Skip to content

Commit

Permalink
Added json version of dp* (#10518)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcasal authored and radare committed Jun 27, 2018
1 parent 7743169 commit 58c11e9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions libr/core/cmd_debug.c
Expand Up @@ -280,7 +280,9 @@ static const char *help_msg_dp[] = {
"Usage:", "dp", " # Process commands",
"dp", "", "List current pid and children",
"dp", " <pid>", "List children of pid",
"dp*", "", "List all attachable pids",
"dpj", " <pid>", "List children of pid in JSON format",
"dpl", "", "List all attachable pids",
"dplj", "", "List all attachable pids in JSON format",
"dp-", " <pid>", "Detach select pid",
"dp=", "<pid>", "Select pid",
"dpa", " <pid>", "Attach and select pid",
Expand Down Expand Up @@ -1067,8 +1069,15 @@ static void cmd_debug_pid(RCore *core, const char *input) {
(int) r_num_math (core->num, input + 2), core->dbg->tid);
core->dbg->main_pid = r_num_math (core->num, input + 2);
break;
case '*': // "dp*"
r_debug_pid_list (core->dbg, 0, 0);
case 'l': // "dpl"
switch (input[2]) {
case '\0': // "dpl"
r_debug_pid_list (core->dbg, 0, 0);
break;
case 'j': // "dplj"
r_debug_pid_list (core->dbg, 0, 'j');
break;
}
break;
case 'j': // "dpj"
r_debug_pid_list (core->dbg, core->dbg->pid, 'j');
Expand Down

0 comments on commit 58c11e9

Please sign in to comment.