mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 00:27:39 +01:00
ptrace/access_reg: print out register name on "bad register"
When we have a "bad register", print out the name of that register (if possible) to aid in debugging.
This commit is contained in:
parent
f8cfe8388a
commit
10abb25af4
1 changed files with 2 additions and 2 deletions
|
@ -251,7 +251,7 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
|
|||
return 0;
|
||||
|
||||
badreg:
|
||||
Debug (1, "bad register number %u (error: %s)\n", reg, strerror (errno));
|
||||
Debug (1, "bad register %s [%u] (error: %s)\n", unw_regname(reg), reg, strerror (errno));
|
||||
return -UNW_EBADREG;
|
||||
}
|
||||
#elif HAVE_DECL_PT_GETREGS
|
||||
|
@ -285,7 +285,7 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
|
|||
return 0;
|
||||
|
||||
badreg:
|
||||
Debug (1, "bad register number %u (error: %s)\n", reg, strerror (errno));
|
||||
Debug (1, "bad register %s [%u] (error: %s)\n", unw_regname(reg), reg, strerror (errno));
|
||||
return -UNW_EBADREG;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue