diff --git a/libr/core/cmd_debug.c b/libr/core/cmd_debug.c index 8a0ba11f7997a..769c3d6f73de4 100644 --- a/libr/core/cmd_debug.c +++ b/libr/core/cmd_debug.c @@ -280,7 +280,9 @@ static const char *help_msg_dp[] = { "Usage:", "dp", " # Process commands", "dp", "", "List current pid and children", "dp", " ", "List children of pid", - "dp*", "", "List all attachable pids", + "dpj", " ", "List children of pid in JSON format", + "dpl", "", "List all attachable pids", + "dplj", "", "List all attachable pids in JSON format", "dp-", " ", "Detach select pid", "dp=", "", "Select pid", "dpa", " ", "Attach and select pid", @@ -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');