Kernel: Make sure crash dumps are properly aligned on x86_64

This commit is contained in:
Gunnar Beutner 2021-07-22 01:21:39 +02:00 committed by Andreas Kling
parent 0e0985f15c
commit b4272d731f
Notes: sideshowbarker 2024-07-18 08:36:34 +09:00
2 changed files with 14 additions and 2 deletions

View file

@ -1121,7 +1121,13 @@ void MemoryManager::unregister_region(Region& region)
void MemoryManager::dump_kernel_regions()
{
dbgln("Kernel regions:");
dbgln("BEGIN END SIZE ACCESS NAME");
#if ARCH(I386)
auto addr_padding = "";
#else
auto addr_padding = " ";
#endif
dbgln("BEGIN{} END{} SIZE{} ACCESS NAME",
addr_padding, addr_padding, addr_padding);
ScopedSpinLock lock(s_mm_lock);
for (auto& region : m_kernel_regions) {
dbgln("{:p} -- {:p} {:p} {:c}{:c}{:c}{:c}{:c}{:c} {}",

View file

@ -316,7 +316,13 @@ KResultOr<Vector<Region*, 2>> Space::try_split_region_around_range(const Region&
void Space::dump_regions()
{
dbgln("Process regions:");
dbgln("BEGIN END SIZE ACCESS NAME");
#if ARCH(I386)
auto addr_padding = "";
#else
auto addr_padding = " ";
#endif
dbgln("BEGIN{} END{} SIZE{} ACCESS NAME",
addr_padding, addr_padding, addr_padding);
ScopedSpinLock lock(m_lock);