mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Print the exit status of addr2line
This commit is contained in:
parent
fe20160958
commit
c879140663
1 changed files with 7 additions and 1 deletions
|
|
@ -1141,13 +1141,19 @@ void os_abort(void)
|
|||
printf("[bt] %02u: %s\n", i, msg);
|
||||
|
||||
if (messages) {
|
||||
int ret;
|
||||
char addr2line[1024];
|
||||
size_t j = 0;
|
||||
while (msg[j] != '(' && msg[j] != ' ' && msg[j] != 0)
|
||||
++j;
|
||||
|
||||
snprintf(addr2line, sizeof(addr2line), "addr2line %p -e %.*s", stack[i], (unsigned)j, msg);
|
||||
system(addr2line);
|
||||
|
||||
ret = system(addr2line);
|
||||
if (WIFEXITED(ret) && WEXITSTATUS(ret) != 0)
|
||||
printf("exit:%d\n", WEXITSTATUS(ret));
|
||||
if (WIFSIGNALED(ret))
|
||||
printf("signal:%d\n", WTERMSIG(ret));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue