Kernel: Make crash dumps look aligned once again
This broke with the recent changes to make printf hex fields behave a bit more correctly.
This commit is contained in:
parent
ad909e7c3f
commit
272bd1d3ef
Notes:
sideshowbarker
2024-07-19 12:38:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/272bd1d3ef5
2 changed files with 8 additions and 8 deletions
Kernel
|
@ -134,18 +134,18 @@ static void dump(const DumpType& regs)
|
|||
}
|
||||
|
||||
if constexpr (IsSame<DumpType, RegisterDumpWithExceptionCode>::value) {
|
||||
kprintf("exception code: %w\n", regs.exception_code);
|
||||
kprintf("exception code: %04x\n", regs.exception_code);
|
||||
}
|
||||
kprintf(" pc=%w:%x ds=%w es=%w fs=%w gs=%w\n", regs.cs, regs.eip, regs.ds, regs.es, regs.fs, regs.gs);
|
||||
kprintf(" stk=%w:%x\n", ss, esp);
|
||||
kprintf(" pc=%04x:%08x ds=%04x es=%04x fs=%04x gs=%04x\n", regs.cs, regs.eip, regs.ds, regs.es, regs.fs, regs.gs);
|
||||
kprintf(" stk=%04x:%08x\n", ss, esp);
|
||||
if (current)
|
||||
kprintf("kstk=%w:%x, base=%x, sigbase=%x\n", current->tss().ss0, current->tss().esp0, current->kernel_stack_base(), current->kernel_stack_for_signal_handler_base());
|
||||
kprintf("eax=%x ebx=%x ecx=%x edx=%x\n", regs.eax, regs.ebx, regs.ecx, regs.edx);
|
||||
kprintf("ebp=%x esp=%x esi=%x edi=%x\n", regs.ebp, esp, regs.esi, regs.edi);
|
||||
kprintf("kstk=%04x:%08x, base=%08x, sigbase=%08x\n", current->tss().ss0, current->tss().esp0, current->kernel_stack_base(), current->kernel_stack_for_signal_handler_base());
|
||||
kprintf("eax=%08x ebx=%08x ecx=%08x edx=%08x\n", regs.eax, regs.ebx, regs.ecx, regs.edx);
|
||||
kprintf("ebp=%08x esp=%08x esi=%08x edi=%08x\n", regs.ebp, esp, regs.esi, regs.edi);
|
||||
|
||||
if (current && current->process().validate_read((void*)regs.eip, 8)) {
|
||||
u8* codeptr = (u8*)regs.eip;
|
||||
kprintf("code: %b %b %b %b %b %b %b %b\n",
|
||||
kprintf("code: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
codeptr[0],
|
||||
codeptr[1],
|
||||
codeptr[2],
|
||||
|
|
|
@ -670,7 +670,7 @@ void Process::dump_regions()
|
|||
kprintf("Process %s(%u) regions:\n", name().characters(), pid());
|
||||
kprintf("BEGIN END SIZE ACCESS NAME\n");
|
||||
for (auto& region : m_regions) {
|
||||
kprintf("%x -- %x %x %c%c%c %s\n",
|
||||
kprintf("%08x -- %08x %08x %c%c%c %s\n",
|
||||
region.vaddr().get(),
|
||||
region.vaddr().offset(region.size() - 1).get(),
|
||||
region.size(),
|
||||
|
|
Loading…
Add table
Reference in a new issue