Skip to content

Commit

Permalink
Show signal name when taken from the Linux backend ##debug
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 2, 2024
1 parent dcbfb8e commit 6347bd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libr/core/clist.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ R_API int r_core_list_io(RCore *core, const char *name, int mode) {
if (name && strcmp (plugin_name, name)) {
continue;
}
str[0] = 'r';
str[1] = plugin->write ? 'w' : '_';
str[2] = plugin->isdbg ? 'd' : '_';
str[3] = 0;
if (mode == 'j') {
pj_o (pj);
pj_ks (pj, "permissions", str);
Expand Down Expand Up @@ -99,10 +103,6 @@ R_API int r_core_list_io(RCore *core, const char *name, int mode) {
}
r_cons_printf ("sysc: %s\n", r_str_bool (plugin->system));
} else {
str[0] = 'r';
str[1] = plugin->write ? 'w' : '_';
str[2] = plugin->isdbg ? 'd' : '_';
str[3] = 0;
r_cons_printf ("%s %-8s %s.", str,
r_str_get (plugin->meta.name),
r_str_get (plugin->meta.desc));
Expand Down
5 changes: 3 additions & 2 deletions libr/debug/p/native/linux/linux_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ int linux_handle_signals(RDebug *dbg, int tid) {
break;
}
if (dbg->reason.signum != SIGTRAP && (dbg->reason.signum != SIGINT || !r_cons_is_breaked ())) {
eprintf ("[+] SIGNAL %d errno=%d addr=0x%08"PFMT64x " code=%d si_pid=%d ret=%d\n",
siginfo.si_signo, siginfo.si_errno,
const char *name = r_signal_tostring (dbg->reason.signum);
eprintf ("[+] SIGNAL %d (aka %s) errno=%d addr=0x%08"PFMT64x " code=%d si_pid=%d ret=%d\n",
siginfo.si_signo, name, siginfo.si_errno,
(ut64) (size_t)siginfo.si_addr, siginfo.si_code, siginfo.si_pid, ret);
}
return true;
Expand Down

0 comments on commit 6347bd4

Please sign in to comment.