Commit Graph

676 Commits

Author SHA1 Message Date
pancake
f8a35da205
Dont use != NULL as its implicit in C, even for bool casts ##refactor
$ find binr libr -name "*.c" -exec sed -i -e 's/ != NULL//g' {} \;
2022-03-15 19:54:04 +01:00
Lazula
d507bda91c Remove R_EMPTY and R_EMPTY2 2022-03-13 11:26:10 +01:00
pancake
63d4172d94
Fix last covs, mainly memleaks and update one test 2022-03-11 13:14:46 +01:00
Lazula
619d9cb8cc
Add ddf command ##debug 2022-03-10 07:47:30 +01:00
Lazula
90ce9c795e
Fix dd command and update tests accordingly ##debug
* Add quotes around filename for dd command
* Account for string argument size in r_core_syscall()
* Fix command comments for dd
* Use a constant static stack size in r_core_syscall()
* Allow passing an address of the filename in memory for dd
* Change consumeBuffer() to print_buffer_hex()
* Improve dsue error message
* Update egg tests
* buf ownership is transferred to egg, dont free
2022-03-09 10:20:49 +01:00
pancake
7b52e66c9c Skip wired-to-ground registers in dr= ##debug 2022-03-07 17:18:53 +01:00
pancake
a46f5e291f Fix drj in debug mode ##debug 2022-03-07 17:18:53 +01:00
Sergi Àlvarez i Capilla
36f161f207 Fix #19617 - Use PJ in dij ##json 2022-02-11 23:18:54 +01:00
pancake
f2995c2949
Introduce r_strf and stop using sdb_fmt ##util 2022-01-18 18:35:31 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
Lazula
2255bf8b5d Many indentation style fixes
* Change several 8-space indents to tabs
* Apply tab indent style when breaking long lines
* Move operators from EOL to start of next line
* Fix ternary formatting
2021-11-18 10:43:52 +01:00
pancake
93f6b4cd3b
Initial work towards supporting mingw32/64 again ##build 2021-10-18 23:58:16 +02:00
Antoni Viciano
88d8b622bf Fix #19094 - RBinOptions renamed to RBinFileOptions 2021-10-10 20:52:46 +02:00
pancake
eb8e8a6503 Add 'dir' command as an alias for 'ls' ##shell 2021-10-09 03:26:47 +02:00
Lazula
d1631b8d34 Multiple alias improvements
* Add proper hashtable functions in RCmdAlias to prevent memory leaks
* Fix off-by-one error in alias name processing
* Don't allow 0-length aliases
* Fix memory leak in r_cmd_alias_set_raw() when malloc fails and add
  null checks to other alias set functions
* Document intended use of strlen() result for buffer size
2021-10-06 22:24:42 +02:00
pancake
704bf823d1
Cleanup and boolify some more debug apis ##refactor 2021-10-04 20:56:34 +02:00
Lazula
25fc71570c Overhaul alias system
Aliases now use a hashtable. Aliases are now either commands or data.
Data aliases may be strings or raw bytes.

