Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added json version of dp* #10518

Merged
merged 2 commits into from
Jun 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions libr/core/cmd_debug.c
Original file line number Diff line number Diff line change
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