704 Commits

Author SHA1 Message Date
Riccardo Schirone
b703dfbf17 anal/xrefs: single, global xrefs API
* several bugfixes
* Fix xrefs/refs confusion with asm.cmt.refs
* Also check if xref source is valid offset
* Fix ax* to show type of ref
* anal/xrefs: pass the right hashtable to mylistrefs
* r_anal_refs_get should use anal->refs, not anal->xrefs
* anal/fcn: add xref also when there's a CALL to a noreturn function
* projects: use radare2 output of ax command to save/restore xrefs
* core/cmd_anal: when analyzing calls, we should use REF_TYPE_CALL
* core/canal: use xrefs API, because the list is a just a copy
* core/canal: rename "loc." entries to "fcn." when a CALL is found
* sort xrefs to make results consistent
* core/canal: avoid recomputing function every time during `aan`
* anal: move fcn_refs/xrefs functions to the xrefs.c file
* core/canal.c: avoid iterating fcn xrefs list
* anal/xrefs: compute fcn xrefs by analyzing fcn addresses
* remove other unused functions
* anal/xrefs: remove fcn_xrefs_add and fcn_xrefs_deln
* anal/xrefs: remove old fcn->refs/xrefs
* anal/xrefs: directly store RAnalRef objects in the hash table
* libr: prevent memory leaks when using refs/xrefs
* anal/xrefs: merge anal/ref and anal/xref and clean API

Big xrefs/refs refactoring that provides a more uniform and simple API.
It avoids changes to refs/xrefs except through the API and it keeps all
xrefs/refs info in one single place, to improve consistency.

