mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything:
This commit is contained in:
parent
c7fc9d185d
commit
11d651d447
3 changed files with 18 additions and 18 deletions
|
@ -161,7 +161,7 @@ void Parser::access_generic_address(const Structures::GenericAddressStructure& s
|
|||
dbgln("ACPI Warning: Unknown access size {}", structure.access_size);
|
||||
ASSERT(structure.bit_width != (u8)GenericAddressStructure::BitWidth::QWord);
|
||||
ASSERT(structure.bit_width != (u8)GenericAddressStructure::BitWidth::Undefined);
|
||||
dbg() << "ACPI: Bit Width - " << structure.bit_width << " bits";
|
||||
dbgln("ACPI: Bit Width - {} bits", structure.bit_width);
|
||||
address.out(value, structure.bit_width);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -419,7 +419,7 @@ void page_fault_handler(TrapFrame* trap)
|
|||
|
||||
auto current_thread = Thread::current();
|
||||
if (!faulted_in_kernel && !MM.validate_user_stack(current_thread->process(), VirtualAddress(regs.userspace_esp))) {
|
||||
dbg() << "Invalid stack pointer: " << VirtualAddress(regs.userspace_esp);
|
||||
dbgln("Invalid stack pointer: {}", VirtualAddress(regs.userspace_esp));
|
||||
handle_crash(regs, "Bad stack on page fault", SIGSTKFLT);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
@ -441,11 +441,11 @@ void page_fault_handler(TrapFrame* trap)
|
|||
}
|
||||
}
|
||||
|
||||
dbg() << "Unrecoverable page fault, "
|
||||
<< (regs.exception_code & PageFaultFlags::ReservedBitViolation ? "reserved bit violation / " : "")
|
||||
<< (regs.exception_code & PageFaultFlags::InstructionFetch ? "instruction fetch / " : "")
|
||||
<< (regs.exception_code & PageFaultFlags::Write ? "write to" : "read from")
|
||||
<< " address " << VirtualAddress(fault_address);
|
||||
dbgln("Unrecoverable page fault, {}{}{} address {}",
|
||||
regs.exception_code & PageFaultFlags::ReservedBitViolation ? "reserved bit violation / " : "",
|
||||
regs.exception_code & PageFaultFlags::InstructionFetch ? "instruction fetch / " : "",
|
||||
regs.exception_code & PageFaultFlags::Write ? "write to" : "read from",
|
||||
VirtualAddress(fault_address));
|
||||
u32 malloc_scrub_pattern = explode_byte(MALLOC_SCRUB_BYTE);
|
||||
u32 free_scrub_pattern = explode_byte(FREE_SCRUB_BYTE);
|
||||
u32 kmalloc_scrub_pattern = explode_byte(KMALLOC_SCRUB_BYTE);
|
||||
|
@ -453,19 +453,19 @@ void page_fault_handler(TrapFrame* trap)
|
|||
u32 slab_alloc_scrub_pattern = explode_byte(SLAB_ALLOC_SCRUB_BYTE);
|
||||
u32 slab_dealloc_scrub_pattern = explode_byte(SLAB_DEALLOC_SCRUB_BYTE);
|
||||
if ((fault_address & 0xffff0000) == (malloc_scrub_pattern & 0xffff0000)) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like it may be uninitialized malloc() memory";
|
||||
dbgln("Note: Address {} looks like it may be uninitialized malloc() memory", VirtualAddress(fault_address));
|
||||
} else if ((fault_address & 0xffff0000) == (free_scrub_pattern & 0xffff0000)) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like it may be recently free()'d memory";
|
||||
dbgln("Note: Address {} looks like it may be recently free()'d memory", VirtualAddress(fault_address));
|
||||
} else if ((fault_address & 0xffff0000) == (kmalloc_scrub_pattern & 0xffff0000)) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like it may be uninitialized kmalloc() memory";
|
||||
dbgln("Note: Address {} looks like it may be uninitialized kmalloc() memory", VirtualAddress(fault_address));
|
||||
} else if ((fault_address & 0xffff0000) == (kfree_scrub_pattern & 0xffff0000)) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like it may be recently kfree()'d memory";
|
||||
dbgln("Note: Address {} looks like it may be recently kfree()'d memory", VirtualAddress(fault_address));
|
||||
} else if ((fault_address & 0xffff0000) == (slab_alloc_scrub_pattern & 0xffff0000)) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like it may be uninitialized slab_alloc() memory";
|
||||
dbgln("Note: Address {} looks like it may be uninitialized slab_alloc() memory", VirtualAddress(fault_address));
|
||||
} else if ((fault_address & 0xffff0000) == (slab_dealloc_scrub_pattern & 0xffff0000)) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like it may be recently slab_dealloc()'d memory";
|
||||
dbgln("Note: Address {} looks like it may be recently slab_dealloc()'d memory", VirtualAddress(fault_address));
|
||||
} else if (fault_address < 4096) {
|
||||
dbg() << "Note: Address " << VirtualAddress(fault_address) << " looks like a possible nullptr dereference";
|
||||
dbgln("Note: Address {} looks like a possible nullptr dereference", VirtualAddress(fault_address));
|
||||
}
|
||||
|
||||
handle_crash(regs, "Page Fault", SIGSEGV, response == PageFaultResponse::OutOfMemory);
|
||||
|
@ -1362,7 +1362,7 @@ Vector<FlatPtr> Processor::capture_stack_trace(Thread& thread, size_t max_frames
|
|||
// until it returns the data back to us
|
||||
smp_unicast(thread.cpu(),
|
||||
[&]() {
|
||||
dbg() << "CPU[" << Processor::current().id() << "] getting stack for cpu #" << proc.id();
|
||||
dbgln("CPU[{}] getting stack for cpu #{}", Processor::current().id(), proc.id());
|
||||
ProcessPagingScope paging_scope(thread.process());
|
||||
auto& target_proc = Processor::current();
|
||||
ASSERT(&target_proc != &proc);
|
||||
|
@ -1409,7 +1409,7 @@ Vector<FlatPtr> Processor::capture_stack_trace(Thread& thread, size_t max_frames
|
|||
break;
|
||||
}
|
||||
default:
|
||||
dbg() << "Cannot capture stack trace for thread " << thread << " in state " << thread.state_string();
|
||||
dbgln("Cannot capture stack trace for thread {} in state {}", thread, thread.state_string());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ bool BXVGADevice::set_resolution(size_t width, size_t height)
|
|||
return false;
|
||||
|
||||
set_resolution_registers(width, height);
|
||||
dbg() << "BXVGADevice resolution set to " << width << "x" << height << " (pitch=" << m_framebuffer_pitch << ")";
|
||||
dbgln("BXVGADevice resolution set to {}x{} (pitch={})", width, height, m_framebuffer_pitch);
|
||||
|
||||
m_framebuffer_width = width;
|
||||
m_framebuffer_height = height;
|
||||
|
@ -195,7 +195,7 @@ KResultOr<Region*> BXVGADevice::mmap(Process& process, FileDescription&, Virtual
|
|||
shared);
|
||||
if (!region)
|
||||
return KResult(-ENOMEM);
|
||||
dbg() << "BXVGADevice: mmap with size " << region->size() << " at " << region->vaddr();
|
||||
dbgln("BXVGADevice: mmap with size {} at {}", region->size(), region->vaddr());
|
||||
return region;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue