git: ff32a055542f - main - x86: improve machdep.uprintf_signal
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Aug 2022 19:25:17 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff32a055542f0bbe835205a261350d9c0b6c553a commit ff32a055542f0bbe835205a261350d9c0b6c553a Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-08-21 01:47:11 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-08-24 19:12:45 +0000 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 --- sys/amd64/amd64/trap.c | 6 +++--- sys/i386/i386/trap.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 42fb19819111..a94722851ce1 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -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)), diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 5a247a36d2e9..cf7b45b8cd85 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -693,12 +693,12 @@ kernel_trctrap: 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)),