Thanks to:
Riccardo Schirone <sirmy15@gmail.com>
pancake <pancake@nopcode.org>
rene <rlaemmert@gmail.com>
2018-05-04 21:40:47 +02:00
Khairul Azhar Kasmiran
cbe9a12be2 Fix $$$ when in nested cmd (#10010) 2018-05-04 20:08:21 +02:00
Khairul Kasmiran
2faadf6d86 r_cons_singleton() 🠊 r_cons_singleton () 2018-05-02 21:36:08 +08:00
Paul I
cc90ec6be5 [WIP] Move hardcoded paths to r_userconf.h (#9959)
* Move hardcoded paths to r_userconf.h

* Add R2_HOME_* macros

* Some cleanup
2018-04-28 10:02:55 +02:00
Khairul Azhar Kasmiran
41b2b25593 Fix #9835: $$$ - current non-temporary virtual seek (#9971) 2018-04-27 18:41:29 +02:00
pancake
5a899f2846 Add r_th_try_pause() and improve task threading support 2018-04-25 12:30:57 +02:00
pancake
fce51ed9d1 Dont pause bg tasks, avoid deadlock, needs proper fix 2018-04-24 23:11:08 +02:00
pancake
19c4f5223c Fix a lot of things broken in previous merged PRs. grrrrrr 2018-04-24 11:32:51 +02:00
Khairul Azhar Kasmiran
ec75785c7c Highlight seek line using different background color (#9853) 2018-04-24 09:51:14 +02:00
radare
a30c5c3722
Initial work on supporting pauseable CoreTasks (#9921) 2018-04-20 00:25:33 +02:00
radare
ffe3dd11ef
Ensure we dont loop forever in aac (#9916) 2018-04-17 21:52:55 +02:00
pancake
1adac87918 Update sdb-1.1.0, update calls to sdb_fmt() 2018-04-10 23:52:47 +02:00
pancake
2a8ab337d9 WIP: Initial implementation of RFShell tab autocompletion 2018-04-09 01:15:20 +02:00
pancake
3b7f2b8126 Fix #9805 - Implement file autocompletion after > 2018-04-04 22:32:51 +02:00
Xilokar
985fc13545 Fix fixed{arch,bits} if recursively called (#9771) 2018-03-27 16:32:13 +02:00
xarkes
3bc955c713 r_core_editor check for scr.interactive 2018-03-25 19:46:05 +02:00
Florian Märkl
93d9f4ec66 Add mask parameter to r_anal_op() 2018-03-16 11:10:15 +01:00
pancake
dc74fbd746 Fix more memleaks 2018-03-14 15:31:08 +01:00
pancake
3c9879656e Use r_syscall_ref to avoid dblfree-or-leak issue 2018-03-14 12:58:16 +01:00
pancake
2a4efecd39 Initial import of the CoreUndo API and uc command 2018-03-14 12:12:44 +01:00
Dirk Eibach
405524d2f8 Make segment granularity adjustable (#9631)
* core: Make segment granularity adjustable

Segments in x86 real mode have 16 byte granularity(4 address bits).
There are however systems (namely the Vautomation/ARC Turbo 186 cores)
that use 256 byte(8 address bits) instead to allow access to 16MiB memory.

Unfortunately fixed granularity is hard coded in lots of places in r2.

This patch adds asm.seggrn configuration and fixes the hardcoded
assumptions in core.

Signed-off-by: Dirk Eibach <eibach@gdsys.cc>

* anal_x86_cs: Make segment granularity adjustable

Fix hard coded segment granularity assumptions in capstone
anal module.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2018-03-12 12:37:35 +01:00
cyanpencil
cd719d120b Implement pluggable dietline history. Use it in Vo (#9591) 2018-03-09 00:33:33 +01:00
Khairul Kasmiran
c7e38939bd Moved init of core->anal->read_at into r_core_init() 2018-03-08 22:05:05 +08:00
pancake
bbb4fb263b Add autocomplete for the vim command 2018-03-08 11:10:41 +01:00
Riccardo Schirone
a5811d1a2b Fix #9612 - Skip dummy nodes in graph navigation (#9622)
- This reverts commit 747de793c369f29238abaf8138202a4894d4c8c1.
- And skip dummy nodes for VVtf
2018-03-07 22:14:12 +01:00
pancake
6428824bc6 Fix asan issue with graph initialization 2018-03-07 12:47:39 +01:00
pancake
d2f9e090c7 Improve aa* and aas to analyze all entrypoints 2018-03-07 01:56:39 +01:00
pancake
1d81e15424 Introduce graph.dummy to disable the creation of dummy nodes in the graph
- If disabled layout is worst, but 't' and 'f' work because there
  are no dummy nodes to follow_nth()
2018-03-06 23:28:19 +01:00
pancake
6cdd273d5c Implement @@iS RBin.Section foreach operator 2018-02-27 23:10:28 +01:00
Ariel Schon
30278ae14f Autocomplete project open (#9496)
* Added initial code for file completion - also completes from CWD :(
* Changed to use near-same code as in the 'Pl' command, still shows current directory files??
* Added comparison to select only the similar results. However, they are weirdly displayed.. UTF?
* Previously I pointed tmp_argv to foo, which was beeing freed.. I pointed it to a new string (r_str_newf). Now it works!
* Added check to make sure projectspath is not null.
2018-02-24 19:15:55 +01:00
Farid AYOUJIL
1e29f31576 Refactoring asm.cmt* and scr.* 2018-02-22 17:59:08 +01:00
Giuseppe
7a140d71e6 Use different color when pxw unmapped data (#9404) 2018-02-20 23:55:11 +01:00
Vanellope
4a3cfe1882 fixed llx of my previous code to PFMT64x because of portability issue (#9444) 2018-02-20 22:18:02 +01:00
pancake
f5aa5906d4 Fix last covs (null derefs and leaks) 2018-02-12 14:27:38 -06:00
Vanellope
8553ffd7cd added autocomplete for the other missing commands as dbd, dbe, and so on. refactored the code styling a bit. (#9371) 2018-02-11 20:45:11 +01:00
Vanellope
beb967cc82 db- autocompletion (#9356)
* done implementing autocompletion for db-.

* db- autocomplete should show available breakpoints to be deleted with tab key.
2018-02-09 21:28:19 +01:00
Vanellope
aab00e98bd Autocomplete should work properly for agfl now 2018-02-08 11:20:07 +01:00
pancake
8320dbd2af Fix regressions 2018-01-17 15:56:43 +01:00
pancake
ea766fa1f6 Fix a memleak and a use-after-free 2018-01-16 12:14:36 +01:00
pancake
31d550a54b Introduce r_sys_prefix 2018-01-16 11:58:47 +01:00
pancake
303820dbac Initial purge of R2_PREFIX towards dir.prefix 2018-01-16 11:13:21 +01:00
rene
84205ce344 fix some memory leaks 2018-01-12 15:29:06 +01:00
pancake
52d93207af Initial de-rcorefile-fication 2018-01-10 13:45:37 +01:00
pancake
b926122772 Use RInterval in io.cache and io.pcache, renaming and code cleanup 2018-01-10 02:35:11 +01:00
Rene Laemmert
0df2adbe09 First step in removing fcn->refs/xrefs (#9157) 2018-01-09 20:38:08 +01:00
pancake
e43107d1ca r_str_chop_ro, r_str_trim_const -> r_str_trim_ro 2018-01-08 03:29:29 +01:00
invictus1306
ac091ff05a Added some checks for the gs command 2018-01-07 20:25:04 +01:00
Ziyaddin Sadigov
d4dd6fd5e6 Fix typo regarding byte size (#9067) 2017-12-27 18:33:58 +01:00
pancake
a8897b107d Fix #9015 - use after free when quitting main thread having background server threads 2017-12-18 13:27:26 +01:00
pancake
6f0de4913e Implement io.cache.auto to cache all reads for slow io backends 2017-12-18 01:44:22 +01:00