Print hexadecimal integer in error diagnostics using %#x
The formerly used format string %x led to misleading output as there was no clear indication sometimes whether the printed integer was decimal or hexadecimal. * aio.c (startup_child, test_ptrace_seize): Print status using %#x format specifier instead of %x.
This commit is contained in:
parent
a286680b04
commit
600457fa9d
7
strace.c
7
strace.c
@ -1409,7 +1409,8 @@ startup_child(char **argv)
|
||||
}
|
||||
if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) {
|
||||
kill_save_errno(pid, SIGKILL);
|
||||
perror_msg_and_die("Unexpected wait status %x", status);
|
||||
perror_msg_and_die("Unexpected wait status %#x",
|
||||
status);
|
||||
}
|
||||
}
|
||||
/* Else: NOMMU case, we have no way to sync.
|
||||
@ -1522,8 +1523,8 @@ test_ptrace_seize(void)
|
||||
if (WIFSIGNALED(status)) {
|
||||
return;
|
||||
}
|
||||
error_msg_and_die("%s: unexpected wait status %x",
|
||||
__func__, status);
|
||||
error_msg_and_die("%s: unexpected wait status %#x",
|
||||
__func__, status);
|
||||
}
|
||||
}
|
||||
#else /* !USE_SEIZE */
|
||||
|
Loading…
x
Reference in New Issue
Block a user