summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AK/Debug.h.in185
-rw-r--r--CMakeLists.txt1
-rw-r--r--Kernel/ACPI/MultiProcessorParser.cpp2
-rw-r--r--Kernel/ACPI/Parser.cpp2
-rw-r--r--Kernel/Arch/i386/CPU.cpp2
-rw-r--r--Kernel/Debug.h.in101
-rw-r--r--Kernel/Devices/BXVGADevice.cpp2
-rw-r--r--Kernel/Devices/KeyboardDevice.cpp2
-rw-r--r--Kernel/Devices/PS2MouseDevice.cpp2
-rw-r--r--Kernel/Devices/SB16.cpp2
-rw-r--r--Kernel/Devices/USB/UHCIController.cpp2
-rw-r--r--Kernel/Devices/VMWareBackdoor.cpp2
-rw-r--r--Kernel/FileSystem/BlockBasedFileSystem.cpp2
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/FIFO.cpp2
-rw-r--r--Kernel/FileSystem/FileDescription.cpp2
-rw-r--r--Kernel/FileSystem/ProcFS.cpp2
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.cpp2
-rw-r--r--Kernel/FileSystem/ext2_fs.h5
-rw-r--r--Kernel/FutexQueue.cpp2
-rw-r--r--Kernel/Heap/kmalloc.h2
-rw-r--r--Kernel/Interrupts/APIC.cpp2
-rw-r--r--Kernel/Interrupts/IOAPIC.cpp2
-rw-r--r--Kernel/Interrupts/IRQHandler.cpp2
-rw-r--r--Kernel/Interrupts/SharedIRQHandler.cpp2
-rw-r--r--Kernel/Lock.cpp2
-rw-r--r--Kernel/Net/E1000NetworkAdapter.cpp2
-rw-r--r--Kernel/Net/IPv4Socket.cpp2
-rw-r--r--Kernel/Net/LocalSocket.cpp2
-rw-r--r--Kernel/Net/NetworkTask.cpp2
-rw-r--r--Kernel/Net/RTL8139NetworkAdapter.cpp2
-rw-r--r--Kernel/Net/Routing.cpp2
-rw-r--r--Kernel/Net/Socket.cpp2
-rw-r--r--Kernel/Net/TCPSocket.cpp2
-rw-r--r--Kernel/PCI/Access.cpp2
-rw-r--r--Kernel/PCI/Definitions.h2
-rw-r--r--Kernel/PCI/IOAccess.cpp2
-rw-r--r--Kernel/PCI/MMIOAccess.cpp2
-rw-r--r--Kernel/Process.cpp2
-rw-r--r--Kernel/Scheduler.cpp2
-rw-r--r--Kernel/Storage/Partition/DiskPartition.cpp2
-rw-r--r--Kernel/Storage/Partition/GUIDPartitionTable.cpp2
-rw-r--r--Kernel/Storage/Partition/MBRPartitionTable.cpp2
-rw-r--r--Kernel/Storage/StorageDevice.cpp2
-rw-r--r--Kernel/Syscalls/execve.cpp2
-rw-r--r--Kernel/Syscalls/fcntl.cpp2
-rw-r--r--Kernel/Syscalls/fork.cpp2
-rw-r--r--Kernel/Syscalls/futex.cpp2
-rw-r--r--Kernel/Syscalls/open.cpp2
-rw-r--r--Kernel/Syscalls/read.cpp2
-rw-r--r--Kernel/Syscalls/select.cpp2
-rw-r--r--Kernel/Syscalls/waitid.cpp2
-rw-r--r--Kernel/Syscalls/write.cpp2
-rw-r--r--Kernel/TTY/MasterPTY.cpp2
-rw-r--r--Kernel/TTY/PTYMultiplexer.cpp2
-rw-r--r--Kernel/TTY/SlavePTY.cpp2
-rw-r--r--Kernel/TTY/TTY.cpp2
-rw-r--r--Kernel/Thread.cpp2
-rw-r--r--Kernel/Thread.h2
-rw-r--r--Kernel/ThreadBlockers.cpp2
-rw-r--r--Kernel/Time/HPET.cpp2
-rw-r--r--Kernel/Time/HPETComparator.cpp2
-rw-r--r--Kernel/VM/AnonymousVMObject.cpp2
-rw-r--r--Kernel/VM/PurgeablePageRanges.cpp2
-rw-r--r--Kernel/VM/RangeAllocator.cpp2
-rw-r--r--Kernel/VM/Region.cpp2
-rw-r--r--Kernel/WaitQueue.cpp2
-rw-r--r--Meta/Lagom/CMakeLists.txt1
68 files changed, 223 insertions, 196 deletions
diff --git a/AK/Debug.h.in b/AK/Debug.h.in
index 98e8258b74..bca222104f 100644
--- a/AK/Debug.h.in
+++ b/AK/Debug.h.in
@@ -26,165 +26,94 @@
#pragma once
-#cmakedefine01 PROCESS_DEBUG
-#cmakedefine01 SCHEDULER_DEBUG
-#cmakedefine01 SCHEDULER_RUNNABLE_DEBUG
-#cmakedefine01 THREAD_DEBUG
-#cmakedefine01 LOCK_DEBUG
-#cmakedefine01 SIGNAL_DEBUG
+#cmakedefine01 AUTOCOMPLETE_DEBUG
+#cmakedefine01 AWAVLOADER_DEBUG
#cmakedefine01 BMP_DEBUG
-#cmakedefine01 WAITBLOCK_DEBUG
-#cmakedefine01 WAITQUEUE_DEBUG
-#cmakedefine01 MULTIPROCESSOR_DEBUG
-#cmakedefine01 ACPI_DEBUG
-#cmakedefine01 PAGE_FAULT_DEBUG
-#cmakedefine01 CONTEXT_SWITCH_DEBUG
-#cmakedefine01 SMP_DEBUG
-#cmakedefine01 BXVGA_DEBUG
-#cmakedefine01 PS2MOUSE_DEBUG
-#cmakedefine01 VMWARE_BACKDOOR_DEBUG
-#cmakedefine01 FILEDESCRIPTION_DEBUG
-#cmakedefine01 PROCFS_DEBUG
-#cmakedefine01 VFS_DEBUG
-#cmakedefine01 IOAPIC_DEBUG
-#cmakedefine01 IRQ_DEBUG
-#cmakedefine01 INTERRUPT_DEBUG
-#cmakedefine01 E1000_DEBUG
-#cmakedefine01 IPV4_SOCKET_DEBUG
-#cmakedefine01 LOCAL_SOCKET_DEBUG
-#cmakedefine01 SOCKET_DEBUG
-#cmakedefine01 TCP_SOCKET_DEBUG
-#cmakedefine01 PCI_DEBUG
-#cmakedefine01 PATA_DEBUG
-#cmakedefine01 IO_DEBUG
-#cmakedefine01 FORK_DEBUG
-#cmakedefine01 POLL_SELECT_DEBUG
-#cmakedefine01 HPET_DEBUG
-#cmakedefine01 HPET_COMPARATOR_DEBUG
-#cmakedefine01 MASTERPTY_DEBUG
-#cmakedefine01 SLAVEPTY_DEBUG
-#cmakedefine01 PTMX_DEBUG
-#cmakedefine01 TTY_DEBUG
-#cmakedefine01 CONTIGUOUS_VMOBJECT_DEBUG
-#cmakedefine01 VRA_DEBUG
-#cmakedefine01 COPY_DEBUG
-#cmakedefine01 CURSOR_TOOL_DEBUG
-#cmakedefine01 FILE_CONTENT_DEBUG
-#cmakedefine01 GZIP_DEBUG
-#cmakedefine01 CNETWORKJOB_DEBUG
-#cmakedefine01 CSOCKET_DEBUG
-#cmakedefine01 SAFE_SYSCALL_DEBUG
-#cmakedefine01 GHASH_PROCESS_DEBUG
-#cmakedefine01 NT_DEBUG
-#cmakedefine01 CRYPTO_DEBUG
-#cmakedefine01 DWARF_DEBUG
-#cmakedefine01 HUNKS_DEBUG
-#cmakedefine01 JOB_DEBUG
-#cmakedefine01 GIF_DEBUG
-#cmakedefine01 JPG_DEBUG
-#cmakedefine01 EMOJI_DEBUG
-#cmakedefine01 FILL_PATH_DEBUG
-#cmakedefine01 PNG_DEBUG
-#cmakedefine01 PORTABLE_IMAGE_LOADER_DEBUG
-#cmakedefine01 SYNTAX_HIGHLIGHTING_DEBUG
-#cmakedefine01 KEYBOARD_SHORTCUTS_DEBUG
-#cmakedefine01 MARKDOWN_DEBUG
-#cmakedefine01 REGEX_DEBUG
-#cmakedefine01 TLS_DEBUG
-#cmakedefine01 SPAM_DEBUG
-#cmakedefine01 WRAPPER_GENERATOR_DEBUG
-#cmakedefine01 PARSER_DEBUG
-#cmakedefine01 TOKENIZER_TRACE_DEBUG
-#cmakedefine01 IMAGE_LOADER_DEBUG
-#cmakedefine01 RESOURCE_DEBUG
#cmakedefine01 CACHE_DEBUG
-#cmakedefine01 DHCPV4_DEBUG
-#cmakedefine01 DHCPV4CLIENT_DEBUG
-#cmakedefine01 IMAGE_DECODER_DEBUG
-#cmakedefine01 SYSTEM_MENU_DEBUG
-#cmakedefine01 SYSTEMSERVER_DEBUG
-#cmakedefine01 SERVICE_DEBUG
-#cmakedefine01 COMPOSE_DEBUG
-#cmakedefine01 MINIMIZE_ANIMATION_DEBUG
-#cmakedefine01 OCCLUSIONS_DEBUG
-#cmakedefine01 MENUS_DEBUG
-#cmakedefine01 WSSCREEN_DEBUG
-#cmakedefine01 WINDOWMANAGER_DEBUG
-#cmakedefine01 RESIZE_DEBUG
-#cmakedefine01 MOVE_DEBUG
-#cmakedefine01 DOUBLECLICK_DEBUG
-#cmakedefine01 DISASM_DUMP_DEBUG
-#cmakedefine01 PATH_DEBUG
-#cmakedefine01 LOCK_TRACE_DEBUG
-#cmakedefine01 LOCK_RESTORE_DEBUG
-#cmakedefine01 FUTEXQUEUE_DEBUG
-#cmakedefine01 FUTEX_DEBUG
-#cmakedefine01 UHCI_DEBUG
-#cmakedefine01 APIC_DEBUG
-#cmakedefine01 APIC_SMP_DEBUG
-#cmakedefine01 ARP_DEBUG
-#cmakedefine01 AWAVLOADER_DEBUG
-#cmakedefine01 BBFS_DEBUG
#cmakedefine01 CALLBACK_MACHINE_DEBUG
#cmakedefine01 CHTTPJOB_DEBUG
-#cmakedefine01 COMMIT_DEBUG
-#cmakedefine01 AUTOCOMPLETE_DEBUG
+#cmakedefine01 CNETWORKJOB_DEBUG
+#cmakedefine01 COMPOSE_DEBUG
+#cmakedefine01 COPY_DEBUG
#cmakedefine01 CPP_LANGUAGE_SERVER_DEBUG
-#cmakedefine01 DIFF_DEBUG
-#cmakedefine01 HIGHLIGHT_FOCUSED_FRAME_DEBUG
-#cmakedefine01 ITEM_RECTS_DEBUG
-#cmakedefine01 SH_LANGUAGE_SERVER_DEBUG
-#cmakedefine01 STRINGIMPL_DEBUG
-#cmakedefine01 TEXTEDITOR_DEBUG
+#cmakedefine01 CRYPTO_DEBUG
+#cmakedefine01 CSOCKET_DEBUG
+#cmakedefine01 CURSOR_TOOL_DEBUG
#cmakedefine01 DEFERRED_INVOKE_DEBUG
+#cmakedefine01 DHCPV4CLIENT_DEBUG
+#cmakedefine01 DHCPV4_DEBUG
+#cmakedefine01 DIFF_DEBUG
+#cmakedefine01 DISASM_DUMP_DEBUG
+#cmakedefine01 DOUBLECLICK_DEBUG
+#cmakedefine01 DWARF_DEBUG
#cmakedefine01 DYNAMIC_LOAD_DEBUG
#cmakedefine01 EDITOR_DEBUG
#cmakedefine01 ELF_IMAGE_DEBUG
-#cmakedefine01 ETHERNET_DEBUG
-#cmakedefine01 ETHERNET_VERY_DEBUG
+#cmakedefine01 EMOJI_DEBUG
#cmakedefine01 EVENT_DEBUG
#cmakedefine01 EVENTLOOP_DEBUG
-#cmakedefine01 EXEC_DEBUG
-#cmakedefine01 EXT2_DEBUG
-#cmakedefine01 EXT2_VERY_DEBUG
-#cmakedefine01 FIFO_DEBUG
+#cmakedefine01 FILE_CONTENT_DEBUG
+#cmakedefine01 FILL_PATH_DEBUG
#cmakedefine01 GEMINI_DEBUG
#cmakedefine01 GEMINIJOB_DEBUG
-#cmakedefine01 GENERATE_DEBUG_CODE
+#cmakedefine01 GENERATE_DEBUG
+#cmakedefine01 GHASH_PROCESS_DEBUG
+#cmakedefine01 GIF_DEBUG
#cmakedefine01 GLOBAL_DTORS_DEBUG
#cmakedefine01 GMENU_DEBUG
+#cmakedefine01 GZIP_DEBUG
#cmakedefine01 HEAP_DEBUG
#cmakedefine01 HEX_DEBUG
+#cmakedefine01 HIGHLIGHT_FOCUSED_FRAME_DEBUG
#cmakedefine01 HTTPSJOB_DEBUG
-#cmakedefine01 ICMP_DEBUG
+#cmakedefine01 HUNKS_DEBUG
#cmakedefine01 ICO_DEBUG
-#cmakedefine01 IPV4_DEBUG
+#cmakedefine01 IMAGE_DECODER_DEBUG
+#cmakedefine01 IMAGE_LOADER_DEBUG
#cmakedefine01 IRC_DEBUG
-#cmakedefine01 KEYBOARD_DEBUG
-#cmakedefine01 KMALLOC_DEBUG_LARGE_ALLOCATIONS
+#cmakedefine01 ITEM_RECTS_DEBUG
+#cmakedefine01 JOB_DEBUG
+#cmakedefine01 JPG_DEBUG
+#cmakedefine01 KEYBOARD_SHORTCUTS_DEBUG
#cmakedefine01 LEXER_DEBUG
+#cmakedefine01 LOG_DEBUG
#cmakedefine01 LOOKUPSERVER_DEBUG
#cmakedefine01 MALLOC_DEBUG
-#cmakedefine01 MBR_DEBUG
+#cmakedefine01 MARKDOWN_DEBUG
#cmakedefine01 MEMORY_DEBUG
#cmakedefine01 MENU_DEBUG
-#cmakedefine01 NETWORK_TASK_DEBUG
+#cmakedefine01 MENUS_DEBUG
+#cmakedefine01 MINIMIZE_ANIMATION_DEBUG
+#cmakedefine01 MOVE_DEBUG
+#cmakedefine01 NT_DEBUG
#cmakedefine01 OBJECT_DEBUG
-#cmakedefine01 OFFD_DEBUG
+#cmakedefine01 OCCLUSIONS_DEBUG
+#cmakedefine01 PARSER_DEBUG
+#cmakedefine01 PATH_DEBUG
+#cmakedefine01 PNG_DEBUG
+#cmakedefine01 PORTABLE_IMAGE_LOADER_DEBUG
#cmakedefine01 PTHREAD_DEBUG
#cmakedefine01 REACHABLE_DEBUG
-#cmakedefine01 ROUTING_DEBUG
-#cmakedefine01 RTL8139_DEBUG
-#cmakedefine01 SB16_DEBUG
+#cmakedefine01 REGEX_DEBUG
+#cmakedefine01 RESIZE_DEBUG
+#cmakedefine01 RESOURCE_DEBUG
+#cmakedefine01 SAFE_SYSCALL_DEBUG
+#cmakedefine01 SERVICE_DEBUG
#cmakedefine01 SH_DEBUG
-#cmakedefine01 STORAGE_DEVICE_DEBUG
-#cmakedefine01 TCP_DEBUG
+#cmakedefine01 SH_LANGUAGE_SERVER_DEBUG
+#cmakedefine01 SPAM_DEBUG
+#cmakedefine01 STRINGIMPL_DEBUG
+#cmakedefine01 SYNTAX_HIGHLIGHTING_DEBUG
+#cmakedefine01 SYSTEM_MENU_DEBUG
+#cmakedefine01 SYSTEMSERVER_DEBUG
#cmakedefine01 TERMCAP_DEBUG
#cmakedefine01 TERMINAL_DEBUG
+#cmakedefine01 TEXTEDITOR_DEBUG
+#cmakedefine01 TLS_DEBUG
+#cmakedefine01 TOKENIZER_TRACE_DEBUG
#cmakedefine01 UCI_DEBUG
-#cmakedefine01 UDP_DEBUG
-#cmakedefine01 UHCI_VERBOSE_DEBUG
#cmakedefine01 UPDATE_COALESCING_DEBUG
-#cmakedefine01 VOLATILE_PAGE_RANGES_DEBUG
+#cmakedefine01 WINDOWMANAGER_DEBUG
+#cmakedefine01 WRAPPER_GENERATOR_DEBUG
#cmakedefine01 WSMESSAGELOOP_DEBUG
-#cmakedefine01 GPT_DEBUG
+#cmakedefine01 WSSCREEN_DEBUG
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd6e5683b4..56501c6fe4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,7 @@ if (ENABLE_ALL_THE_DEBUG_MACROS)
endif(ENABLE_ALL_THE_DEBUG_MACROS)
configure_file(AK/Debug.h.in AK/Debug.h @ONLY)
+configure_file(Kernel/Debug.h.in Kernel/Debug.h @ONLY)
include_directories(Userland/Libraries)
include_directories(.)
diff --git a/Kernel/ACPI/MultiProcessorParser.cpp b/Kernel/ACPI/MultiProcessorParser.cpp
index b0968adc9a..b71da84daf 100644
--- a/Kernel/ACPI/MultiProcessorParser.cpp
+++ b/Kernel/ACPI/MultiProcessorParser.cpp
@@ -25,10 +25,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/StringView.h>
#include <Kernel/ACPI/MultiProcessorParser.h>
#include <Kernel/Arch/PC/BIOS.h>
+#include <Kernel/Debug.h>
#include <Kernel/Interrupts/IOAPIC.h>
#include <Kernel/StdLib.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp
index 3f8d0de867..39ab067514 100644
--- a/Kernel/ACPI/Parser.cpp
+++ b/Kernel/ACPI/Parser.cpp
@@ -25,10 +25,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/StringView.h>
#include <Kernel/ACPI/Parser.h>
#include <Kernel/Arch/PC/BIOS.h>
+#include <Kernel/Debug.h>
#include <Kernel/IO.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/StdLib.h>
diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp
index 32deb2e26d..8af17c6027 100644
--- a/Kernel/Arch/i386/CPU.cpp
+++ b/Kernel/Arch/i386/CPU.cpp
@@ -25,7 +25,7 @@
*/
#include <AK/Assertions.h>
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <AK/ScopeGuard.h>
#include <AK/String.h>
#include <AK/StringBuilder.h>
diff --git a/Kernel/Debug.h.in b/Kernel/Debug.h.in
new file mode 100644
index 0000000000..9aab795ea9
--- /dev/null
+++ b/Kernel/Debug.h.in
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2021, Paul Scharnofske
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#cmakedefine01 ACPI_DEBUG
+#cmakedefine01 APIC_DEBUG
+#cmakedefine01 APIC_SMP_DEBUG
+#cmakedefine01 ARP_DEBUG
+#cmakedefine01 BBFS_DEBUG
+#cmakedefine01 BXVGA_DEBUG
+#cmakedefine01 COMMIT_DEBUG
+#cmakedefine01 CONTEXT_SWITCH_DEBUG
+#cmakedefine01 CONTIGUOUS_VMOBJECT_DEBUG
+#cmakedefine01 E1000_DEBUG
+#cmakedefine01 ETHERNET_DEBUG
+#cmakedefine01 ETHERNET_VERY_DEBUG
+#cmakedefine01 EXEC_DEBUG
+#cmakedefine01 EXT2_DEBUG
+#cmakedefine01 EXT2_VERY_DEBUG
+#cmakedefine01 FIFO_DEBUG
+#cmakedefine01 FILEDESCRIPTION_DEBUG
+#cmakedefine01 FORK_DEBUG
+#cmakedefine01 FUTEX_DEBUG
+#cmakedefine01 FUTEXQUEUE_DEBUG
+#cmakedefine01 GPT_DEBUG
+#cmakedefine01 HPET_COMPARATOR_DEBUG
+#cmakedefine01 HPET_DEBUG
+#cmakedefine01 ICMP_DEBUG
+#cmakedefine01 INTERRUPT_DEBUG
+#cmakedefine01 IOAPIC_DEBUG
+#cmakedefine01 IO_DEBUG
+#cmakedefine01 IPV4_DEBUG
+#cmakedefine01 IPV4_SOCKET_DEBUG
+#cmakedefine01 IRQ_DEBUG
+#cmakedefine01 KEYBOARD_DEBUG
+#cmakedefine01 KMALLOC_DEBUG
+#cmakedefine01 LOCAL_SOCKET_DEBUG
+#cmakedefine01 LOCK_DEBUG
+#cmakedefine01 LOCK_RESTORE_DEBUG
+#cmakedefine01 LOCK_TRACE_DEBUG
+#cmakedefine01 MASTERPTY_DEBUG
+#cmakedefine01 MBR_DEBUG
+#cmakedefine01 MULTIPROCESSOR_DEBUG
+#cmakedefine01 NETWORK_TASK_DEBUG
+#cmakedefine01 OFFD_DEBUG
+#cmakedefine01 PAGE_FAULT_DEBUG
+#cmakedefine01 PATA_DEBUG
+#cmakedefine01 PCI_DEBUG
+#cmakedefine01 POLL_SELECT_DEBUG
+#cmakedefine01 PROCESS_DEBUG
+#cmakedefine01 PROCFS_DEBUG
+#cmakedefine01 PS2MOUSE_DEBUG
+#cmakedefine01 PTMX_DEBUG
+#cmakedefine01 ROUTING_DEBUG
+#cmakedefine01 RTL8139_DEBUG
+#cmakedefine01 SB16_DEBUG
+#cmakedefine01 SCHEDULER_DEBUG
+#cmakedefine01 SCHEDULER_RUNNABLE_DEBUG
+#cmakedefine01 SIGNAL_DEBUG
+#cmakedefine01 SLAVEPTY_DEBUG
+#cmakedefine01 SMP_DEBUG
+#cmakedefine01 SOCKET_DEBUG
+#cmakedefine01 STORAGE_DEVICE_DEBUG
+#cmakedefine01 TCP_DEBUG
+#cmakedefine01 TCP_SOCKET_DEBUG
+#cmakedefine01 THREAD_DEBUG
+#cmakedefine01 TTY_DEBUG
+#cmakedefine01 UDP_DEBUG
+#cmakedefine01 UHCI_DEBUG
+#cmakedefine01 UHCI_VERBOSE_DEBUG
+#cmakedefine01 VFS_DEBUG
+#cmakedefine01 VMWARE_BACKDOOR_DEBUG
+#cmakedefine01 VOLATILE_PAGE_RANGES_DEBUG
+#cmakedefine01 VRA_DEBUG
+#cmakedefine01 WAITBLOCK_DEBUG
+#cmakedefine01 WAITQUEUE_DEBUG
+#cmakedefine01 KMALLOC_DEBUG_LARGE_ALLOCATIONS
diff --git a/Kernel/Devices/BXVGADevice.cpp b/Kernel/Devices/BXVGADevice.cpp
index c915a46ee7..727dcd67ef 100644
--- a/Kernel/Devices/BXVGADevice.cpp
+++ b/Kernel/Devices/BXVGADevice.cpp
@@ -25,8 +25,8 @@
*/
#include <AK/Checked.h>
-#include <AK/Debug.h>
#include <AK/Singleton.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/BXVGADevice.h>
#include <Kernel/IO.h>
#include <Kernel/PCI/Access.h>
diff --git a/Kernel/Devices/KeyboardDevice.cpp b/Kernel/Devices/KeyboardDevice.cpp
index b93e5cf21a..3708275f16 100644
--- a/Kernel/Devices/KeyboardDevice.cpp
+++ b/Kernel/Devices/KeyboardDevice.cpp
@@ -26,11 +26,11 @@
#include <AK/Assertions.h>
#include <AK/ByteBuffer.h>
-#include <AK/Debug.h>
#include <AK/Singleton.h>
#include <AK/StringView.h>
#include <AK/Types.h>
#include <Kernel/Arch/i386/CPU.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/KeyboardDevice.h>
#include <Kernel/IO.h>
#include <Kernel/TTY/VirtualConsole.h>
diff --git a/Kernel/Devices/PS2MouseDevice.cpp b/Kernel/Devices/PS2MouseDevice.cpp
index 962284acf6..47f0451ec9 100644
--- a/Kernel/Devices/PS2MouseDevice.cpp
+++ b/Kernel/Devices/PS2MouseDevice.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Memory.h>
#include <AK/Singleton.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/PS2MouseDevice.h>
#include <Kernel/Devices/VMWareBackdoor.h>
#include <Kernel/IO.h>
diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp
index 2138bc65fb..b5354b7843 100644
--- a/Kernel/Devices/SB16.cpp
+++ b/Kernel/Devices/SB16.cpp
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Memory.h>
#include <AK/Singleton.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/SB16.h>
#include <Kernel/IO.h>
#include <Kernel/Thread.h>
diff --git a/Kernel/Devices/USB/UHCIController.cpp b/Kernel/Devices/USB/UHCIController.cpp
index 844a2dd621..71ed9a9d21 100644
--- a/Kernel/Devices/USB/UHCIController.cpp
+++ b/Kernel/Devices/USB/UHCIController.cpp
@@ -25,7 +25,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/USB/UHCIController.h>
#include <Kernel/Process.h>
#include <Kernel/StdLib.h>
diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp
index 06c53c7cac..49d1ff2528 100644
--- a/Kernel/Devices/VMWareBackdoor.cpp
+++ b/Kernel/Devices/VMWareBackdoor.cpp
@@ -25,13 +25,13 @@
*/
#include <AK/Assertions.h>
-#include <AK/Debug.h>
#include <AK/OwnPtr.h>
#include <AK/Singleton.h>
#include <AK/String.h>
#include <Kernel/API/MousePacket.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/CommandLine.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/VMWareBackdoor.h>
#include <Kernel/IO.h>
diff --git a/Kernel/FileSystem/BlockBasedFileSystem.cpp b/Kernel/FileSystem/BlockBasedFileSystem.cpp
index fe22b4aa94..78b9570a2b 100644
--- a/Kernel/FileSystem/BlockBasedFileSystem.cpp
+++ b/Kernel/FileSystem/BlockBasedFileSystem.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/IntrusiveList.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/BlockBasedFileSystem.h>
#include <Kernel/Process.h>
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 3b695ce070..bc68681070 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -25,11 +25,11 @@
*/
#include <AK/Bitmap.h>
-#include <AK/Debug.h>
#include <AK/HashMap.h>
#include <AK/MemoryStream.h>
#include <AK/StdLibExtras.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/FileSystem/Ext2FileSystem.h>
#include <Kernel/FileSystem/FileDescription.h>
diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp
index b9897702b3..5b419b1efa 100644
--- a/Kernel/FileSystem/FIFO.cpp
+++ b/Kernel/FileSystem/FIFO.cpp
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/HashTable.h>
#include <AK/Singleton.h>
#include <AK/StdLibExtras.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FIFO.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Lock.h>
diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp
index 4b38811c23..6757be97ad 100644
--- a/Kernel/FileSystem/FileDescription.cpp
+++ b/Kernel/FileSystem/FileDescription.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/MemoryStream.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/FileSystem/Custody.h>
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp
index 45c5632407..ff8a92593b 100644
--- a/Kernel/FileSystem/ProcFS.cpp
+++ b/Kernel/FileSystem/ProcFS.cpp
@@ -24,7 +24,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/JsonArraySerializer.h>
#include <AK/JsonObject.h>
#include <AK/JsonObjectSerializer.h>
@@ -33,6 +32,7 @@
#include <Kernel/Arch/i386/ProcessorInfo.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Console.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/Devices/KeyboardDevice.h>
#include <Kernel/FileSystem/Custody.h>
diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp
index 549b72f43c..01db312c75 100644
--- a/Kernel/FileSystem/VirtualFileSystem.cpp
+++ b/Kernel/FileSystem/VirtualFileSystem.cpp
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/LexicalPath.h>
#include <AK/Singleton.h>
#include <AK/StringBuilder.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileBackedFileSystem.h>
diff --git a/Kernel/FileSystem/ext2_fs.h b/Kernel/FileSystem/ext2_fs.h
index 372423f0ec..6211a48545 100644
--- a/Kernel/FileSystem/ext2_fs.h
+++ b/Kernel/FileSystem/ext2_fs.h
@@ -23,11 +23,6 @@
*/
/*
- * Define EXT2FS_DEBUG to produce debug messages
- */
-#undef EXT2FS_DEBUG
-
-/*
* Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
*/
#define EXT2_PREALLOCATE
diff --git a/Kernel/FutexQueue.cpp b/Kernel/FutexQueue.cpp
index 4c89c2f015..9222fe7dc8 100644
--- a/Kernel/FutexQueue.cpp
+++ b/Kernel/FutexQueue.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FutexQueue.h>
#include <Kernel/Thread.h>
diff --git a/Kernel/Heap/kmalloc.h b/Kernel/Heap/kmalloc.h
index 43c03af3e8..adeb38559c 100644
--- a/Kernel/Heap/kmalloc.h
+++ b/Kernel/Heap/kmalloc.h
@@ -26,8 +26,8 @@
#pragma once
-#include <AK/Debug.h>
#include <AK/Types.h>
+#include <Kernel/Debug.h>
#define KMALLOC_SCRUB_BYTE 0xbb
#define KFREE_SCRUB_BYTE 0xaa
diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp
index 3ef76ba988..e6431f04c3 100644
--- a/Kernel/Interrupts/APIC.cpp
+++ b/Kernel/Interrupts/APIC.cpp
@@ -25,7 +25,6 @@
*/
#include <AK/Assertions.h>
-#include <AK/Debug.h>
#include <AK/Memory.h>
#include <AK/Singleton.h>
#include <AK/StringView.h>
@@ -33,6 +32,7 @@
#include <Kernel/ACPI/Parser.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Arch/i386/ProcessorInfo.h>
+#include <Kernel/Debug.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/APIC.h>
#include <Kernel/Interrupts/SpuriousInterruptHandler.h>
diff --git a/Kernel/Interrupts/IOAPIC.cpp b/Kernel/Interrupts/IOAPIC.cpp
index 195bc0acb7..7f20296e8e 100644
--- a/Kernel/Interrupts/IOAPIC.cpp
+++ b/Kernel/Interrupts/IOAPIC.cpp
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Optional.h>
#include <AK/StringView.h>
#include <Kernel/ACPI/MultiProcessorParser.h>
#include <Kernel/Arch/i386/CPU.h>
+#include <Kernel/Debug.h>
#include <Kernel/Interrupts/APIC.h>
#include <Kernel/Interrupts/IOAPIC.h>
#include <Kernel/Interrupts/InterruptManagement.h>
diff --git a/Kernel/Interrupts/IRQHandler.cpp b/Kernel/Interrupts/IRQHandler.cpp
index 620c4e9767..c8c74c7e48 100644
--- a/Kernel/Interrupts/IRQHandler.cpp
+++ b/Kernel/Interrupts/IRQHandler.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <Kernel/Arch/i386/CPU.h>
+#include <Kernel/Debug.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Interrupts/InterruptManagement.h>
diff --git a/Kernel/Interrupts/SharedIRQHandler.cpp b/Kernel/Interrupts/SharedIRQHandler.cpp
index 5d327849f0..6cf19ddbbe 100644
--- a/Kernel/Interrupts/SharedIRQHandler.cpp
+++ b/Kernel/Interrupts/SharedIRQHandler.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Assertions.h>
+#include <Kernel/Debug.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Interrupts/InterruptManagement.h>
#include <Kernel/Interrupts/PIC.h>
diff --git a/Kernel/Lock.cpp b/Kernel/Lock.cpp
index f1c523054e..1727d4ce3b 100644
--- a/Kernel/Lock.cpp
+++ b/Kernel/Lock.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/TemporaryChange.h>
+#include <Kernel/Debug.h>
#include <Kernel/KSyms.h>
#include <Kernel/Lock.h>
#include <Kernel/Thread.h>
diff --git a/Kernel/Net/E1000NetworkAdapter.cpp b/Kernel/Net/E1000NetworkAdapter.cpp
index 456cbfec42..9397c6d4fc 100644
--- a/Kernel/Net/E1000NetworkAdapter.cpp
+++ b/Kernel/Net/E1000NetworkAdapter.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/MACAddress.h>
+#include <Kernel/Debug.h>
#include <Kernel/IO.h>
#include <Kernel/Net/E1000NetworkAdapter.h>
#include <Kernel/Thread.h>
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index 38d5bce0f9..b53242634b 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Singleton.h>
#include <AK/StringBuilder.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Net/ARP.h>
#include <Kernel/Net/ICMP.h>
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp
index 6d604d9833..ee23fcd976 100644
--- a/Kernel/Net/LocalSocket.cpp
+++ b/Kernel/Net/LocalSocket.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Singleton.h>
#include <AK/StringBuilder.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Net/LocalSocket.h>
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp
index 67606f8d6d..edc25e0d6f 100644
--- a/Kernel/Net/NetworkTask.cpp
+++ b/Kernel/Net/NetworkTask.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Lock.h>
#include <Kernel/Net/ARP.h>
#include <Kernel/Net/EtherType.h>
diff --git a/Kernel/Net/RTL8139NetworkAdapter.cpp b/Kernel/Net/RTL8139NetworkAdapter.cpp
index bdfea42f7f..d74d746ed8 100644
--- a/Kernel/Net/RTL8139NetworkAdapter.cpp
+++ b/Kernel/Net/RTL8139NetworkAdapter.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/MACAddress.h>
+#include <Kernel/Debug.h>
#include <Kernel/IO.h>
#include <Kernel/Net/RTL8139NetworkAdapter.h>
diff --git a/Kernel/Net/Routing.cpp b/Kernel/Net/Routing.cpp
index a4100152e6..2c813c9afa 100644
--- a/Kernel/Net/Routing.cpp
+++ b/Kernel/Net/Routing.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/HashMap.h>
#include <AK/Singleton.h>
+#include <Kernel/Debug.h>
#include <Kernel/Net/LoopbackAdapter.h>
#include <Kernel/Net/Routing.h>
#include <Kernel/Thread.h>
diff --git a/Kernel/Net/Socket.cpp b/Kernel/Net/Socket.cpp
index 2b561cb233..e0d2e7bd1f 100644
--- a/Kernel/Net/Socket.cpp
+++ b/Kernel/Net/Socket.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/StringBuilder.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Net/IPv4Socket.h>
#include <Kernel/Net/LocalSocket.h>
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index c61e4dcbdd..2861a4accf 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Singleton.h>
#include <AK/Time.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/RandomDevice.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Net/NetworkAdapter.h>
diff --git a/Kernel/PCI/Access.cpp b/Kernel/PCI/Access.cpp
index d9eeea1f44..4bbe031265 100644
--- a/Kernel/PCI/Access.cpp
+++ b/Kernel/PCI/Access.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/IO.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/PCI/IOAccess.h>
diff --git a/Kernel/PCI/Definitions.h b/Kernel/PCI/Definitions.h
index a3be8b7d71..60bb13d868 100644
--- a/Kernel/PCI/Definitions.h
+++ b/Kernel/PCI/Definitions.h
@@ -26,12 +26,12 @@
#pragma once
-#include <AK/Debug.h>
#include <AK/Function.h>
#include <AK/LogStream.h>
#include <AK/String.h>
#include <AK/Types.h>
#include <AK/Vector.h>
+#include <Kernel/Debug.h>
namespace Kernel {
diff --git a/Kernel/PCI/IOAccess.cpp b/Kernel/PCI/IOAccess.cpp
index 8e67cf5f0b..8ca61245b7 100644
--- a/Kernel/PCI/IOAccess.cpp
+++ b/Kernel/PCI/IOAccess.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/IO.h>
#include <Kernel/PCI/IOAccess.h>
diff --git a/Kernel/PCI/MMIOAccess.cpp b/Kernel/PCI/MMIOAccess.cpp
index b91f51ed61..56831b5c21 100644
--- a/Kernel/PCI/MMIOAccess.cpp
+++ b/Kernel/PCI/MMIOAccess.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Optional.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/PCI/MMIOAccess.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 7636f7d35e..aa341b00bd 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -24,7 +24,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Demangle.h>
#include <AK/QuickSort.h>
#include <AK/StdLibExtras.h>
@@ -34,6 +33,7 @@
#include <Kernel/API/Syscall.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/CoreDump.h>
+#include <Kernel/Debug.h>
#include <Kernel/Devices/NullDevice.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index 30533328bf..4c66669183 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/QuickSort.h>
#include <AK/ScopeGuard.h>
#include <AK/TemporaryChange.h>
#include <AK/Time.h>
+#include <Kernel/Debug.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Process.h>
#include <Kernel/RTC.h>
diff --git a/Kernel/Storage/Partition/DiskPartition.cpp b/Kernel/Storage/Partition/DiskPartition.cpp
index 377244803d..6499fac5ed 100644
--- a/Kernel/Storage/Partition/DiskPartition.cpp
+++ b/Kernel/Storage/Partition/DiskPartition.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Storage/Partition/DiskPartition.h>
diff --git a/Kernel/Storage/Partition/GUIDPartitionTable.cpp b/Kernel/Storage/Partition/GUIDPartitionTable.cpp
index 58f65318b6..9f7b787aa5 100644
--- a/Kernel/Storage/Partition/GUIDPartitionTable.cpp
+++ b/Kernel/Storage/Partition/GUIDPartitionTable.cpp
@@ -26,7 +26,7 @@
#include <AK/AllOf.h>
#include <AK/Array.h>
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Storage/Partition/GUIDPartitionTable.h>
namespace Kernel {
diff --git a/Kernel/Storage/Partition/MBRPartitionTable.cpp b/Kernel/Storage/Partition/MBRPartitionTable.cpp
index f570938598..e56cc9ed2e 100644
--- a/Kernel/Storage/Partition/MBRPartitionTable.cpp
+++ b/Kernel/Storage/Partition/MBRPartitionTable.cpp
@@ -25,7 +25,7 @@
*/
#include <AK/ByteBuffer.h>
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Storage/Partition/MBRPartitionTable.h>
namespace Kernel {
diff --git a/Kernel/Storage/StorageDevice.cpp b/Kernel/Storage/StorageDevice.cpp
index b4e5f72178..98b3d08421 100644
--- a/Kernel/Storage/StorageDevice.cpp
+++ b/Kernel/Storage/StorageDevice.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Memory.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Storage/StorageDevice.h>
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index b6ebe30e66..321017622c 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/LexicalPath.h>
#include <AK/ScopeGuard.h>
#include <AK/TemporaryChange.h>
#include <AK/WeakPtr.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/PerformanceEventBuffer.h>
diff --git a/Kernel/Syscalls/fcntl.cpp b/Kernel/Syscalls/fcntl.cpp
index ce83415c77..c6a83cf85c 100644
--- a/Kernel/Syscalls/fcntl.cpp
+++ b/Kernel/Syscalls/fcntl.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp
index db600ee562..0f12b412a5 100644
--- a/Kernel/Syscalls/fork.cpp
+++ b/Kernel/Syscalls/fork.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp
index 0d12505aad..db312158fa 100644
--- a/Kernel/Syscalls/futex.cpp
+++ b/Kernel/Syscalls/futex.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Singleton.h>
#include <AK/Time.h>
+#include <Kernel/Debug.h>
#include <Kernel/Process.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp
index 43b0cc2890..e42f04a98b 100644
--- a/Kernel/Syscalls/open.cpp
+++ b/Kernel/Syscalls/open.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
diff --git a/Kernel/Syscalls/read.cpp b/Kernel/Syscalls/read.cpp
index b82924d34e..61744d0e26 100644
--- a/Kernel/Syscalls/read.cpp
+++ b/Kernel/Syscalls/read.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
diff --git a/Kernel/Syscalls/select.cpp b/Kernel/Syscalls/select.cpp
index aab13756ed..6b0548a13b 100644
--- a/Kernel/Syscalls/select.cpp
+++ b/Kernel/Syscalls/select.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/ScopeGuard.h>
#include <AK/Time.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
diff --git a/Kernel/Syscalls/waitid.cpp b/Kernel/Syscalls/waitid.cpp
index b7c33972a5..abba7c6f94 100644
--- a/Kernel/Syscalls/waitid.cpp
+++ b/Kernel/Syscalls/waitid.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/write.cpp b/Kernel/Syscalls/write.cpp
index fea030731d..f6aa4e9550 100644
--- a/Kernel/Syscalls/write.cpp
+++ b/Kernel/Syscalls/write.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/NumericLimits.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp
index e3da7a97cb..068b0a3166 100644
--- a/Kernel/TTY/MasterPTY.cpp
+++ b/Kernel/TTY/MasterPTY.cpp
@@ -27,7 +27,7 @@
#include "MasterPTY.h"
#include "PTYMultiplexer.h"
#include "SlavePTY.h"
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Process.h>
#include <LibC/errno_numbers.h>
#include <LibC/signal_numbers.h>
diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp
index 4bc9a3a886..79554b18f5 100644
--- a/Kernel/TTY/PTYMultiplexer.cpp
+++ b/Kernel/TTY/PTYMultiplexer.cpp
@@ -26,8 +26,8 @@
#include "PTYMultiplexer.h"
#include "MasterPTY.h"
-#include <AK/Debug.h>
#include <AK/Singleton.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
#include <LibC/errno_numbers.h>
diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp
index eef04946ef..a8024b3609 100644
--- a/Kernel/TTY/SlavePTY.cpp
+++ b/Kernel/TTY/SlavePTY.cpp
@@ -26,7 +26,7 @@
#include "SlavePTY.h"
#include "MasterPTY.h"
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/DevPtsFS.h>
#include <Kernel/Process.h>
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index 2bf26617a0..46795325f6 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/ScopeGuard.h>
+#include <Kernel/Debug.h>
#include <Kernel/Process.h>
#include <Kernel/TTY/TTY.h>
#include <LibC/errno_numbers.h>
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp
index 52fe586f0c..3aa69b1d0f 100644
--- a/Kernel/Thread.cpp
+++ b/Kernel/Thread.cpp
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Demangle.h>
#include <AK/ScopeGuard.h>
#include <AK/StringBuilder.h>
#include <AK/Time.h>
#include <Kernel/Arch/i386/CPU.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/KSyms.h>
#include <Kernel/PerformanceEventBuffer.h>
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 234878114b..99530bc1b5 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -26,7 +26,6 @@
#pragma once
-#include <AK/Debug.h>
#include <AK/Function.h>
#include <AK/IntrusiveList.h>
#include <AK/Optional.h>
@@ -38,6 +37,7 @@
#include <AK/Weakable.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Arch/i386/SafeMem.h>
+#include <Kernel/Debug.h>
#include <Kernel/Forward.h>
#include <Kernel/KResult.h>
#include <Kernel/LockMode.h>
diff --git a/Kernel/ThreadBlockers.cpp b/Kernel/ThreadBlockers.cpp
index 6f5834ca3a..fb6ad2b9c9 100644
--- a/Kernel/ThreadBlockers.cpp
+++ b/Kernel/ThreadBlockers.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Net/Socket.h>
#include <Kernel/Process.h>
diff --git a/Kernel/Time/HPET.cpp b/Kernel/Time/HPET.cpp
index e534a7b974..e3149f5568 100644
--- a/Kernel/Time/HPET.cpp
+++ b/Kernel/Time/HPET.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/StringView.h>
#include <Kernel/ACPI/Parser.h>
+#include <Kernel/Debug.h>
#include <Kernel/Interrupts/InterruptManagement.h>
#include <Kernel/Time/HPET.h>
#include <Kernel/Time/HPETComparator.h>
diff --git a/Kernel/Time/HPETComparator.cpp b/Kernel/Time/HPETComparator.cpp
index 66d7d5b52f..4c996829a4 100644
--- a/Kernel/Time/HPETComparator.cpp
+++ b/Kernel/Time/HPETComparator.cpp
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <Kernel/Assertions.h>
+#include <Kernel/Debug.h>
#include <Kernel/Time/HPETComparator.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/VM/AnonymousVMObject.cpp b/Kernel/VM/AnonymousVMObject.cpp
index 0d9ea25be9..bd3a44a154 100644
--- a/Kernel/VM/AnonymousVMObject.cpp
+++ b/Kernel/VM/AnonymousVMObject.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Process.h>
#include <Kernel/VM/AnonymousVMObject.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/VM/PurgeablePageRanges.cpp b/Kernel/VM/PurgeablePageRanges.cpp
index d672251e59..0782daef5b 100644
--- a/Kernel/VM/PurgeablePageRanges.cpp
+++ b/Kernel/VM/PurgeablePageRanges.cpp
@@ -25,8 +25,8 @@
*/
#include <AK/BinarySearch.h>
-#include <AK/Debug.h>
#include <AK/ScopeGuard.h>
+#include <Kernel/Debug.h>
#include <Kernel/Process.h>
#include <Kernel/VM/AnonymousVMObject.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/VM/RangeAllocator.cpp b/Kernel/VM/RangeAllocator.cpp
index f98f4015df..6ac36b0e15 100644
--- a/Kernel/VM/RangeAllocator.cpp
+++ b/Kernel/VM/RangeAllocator.cpp
@@ -25,8 +25,8 @@
*/
#include <AK/BinarySearch.h>
-#include <AK/Debug.h>
#include <AK/QuickSort.h>
+#include <Kernel/Debug.h>
#include <Kernel/Random.h>
#include <Kernel/Thread.h>
#include <Kernel/VM/RangeAllocator.h>
diff --git a/Kernel/VM/Region.cpp b/Kernel/VM/Region.cpp
index ed066d3034..3c18b1d65b 100644
--- a/Kernel/VM/Region.cpp
+++ b/Kernel/VM/Region.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
#include <AK/Memory.h>
#include <AK/StringView.h>
+#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Process.h>
#include <Kernel/Thread.h>
diff --git a/Kernel/WaitQueue.cpp b/Kernel/WaitQueue.cpp
index 6d6f3d9611..8197ddd813 100644
--- a/Kernel/WaitQueue.cpp
+++ b/Kernel/WaitQueue.cpp
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Debug.h>
+#include <Kernel/Debug.h>
#include <Kernel/Thread.h>
#include <Kernel/WaitQueue.h>
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt
index 5a1d1059e7..d49b5ba46b 100644
--- a/Meta/Lagom/CMakeLists.txt
+++ b/Meta/Lagom/CMakeLists.txt
@@ -81,6 +81,7 @@ set(LAGOM_MORE_SOURCES ${LIBELF_SOURCES} ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${
# in combination with the system, we generate two Debug.h files. One in
# Build/AK/Debug.h and the other in Build/Meta/Lagom/AK/Debug.h.
configure_file(../../AK/Debug.h.in AK/Debug.h @ONLY)
+configure_file(../../Kernel/Debug.h.in Kernel/Debug.h @ONLY)
include_directories(../../)
include_directories(../../Userland/)