diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-17 21:29:46 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-17 21:29:46 +0200 |
commit | 272bd1d3ef52606b42d20d0f0f47d260527f099b (patch) | |
tree | c18db3a747fa273f992f67174d91449967acfa4d /Kernel | |
parent | ad909e7c3f28cbdba269ac5cfcd01a84f482c3c2 (diff) | |
download | serenity-272bd1d3ef52606b42d20d0f0f47d260527f099b.zip |
Kernel: Make crash dumps look aligned once again
This broke with the recent changes to make printf hex fields behave
a bit more correctly.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Arch/i386/CPU.cpp | 14 | ||||
-rw-r--r-- | Kernel/Process.cpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp index 5e8721f11b..4a0bc9a1e0 100644 --- a/Kernel/Arch/i386/CPU.cpp +++ b/Kernel/Arch/i386/CPU.cpp @@ -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], diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index bf5c4b0670..b562068d06 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -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(), |