Remove the configuration variable graph.web (#567)
This commit is contained in:
parent
aa3558b294
commit
bc4fe462c7
3 changed files with 15 additions and 34 deletions
|
|
@ -3469,7 +3469,6 @@ RZ_API int rz_core_config_init(RzCore *core) {
|
||||||
SETPREF("graph.font", "Courier", "Font for dot graphs");
|
SETPREF("graph.font", "Courier", "Font for dot graphs");
|
||||||
SETBPREF("graph.offset", "false", "Show offsets in graphs");
|
SETBPREF("graph.offset", "false", "Show offsets in graphs");
|
||||||
SETBPREF("graph.bytes", "false", "Show opcode bytes in graphs");
|
SETBPREF("graph.bytes", "false", "Show opcode bytes in graphs");
|
||||||
SETBPREF("graph.web", "false", "Display graph in web browser (VV)");
|
|
||||||
SETI("graph.from", UT64_MAX, "Lower bound address when drawing global graphs");
|
SETI("graph.from", UT64_MAX, "Lower bound address when drawing global graphs");
|
||||||
SETI("graph.to", UT64_MAX, "Upper bound address when drawing global graphs");
|
SETI("graph.to", UT64_MAX, "Upper bound address when drawing global graphs");
|
||||||
SETI("graph.scroll", 5, "Scroll speed in ascii-art graph");
|
SETI("graph.scroll", 5, "Scroll speed in ascii-art graph");
|
||||||
|
|
|
||||||
|
|
@ -548,7 +548,7 @@ static const char *help_msg_ag[] = {
|
||||||
"k", "", "SDB key-value",
|
"k", "", "SDB key-value",
|
||||||
"t", "", "Tiny ascii art",
|
"t", "", "Tiny ascii art",
|
||||||
"v", "", "Interactive ascii art",
|
"v", "", "Interactive ascii art",
|
||||||
"w", " [path]", "Write to path or display graph image (see graph.gv.format and graph.web)",
|
"w", " [path]", "Write to path or display graph image (see graph.gv.format)",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -8017,12 +8017,8 @@ RZ_API void rz_core_agraph_print(RzCore *core, int use_utf, const char *input) {
|
||||||
rz_cons_print("]\n");
|
rz_cons_print("]\n");
|
||||||
break;
|
break;
|
||||||
case 'w': { // "aggw"
|
case 'w': { // "aggw"
|
||||||
if (rz_config_get_i(core->config, "graph.web")) {
|
const char *filename = rz_str_trim_head_ro(input + 1);
|
||||||
rz_core_cmd0(core, "=H /graph/");
|
convert_dotcmd_to_image(core, "aggd", filename);
|
||||||
} else {
|
|
||||||
const char *filename = rz_str_trim_head_ro(input + 1);
|
|
||||||
convert_dotcmd_to_image(core, "aggd", filename);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
@ -8262,15 +8258,12 @@ static void cmd_analysis_graph(RzCore *core, const char *input) {
|
||||||
rz_core_print_bb_custom(core, fcn);
|
rz_core_print_bb_custom(core, fcn);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'w': // "agfw"
|
case 'w': { // "agfw"
|
||||||
if (rz_config_get_i(core->config, "graph.web")) {
|
char *cmdargs = rz_str_newf("agfd @ 0x%" PFMT64x, core->offset);
|
||||||
rz_core_cmd0(core, "=H /graph/");
|
convert_dotcmd_to_image(core, cmdargs, input + 2);
|
||||||
} else {
|
free(cmdargs);
|
||||||
char *cmdargs = rz_str_newf("agfd @ 0x%" PFMT64x, core->offset);
|
|
||||||
convert_dotcmd_to_image(core, cmdargs, input + 2);
|
|
||||||
free(cmdargs);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
eprintf("Usage: see ag?\n");
|
eprintf("Usage: see ag?\n");
|
||||||
break;
|
break;
|
||||||
|
|
@ -8512,15 +8505,12 @@ static void cmd_analysis_graph(RzCore *core, const char *input) {
|
||||||
case 'v': // "agv" alias for "agfv"
|
case 'v': // "agv" alias for "agfv"
|
||||||
rz_core_cmdf(core, "agfv%s", input + 1);
|
rz_core_cmdf(core, "agfv%s", input + 1);
|
||||||
break;
|
break;
|
||||||
case 'w': // "agw"
|
case 'w': { // "agw"
|
||||||
if (rz_config_get_i(core->config, "graph.web")) {
|
char *cmdargs = rz_str_newf("agfd @ 0x%" PFMT64x, core->offset);
|
||||||
rz_core_cmd0(core, "=H /graph/");
|
convert_dotcmd_to_image(core, cmdargs, input + 1);
|
||||||
} else {
|
free(cmdargs);
|
||||||
char *cmdargs = rz_str_newf("agfd @ 0x%" PFMT64x, core->offset);
|
|
||||||
convert_dotcmd_to_image(core, cmdargs, input + 1);
|
|
||||||
free(cmdargs);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
rz_core_cmd_help(core, help_msg_ag);
|
rz_core_cmd_help(core, help_msg_ag);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -6430,11 +6430,7 @@ repeat:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
if (rz_config_get_b(core->config, "graph.web")) {
|
__call_visual_graph(core);
|
||||||
rz_core_cmd0(core, "agv $$");
|
|
||||||
} else {
|
|
||||||
__call_visual_graph(core);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ':':
|
case ':':
|
||||||
rz_core_visual_prompt_input(core);
|
rz_core_visual_prompt_input(core);
|
||||||
|
|
@ -6654,11 +6650,7 @@ repeat:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
if (rz_config_get_b(core->config, "graph.web")) {
|
__call_visual_graph(core);
|
||||||
rz_core_cmd0(core, "agv $$");
|
|
||||||
} else {
|
|
||||||
__call_visual_graph(core);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ']':
|
case ']':
|
||||||
if (__check_panel_type(cur, PANEL_CMD_HEXDUMP)) {
|
if (__check_panel_type(cur, PANEL_CMD_HEXDUMP)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue