Riccardo Schirone
6be6f0a862
core/graph: fix regression about moving between nodes
2015-10-14 18:35:11 +02:00
Riccardo Schirone
50c2d4b8c9
core/graph: fix shortcuts for in-function jumps
2015-10-14 11:13:59 +02:00
Kamil Rytarowski
9d143d53db
Fix warning: array subscript has type ‘char’
...
Caught on NetBSD.
2015-10-14 10:17:52 +02:00
Riccardo Schirone
06ec37edd2
core/graph: use multiletter shortcuts to jumps between functions
...
TODO: shortcuts relative to basicblocks should make the target node the
current one.
2015-10-14 00:10:58 +02:00
Riccardo Schirone
e54462343d
core/graph: honor scr.color also for edges and current box
2015-10-14 00:10:17 +02:00
pancake
3a5612190b
Add VVc to toggle asm.comments
2015-10-13 03:49:21 +02:00
Riccardo Schirone
0de25aacda
core/graph: use pD instead of pI to display comments and fcn info
...
core/disasm: fix some printing things
2015-10-06 18:24:41 +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
pancake
17834903be
Enhace V! Visual Panels with scroll and colors
2015-09-29 04:26:00 +02:00
Riccardo Schirone
e6f01e162c
core/graph: handle functions with no basic blocks
...
fix #3381
2015-09-28 10:18:26 +02:00
Riccardo Schirone
679a5457eb
core/graph: use g->movspeed when scrolling from the keyboard
...
Fixes a regression. The 'w' command in VV wasn't working anymore. Now it
switch again between speed 1 and speed graph.scroll, as expected.
2015-09-21 16:31:48 +02:00
pancake
4e47d86de0
Honor wheelspeed, fix oob in vmenus and more boolification
2015-09-14 16:22:57 +02:00
pancake
b515a34676
More stdboolification
2015-09-14 12:35:38 +02:00
pancake
2034047290
Fix #3282 - VVm was not working
2015-09-13 23:33:58 +02:00
Riccardo Schirone
8d49c54cf4
core/graph: fix 'agf one' graph
2015-09-12 19:08:33 +02:00
Riccardo Schirone
120753ed8b
core/graph: improve switching between visual and graph mode
...
Seek to the selected graph node when exiting from the graph mode and
select the node that contains the current offset on entering.
* core/anal: add r_core_anal_getbbaddr API
2015-09-12 18:32:25 +02:00
pancake
6f4c06c0e5
Invert hjkl keys in graph
2015-08-31 01:09:49 +02:00
pancake
f1651994e3
Use ' ' to toggle disasm/graph. hjkl/HJKL keys swapped in graph
2015-08-31 00:55:41 +02:00
pancake
02a23e00d1
Key R in visual graph also randomizes disasm colors
2015-08-31 00:46:28 +02:00
jvoisin
4261075d60
Misc fixes to make clang-analyser even more happy
2015-08-29 18:08:38 +02:00
jvoisin
98bb29c4ed
Fix some clang-analyzer defects
2015-08-28 17:28:09 +02:00
Riccardo Schirone
2518c9e21c
core/core: add scr.promptflag variable
2015-08-11 16:03:07 +02:00
Riccardo Schirone
6c5606ed6f
core/graph: fix issues in minigraph
...
* title not printed when it should partially printed
* fix style issues
* fix #3015
2015-08-09 14:07:11 +02:00
pancake
53a033d67c
Fix #2997 and #3010 - Fixes for minigraph rendering
2015-08-09 04:59:35 +02:00
Álvaro Felipe Melchor
8b7d699303
Fix oob in r_agraph_add_node
2015-08-01 00:42:20 +02:00
Riccardo Schirone
6007ca4fde
cons/canvas,core/graph: fix some CIDs
2015-07-31 00:05:56 +02:00
Riccardo Schirone
434561ec40
core/graph: reserve the first line for the title
2015-07-30 10:56:15 +02:00
Riccardo Schirone
fc42e8a2a6
cons/canvas: support ansi strings
...
core/graph: use colored disassembly as default
2015-07-30 01:05:31 +02:00
Riccardo Schirone
96c5444b9d
core/graph: while calculating graph size, consider edges
...
fix #3003
2015-07-27 12:29:30 +02:00
Riccardo Schirone
ca8ea943c5
core/graph: remove curnode when in non-interactive mode
...
fix #3004
2015-07-27 12:29:30 +02:00
Riccardo Schirone
94f303ca36
core/graph: clean code + fixes
...
cons/canvas_line: split style in color and symbol
In this way you can choose to apply a color and/or a symbol (t/f/v) to a
line. This patch also changes core/graph to avoid t/f symbols in the
middle of long edges.
cons/canvas_line: fix "reversed" edge
core/graph: center current node when changing function
2015-07-27 12:29:18 +02:00
Álvaro Felipe Melchor
65ecefcd3f
change layout prompt to point at the end
2015-07-25 20:47:38 +02:00
Álvaro Felipe Melchor
9a44a6c396
Change the nomenclature in some commands visual ascii graph
2015-07-25 20:47:36 +02:00
Álvaro Felipe Melchor
c06dee984e
Added the ability to go/seek in Visual Ascii Graph
...
Fix #2906 - Added the ability tu undo and redo in Visual Ascii Graph
updated agraph_refresh
2015-07-25 20:46:58 +02:00
Riccardo Schirone
af5d430396
core/graph: small fixes
...
* no need to reset colors at the end
* print title of the graph when in non-interactive mode
2015-07-25 17:06:26 +02:00
Riccardo Schirone
31dfeda157
core/graph: improve edges layout
2015-07-25 13:55:31 +02:00
pancake
04e128ab92
Fix some covs
2015-07-25 09:58:11 +02:00
Riccardo Schirone
8f96bc4de1
core/graph: avoid two nodes with the same title
2015-07-25 02:11:51 +02:00
Riccardo Schirone
1fd9f05297
core/graph: fix cmd_graph tests
2015-07-25 02:11:51 +02:00
Riccardo Schirone
8b5f7308f0
core/graph: improve node layout
...
core/graph: remove all_reversed_right and shift_right_dummies
core/graph: change dist_nodes calculations
2015-07-24 18:00:32 +02:00
Riccardo Schirone
23fd1a4425
core/graph: reduce space between nodes
...
core/graph: if we already have the distance between two nodes, update it
core/graph: avoid setting layout two times
2015-07-24 18:00:23 +02:00
Riccardo Schirone
5ef6454ee0
core/graph: sdbization of RAGraph
...
* core/graph: refactor check_changes of agraph
* core/graph: udpate info when getting the Sdb from the graph
* core/graph: add in sdb info about nodes
* core/graph: add "agraph.delta_x" to rebase all coordinates and make
them unsigned integers
* core/cmd_anal: add 'agg*' to print r2 commands to generate the graph
* core/cmd_anal: add helps to 'agn' and 'age' commands
2015-07-24 14:00:11 +02:00
Riccardo Schirone
67735a34ed
core/cmd_anal: fix base64 body for 'agn' command
2015-07-24 13:50:06 +02:00
Riccardo Schirone
65bed1595c
core/graph: remove set_layout_callgraph but just use the same algorithm
...
* core/graph: avoid calling agraph_reload_nodes, do it during refresh
2015-07-19 01:35:01 +02:00
Riccardo Schirone
3738b5fe59
core/graph: make the title a field of RAGraph
...
* core/graph: add r_agraph_set_title function to the API
2015-07-19 01:35:01 +02:00
Riccardo Schirone
9d830a925f
core/graph: last line fix + memleaks fixes
...
* core/graph: fix last line in non-interactive mode
* core/graph: remove event_resize callback at the end
* core/graph: free RANodes when you free/reset the RAGraph
* core/graph: use R_TRUE/R_FALSE instead of 1/0
* core/graph: remove warnings
2015-07-19 01:33:52 +02:00
Riccardo Schirone
a21bcf706b
core/graph: not center graph when stepping inside other nodes
2015-07-18 00:20:07 +02:00
Sven Steinbauer
3aa79a291c
Option to toggle invert scrolling of ASCII graph
...
Toggles both HJKL and mouse wheel scrolling of canvas
* Remove invert scroll toggle. Config only
* Changes invert_scroll to invscroll
* Removes invscroll from RAGraph
* Replaces spaces with tabs
2015-07-17 00:21:15 +02:00
deffi420
9d92712cea
Add aar command to search xrefs in code
...
- Ignore references to sections with vaddr=0
- Skip overlapping instructions in xref search
- Improve debugger mode support of `axa`
- Remove unused cmd variable
2015-07-16 00:32:18 +02:00
pancake
8ff870be8e
Honor graph.scroll by default
2015-07-16 00:13:47 +02:00
pancake
a02cdf666d
Fix aagraph help and add '!' to toggle experimental disasm color
2015-07-15 16:11:39 +02:00
pancake
df25085ffe
Add custom color support for graphs and handle VVR and VVVq
2015-07-15 15:54:20 +02:00
pancake
390a0e61bc
Fix some coverities
2015-07-15 15:08:56 +02:00
Riccardo Schirone
11c495a0b5
core/graph: fix a null dereference
2015-07-14 19:03:05 +02:00
Riccardo Schirone
66753a1050
core/cmd_anal: accept spaces in title and body for 'agn' and 'age'
2015-07-14 18:39:31 +02:00
Riccardo Schirone
a6c23407b2
cons/cons.c: avoid printing last line
...
fix #2908
2015-07-14 18:06:55 +02:00
Riccardo Schirone
be7b1edd2e
core/graph: when re-adding edges, put them in the original position
...
fix #2936
2015-07-13 20:33:52 +02:00
Riccardo Schirone
6c6e9f5f3c
util/graph: RGraphEdgeCallback now accepts a RGraphEdge
2015-07-13 20:33:52 +02:00
pancake
8e9058ed26
Avoid using keywords like class
2015-07-13 14:43:13 +02:00
Riccardo Schirone
4eedd69a91
core/cmd_anal: implement ag-/agn/age/agg to work with core->graph
2015-07-13 13:48:31 +02:00
Riccardo Schirone
3d29108225
core/graph: add r_agraph_print
2015-07-13 13:48:31 +02:00
Riccardo Schirone
975e30ac6c
core/graph: add r_agraph_get_node
2015-07-13 13:48:31 +02:00
Riccardo Schirone
9391131479
core/graph: add r_agraph_add_edge
2015-07-13 13:48:31 +02:00
Riccardo Schirone
6c55098a44
core/graph: add r_agraph_add_node
2015-07-13 13:48:30 +02:00
Riccardo Schirone
e58bf2350f
core/graph: change name AGraph => RAGraph and make it a public structure
2015-07-13 13:48:30 +02:00
Riccardo Schirone
c667b65479
core/graph: remove RCore,RAnalFunction dependencies from AGraph
...
core/graph: initialize movspeed outside the constructor
core/graph: change RANode "text" field to "body"
core/graph: free the history stack when reloading nodes
core/graph: make coverity happy. No need to check for NULL
core/graph: increase the minimum height of a node
2015-07-13 13:48:30 +02:00
pancake
5cf8dc1c36
Honor graph.scroll by default
2015-07-09 01:38:36 +02:00
Riccardo Schirone
a13f04ba58
core/graph: print the whole graph when the graph is not interactive
2015-07-07 00:54:38 +02:00
Riccardo Schirone
42e1bab640
core/graph: use get_anode instead of explicit casting
2015-07-07 00:54:38 +02:00
Riccardo Schirone
316a529a80
core/graph: fix a regression where dots are printed out of node
2015-07-07 00:54:38 +02:00
Riccardo Schirone
261dd145d9
core/graph: fix memleaks in combine_sequences
2015-07-07 00:54:38 +02:00
Riccardo Schirone
f6774e5938
core/graph: traverse nodes with based on (x,y) coordinates
2015-07-04 02:34:59 +02:00
Riccardo Schirone
fe794fcc16
core/graph: const-ify
2015-07-04 02:34:58 +02:00
Riccardo Schirone
937d87f893
core/graph: fix warnings
2015-07-04 02:34:58 +02:00
Riccardo Schirone
b3589b4a0c
core/graph: move reversed edges, when possible, to make more space
2015-07-03 09:40:35 +02:00
Riccardo Schirone
5dad19fb06
core/graph: implement place_originals
...
core/graph: implement place_single
core/graph: implement combine_sequence
core/graph: implement collect_left/right_changes
2015-07-03 09:40:35 +02:00
Riccardo Schirone
b0aa2add3b
core/graph: better implementation of dist_nodes
...
core/graph: add set_dist_nodes
2015-07-03 09:40:35 +02:00
Riccardo Schirone
d2c362344a
core/graph: implement place_dummies
...
core/graph: compute vertical partitions and left classes
core/graph: implement place_left
core/graph: implement adjust_left_class
core/graph: implement methods called in place_virtuals for left/right
2015-07-03 09:40:35 +02:00
Riccardo Schirone
60107b1652
core/graph: refactoring creation of ascii_node and add is_reversed field
...
an ascii_node (ANode) is reversed when it's a dummy node and it's part
of a back edge that is reversed during the layout algorithm
2015-07-03 09:40:35 +02:00
Riccardo Schirone
57f8c7506f
core/graph: count crossing also between layer i and layer i+1
2015-07-03 09:40:35 +02:00
Riccardo Schirone
e5bd85eb06
core/graph: make alternative movement speed configurable
2015-07-02 18:23:10 +02:00
Riccardo Schirone
647e957707
core/graph: add commands to toggle between different movement speeds
2015-07-02 18:23:09 +02:00
Riccardo Schirone
baeab6eeae
core/graph: print some dots when cropping text because of zoom
2015-07-01 13:46:41 +02:00
Riccardo Schirone
687b255665
core/graph: use '0' to set zoom to the default value
...
In this way we have a key to center the screen in every mode we have
(graph, minigraph, etc.)
2015-07-01 13:46:41 +02:00
Riccardo Schirone
5036518c0a
core/graph: allow to zoom out until the minigraph appears
2015-07-01 13:46:41 +02:00
Riccardo Schirone
3829b1a82b
core/graph: set minimal dimensions for nodes
2015-07-01 13:46:41 +02:00
Riccardo Schirone
ceeaa36620
core/graph: fix out of nodes text when zoom < 100
2015-07-01 13:46:41 +02:00
Riccardo Schirone
0749329762
core/graph: fix out of screen nodes when zoom > 100
2015-07-01 13:46:41 +02:00
Riccardo Schirone
822c6704d1
core/graph: . should center the graph to the current node
2015-07-01 13:46:40 +02:00
Riccardo Schirone
8c0bb719c2
core/graph: code refactoring, make zoom a field of the AGraph structure
2015-07-01 13:46:40 +02:00
pancake
fbc1746ffa
Add +/- keys for zoom in/out
2015-06-29 17:00:12 +02:00
pancake
47cbce50c4
Deprecate WASD keys in ascii graph to make azerty users happy
2015-06-28 02:24:46 +02:00
Riccardo Schirone
1b69ac97d5
core/graph: not remove nodes while traversing them
2015-06-17 23:20:28 +02:00
Riccardo Schirone
b5b548255e
core/cmd_debug,core/graph: fix warning types with sdb_num_get
2015-06-17 23:20:28 +02:00
Riccardo Schirone
814bf3a49c
core/graph: implement layering and ordering of nodes in each layer
2015-06-17 11:22:10 +02:00
Álvaro Felipe Melchor
53badd517d
Fix COVs
2015-06-17 00:22:40 +02:00
Anton Kochkov
c871d8e155
Fix CID 1306716, 1306711
2015-06-15 21:15:57 +03:00
Anton Kochkov
966744b4c2
Fix CID 1306706
2015-06-15 20:44:37 +03: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
pancake
3013b98099
Add key.s/key.S config vars and fix aagraph glitch
2015-06-12 02:19:58 +02:00