Fixed dpk ##debug

This commit is contained in:
yossizap 2019-10-25 22:08:57 +00:00 committed by radare
parent d5bf57258a
commit 797803473b
3 changed files with 3 additions and 3 deletions

View File

@ -1075,7 +1075,7 @@ static void cmd_debug_pid(RCore *core, const char *input) {
ptr = strchr (ptr, ' ');
sig = ptr? atoi (ptr + 1): 0;
eprintf ("Sending signal '%d' to pid '%d'\n", sig, pid);
r_debug_kill (core->dbg, 0, false, sig);
r_debug_kill (core->dbg, pid, false, sig);
} else eprintf ("cmd_debug_pid: Invalid arguments (%s)\n", input);
break;
case 'n': // "dpn"

View File

@ -1577,7 +1577,7 @@ R_API int r_debug_kill(RDebug *dbg, int pid, int tid, int sig) {
return false;
}
if (dbg->h && dbg->h->kill) {
if (pid > 0 && tid > 0) {
if (pid > 0) {
return dbg->h->kill (dbg, pid, tid, sig);
}
return -1;

View File

@ -1514,7 +1514,7 @@ static RList *r_debug_native_modules_get (RDebug *dbg) {
return last;
}
static bool r_debug_native_kill (RDebug *dbg, int pid, int tid, int sig) {
static bool r_debug_native_kill(RDebug *dbg, int pid, int tid, int sig) {
bool ret = false;
if (pid == 0) {
pid = dbg->pid;