Commit Graph

36 Commits

Author SHA1 Message Date
pancake
52a22ab995 Add lint for \tfree( 2022-08-18 10:27:06 +02:00
Paul B Mahol
b4d929f2c4 Check for RGraph in r_graph_free() ##util 2022-08-08 19:22:49 +02: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
karliss
bdb88df38c
Graph refactor ##refactor (#17631)
* Support more output modes for class inheritence graph.
* Refactor codexrefs and importxrefs graphs.
* Add ag_w for the commands using new mechanism.
* Separate drawable graph from r_graph.
2020-10-06 10:57:51 +08:00
HoundThe
b44b8cb405
Add acg - printing class hierarchy graph ##anal (#17362)
* add `acg` - printing class hierarchy graph
* Move the printing into the cmd_anal.c from returned RAGraph
* Change API to return Graph and transform it to AGraph when printing is necessary
* Move graph to agraph into agraph module, move generic node structure to rgraph, removing unnecessary dependency
* Move RGraphNodeInfo related functions to graph.c
2020-08-07 17:23:52 +08: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
pancake
ab05f06287
Some random cleanups in RUtil (#16457) 2020-04-07 14:07:40 +02:00
condret
cbb2389b10 Implement ESIL control-flow-graph and further dfg analysis ##anal
* Implement containing rbtree, give RBTreeComparator a user ptr
* RAnal.ESIL.DFG: handle type, memory, register, relations and filter, reverse
* Add r_anal_esil_cfg_op and use it to merge fcn bbs
2019-09-26 11:36:20 +02:00
radare
89211e61ac
Implement graph neighbourhood navigation with i and I keys ##visual 2019-05-05 03:02:49 +03:00
pancake
f1c3ad4524 Restore the seek when doing aggv to fix a random bug 2019-04-29 04:21:34 +03:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
cyanpencil
fdd4b3063e Switched to alternative way of deleting dup edges 2018-07-13 11:51:13 +08:00
Luca Di Bartolomeo
e209b9147a Improve jmptbl edges, second try (#10662)
* Improve jmptbl edge positioning

* Merged edges with the same origin/destination

* Fix callgraph
2018-07-08 09:29:56 +02:00
pancake
e7e4c86910 Add N key in graph to toggle mini nodes and graph.cmtright 2016-12-19 01:33:54 +01:00
Maijin
c274afe748 Fix #3286 - Use stdbool.h 2016-07-12 22:15:19 +02:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
Riccardo Schirone
1c7119401a core/graph: improve layer assignment algorithm
It should fix some layer problem on some binaries like ls-linux64 and in
the presence of self-loop. The previous algorithm could assign the same
layer to two nodes that are connected with an edge (and it should never
happen, because they have to be on different layers).

This patch uses the topological sort of a graph to assign the layer.
2016-05-14 10:37:55 +02:00
Riccardo Schirone
d9e3a290c1 libr: fix compilation warnings
libr/util/graph: add some comments to the API
2016-05-13 09:57:55 +02:00
gk
9fcd6ed3a4 Do not try and allocate a stack if we have no edges 2015-10-26 00:50:56 +01:00
Riccardo Schirone
d977002628 util/graph: remove edge only when it exists 2015-10-05 09:23:55 +02:00
Riccardo Schirone
9fc6dc6d7d core/cmd_anal: add commands to remove nodes/edges from core->graph 2015-10-03 12:42:40 +02:00
Riccardo Schirone
6c6e9f5f3c util/graph: RGraphEdgeCallback now accepts a RGraphEdge 2015-07-13 20:33:52 +02:00
Riccardo Schirone
5d66b7510b util/list: add r_list_insert to insert element in a specified position 2015-07-13 20:33:52 +02:00
Riccardo Schirone
40e0884e57 util/graph: move adjacency lists to the RGraphNode 2015-07-03 09:40:35 +02:00
Anton Kochkov
3f6dd0c11f Fix CID 1306842 2015-06-17 14:30:43 +03:00
Riccardo Schirone
31099a3a54 util/graph: add DFS visit implementation and r_graph_del_edge/node 2015-06-17 11:22:10 +02:00
Riccardo Schirone
b279f282ba Refactoring ascii art graph
util/stack: extend stack api with r_stack_size
core/graph: use RStack instead of a custom implementation
util/graph: change implementation to use lists and extend api
core/cmd_debug: avoid free r_graph_get_nodes
core/graph: rename some functions and use typedefs for graph struct
core/graph: use RGraph for the ascii art graph
util/list: add const whenever possible
util/graph: add const on r_graph_get_nodes/neighbours
core/graph,core/cmd_debug: use const
core/graph: clean the code (add comments, use const, remove magic nums)

* use r_graph_node_iter for the current node
* reset graph when reloading nodes
* on callgraph edges printing, nth should be 0
* force seek of current node when reloading nodes
* use graph_foreach_node
* core/graph: remove get_current_node because useless
2015-06-14 00:46:11 +02:00
Riccardo Schirone
177ee3ac56 include/r_types: fix R_NEWS0 calloc usage and use it in libr/util 2015-06-12 12:48:39 +02:00
Riccardo Schirone
49ebf0942c libr/util: reimplement graph api
libr/util/t/graph: add test
2015-06-11 22:53:48 +02:00
Anton Kochkov
f1e2ffa2ca Fix CID #1134712 2014-04-25 05:24:21 +04:00
Fedor Sakharov
13547a0bbf Fix #370 - Some memory leaks
Fix memory leak in r_config_new.
  cfg->nodes->free should be a custom function that frees RConfigNode
  structure correctly, but not the ordinary free.
Fix memory leak in r_anal_new.
  In r_anal_free need to call r_meta_free to free the
  whole RMeta structure, not only it's data list.
  The r_meta_free doesn't seem to have any leak itself.
Fix leaking anal->hints.
Fix memory leaks in r_cmd_free
Fix memory leak in r_cmd_plugin_init
Fix memleak in r_lib_new
Fix memory leak in r_io_plugin_init
Fix memory leak in r_debug_trace_new
Fix memory leaks in r_io_new
Fix memory leak in r_graph_new
Fix memory leak in r_sys_getdir.
  Note: calling getcwd with dir=NULL is a Linux-specific extension
  of POSIX, not sure if works on other non-windows platforms.
Fixes a typo
2013-11-19 01:51:40 +01:00
pancake
7e4d92c6fb Fix some warnings 2013-04-02 12:45:16 +02:00
pancake
b45f07a39a dtc now uses r_cons_printf 2013-03-03 05:47:33 +01:00
pancake
5ebe3d20b8 Add ?P command, fix overflow in anal/cc and ctypes build
Added ctypes/test.py example
2012-12-08 02:17:21 +01:00
pancake
7ee7f936db Fixes parsing bug in java class and and rbinelfFixes in java class and and rbinelf)) 2012-11-14 04:57:56 +01:00
pancake
7c2a6e63b4 * Initial implementation of r_debug_map_protect()
- Bind to dmp command
  - Only w32 + osx, needs more work
* Added new api r_graph
* Added dtc and dtg
* Some minor makeup in RList
2011-11-25 04:32:32 +01:00