Commit graph

227 commits

Author SHA1 Message Date
Riccardo Schirone
33a550aa23 core/graph: fix undefined behaviour in event_resize callback
* fix bug in VV introduced by f802bdf3b1
* code refactoring
2015-06-11 12:46:36 +02:00
pancake
f802bdf3b1 Add afg command to print non-interactive ascii-art graph 2015-06-11 03:55:15 +02:00
pancake
03aa69b261 Implement reverse rap for system() 2015-06-09 01:45:39 +02:00
Riccardo Schirone
8cb35540c7 cons: use all the available space in the screen
* r_cons_get_size should return the number of rows, why is there a "-1"?
* the newline at the end of the canvas converted to string (in
  r_cons_canvas_to_string) make things shift up one line
* r_cons_canvas_write should consider "left" (which is the number of
  chars available from x until the right side of the screen) and not
  "left - 1". Moreover, since "slen" is at most the maximum number of
  characters that we can print in that row, there is no need to check
  if we can write those bytes
* r_cons_flush usually add a newline, but we shouldn't print it because
  otherwise everything will shift up by one line
2015-06-04 19:11:16 +02:00
Riccardo Schirone
225cc70e37 core/graph: do all update of the state in the graph_refresh function 2015-06-03 17:59:53 +02:00
Riccardo Schirone
ad59230ef9 core/graph: push also tab/TAB movements in the history
core/graph: rename + moving functions
2015-06-03 17:59:53 +02:00
Riccardo Schirone
e9facfe535 core/graph: clean graph_reload_nodes
leave the selection of the right thing to do to sub-functions.
reload_nodes choose which node to reload based on the status of g.
graph_set_layout choose which layout to apply based on the status of g.
2015-06-03 17:59:53 +02:00
Riccardo Schirone
e189a9ba49 core/graph: use a function to update the is_small_nodes flag
in this way we can always update the size of the nodes at the right
moment.
2015-06-03 17:59:52 +02:00
Riccardo Schirone
823c7f8b1b core/graph: extract function graph_print_nodes/edges 2015-06-03 17:59:52 +02:00
Riccardo Schirone
5505d59a81 core/graph: avoid realloc of edges at every step of the loop 2015-06-03 17:59:52 +02:00
Riccardo Schirone
91c4229660 core/graph: use n_edges/n_nodes instead of NULL terminating the list 2015-06-03 17:59:52 +02:00
Riccardo Schirone
cfa69ae7a8 core/graph: choose type of printing in graph_reload_nodes
extract graph_prev/next_node to move to the previous/next node in the
graph.
2015-06-03 17:59:52 +02:00
Riccardo Schirone
78471faf98 core/graph: code refactoring
core/graph: extrat struct graph

core/graph: replace updateSeek with graph_update_seek

core/graph: change names to some functions

core/graph: refactoring of graph_set_layout