* Expand alias API
* Remove remote aliases - remote commands can still be aliased normally
* Update alias help text
* Fix an alias test and add new tests
* Add r_str_escape_raw() for null-safe escaping of unprintable characters
* Remove command to print alias without newline
* Fix dif command opening files as strings
2021-10-04 09:30:37 +02:00
pancake
9a2636b32b
Remove other useless and incomplete treesitter leftovers and get +400 new commands in the recursive help ##shell 2021-08-14 18:28:20 +02:00
gogo
130c220792 Add 'sigstr' to the 'di' output for verboser stop reasons ##debug 2021-07-17 13:00:21 +02:00
pancake
188bce9f25 Use DRX APIs to handle breakpoint recoils only on x86-64 ##debug 2021-06-29 11:56:55 +02:00
pancake
f7d3ec4fc4 Fix dsui help message 2021-05-16 18:46:29 +02:00
pancake
ee08bc7600 Implement aeis to initialize argc, argv and envp for emulation ##emu
* Only for 64bit systems for now, it's easy to switch to 32bit
2021-05-13 00:37:42 +02:00
pancake
4ae7cef832 Add dxe? help, improve parsing and few egg boolification 2021-05-04 12:51:09 +02:00
pancake
33ddd84593
Show string version of the stop reason in di ##debug (#18649) 2021-05-02 19:34:46 +02:00
Anthoine Bourgeois
752ddf6a46 debug: Do not print 0 on unknown register
Fix CI linux-test.

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
2021-04-24 21:58:09 +02:00
pancake
ed8a150867 Fix null printf issue in arpi command ##reg 2021-04-11 01:38:25 +02:00
pancake
3231c0d585 Initial working implementation of =RS 2021-04-11 01:38:25 +02:00
pancake
fd1484525a
Implement drcq and show it in visual debug/emu ##debug (#18519)
Co-authored-by: pancake <pancake@nopcode.org>
2021-03-31 19:26:19 +02:00
pancake
9f23cf7378 Fix #18502 - dangling pointers issues in dbm ##debug 2021-03-29 21:25:20 +02:00
pancake
a001a33a72 Fix #18510 - json assert in drtj 2021-03-29 19:44:56 +02:00
pancake
45caf760a6 Revert "dmi commands handle symbols, exports, main, entries too ##debug"
This reverts commit e82f3d7fcb.
2021-03-15 04:00:00 +01:00
pancake
894bc43ea9 Use more r_str_ncpy and improve it to not alloc beyond nullbyte ##api 2021-03-15 02:24:16 +01:00
pancake
14e4e84ee3 Fix oobread in dcu 2021-03-15 02:24:16 +01:00
Khairul Azhar Kasmiran
ded1bafab3 Fix some uninitialized and minor memleak issues 2021-03-15 02:24:16 +01:00
pancake
08b3dc0ea9 Honor cfg.debug in asm.section using dmi. ##disasm 2021-03-14 18:54:01 +01:00
pancake
e82f3d7fcb dmi commands handle symbols, exports, main, entries too ##debug 2021-03-14 18:54:01 +01:00
pancake
402be564e1 Implement dmis command as an alias for .dmi* ##debug 2021-03-14 18:54:01 +01:00
pancake
f46683f6be Workaround the dmi issue by using rabin2 in macOS for now ##debug 2021-03-14 18:54:01 +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
47358feb6d Improve reg profile parsing and error handling ##anal 2021-03-02 00:08:14 +01:00
GustavoLCR
ed208edcd9 Put registers in their own flagspace 2021-02-06 03:30:53 +01:00
ChD1
6187be3be6
Fixes in ae command handler and some null derefs (#18307) 2021-01-29 19:49:41 +01:00
Liumeo
a79bf446fa
Use pj in debug ##refactor (#18270) 2021-01-24 16:07:30 +01:00
pancake
08d7fe688c Implement RTable:sql and add RTable.name ##core 2021-01-15 10:56:58 +01:00
Liumeo
0d49da05b7
Use pj in dbtj ##refactor (#18230) 2021-01-14 17:29:27 +01:00
Liumeo
a74ca8f07b
Remove core.file ##refactor (#18178) 2021-01-06 23:44:18 +01:00
eagleoflqj
cd3ac9e2f2 Use pj in cmd_anal.c ##refactor 2021-01-06 00:03:44 +01:00
Aswin C
ef4c9b603d Add internal help for arS and drS 2021-01-03 10:11:04 +01:00
eagleoflqj
2879c582af Use pj in cmd_info.c ##refactor 2021-01-03 01:24:58 +01:00
pancake
b69355bb84
Fix #18136 - Remove RBin.is_debugger and use cfg.debug (#18146) ##refactor 2021-01-01 22:48:02 +01:00