Commit Graph

255 Commits

Author SHA1 Message Date
Riccardo Schirone
56f88a0e20
Remove INNER nodes and merge inner node with the command with same name (#16784)
* Remove INNER nodes and merge inner node with the command with same name
* Add test
2020-05-11 10:55:49 +02:00
Florian Märkl
edf1be10d1
Refactor Meta out of SDB (#16716) 2020-05-09 20:49:28 +02:00
Florian Märkl
242f1efdfa Add RIntervalTreeIter typedef 2020-05-09 12:27:17 +02:00
Florian Märkl
63c09c7ed6 Add breaking to RIntervalIterCb 2020-05-09 12:27:17 +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
Riccardo Schirone
03a5c4d3f5
Remove RCoreCmdStatus and just use RCmdStatus (#16774)
* Remove RCoreCmdStatus and just use RCmdStatus
* Assume RCorePlugins returns true/false
2020-05-06 14:38:20 +02:00
Riccardo Schirone
64e6df5004
Extend RCmdDesc with different types (#16738)
* Add RCmdDesc and use it for newshell to call command handlers
* Keep supporting existing RCorePlugin commands
* Properly free RCmdDesc tree
* Remove help from API because not used
* Check for cp->call before using it
* Set res to 0 because otherwise it could exit too early
2020-05-06 14:34:19 +08:00
Francesco Tamagni
e9152db544 Add unit test for r_leb128 2020-05-05 18:47:23 +02:00
Riccardo Schirone
79bee09fc3 Use g->x and g->y to rebase x/y got with r_str_str_xy
* Use RVector instead of RPVector
* Use RAGraph instead of the fixed core->agraph which may be wrong
* Fix infinite loop and remove unused functions
2020-05-03 17:33:36 +02:00
pancake
af4b6e7dc3
Avoid the use of for (int in our codebase (#16718) 2020-04-27 15:47:21 +02:00
pancake
80a01cb4e3
Implement r_strbuf_setptr API and improve + test it more ##util (#16649)
Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2020-04-27 13:10:57 +02:00
Riccardo Schirone
169531abb5
Pass parsed arguments directly to RCmd (#16703)
* Remove r_cmd_call_long API because never used
* Remove r_cmd_add_long because never used
* Remove r_cmd_args and fix some spaces
* Add RCmdParsedArgs and unit tests
* Introduce r_cmd_call_parsed_args and use it in cmd.c
* Introduce RCmdParsedArgs in cmd.c
2020-04-24 09:46:43 +02:00
pancake
dcbb114a9d
Add missing r_vector_fini implementation ##util (#16650) 2020-04-21 17:02:45 +02:00
Florian Märkl
4560120be2
Refactor Variable Accesses out of SDB (#16632)
Fix #15944
2020-04-19 17:56:27 +02:00
Florian Märkl
efc067bc8b
Remove r_pvector_upper_bound() and add r_vector_lower_bound() (#16629) 2020-04-18 17:35:42 +02:00
Florian Märkl
dcf0c7049f
Chop Basic Blocks instead of re-analyzing in noreturn propagation (#16612) 2020-04-17 19:51:47 +02:00
pancake
0baf99d81d
Add generic reference counting implementation ##util (#16604)
* Unit test for the r-ref api
2020-04-17 11:56:28 +08:00
Florian Märkl
028db9cd62
Minor Fixes for XRefs counting (#16546) ##anal 2020-04-12 16:42:19 +02:00
Alexis Ehret
60ee0daa91
Implement r_table_uniq as API and query (#16385) ##util 2020-04-08 20:34:05 +02:00
pancake
7be2b26ec5
Use r_str_trim_head_ro instead of hacky while loops (#16416)
$ git grep IS_WHITE | grep while
2020-04-05 15:50:19 +02:00
Florian Märkl
2e735dff07 Add Windows argv Formatting 2020-04-02 23:41:58 +02:00
Florian Märkl
79fcf4fbff
Initial Implementation of R2R in C (#16216) ##test 2020-03-24 20:18:16 +01:00
Riccardo Schirone
d861918379
Fix minunit.h to compute macro arguments just one time (#16260) 2020-03-19 20:13:21 +01: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
Khairulmizam Samsudin
bb389101da
Make r_reg_get_list() search harder (#16202) ##reg 2020-03-13 12:01:54 +01:00
Khairul Azhar Kasmiran
2c8d5982cd
Convert preinc/predec in 3rd part of for statement to postinc/postdec (#16187) 2020-03-12 18:40:46 +01:00
Khairulmizam Samsudin
89cda00652
Add test for x64 to verify fpu and xmm register size and offset (#16186) 2020-03-12 11:48:41 +08:00
Khairulmizam Samsudin
35346d5a4f
Add r_reg_get() and r_reg_get_pack() for xmm registers (#16171) 2020-03-10 12:16:59 +08:00
Florian Märkl
1d8bf0e843
Fix r_anal_switch_op_new() args (#16165) 2020-03-09 11:57:46 +08:00
radare
1be8f02906
Add test for r_reg_get_value() and r_reg_set_value() (#16136) ##test 2020-03-05 14:42:47 +01:00
radare
5e629a3260
Avoidify the strTrim() APIs + cleanup/refactor ##util (#16056) 2020-03-02 21:39:37 +01:00
Khairulmizam Samsudin
ae1ef3ffbe
Create RReg test unit (#16081)
* Add test for r_reg_set_name() and r_reg_get_name()
* Add test for r_reg_set_profile_string()
* Add test for r_reg_setv() and r_reg_getv()
2020-03-02 13:39:47 +08:00
Florian Märkl
204e038211
Fix r_cons_rgb_parse() harder (#16061)
Also fix init of some ret args in r_meta_print()
2020-02-27 20:13:34 +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
Khairulmizam Samsudin
3ed91d6e83
Fix consecutive call to r_table_sort (#16049) ##refactor
* Fix r_table_sort
* Force sorting of rows in the event of consecutive sort
* Remove global Gdec and use r_list_reverse for decreasing sort
* Add test for r_table_tostring and r_table_sort
2020-02-25 11:05:06 +01:00
Khairulmizam Samsudin
f3f5d5699a
Fix r_table_sort segfault when column type is NULL (#16047)
* Rename argument to 'dec' (decreasing) to reflect existing output
* Add test
2020-02-25 02:28:19 +01:00
Khairulmizam Samsudin
45f3715e51
Add tests for RList (set, get, reverse, clone, append, prepend) and remove legacy ##test (#16037) 2020-02-24 03:44:41 +01:00
Florian Märkl
820693b718
Make r_table_columns() faster, leak- and double free free (#16031) 2020-02-23 11:49:13 +01:00
Florian Märkl
1dddfd83d4
Fix Spaces Interference in r_flag_get_at() (#16019) 2020-02-22 21:32:30 +01:00
pancake
225ba69774 Fix RCons test UB issue 2020-02-18 10:19:14 +01:00
pancake
77ce3bb7c3 Add testcase for this RCons.rgbParse() crash 2020-02-18 01:06:47 +01:00
pancake
36653ebe5a Honor rc in unit runs and fix execution path in make run 2020-02-17 16:36:31 +01:00
Riccardo Schirone
a62b46eda2
Fix memory leak in test_rbtree (#15983) 2020-02-16 21:37:29 +01:00
Florian Märkl
a5e11a3f55
Refactor Anal Hints (#15876) ##anal
* Use RVector for Address Hints
* Add Arch/Bits Hint Trees
* Add Unit Tests for Addr, Arch and Bits Hints
* Add unset for newbits
* Fix jmptbl hint fetching
* Fix r_anal_*_bits_foreach
* Print grouped Anal Hints
* Fix arch bit affect on disasm
* Add Reset Hints to Commands
2020-02-13 11:48:24 +01:00
Florian Märkl
d1e2b8fda4
Add Unit Tests to Meson (#15926) ##test 2020-02-05 09:55:30 +01:00
Florian Märkl
11dad4facb
Remove unused Function Tree and Fix Relocate (#15898) 2020-01-26 00:07:54 +01:00
Florian Märkl
14215350af Refactor RAnal Basic Blocks and Functions (#15169) ##anal
Basic Blocks are now global instead of owned by a single function.
2020-01-15 15:23:34 +01:00
radare
2b15e7421e
Many improvements in the V testsuite (#15722) ##test
* Kill some more tests using <<RUN
* Improve r2r.v quite a lot up to 0.2
* Delete stale temporal files in the unit test
* Use executable path instead of dbpath and more cleanup
* Move manpage and move old bins into the attic
2019-12-29 19:26:15 +01:00
radare
75a63cd131
Implement r_strbuf_slice and use it in panels to solve a glitch ##cons (#15704)
* This api honors ansi escape characters
2019-12-29 08:00:38 +01:00
Florian Märkl
2a27daac4c
Change Semantics of r_rbtree_upper_bound() and simplify Iter Fcns (#15698) 2019-12-23 17:21:20 +01:00
Riccardo Schirone
2a676b5f62 Function r_anal_cc_arg should just return NULL when nothing is available (#15646)
* Function r_anal_cc_arg should just return NULL when nothing is available

Callers should be able to handle NULLs

* Fix memory leaks in unit tests
2019-12-16 08:56:40 -06:00
Florian Märkl
e866f8f21f Add RIntervalTree data structure ##util (#15541)
* Add RRangeTree
* Inclusive/Exclusive
* Add r_interval_tree_delete and r_interval_tree_resize
* Fix r_interval_tree_all_at()
2019-12-09 00:07:10 +01:00
Florian Märkl
ae61aa8e37
Imports Tests from radare2-regressions (#15546) 2019-12-08 15:31:14 +01:00