condret
251fef7571
Fix io bank cmp cb functions ##io
2021-10-21 02:12:43 +02:00
condret
6fd6a8d4ca
Refix r_io_submap_set_to (typo) ##io
2021-10-21 02:12:43 +02:00
Sergi Àlvarez i Capilla
2296a570a2
Fix the macOS ci
2021-10-19 21:27:17 +02:00
condret
428ccf5786
Fix a few bugs in io banks
2021-10-19 13:17:37 +02:00
pancake
3548e2e8a4
Final mingw fixes
2021-10-19 12:52:00 +02:00
pancake
93f6b4cd3b
Initial work towards supporting mingw32/64 again ##build
2021-10-18 23:58:16 +02:00
condret
dbc39ee5d6
Enable io bank support in r_io_map_resize ##io
2021-10-17 17:21:24 +02:00
condret
889912681c
Kill r_io_map_location ##io
2021-10-17 16:21:50 +02:00
condret
0629f9ffaf
Enable io bank support in r_io_nread_at ##io
2021-10-17 03:30:47 +02:00
condret
d0d56a7f94
Implement r_io_bank_{read_from/write_to}_submap_at ##io
2021-10-17 03:13:23 +02:00
condret
abeb3b134c
Enable io bank support in r_io_v{read/write}_at ##io
2021-10-16 23:53:33 +02:00
condret
aa10b78aa9
Enable io bank support in r_io_map_depriorize ##io
2021-10-16 22:47:24 +02:00
Sergi Àlvarez i Capilla
12cbc9617f
Implement new r_io_desc_get_byuri() API ##io
2021-10-16 15:07:25 +02:00
pancake
c6c9f4fbce
Fix some null checks around the open_many apis ##bin
2021-10-16 14:36:08 +02:00
condret
183ecea354
Enable io-bank support in r_io_map_get_paddr ##io
2021-10-15 02:53:18 +02:00
condret
16c569070c
Enable io-banks for r_io_map_del_for_fd ##io
2021-10-15 01:36:00 +02:00
condret
e356d4e196
Fix return value in io_default close entry ##io
2021-10-12 23:54:02 +02:00
condret
220f56881d
Fix resource leak and logic bug in r_io_reopen ##io
2021-10-12 23:44:53 +02:00
Sergi Àlvarez i Capilla
d6e6609617
Make the macOS debugger more stable ##debug
...
* Fix random spawn error
* Fix ood regression
2021-10-12 21:53:23 +02:00
Lazula
d12be9e614
Fix new defects and an overread
...
* Fix global variable overread in r_str_ss()
* Fix memory leak in grep ASCII art ~?ea
* Fix memory leak in @%
* Fix use-after-free in r_io_bank_del_map()
2021-10-12 21:53:05 +02:00
Sergi Àlvarez i Capilla
4020dfe52a
Fix reopen regression on Windows
2021-10-12 20:24:32 +02:00
condret
53a20c0344
Check for access bytes in r_io_bank_{read/write}_at ##io
2021-10-11 22:06:59 +02:00
condret
81410c1e1d
Enable io-banks support in r_io_map_remap ##io
2021-10-10 19:17:14 +02:00
pancake
dfd67eb444
Fix zero index on null deref on bank init spotted by latest clang
2021-10-10 12:14:47 +02:00
condret
87a38708e0
Enable io-bank support in r_io_map_new ##io
2021-10-10 00:04:10 +02:00
condret
814ebb9f68
Kill r_io_map_add_batch ##io
2021-10-09 22:52:06 +02:00
condret
1c3c768f0a
Remove unnecessary return val from r_io_map_del ##io
2021-10-09 21:14:38 +02:00
condret
7b514b66bf
Enable io-bank support in r_io_map_del ##io
2021-10-09 20:44:15 +02:00
condret
82ebbac993
Rename r_io_map_next_available to r_io_map_locate and add use_banks support ##io
2021-10-09 03:20:49 +02:00
condret
f65be8067f
Kill r_io_map_next_address ##io
2021-10-08 23:26:18 +02:00
condret
2ebf4680e0
Improve r_io_bank_locate for replacing r_io_map_get_next_available ##io
2021-10-08 22:51:23 +02:00
Lazula
0747bcd8e2
Fix new defects in various files
...
* Remove unnecessary NULL check in __demangleAs()
* Remove unnecessary NULL check in r_io_fd_seek()
* Add missing break in ARM32 COFF case and fix test
* Add missing NULL checks for r_io_bank_get() result
* Add missing NULL checks in r_bin_demangle()
* Add missing NULL check for r_io_submap_new() result
* Fix improper failure check in risv_assemble()
* Add missing break in open command
* Document fall-through case in dalvik anal
2021-10-08 01:31:17 +02:00
condret
c6929b6231
Add alignment support to r_io_bank_locate ##io
2021-10-08 01:26:08 +02:00
condret
4c9f466b7c
Fix r_io_map_del_name ##io
2021-10-08 00:05:30 +02:00
condret
4b05dfda99
Add r_io_bank_get_map_at and enable banks in r_io_get_map_at ##io
2021-10-07 22:24:50 +02:00
condret
bf29366140
Add 2 comments for clarification ##io
2021-10-06 23:41:27 +02:00
pancake
704bf823d1
Cleanup and boolify some more debug apis ##refactor
2021-10-04 20:56:34 +02:00
pancake
690f6e6f8f
Boolify RIO.close() ##refactor
2021-10-04 14:47:22 +02:00
condret
0353cdcf5f
Implement map depriorization in io banks ##io
...
* Add r_io_bank_map_add_bottom and r_io_bank_map_depriorize ##io
* Fix potential bug in r_io_bank_update_map_boundaries and add some comment for clarification ##io
2021-10-01 14:54:24 +02:00
condret
ed311e825f
Some cleanup and code deduplication ##io
2021-09-23 16:54:33 +02:00
condret
128071b3dc
Fix oob write in r_io_bank_{read/write}_at ##io
2021-09-23 13:15:54 +02:00
pancake
199976b926
Initial io.banks management commands ##io
2021-09-22 16:44:54 +02:00
condret
d62207bce0
Rename r_io_bank_update_map_location to r_io_bank_update_map_boundaries and make it useable for map resize (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
1e2dc7b6cd
Some code cleanup (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
63cbd4a81a
Fix Build
2021-09-20 22:10:08 +02:00
condret
6a972665de
Use incremental timestamp on map creation instead of real ones (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
b64fd4bcd3
Implement r_io_bank_update_map_location (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
442838915f
Use r_list_iter_get_prev (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
a8e8d0c978
Implement r_io_bank_delete_map and fix some bugs (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
326f9fcbc4
Add r_io_bank_drain (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
8bb3e35387
Implement r_io_submap_set{from/to} (siol_eternal) #18476 ##io
2021-09-20 22:10:08 +02:00
condret
f2a7efed7d
Implement r_io_bank_write_at (siol_eternal) ##io
2021-09-20 22:10:08 +02:00
condret
c7c906a0fb
Implement r_io_bank_read_at (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
f1639310d9
Constify bankid and mapid in io-bank api (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
0dce1c7be5
Imnplement r_io_bank_map_priorize (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
ea64077b0b
Speedup r_io_bank_map_add_top (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
dbf531716a
Add missing NULL-check (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
2f9a20d090
Fix potential segfault (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
8b337b68f8
Adjust codingstyle in libr/io/io_map.c (siol eternal) ##io
...
Co-authored-by: pancake <pancake@youterm.com>
2021-09-20 22:10:08 +02:00
condret
6a33e28c3e
Implement r_io_bank_locate (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
4caa7849f1
Implement r_io_bank_map_add_top and r_io_bank_get (siol eternal) ##io
2021-09-20 22:10:08 +02:00
condret
9729c8da04
Implement r_io_bank_{free,init,fini] (siol_eternal) ##io
2021-09-20 22:10:08 +02:00
condret
d3a19f0b0a
Update r_io_map_get_by_ref (siol_eternal) ##io
2021-09-20 22:10:08 +02:00
condret
72f7b019c2
Start implementing RIOBank and RIOSubmap ##io
2021-09-20 22:10:08 +02:00
pancake
4d2be3830f
Initial import of the isotp:// plugin ##io
2021-09-16 12:53:23 +02:00
Dennis Goodlett
1d747fa371
Fix potential fault in the ar:// plugin ##io
2021-09-13 22:47:13 +02:00
Dennis Goodlett
cfbfcd8985
Fix const clobber in ar ##io ( #19072 )
2021-09-12 23:42:27 +02:00
pancake
fd8e97034b
Expose r_w32_
function APIs instead of global symbols ##windows
...
* This fixes some long standing bugs related to linker problems
2021-08-27 03:03:34 +02:00
pancake
ba375f5702
Code cleanup, somewhat related to windows code
2021-08-27 03:03:34 +02:00
pancake
e696780474
gzip:// write warning only appears when memory buffer has changed
2021-08-23 14:06:30 +02:00
pancake
5fce24f764
Fix #19006 - Fix io.cache crash by improving boundary checks ##io ( #19008 )
2021-08-23 13:02:18 +02:00
pancake
2898ee436e
Fix io-r2k build on non-mainstream OSs
2021-08-20 16:01:02 +02:00
pancake
701363f61c
Fix io.gprobe build on some broken systems with missing definitions
2021-08-20 14:44:33 +02:00
pancake
9525cb90b1
Add portability support for Vinix ##build ( #18997 )
2021-08-19 12:25:50 +02:00
pancake
67b8af8f5b
Fix the windows debugger and make it more stable ##debug
2021-08-18 01:41:30 +02:00
pancake
bd888a2edf
Fix more vs warnings
2021-08-17 00:35:52 +00:00
pancake
0acb19b68a
Fix some warnings spotted by visual studio ( #18985 )
...
Co-authored-by: pancake <pancake@nopcode.org>
2021-08-16 20:45:17 +02:00
pancake
bbd1ee11f3
gprobe probably needs to use HAVE_PTY instead
2021-07-07 19:49:04 +02:00
pancake
190d809466
Use dynamic api resolution on windows builds for better portability ##windows
...
* Single implementation in r_util, used across io and debug
2021-06-21 23:09:14 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build
2021-06-20 17:14:43 +02:00
pancake
8c01a26f78
io.plugin.lseek -> .seek for portability (wasi related) ( #18840 ) ##io
...
API/ABI breaks
2021-06-17 18:47:55 +02:00
gogo
6b7c15ce0a
refactor WIFSTOPPED
2021-06-12 04:43:50 +02:00
gogo
49ecf27bf9
refactor even more
2021-06-12 04:43:50 +02:00
gogo
1b876ccdfd
refactor fork_and_ptraceme_for_unix
2021-06-12 04:43:50 +02:00
gogo
14454aa477
message 'process with pid started' removed
2021-06-12 04:04:55 +02:00
pancake
b545c72017
Better handling of HAVE_SYSTEM, PTY, FORK, DYLINK and THREADS ##build
2021-06-10 13:52:29 +02:00
pancake
f6b35eec47
Use r_sys_getpid() for source portability whetever getpid() is called ( #18809 )
2021-06-07 17:32:37 +02:00
Sergi Àlvarez i Capilla
99587dfb61
Fix oobread in io.r2k.linux plugin
2021-05-31 00:32:06 +02:00
pancake
fa7f54a08c
Add rafind2 -L to list IO plugins (same as r2 -L) ##tools ( #18771 )
2021-05-28 13:02:12 +02:00
pancake
46ec83c5a0
Add use_cgen meson option ##build ( #18766 )
2021-05-27 23:56:28 +02:00
pancake
e96de87e90
Fix last covs
2021-05-25 11:46:01 +02:00
pancake
7de0a602bf
Implement socket:// plugin, inspired by radare1 ##io ( #18740 )
2021-05-24 14:16:23 +02:00
pancake
6f0dd19157
Rename tcp:// to tcp-slurp:// and improve help message ##io ( #18735 )
2021-05-23 21:11:39 +02:00
pancake
f10d767282
Fix assert in 'r2 -qc 'omp rwx' -
2021-05-20 02:25:23 +02:00
pancake
f47f58d8f4
Fix last covs ( #18674 )
2021-05-11 14:49:48 +02:00
pancake
57a9926b1f
Remove globals in cons/grep and random cleanup ( #18671 )
2021-05-10 11:56:08 +02:00
pancake
a8238d3e37
Add io.cache.nodup to not write the same bytes in the cache ##io
2021-04-24 22:40:51 +02:00
pancake
0f5a7ce45f
Fix non-null terminated bug in io.winedbg
2021-04-21 13:22:37 +02:00
pancake
f98bdc775f
Add dbg.wrap for changing want_ptrace at runtime ##debug ( #18607 )
2021-04-21 12:07:01 +02:00
pancake
b5e262a6b9
Linux debugger improvements
2021-04-19 17:28:42 -07:00
pancake
71dc8b715c
Move shlr/ptrace-wrap into libr/io, simplify build ( #18587 )
2021-04-16 19:19:56 +02:00
pancake
476efd4d2f
Improve error reporting in winkd://
2021-04-10 23:43:24 +02:00
pancake
2ab0934784
Dont build the QNX IO plugin if built without GPL support
2021-03-19 17:41:01 +01:00
pancake
990d6c9855
Use snprintf instead of sprintf in io.debug for linux
2021-03-18 03:28:15 +01:00
pancake
73f220f22d
Update doc/license for more clarifications ##build
...
* Orphaned shlr/arm/omap3430 script moved to extras
* Unified json format for r2 -Lj
* Update QNX io plugin to GPL until clarified with the author
2021-03-17 12:56:38 +01:00
condret
116997df03
Close #18257 / Remove RIODescData ##io
2021-03-16 01:22:16 +01:00
pancake
7ff2673dd9
Random uninitialized variable uses fixups ( #18453 )
2021-03-15 02:23:39 +01:00
pancake
285ec16b4e
io/p/io_zip: fix NULL deref when opening unknown zip ( #18455 )
...
Co-authored-by: Riccardo Schirone <sirmy15@gmail.com>
2021-03-14 22:45:17 +01:00
pancake
80f861a71d
Implement custom bit size cyclic memory layout and wrap flags in ##io ( #18417 )
...
* Repeated maps dont have executable permissions
* This is used on s390, ARMv4 (and lower) and some v850
* Added some basic tests
2021-03-14 16:55:57 +01:00
condret
1fae2164cb
Rename r_io_map_get_for_fd to r_io_map_get_by_fd ##io
2021-03-12 20:52:45 +01:00
condret
4f67157ff5
Rename r_io_map_resolve to r_io_map_get ##io
2021-03-12 17:56:46 +01:00
condret
eb48818342
Rename r_io_map_get to r_io_map_get_at ##io
2021-03-12 17:56:46 +01:00
pancake
1599371f75
Implement slurp:// uri handler plugin ##io ( #18424 )
...
* Same as oom but without the extra step
2021-03-08 12:08:39 +01:00
pancake
f07bedfacd
Use proper types in some fields in IO to fix some potential issues
2021-03-04 18:32:59 +01:00
pancake
4d0aa7e9b7
Fix infinite loop in r_io_map_next_available ##io
2021-02-26 22:13:36 +01:00
pancake
a350c2cd3b
Add help message for winkd://? and improve desc ##io
2021-02-14 03:19:24 +01:00
Alexis Ehret
5b1b0c0da6
Fix dead increments
2021-01-25 00:34:58 +01:00
pancake
7c5f1a88a1
Fix warning
2021-01-13 01:31:59 +01:00
eagleoflqj
2718385ede
Reuse code in memory-based io plugins ##refactor
2021-01-13 01:22:42 +01:00
Dennis Goodlett
528e6598a1
Add arall:// and liball:// open_many plugins #io ( #18196 )
2021-01-10 17:34:38 +01:00
Dennis Goodlett
f695d2a24f
Fix and refactor the ar:// plugin ##io ( #18180 )
...
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2021-01-07 10:23:08 +01:00
Liumeo
06b735441d
Fix memleak in test_anal_block & test_io ( #18153 )
2021-01-02 09:37:23 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) ( #18077 )
2020-12-21 01:10:22 +01:00
pancake
aaa930ab26
Improve and formalize r_name_check() along all the base ##core ( #18020 )
2020-12-16 14:49:50 +01:00
Lazula
243bc871c3
Multiple refactors in io and util ##io ##util ##refactor
...
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
pancake
7df28e1fb2
Implement the comma command to manage user-defined tables ##util ( #17702 )
...
* Import export in CSV and R2 formats
* Export in JSON, ascii-art, columns, r2, ..
* For example: aaa;aflt>$a;,.$a,/size/sum
2020-12-09 03:39:49 +01:00
pancake
4f5434bc89
Minor cleanup and fix uninitialized PJ usage warning in io_cache.c ( #18007 )
2020-12-08 16:55:11 +01:00
GustavoLCR
203878e60e
Optimize io.cache ##io ( #17952 )
...
* Add RSkyline ##util
* Add `r_vector_len()`
* Optimize io.cache ##io
* Use RSkyline instead of RList
* Add cache skyline for faster reads
* Use PJ API in `wcj`
* Add test and fix
2020-11-23 12:36:32 +08:00
Anton Kochkov
5da1b3b076
Fix some warnings
2020-11-16 18:56:21 +08:00
Liumeo
26919b37f9
Fix ARM64 format warnings ( #17914 )
2020-11-11 10:12:16 +08:00
yossizap
ab38a9eb55
Fix not being able to return from debug when using WinDbg(DbgEng) ##debug
2020-11-10 12:22:09 +08:00
Anton Kochkov
aaccc09828
Variadic argument fixes
2020-11-10 11:11:45 +08:00
condret
965b0fa4e0
Implement first/last/next/prev fd APIs ##io
2020-11-01 11:33:31 +01:00
pancake
d08ea37ae9
Code cleanup in R_IO
2020-11-01 11:33:31 +01:00
GustavoLCR
0ca7d6c3c1
Add RIO on write event ##io
2020-11-01 02:12:14 +01:00
Roman Hargrave
5aff070b0f
Make use of dbg.args on *nix and macos ( #17846 )
...
As with the windbg implementation of fork_and_ptraceme, this checks for
the presence io->args and appends them to the child command before
invoking it.
The primary purpose of this fix is to make argument-passing possible
when using Cutter to debug programs, as Cutter sets dbg.args in order to
pass user-provided arguments to the child task. Presently, this does not
do anything on *nix platforms, greatly limiting Cutter's usefulness
insofar as debugging.
2020-10-26 13:56:59 +08:00
GustavoLCR
623c4819d6
Fix some warnings in WinDBG plugin ( #17784 )
2020-10-14 14:51:11 +08:00
Riccardo Schirone
1e58692071
Fix incorrect uses of printf-like functions ##refactor ( #17648 )
2020-10-13 16:26:15 +02:00
Riccardo Schirone
741d22ed61
Use -Werror when building in CI ( #17781 )
2020-10-13 12:42:57 +02:00
Florian Märkl
8fea09e21d
Use Ht instead of SDB for pcache ##io ( #17716 )
2020-09-27 12:22:18 +02:00
Florian Märkl
3f81a40844
Kill RIODesc.obsz ##io ( #17715 )
2020-09-27 10:01:23 +02:00
pancake
62c2128b6f
Better use of the R_SOCKET_PROTO_DEFAULT and add _NONE ( #17644 )
...
* Better use of the R_SOCKET_PROTO_DEFAULT and add _NONE ##http
* Fix regressions in: r2 -C and =+ ##r2pipe
Introduced in 04edfa82c1
* Implement sleep command ##shell
* Add tests for the webserver and remoting
* Implement daemon directive in rarun2, fix http test ##rarun2
* Fix socket timeout on Windows (patch by @GustavoLCR) ##socket
* Missing http.root is not a reason to not start the webserver ##http
* Fix r2 -C, =!=0, replace curl with r2 in the webserver test ##http
* Honor anal.in/from/to in aae, optimize db/formats/mach0/thumb ##anal
* Bug fixes and performance improvements
Co-authored-by: pancake <pancake@nopcode.org>
2020-09-25 19:51:23 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local ( #17639 )
2020-09-15 09:16:14 +02:00
GustavoLCR
443fc06500
Fix wrong calling convetion in io_windbg.c ( #17570 )
2020-09-01 17:02:08 -05:00
pancake
b5b2daf69a
Fix warning not addressed in cef191cde3
( #17456 )
2020-08-26 11:01:56 +08:00
Zi Fan
0ba897f5c9
Add network support for WinDbg/KD (KDNET) ##debug ( #17340 )
...
* Add network support for WinDbg/KD (KDNET) ##debug
* Add iob_net io_backend plugin for shlr/winkd
* Add Windows 10 (May 2019 Update) build 18362 profile
* Add r_hash_do_hmac_sha256 function to r_hash
* Change r_socket_connect to bind source port for UDP connection
2020-08-26 10:24:20 +08:00
GustavoLCR
489538e02b
Add DbgEng based debug backend for Windows ##debug ( #17491 )
...
* Rename `windbg` plugin to `winkd` ##debug
* Add DbgEng based debug backend for Windows ##debug
2020-08-24 19:01:10 +08:00
GustavoLCR
bb3e80c040
Implement pde
to disassemble following code execution ##disasm ( #17410 )
...
* Implement `pde` to disassemble following code execution
* Fix `asm.filter=1` with `scr.color=0`
* Fix cache not being used
* Share read and write file permissions on Windows
* Use CreateFileW in r_sandbox_open on Windows and fix file permissions
* Fix opening nul and O_RDWR
* File creation flags cannot be combined on Windows
* Share write in r_file_mmap_windows
2020-08-13 10:05:38 +08:00
David CARLIER
9ebbdd64ec
Enable is_pid_already_attached for NetBSD ##io ( #17457 )
...
Similar interface as OpenBSD
2020-08-13 09:55:54 +08:00
Anton Kochkov
5d5f8b6c69
Add missing PTRACE_GETSIGINFO for old glibc ( #17416 )
2020-08-08 01:39:15 +08:00
David CARLIER
2a00f5fee1
io_self: giving more meaningful mapping names when possible ##port ( #17382 )
...
using libproc to get proper mapping names to match better Linux version.
2020-08-03 12:37:38 +08:00
GustavoLCR
cef191cde3
Fix #14024 - Make r_io_map_get() faster ( #17324 ) ##io
...
* Fix O(n) in r_io_map_get() ##io
* Kill `map_skyline_shadow` and `do_skyline`
2020-07-31 10:04:57 +02:00
Zi Fan
ac126508d5
Fix debugger to run debuggee with original environment variables ##debug ( #17116 )
...
* Change `fork_and_ptraceme` to start debuggee with rarun2 profile on Linux & Mac
* Add two new commands `doe` and `doe!` to show and edit rarun2 startup profile
* Fix `r_run_parse` to read last line
2020-07-24 16:25:55 +08:00
pancake
9cc1ce3c80
Fix wrong function signature in io.gdb ( #17318 )
...
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-20 19:38:43 +08:00
Khairul Azhar Kasmiran
d970c64292
Move r2r diffchar code into r_util ( #17316 )
2020-07-20 00:44:27 +08:00
Riccardo Schirone
594b940b7c
Fixes some of the issues in Travis ( #17267 )
...
* Do not check with r_return_ if the convention is present
Let's just assume the NULL default in such a case, so that architectures
for which we don't have a defined calling convention can still be
processed somehow by the analysis code. It won't be precise, but it's
better than nothing.
Also add a warning message so users are aware when the calling
convention is not defined.
* Fix oob-read when # is at the end of the cmd string
* Do not set TMPDIR when the new value is the empty string
When TMPDIR is set to empty value, clang+ld behaves in weird ways and
you cannot compile files from within the r2 shell (e.g. when using #!c
or #!cpipe)
* Use meson and add -lasan to pkgconfig files when sanitizer are used
2020-07-16 20:47:30 +08:00
David CARLIER
74d5a677e1
io_self update DragonFly support and fix one typo. ##libr ( #17274 )
...
Applying patch from Dports.
Using higher level API rather than querying direct fields which are prone to changes.
Original author: @zrj-rimwis.
2020-07-14 21:57:30 +08:00
pancake
cccaf55a6c
Initial implementation of io.fd plugin ##io ( #17158 )
...
Useful for `self://` and r2frida when injecting the lib inside a target process
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-08 11:28:08 +08:00
Riccardo Schirone
d6c9bd4542
Add support for binr/blob and fix android build ##meson ##build ( #17150 )
...
* Make sure meson can build with `system` = `android`.
* Add support for binr/blob in meson build
* Add also r_util as dependency
* Create sdb_version.py to get the SDBVER value from config.mk
* Set unknown sdb version if something fails
2020-07-05 10:53:37 +08:00
David CARLIER
5c71b01097
Support self:// for Solaris ( #17196 ) ##io
...
enabled only on 64 bits unsupported on 32 bits with large files.
missing cfmakeraw function on this platform for socket et cons.
2020-07-03 18:59:24 +02:00
pancake
d47aed440a
Fix covs from 2020-06-29 ( #17184 )
...
* Fix covs from 2020-06-29
* CIDs: 1293553 1408695 1430058 1430059 1430060
1430061 1430062 1430063 1430064 1430065 1430067
* More fixes
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 09:33:38 +08:00
GustavoLCR
043b0183bd
Fixes for windows debugger ##debug ( #17151 )
...
* Fixes memleaks
* Fix compiler warnings
* Fix warning when reopening file as debugger
* Improve exception logging
* Fix inconsistencies killing/restarting a process
* Fix detaching without killing debuggee
* Fix warning when continuing after receiving CONTROL-C
* Expose exception reason for 'di'
* Fix listing opened files with 'dd'
2020-06-30 10:48:08 +08:00
David CARLIER
f56ae25d35
Haiku OS - implement io_self ##libr ( #17164 )
...
Update debug thread wrapper and implement basic io_self plugin
2020-06-29 13:06:07 +08:00
David CARLIER
4d22e92d6d
Haiku build fix proposal ( #17117 ) ##sys
2020-06-27 17:20:43 +02:00
pancake
bd9a604a87
Check for return values in about ~50 method calls ( #17025 )
2020-06-15 11:24:43 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures ( #17026 ) ##refactoring
...
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build ( #17020 )
...
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
pancake
75ee57bfb0
Update SDB with boolified SdbForeachCallback ( #17040 )
2020-06-11 11:25:23 +02:00
Riccardo Schirone
72f97959e8
Fix Tests after Reports by asan ( #16776 )
...
* Fix memory leak in IO
* Fix memory leak in cmd_api
* Remove unused variables in test_table
* Fix memory leak in test_flags
* Fix memory leak in test_list
* Fix memory leaks in test_anal_var
2020-05-08 21:45:01 +02:00
pancake
55f99ba4f4
Fix regression loading large files (>2GB) on 32bit systems ##io ( #16648 )
2020-04-28 22:09:30 +02:00
GustavoLCR
ac5355fb3d
Fixes for windows debugger - ##windows ##debug ( #16717 )
...
* Fix #15937 - Fix debuggee hanging when attaching to it
* Fix `dm` not working for attached processes
* Fix debuggee crashing when opening a file dialog
* Unify RIOW32Dbg and w32dbg_wrap_instance under W32DbgWInst
* Don't signal threads on select, only on continue
2020-04-26 11:54:36 +08:00
Liumeo
cc9b4a0063
Use ut64 in counter for gdb.write via LGTM ( #16672 )
2020-04-22 01:24:40 +02:00
pancake
315050e7ab
Fix last coverities
2020-04-13 23:57:16 +02:00
Disconnect3d
1026faaf01
Fix off by one in "dr*" matching
...
The string literal `"dr*"` has a length of 3 so the strncmp used should have size argument of 3 instead of 2.
PS: I am not sure if this fix is correct but it seems so. If it is not, please close this PR. However, if the fix is incorrect it seems there could be some bug as next `else if` checks for `"dr"` too.
2020-04-13 20:23:17 +02:00
pancake
d0c0cf13a8
Boolify r_io_shift
2020-04-13 20:05:03 +02:00
pancake
54617455de
Initial refactoring of the rap:// protocol (-75 LOC) ##socket ( #16534 )
...
* It's implemented in IO, Socket and Core
* Remove duplicated apis and defines, everything in in RSocket now
* RIO now owns an RCoreBind instead of 3 fcn pointers + 1 void*
* Use proper filenames in libr/socket following public api names
* Use RSocket.block apis in the rap client + server apis
2020-04-12 16:40:55 +02:00
pancake
e9eb1a2ab3
Fix #16432 - openbsd fork+attach EBUSY issue ##debug ( #16505 )
...
* Implement is_pid_already_attached() for OpenBSD
2020-04-11 01:56:50 +02:00
Khairul Azhar Kasmiran
f31e6ca527
Fix #16283 - Continue as normal even if detachee is not found ( #16500 )
2020-04-09 23:07:03 +02:00
Florian Märkl
9a2effd5ed
Use RPVector for io->maps - speedup map traversal ##io
...
- The 64K section bin now loads in 15s instead of 26s
2020-04-07 12:43:41 +02:00
Riccardo Schirone
90d77e2a21
r_buffer: do not move seek when using _at APIs ( #16401 ) ##util
...
This allows to use r_buf_read/r_buf_write to read/write sequentially but
at the same time having random reads/writes in the buffer if needed,
without the need to save/restore the seek every time.
* Fix some uses of r_buf_read_at/write_at that assumed seek change
2020-04-04 10:31:48 +02:00
radare
3f77b9a76b
Avoid duplicated module filenames to fix static.sh ##build ( #16403 )
2020-04-02 14:30:27 +02:00
Florian Märkl
0eb98d24be
Fix all Warnings for GCC 9 ( #16223 )
2020-03-17 13:31:28 +01:00
Florian Märkl
0b5e78e923
Make size arg of r_file_slurp() size_t ( #16221 )
2020-03-15 23:34:38 +01:00
Rikard Falkeborn
158668c876
Fix wrong return value in error path ( #16201 )
...
Returning -1 in a function with bool as return type is the same as returning
true. This is not the intended behaviour when e.g. allocation fails.
2020-03-13 12:13:57 +08:00
radare
72093ac706
Fix #16138 - Do not preincrement when it's not necessary ( #16151 )
2020-03-05 19:06:59 +01:00
radare
5e629a3260
Avoidify the strTrim() APIs + cleanup/refactor ##util ( #16056 )
2020-03-02 21:39:37 +01:00
Paul I
0e62dda341
Fix fgets() usage ( #16068 )
2020-02-29 20:47:10 +01:00
radare
6ae8806411
Do not use the elvis operator for bool expressions ( #16073 )
2020-02-28 15:19:37 +01:00
Anton Kochkov
9ae41ae69f
Revert "Avoidify the RUtil.strTrim() APIs, rename trimHeadTail() and add asserts in RConfig ##refactor" ( #16055 )
...
This reverts commit 38b61c7bcf
.
2020-02-26 09:59:04 +08:00
radare
38b61c7bcf
Avoidify the RUtil.strTrim() APIs, rename trimHeadTail() and add asserts in RConfig ##refactor
2020-02-25 17:53:09 +01:00
pancake
5f82d077eb
When esil.stack.addr is -1 set it to the next unallocated address ##esil
2020-02-24 01:16:14 +01:00
pancake
5677390ca6
Fix #10696 - Kill r_io_map_add_next_available
...
The function is just renamed to be reused and we have no tests for it, but it may fall into an infinite loop
2020-02-24 01:16:14 +01:00
Riccardo Schirone
2ec4a2a92c
Fix memory leak due to not freed uri
2020-02-21 23:58:24 +01:00
dodococo
2c3249c2f3
Fix #15789 : Increment offset for reads as well ( #15865 ) ##io
2020-01-20 17:39:16 -05:00
pancake
35b05d8697
Fix warnings
2020-01-19 17:11:07 -05:00
David CARLIER
7ef9dc813e
Mach-O io: mem leak fix proposal. ( #15829 )
2020-01-17 13:31:09 +08:00
yossizap
f64f2211fb
Added reverse step and continue support to gdbr ##debug
...
This feature only works with server implementations that have ReverseStep
and ReverseContinue enabled, such as rr. The official gdbserver doesn't support it.
2020-01-15 09:49:03 +01:00
GustavoLCR
a5b41b9592
Fix reading on invalid process memory ##windows ( #15743 )
...
This fixes situations that if a read contained even a byte inside invalid memory, the entire read would fail
2020-01-04 01:56:17 +01:00
Anton Kochkov
d5d5cd3bfa
Some coverity fixes ( #15643 )
2019-12-16 04:36:46 -06:00
yossizap
89a5320e5f
Fixed a crash caused by reopening gdb ##debug
...
The plugin would try to work with an old version of desc that was already
freed by r_io_close_all after closing the session. I set debug_gdb's
global 'desc' to NULL in detach as a temporary solution. We should convert
to **desc to keep an updated copy of the pointer.
2019-12-16 01:23:27 +01:00