Page MenuHomeFreeBSD

amd64: dump standard registers when crashing
ClosedPublic

Authored by mjg on Aug 25 2022, 1:06 PM.
Tags
None
Referenced Files
F101308817: D36348.diff
Sun, Oct 27, 2:20 PM
Unknown Object (File)
Sep 25 2024, 7:46 AM
Unknown Object (File)
Sep 19 2024, 2:55 PM
Unknown Object (File)
Sep 18 2024, 3:42 PM
Unknown Object (File)
Sep 8 2024, 7:59 PM
Unknown Object (File)
Sep 2 2024, 11:07 PM
Unknown Object (File)
Aug 29 2024, 3:41 PM
Unknown Object (File)
Aug 25 2024, 7:07 AM
Subscribers

Details

Summary

Sample output:

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x2 
fault code              = supervisor write data, page not present
instruction pointer     = 0x20:0xffffffff80556853
stack pointer           = 0x28:0xffffffff8141bf50
frame pointer           = 0x28:0xffffffff8141bfa0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0 
current process         = 0 (swapper)
rdi: fffff80002c9c400 rsi: ffffffff80b89183 rdx:                0   
rcx:                2  r8:               fe  r9:                1
rax: fffff80002c9c400 rbx:                1 rbp: ffffffff8141bfa0
r10:                0 r11: ffffffff80b97f8c r12:                0
r13:                0 r14:                0 r15:                0
trap number             = 12
panic: page fault
cpuid = 1 
time = 1

now it is slightly redundant with rip, rsp and rbp being printed twice, but I don't think that's a big deal.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mjg requested review of this revision.Aug 25 2022, 1:06 PM
mjg created this revision.
sys/amd64/amd64/trap.c
934

I suggest omitting this line, it is clear what is printed, without the header

935

Lines are too long, please wrap them.

mjg edited the summary of this revision. (Show Details)
  • wrap lines
  • remove 'register dump' line
This revision is now accepted and ready to land.Aug 25 2022, 5:57 PM
This revision was automatically updated to reflect the committed changes.