mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-13 16:18:33 +00:00
Fix profiling RCore.cmdCall() via ?t"" ##shell
This commit is contained in:
parent
3ead2117be
commit
71dfd4d833
@ -3580,6 +3580,12 @@ static int r_core_cmd_subst(RCore *core, char *cmd) {
|
||||
if (r_str_startswith (cmd, "\"\"")) {
|
||||
return r_core_cmd_call (core, cmd + 2);
|
||||
}
|
||||
if (r_str_startswith (cmd, "?t\"\"")) {
|
||||
char *c = r_str_newf ("?t\"\"%s", cmd + 4);
|
||||
int res = r_core_cmd_call (core, c);
|
||||
free (c);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (r_str_startswith (cmd, "GET /cmd/")) {
|
||||
memmove (cmd, cmd + 9, strlen (cmd + 9) + 1);
|
||||
|
@ -604,6 +604,20 @@ static int cmd_help(void *data, const char *input) {
|
||||
}
|
||||
core->curtab ++;
|
||||
break;
|
||||
case '"':
|
||||
{
|
||||
struct r_prof_t prof;
|
||||
r_prof_start (&prof);
|
||||
if (input[1] == '"') {
|
||||
r_core_cmd_call (core, input + 3);
|
||||
} else {
|
||||
r_core_cmd (core, input + 1, 0);
|
||||
}
|
||||
r_prof_end (&prof);
|
||||
r_core_return_value (core, (ut64)(int)prof.result);
|
||||
eprintf ("%lf\n", prof.result);
|
||||
}
|
||||
break;
|
||||
case ' ':
|
||||
{
|
||||
struct r_prof_t prof;
|
||||
|
Loading…
Reference in New Issue
Block a user