core/graph: make ostack part of the struct graph
2015-06-03 17:59:52 +02:00
Riccardo Schirone
3315382895 core/graph: null check should be before dereferencing the pointer 2015-06-03 17:59:52 +02:00
jvoisin
7c096bb1f4 Fix various coverity issues 2015-06-01 21:10:37 +02:00
pancake
a793859d5b Fix some COVs 2015-06-01 11:20:53 +02:00
pancake
c27327cac5 Fix #2648 - save restore arg/var name and type 2015-05-31 23:46:32 +02:00
Riccardo Schirone
676453db6e Simplify canvas boundary check for node text 2015-05-31 23:11:03 +02:00
pancake
bb151c1607 Fix two out-of-canvas node location and missing box lines issues 2015-05-31 22:27:47 +02:00
Riccardo Schirone
da16e1424d core/graph: when printing the text inside a node, consider borders 2015-05-31 20:20:31 +02:00
Riccardo Schirone
17cc0e3c41 core/graph: support partial writing of node title 2015-05-31 20:20:31 +02:00
Riccardo Schirone
e6500b2ec1 core/graph: use constants for the margin of the text inside the node 2015-05-31 20:20:31 +02:00
Riccardo Schirone
14e8c9aead core/graph: remove duplicated print of title in normal_Node_print 2015-05-31 20:20:31 +02:00
Riccardo Schirone
212dbc1024 core/graph: split Node_print in two sub functions, based on small_nodes 2015-05-31 20:20:31 +02:00
Riccardo Schirone
9ec497ccd8 core/graph: check for NULL values at the very start of Node_print 2015-05-31 20:20:31 +02:00
Riccardo Schirone
c60e009cd7 core/graph: code refactoring
core/graph: use while-loop instead of goto
core/graph: use constants instead of numbers
2015-05-31 20:20:31 +02:00
Riccardo Schirone
a104185d69 core/graph: avoid macros in the middle of the file 2015-05-31 20:20:31 +02:00
Anton Kochkov
4d58edede2 Prevent segfaults 2015-04-11 02:41:02 +03:00
pancake
eb42823a51 Add esil.gotolimit to restrict the number of words to run after an esil goto 2015-04-01 00:38:24 +02:00
Jonathan Neuschäfer
dcc1a15749 more EOF fixes 2015-03-23 16:16:37 +01:00
pancake
28d6c12043 V! -> V!!, VV(nofn) -> V!
- VV only opens if there's a function analized
- V! now opens the panels view
- V!! launches the 2048 game
2015-03-05 23:33:28 +01:00
pancake
ef293e4b66 Initial PoC for the Visual 2.0 (for now: VV) 2015-03-05 02:07:53 +01:00
jvoisin
838c467724 Coverifix once again 2015-02-19 15:04:58 +01:00
pancake
beda5fd111 Handle mouse wheel in Ascii Art graph - press 'm' 'M' to change mouse mode 2015-02-17 01:28:51 +01:00
pancake
d3ddbea631 Colorize node box 2015-02-15 21:48:46 +01:00
pancake
40edd608d1 Bring back the old edge style in the aa graph. Fix self loops 2015-02-15 21:34:12 +01:00
r0nk
5b8c813268 fixed offsets for graph` 2015-02-15 13:34:12 +01:00
pancake
1ba75dbd2a Fix support for RGB ascii-art graph lines within RConsCanvas 2015-02-14 05:10:03 +01:00
pancake
421dd1243f Obey scr.color in RConsCanvas from RCore.cmd("VV") 2015-02-14 04:50:29 +01:00
pancake
f2351636fe Fix r_cons_readline() signature and some code cleanup 2015-01-31 00:50:05 +01:00
pancake
d15d4daa25 Fix VV stepping with esil. Code cleanup in cmd_anal.c 2015-01-30 01:55:21 +01:00
pancake
86b3fa2a4c Fix graphs in debugger, only follow rip when stepping with 'z' 2015-01-13 03:18:42 +01:00
pancake
d9d9ac827b Implicitly ignore return value of some canvas gotos 2015-01-11 20:01:44 +01:00
pancake
377ec87272 Fix two null deref in RConsCanvas and another left border glitch 2015-01-11 02:54:27 +01:00
pancake
d713debdfc Fix left and top border issues with canvas text (nicer graphs) 2015-01-11 02:28:59 +01:00
pancake
c61368a0f3 Add support for asm.pseudo and asm.varsub for ARM and ARM64 2015-01-11 01:48:20 +01:00
pancake
c7e1fad6bc Add Vn (mini-ascii-art graph visual mode) 2015-01-09 11:39:25 +01:00
pancake
9bb64f1a4c Enhace Capstone-SPARC code analysis 2014-11-11 00:46:46 +01:00
pancake
658d6deee8 Initial add 'C' to toggle colors in ascii graph (buggy+experimental) 2014-11-07 09:56:39 +01:00
Jeffrey Crowell
9a44fbc8f4 Fix crash in graph where you print the current node twice. 2014-11-01 22:08:04 +01:00
pancake
a004393b32 Add more help for VV 2014-10-28 17:17:10 +01:00
pancake
d69175f38f Make graph debugger mode work and add cmd.gprompt 2014-10-23 03:29:05 +02:00
pancake
bc658c8a4e Fix #1553 - node select history and autoscroll, fixes tfu keys 2014-10-23 02:13:25 +02:00
pancake
238bd6b6c4 Fix VV: wheel issue and set scr.highlight via Vdh, V/ or VV/ 2014-09-28 04:01:31 +02:00
Jody Frankowski
320c43b262 Use get_fcn_in where it used _at 2014-09-26 18:14:09 +02:00
Jody Frankowski
df289d8611 Unify fcn_find and get_fcn_at in get_fcn_in and get_fcn_at 2014-09-26 17:16:28 +02:00
pancake
a18f7819d9 Fix the support for 0x0 sized terminals (adb shell) 2014-09-24 03:17:43 +02:00
pancake
932279ed7e Initial work to disable FCN_OLD. 2014-09-23 00:40:35 +02:00
pancake
a071ee29d7 Fix ascii art graph for one block graphs 2014-08-08 21:08:47 +02:00
pancake
c91f838821 Handle ':' prompt in aa graph too 2014-08-05 19:49:33 +02:00
pancake
0a292c936a Add asm.indent, handle 'xX' in aa graph and enhace ptr references 2014-08-05 18:03:14 +02:00
pancake
06108516b0 Allow resizing window when in aa-graph-view (VV) 2014-08-04 01:30:29 +02:00
jvoisin
69fa33ce78 Fix some coverity issues 2014-08-03 14:43:44 +02:00
pancake
29c3e1ba7a Fix more CIDs assigned to me 2014-08-01 12:07:08 +02:00
pancake
3fc1e58bc3 Fix oob glitch in ascii art graph 2014-08-01 00:54:04 +02:00
pancake
0f24b905f6 Initial implementation of VVV for ascii-art callgraphs 2014-07-09 05:05:22 +02:00
jvoisin
bc30cb72c6 Fix some coverity issues 2014-07-07 16:09:03 +02:00
pancake
0d68756791 Add r_str_crop() will be used by canvas to shifted render text 2014-05-18 03:41:39 +02:00
pancake
1ce6e7c45b Add rahash2 -d and -D to encode/decode base64 strings and files 2014-05-16 14:34:36 +02:00
pancake
ee276298b2 Fix memleaks in radiff2, segfaults in 8051 and aagraph 2014-05-09 03:06:05 +02:00
pancake
201231a7a5 Fix remaining segfault in RCons.canvas, still trashy output 2014-05-08 02:58:20 +02:00
pancake
7fa79a3f36 Fix some RCons.canvas bugs 2014-05-08 02:26:42 +02:00
Anton Kochkov
28e6648e62 Fix CID 1211141 2014-05-06 01:17:02 +04:00
pancake
1b37861c38 Fix null deref in graph 2014-05-05 14:03:27 +02:00
pancake
f9256d83de Add initial ascii-art graph layout and implement RCons.resize() api 2014-05-05 03:15:28 +02:00
pancake
71a105e444 Oops fix aagraph 2014-04-29 04:22:21 +02:00
pancake
7028b225bd Added 'VV' command to run the visual graph mode 2014-04-29 03:54:20 +02:00