Everywhere: Fix obvious dbgln() bugs

This will allow compiletime dbgln() checks to pass
This commit is contained in:
AnotherTest 2021-01-17 12:32:26 +03:30 committed by Andreas Kling
parent b68e34cc2e
commit 53ce923e10
4 changed files with 4 additions and 4 deletions

View file

@ -133,7 +133,7 @@ u32 FutexQueue::wake_all(bool& is_empty)
ASSERT(data);
ASSERT(b.blocker_type() == Thread::Blocker::Type::Futex);
auto& blocker = static_cast<Thread::FutexBlocker&>(b);
dbgln<FUTEXQUEUE_DEBUG>("FutexQueue @ {}: wake_all unblocking", this, *static_cast<Thread*>(data));
dbgln<FUTEXQUEUE_DEBUG>("FutexQueue @ {}: wake_all unblocking {}", this, *static_cast<Thread*>(data));
if (blocker.unblock(true)) {
did_wake++;
return true;

View file

@ -231,7 +231,7 @@ bool Scheduler::pick_next()
}
if constexpr (SCHEDULER_RUNNABLE_DEBUG) {
dbgln("Scheduler thread list:", Processor::id());
dbgln("Scheduler thread list for processor {}:", Processor::id());
Thread::for_each([&](Thread& thread) -> IterationDecision {
switch (thread.state()) {
case Thread::Dying:

View file

@ -903,7 +903,7 @@ public:
}
if (m_blocker && !m_blocker->can_be_interrupted() && !m_should_die) {
block_lock2.unlock();
dbgln("Thread should not be unblocking, current state: ", state_string());
dbgln("Thread should not be unblocking, current state: {}", state_string());
set_state(Thread::Blocked);
continue;
}

View file

@ -433,7 +433,7 @@ DynamicLoader::RelocationResult DynamicLoader::do_relocation(size_t total_tls_si
// We could explicitly do them first using m_number_of_relocatoins from DT_RELCOUNT
// However, our compiler is nice enough to put them at the front of the relocations for us :)
dbgln<DYNAMIC_LOAD_DEBUG>("Load address relocation at offset {:#08x}", relocation.offset());
dbgln<DYNAMIC_LOAD_DEBUG>(" patch ptr == %p, adding load base address ({:p}) to it and storing {:p}", *patch_ptr, m_dynamic_object->base_address().as_ptr(), *patch_ptr + m_dynamic_object->base_address().as_ptr());
dbgln<DYNAMIC_LOAD_DEBUG>(" patch ptr == {:p}, adding load base address ({:p}) to it and storing {:p}", *patch_ptr, m_dynamic_object->base_address().as_ptr(), *patch_ptr + m_dynamic_object->base_address().as_ptr());
*patch_ptr += (FlatPtr)m_dynamic_object->base_address().as_ptr(); // + addend for RelA (addend for Rel is stored at addr)
break;
}