diff --git a/Kernel/Debug.h.in b/Kernel/Debug.h.in index 8a36b568c2b..1d8285c982c 100644 --- a/Kernel/Debug.h.in +++ b/Kernel/Debug.h.in @@ -187,6 +187,10 @@ #cmakedefine01 LOCK_TRACE_DEBUG #endif +#ifndef LOOPBACK_DEBUG +#cmakedefine01 LOOPBACK_DEBUG +#endif + #ifndef MASTERPTY_DEBUG #cmakedefine01 MASTERPTY_DEBUG #endif diff --git a/Kernel/Net/LoopbackAdapter.cpp b/Kernel/Net/LoopbackAdapter.cpp index 207730c78c6..14c0ce0f503 100644 --- a/Kernel/Net/LoopbackAdapter.cpp +++ b/Kernel/Net/LoopbackAdapter.cpp @@ -30,7 +30,7 @@ LoopbackAdapter::~LoopbackAdapter() = default; void LoopbackAdapter::send_raw(ReadonlyBytes payload) { - dbgln("LoopbackAdapter: Sending {} byte(s) to myself.", payload.size()); + dbgln_if(LOOPBACK_DEBUG, "LoopbackAdapter: Sending {} byte(s) to myself.", payload.size()); did_receive(payload); } diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake index 5f956b8c5bd..f53e68355ca 100644 --- a/Meta/CMake/all_the_debug_macros.cmake +++ b/Meta/CMake/all_the_debug_macros.cmake @@ -104,6 +104,7 @@ set(LOCK_RESTORE_DEBUG ON) set(LOCK_SHARED_UPGRADE_DEBUG ON) set(LOCK_TRACE_DEBUG ON) set(LOOKUPSERVER_DEBUG ON) +set(LOOPBACK_DEBUG ON) set(LZMA_DEBUG ON) set(MALLOC_DEBUG ON) set(MARKDOWN_DEBUG ON)