24774 Commits

Author SHA1 Message Date
Azox
1287f7443f
FIX ARM IT block ##anal (#17509)
* Fix asm/anal IT block for ARM
* Fix indent + missing spaces
* Fix ARM asm patch breaking test
* Remove forgotten debug printf
* Moved anal patch to separate function anal_ITblock()
* Changed to RIOBind + fix code based on comments
* Fix issue with io/rasm
* Switched to HT, still need to invalidate HT
* Add routine to track and clean ITblock

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2020-09-30 13:45:01 +08:00
Florian Märkl
f56046e32a
Add setters for CC self and error and Tests ##anal (#17704)
* Add setters for CC self and error and Tests ##anal
* Purge sdb_cc on anal purge ##anal
* Add non-nonsensical syntax for self/err CC
2020-09-30 13:39:20 +08:00
Riccardo Schirone
72baf0da5c
Split GROUP RCmdDesc and regular ones ##newshell (#17726)
* Convert R_CMD_DESC_TYPE_GROUP to INNER

* Avoid confusing "group_" prefixes by splitting cmddesc ##newshell

Create "group" command descriptor and give them their own help, to avoid
dupping fields such as group_summary, group_args_str, etc. By having a
separate help structure for the grouping node we make the cmd_api code
easier because it doesn't need to distinguish between
group_summary/summary, group_args_str/args_str, etc. and we avoid few
bytes for each command descriptor help structure, since most of them
did not use group_* fields.

* Other simplification in cmd_api due to split GROUP/exec cb.

