x86: improve machdep.uprintf_signal
Print %eax/%rax. Use better format strings, like %#x. Reviewed by: jhb Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36302
This commit is contained in:
parent
01a33b2af5
commit
ff32a05554
@ -628,11 +628,11 @@ trap(struct trapframe *frame)
|
||||
ksi.ksi_trapno = type;
|
||||
ksi.ksi_addr = (void *)addr;
|
||||
if (uprintf_signal) {
|
||||
uprintf("pid %d comm %s: signal %d err %lx code %d type %d "
|
||||
"addr 0x%lx rsp 0x%lx rip 0x%lx "
|
||||
uprintf("pid %d comm %s: signal %d err %#lx code %d type %d "
|
||||
"addr %#lx rsp %#lx rip %#lx rax %#lx"
|
||||
"<%02x %02x %02x %02x %02x %02x %02x %02x>\n",
|
||||
p->p_pid, p->p_comm, signo, frame->tf_err, ucode, type,
|
||||
addr, frame->tf_rsp, frame->tf_rip,
|
||||
addr, frame->tf_rsp, frame->tf_rip, frame->tf_rax,
|
||||
fubyte((void *)(frame->tf_rip + 0)),
|
||||
fubyte((void *)(frame->tf_rip + 1)),
|
||||
fubyte((void *)(frame->tf_rip + 2)),
|
||||
|
@ -693,12 +693,12 @@ trap(struct trapframe *frame)
|
||||
ksi.ksi_addr = (void *)addr;
|
||||
ksi.ksi_trapno = type;
|
||||
if (uprintf_signal) {
|
||||
uprintf("pid %d comm %s: signal %d err %x code %d type %d "
|
||||
"addr 0x%x ss 0x%04x esp 0x%08x cs 0x%04x eip 0x%08x "
|
||||
uprintf("pid %d comm %s: signal %d err %#x code %d type %d "
|
||||
"addr %#x ss %#04x esp %#08x cs %#04x eip %#08x eax %#08x"
|
||||
"<%02x %02x %02x %02x %02x %02x %02x %02x>\n",
|
||||
p->p_pid, p->p_comm, signo, frame->tf_err, ucode, type,
|
||||
addr, frame->tf_ss, frame->tf_esp, frame->tf_cs,
|
||||
frame->tf_eip,
|
||||
frame->tf_eip, frame->tf_eax,
|
||||
fubyte((void *)(frame->tf_eip + 0)),
|
||||
fubyte((void *)(frame->tf_eip + 1)),
|
||||
fubyte((void *)(frame->tf_eip + 2)),
|
||||
|
Loading…
Reference in New Issue
Block a user