mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
Rotate between call/jmp/lea in graph and panels with 'r'
This commit is contained in:
parent
74d7d7635d
commit
71dd95bb90
@ -4382,8 +4382,16 @@ R_API int r_core_visual_graph(RCore *core, RAGraph *g, RAnalFunction *_fcn, int
|
||||
g->need_reload_nodes = true;
|
||||
}
|
||||
// TODO: toggle shortcut hotkeys
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
if (r_config_get_i (core->config, "asm.hint.call")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.jmp")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.lea")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
}
|
||||
break;
|
||||
case '$':
|
||||
r_core_cmd (core, "dr PC=$$", 0);
|
||||
|
@ -147,7 +147,7 @@ static const char *help_msg_panels[] = {
|
||||
"o", "go/seek to given offset",
|
||||
"pP", "seek to next or previous scr.nkey",
|
||||
"q", "quit, back to visual mode",
|
||||
"r", "toggle jmphints/leahints",
|
||||
"r", "toggle callhints/jmphints/leahints",
|
||||
"sS", "step in / step over",
|
||||
"uU", "undo / redo seek",
|
||||
"w", "start Window mode",
|
||||
@ -3855,8 +3855,16 @@ repeat:
|
||||
setRefreshAll (panels, true);
|
||||
break;
|
||||
case 'r':
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
if (r_config_get_i (core->config, "asm.hint.call")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.jmp")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.lea")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
}
|
||||
setRefreshAll (panels, false);
|
||||
break;
|
||||
case 'R':
|
||||
|
@ -279,7 +279,7 @@ static const char *help_msg_visual[] = {
|
||||
"O", "toggle asm.pseudo and asm.esil",
|
||||
"p/P", "rotate print modes (hex, disasm, debug, words, buf)",
|
||||
"q", "back to radare shell",
|
||||
"r", "toggle jmphints/leahints",
|
||||
"r", "toggle callhints/jmphints/leahints",
|
||||
"R", "randomize color palette (ecr)",
|
||||
"sS", "step / step over",
|
||||
"tT", "tt new tab, t[1-9] switch to nth tab, t= name tab, t- close tab",
|
||||
@ -2681,15 +2681,15 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
|
||||
break;
|
||||
case 'r':
|
||||
// TODO: toggle shortcut hotkeys
|
||||
if (r_config_get_i (core->config, "asm.hint.jmp")) {
|
||||
if (r_config_get_i (core->config, "asm.hint.call")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.jmp")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.call")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
} else if (r_config_get_i (core->config, "asm.hint.lea")) {
|
||||
r_core_cmd0 (core, "e!asm.hint.lea");
|
||||
r_core_cmd0 (core, "e!asm.hint.jmp");
|
||||
r_core_cmd0 (core, "e!asm.hint.call");
|
||||
}
|
||||
visual_refresh (core);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user