* Handle R_CMD_DESC_TYPE_GROUP in r_cmd_call_parsed_args
2020-09-30 13:38:30 +08:00
Khairul Azhar Kasmiran
0e1fa7c341
Do partial =h test on Windows (without /cmd and using curl) (#17729)
* Properly default http.root on Windows
* Do partial =h test on Windows (without /cmd and using curl)
2020-09-29 21:23:26 +08:00
Damien Zammit
56fb85bff4
Revert "r2sdb: Install executable" (#17724)
This partially reverts commit 2a0d8fbe5926a50588c81833e73d403b04cff139
Fix meson warnings.
2020-09-29 11:22:43 +02:00
Jing Xia
b3c0e42426
Fix inverted help for /ai and /aI ##doc (#17719) (#17725) 2020-09-29 11:21:00 +02:00
phakeobj
1aba692eb6
Treat error as a format string instead of a string literal (#17731) 2020-09-29 12:36:59 +08:00
Aswin C
45c0024300
Rename asm.var.sub to asm.sub.var ##cons (#17717)
* Rename `asm.var.sub` to `asm.sub.var`
* Rename tests for `asm.var.sub`
2020-09-28 17:51:38 +08:00
Florian Märkl
8fea09e21d
Use Ht instead of SDB for pcache ##io (#17716) 2020-09-27 12:22:18 +02:00
Khairul Azhar Kasmiran
9100440fae
Fix possible use of dangling pointer due to calling r_anal_pin_fini() followed by r_anal_pin_init() (#17720) 2020-09-27 12:21:50 +02:00
Florian Märkl
3f81a40844
Kill RIODesc.obsz ##io (#17715) 2020-09-27 10:01:23 +02:00
pancake
aa7de006e6 Fix TinyCC build ##build 2020-09-27 13:33:26 +08:00
Florian Märkl
ae0b5e503f
Purge Pins on r_anal_purge ##anal (#17703) 2020-09-27 12:39:50 +08:00
Khairul Azhar Kasmiran
d74ecd12b7
Unbreak =h tests (#17714) 2020-09-26 18:53:24 +08:00
Riccardo Schirone
73ebe78f94
Mark =h test on darwin as broken, it fails for now (#17713) 2020-09-25 23:18:38 +08:00
Riccardo Schirone
c7b3dc9e65
Remove sig_t because not used (#17712) 2020-09-25 15:37:33 +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 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9

* 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
Riccardo Schirone
83d3e7bf18
Mark tests as broken until properly fixed (#17711)
* Mark http test as broken until properly fixed
* Fix return type of `signal`
* Mark V850 pseudo test as broken

Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-09-25 17:30:29 +08:00
Riccardo Schirone
ea7da3366b
Add parse_v850_pseudo to meson build (#17710) 2020-09-25 16:51:03 +08:00
pancake
664df15f2f
Fix race condition in http server test (#17705) 2020-09-24 18:33:54 +02:00
pancake
e28ce2990d
Implement the v850.pseudo RParser plugin ##disasm (#17687) 2020-09-24 17:56:16 +02:00
Riccardo Schirone
9b59074787
Automatically group sub-commands ##newshell (#17663)
* Add GROUP RCmdDesc type and fix where the args_str is shown
* Adjust color of `[?]`
* Differentiate between cmd<?> and cmd[?]
<?> when cmd is not valid by itself
[?] when cmd is valid but there are also other sub-commands available
* Fix usage for commands like `w` that are both commands and groups
* Do not automatically switch to detail=2 for leaf commands
* Fix test due to change in `?`/`??` behaviour
2020-09-24 17:50:52 +02:00
pancake
46aff1ec53
Implement ab./ablj/abl,/ablq - list all the basic blocks ##anal (#17680) 2020-09-24 17:23:23 +02:00
pancake
7c76d85031 Add tests for RTable using r2 commands 2020-09-24 17:19:25 +02:00
pancake
e13753e6d0 Support strings in /ne/ and /eq/ RTable.filter ##util 2020-09-24 17:19:25 +02:00
pancake
6ce78c6149 Implement /head, /tail and /page in RTable API ##util 2020-09-24 17:19:25 +02:00
pancake
43ff1e4189 Support boolean columns in RTable ##util 2020-09-24 17:19:25 +02:00
pancake
454d7ada78 Support :simple in RTable.tostring() ##util 2020-09-24 17:19:25 +02:00
pancake
f71ec729ba
Always register the derived CC from the reg profile ##anal (#17685) 2020-09-24 17:17:15 +02:00
Damien Zammit
2a0d8fbe59
Install r2sdb, detect R2_HOME_SDB_FCNSIGN for r2extras custom CC ##build
* cc: Add autodetection for R2_HOME_SDB_FCNSIGN new location of custom calling conventions
* Fix r_file_exists not expanding tilde path
* r2sdb: Install executable
2020-09-24 12:26:53 +02:00
Florian Maerkl
8842de91e5 Kill RAnal.sdb_fcns because it is unused now ##refactor 2020-09-24 12:12:42 +02:00
Florian Maerkl
5e50ed7f11 Remove noperational axt for vars ##refactor 2020-09-24 12:12:42 +02:00
Florian Maerkl
e6cefa903a Directly apply Callee Args in Type Matching ##anal 2020-09-24 12:12:42 +02:00
pancake
63803c57dd
Fix scrolling with L in mini graph mode ##visual (#17700) 2020-09-24 09:47:54 +02:00
phakeobj
89e1618e3c
Fix #17353 - Remove duplicated implementation of uleb128 in mach0 ##bin (#17489) 2020-09-24 09:47:23 +02:00
Alexis Ehret
ec6a52e8a9
Fix 3 lgtm warnings (#17465) 2020-09-24 09:37:41 +02:00
Khairul Azhar Kasmiran
2293d29308
x86 cmp/sub: Properly generate esil for bitsize of 64 ##anal (#17665)
* x86 cmp/sub esil: Support bitsize of 64
* Fix pij tests
* Don't shift if bitsize is 0
* Don't esilprint anything if bitsize is invalid
* Use %u instead of %d
* Check whether bitsize is 0
2020-09-24 12:14:43 +08:00
Florian Märkl
022324029d
Add Global Import API (#17692)
* Add Tests and Make it strict
2020-09-24 02:15:22 +02:00
Riccardo Schirone
13ca72df81
Make sure $( is always considered as cmd substitution ##newshell (#17699)
Sometimes argument could be "value$", but this commits ensures that if
the argument is "value$(...)", then `$(...)` is considered as a
cmd_substitution_arg.
2020-09-23 21:43:36 +02:00
GustavoLCR
22468fdc0a
Support demangling MSVC managed pointer types ##bin (#17694)
* Demangle __clrcall calling convention
* Transform a giant macro to a function for sanity sake
* Add tests
2020-09-23 16:40:10 +02:00
Khairul Azhar Kasmiran
6511ec9cd9
Test =h on Linux (#17697) 2020-09-23 20:09:21 +08:00
Riccardo Schirone
ac6bdc1e7e
Add support for additional cmd_identifiers ##newshell (#17696) 2020-09-23 14:01:24 +02:00
Florian Märkl
78e30b3ac7
Refactor Variable Constraints out of SDB ##anal (#17693) 2020-09-23 09:40:39 +02:00
pancake
19f941509b
Fix rasm2 -L bits field for 4 and 0-bit plugins ##asm (#17686) 2020-09-23 13:31:56 +08:00
Florian Märkl
1c485e8bfc
Rename r_sign_anal_additem to r_sign_add_item and add r_sign_get_item ##signatures (#17691) 2020-09-22 14:09:17 +02:00
pancake
c9e98e4645
Implement tcc-* commmand to unload all calling conventions ##anal (#17688) 2020-09-22 10:03:37 +02:00
Anton Kochkov
b905e7a3b0
Fix forward declaration of RCore (#17689) 2020-09-22 09:40:06 +02:00
Riccardo Schirone
478ba6eb25
Do not let ASAN crash on large allocations (#17683) 2020-09-21 23:00:10 +08:00
junchao-loongson
ca9b6ac1a0
Set asm.cpu for mips.gnu derived from the ISA defined in the ELF ##bin (#17555) 2020-09-21 16:58:07 +02:00
Aswin C
61a1e15af5
Fix rj and add tests (#17682) 2020-09-21 16:17:33 +02:00