ladybird/AK/Debug.h

588 lines
12 KiB
C
Raw Normal View History

/*
* Copyright (c) 2020, the SerenityOS developers.
* 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
// FIXME: We could generate this file with CMake and configure.
#ifdef PROCESS_DEBUG
constexpr bool debug_process = true;
#else
constexpr bool debug_process = false;
#endif
#ifdef SCHEDULER_DEBUG
constexpr bool debug_scheduler = true;
#else
constexpr bool debug_scheduler = false;
#endif
#ifdef SCHEDULER_RUNNABLE_DEBUG
constexpr bool debug_scheduler_runnable = true;
#else
constexpr bool debug_scheduler_runnable = false;
#endif
#ifdef THREAD_DEBUG
constexpr bool debug_thread = true;
#else
constexpr bool debug_thread = false;
#endif
#ifdef LOCK_DEBUG
constexpr bool debug_lock = true;
#else
constexpr bool debug_lock = false;
#endif
#ifdef SIGNAL_DEBUG
constexpr bool debug_signal = true;
#else
constexpr bool debug_signal = false;
#endif
#ifdef BMP_DEBUG
constexpr bool debug_bmp = true;
#else
constexpr bool debug_bmp = false;
#endif
#ifdef WAITBLOCK_DEBUG
constexpr bool debug_waitblock = true;
#else
constexpr bool debug_waitblock = false;
#endif
#ifdef WAITQUEUE_DEBUG
constexpr bool debug_waitqueue = true;
#else
constexpr bool debug_waitqueue = false;
#endif
#ifdef MULTIPROCESSOR_DEBUG
constexpr bool debug_multiprocessor = true;
#else
constexpr bool debug_multiprocessor = false;
#endif
#ifdef ACPI_DEBUG
constexpr bool debug_acpi = true;
#else
constexpr bool debug_acpi = false;
#endif
#ifdef PAGE_FAULT_DEBUG
constexpr bool debug_page_fault = true;
#else
constexpr bool debug_page_fault = false;
#endif
#ifdef CONTEXT_SWITCH_DEBUG
constexpr bool debug_context_switch = true;
#else
constexpr bool debug_context_switch = false;
#endif
#ifdef SMP_DEBUG
constexpr bool debug_smp = true;
#else
constexpr bool debug_smp = false;
#endif
#ifdef BXVGA_DEBUG
constexpr bool debug_bxvga = true;
#else
constexpr bool debug_bxvga = false;
#endif
#ifdef PS2MOUSE_DEBUG
constexpr bool debug_ps2mouse = true;
#else
constexpr bool debug_ps2mouse = false;
#endif
#ifdef VMWAREBACKDOOR_DEBUG
constexpr bool debug_vmware_backdoor = true;
#else
constexpr bool debug_vmware_backdoor = false;
#endif
#ifdef FILEDESCRIPTION_DEBUG
constexpr bool debug_file_description = true;
#else
constexpr bool debug_file_description = false;
#endif
#ifdef PROCFS_DEBUG
constexpr bool debug_procfs = true;
#else
constexpr bool debug_procfs = false;
#endif
#ifdef VFS_DEBUG
constexpr bool debug_vfs = true;
#else
constexpr bool debug_vfs = false;
#endif
#ifdef IOAPIC_DEBUG
constexpr bool debug_ioapic = true;
#else
constexpr bool debug_ioapic = false;
#endif
#ifdef IRQ_DEBUG
constexpr bool debug_irq = true;
#else
constexpr bool debug_irq = false;
#endif
#ifdef INTERRUPT_DEBUG
constexpr bool debug_interrupt = true;
#else
constexpr bool debug_interrupt = false;
#endif
#ifdef E1000_DEBUG
constexpr bool debug_e1000 = true;
#else
constexpr bool debug_e1000 = false;
#endif
#ifdef IPV4_SOCKET_DEBUG
constexpr bool debug_ipv4_socket = true;
#else
constexpr bool debug_ipv4_socket = false;
#endif
#ifdef DEBUG_LOCAL_SOCKET
constexpr bool debug_local_socket = true;
#else
constexpr bool debug_local_socket = false;
#endif
#ifdef DEBUG_SOCKET
constexpr bool debug_socket = true;
#else
constexpr bool debug_socket = false;
#endif
#ifdef TCP_SOCKET_DEBUG
constexpr bool debug_tcp_socket = true;
#else
constexpr bool debug_tcp_socket = false;
#endif
#ifdef PCI_DEBUG
constexpr bool debug_pci = true;
#else
constexpr bool debug_pci = false;
#endif
#ifdef PATA_DEBUG
constexpr bool debug_pata = true;
#else
constexpr bool debug_pata = false;
#endif
#ifdef DEBUG_IO
constexpr bool debug_io = true;
#else
constexpr bool debug_io = false;
#endif
#ifdef FORK_DEBUG
constexpr bool debug_fork = true;
#else
constexpr bool debug_fork = false;
#endif
#ifdef DEBUG_POLL_SELECT
constexpr bool debug_poll_select = true;
#else
constexpr bool debug_poll_select = false;
#endif
#ifdef HPET_DEBUG
constexpr bool debug_hpet = true;
#else
constexpr bool debug_hpet = false;
#endif
#ifdef HPET_COMPARATOR_DEBUG
constexpr bool debug_hpet_comperator = true;
#else
constexpr bool debug_hpet_comperator = false;
#endif
#ifdef MASTERPTY_DEBUG
constexpr bool debug_masterpty = true;
#else
constexpr bool debug_masterpty = false;
#endif
#ifdef SLAVEPTY_DEBUG
constexpr bool debug_slavepty = true;
#else
constexpr bool debug_slavepty = false;
#endif
#ifdef PTMX_DEBUG
constexpr bool debug_ptmx = true;
#else
constexpr bool debug_ptmx = false;
#endif
#ifdef TTY_DEBUG
constexpr bool debug_tty = true;
#else
constexpr bool debug_tty = false;
#endif
#ifdef CONTIGUOUS_VMOBJECT_DEBUG
constexpr bool debug_contiguous_vmobject = true;
#else
constexpr bool debug_contiguous_vmobject = false;
#endif
#ifdef VRA_DEBUG
constexpr bool debug_vra = true;
#else
constexpr bool debug_vra = false;
#endif
#ifdef COPY_DEBUG
constexpr bool debug_copy = true;
#else
constexpr bool debug_copy = false;
#endif
#ifdef DEBUG_CURSOR_TOOL
constexpr bool debug_cursor_tool = true;
#else
constexpr bool debug_cursor_tool = false;
#endif
#ifdef DEBUG_FILE_CONTENT
constexpr bool debug_file_content = true;
#else
constexpr bool debug_file_content = false;
#endif
#ifdef DEBUG_GZIP
constexpr bool debug_gzip = true;
#else
constexpr bool debug_gzip = false;
#endif
#ifdef CNETWORKJOB_DEBUG
constexpr bool debug_cnetworkjob = true;
#else
constexpr bool debug_cnetworkjob = false;
#endif
#ifdef CSOCKET_DEBUG
constexpr bool debug_csocket = true;
#else
constexpr bool debug_csocket = false;
#endif
#ifdef SAFE_SYSCALL_DEBUG
constexpr bool debug_safe_syscall = true;
#else
constexpr bool debug_safe_syscall = false;
#endif
#ifdef GHASH_PROCESS_DEBUG
constexpr bool debug_ghash_process = true;
#else
constexpr bool debug_ghash_process = false;
#endif
#ifdef NT_DEBUG
constexpr bool debug_nt = true;
#else
constexpr bool debug_nt = false;
#endif
#ifdef CRYPTO_DEBUG
constexpr bool debug_crypto = true;
#else
constexpr bool debug_crypto = false;
#endif
#ifdef DWARF_DEBUG
constexpr bool debug_dwarf = true;
#else
constexpr bool debug_dwarf = false;
#endif
#ifdef DEBUG_HUNKS
constexpr bool debug_hunks = true;
#else
constexpr bool debug_hunks = false;
#endif
#ifdef JOB_DEBUG
constexpr bool debug_job = true;
#else
constexpr bool debug_job = false;
#endif
#ifdef GIF_DEBUG
constexpr bool debug_gif = true;
#else
constexpr bool debug_gif = false;
#endif
#ifdef JPG_DEBUG
constexpr bool debug_jpg = true;
#else
constexpr bool debug_jpg = false;
#endif
#ifdef EMOJI_DEBUG
constexpr bool debug_emoji = true;
#else
constexpr bool debug_emoji = false;
#endif
#ifdef FILL_PATH_DEBUG
constexpr bool debug_fill_path = true;
#else
constexpr bool debug_fill_path = false;
#endif
#ifdef PNG_DEBUG
constexpr bool debug_png = true;
#else
constexpr bool debug_png = false;
#endif
#ifdef PORTABLE_IMAGE_LOADER_DEBUG
constexpr bool debug_portable_image_loader = true;
#else
constexpr bool debug_portable_image_loader = false;
#endif
#ifdef DEBUG_SYNTAX_HIGHLIGHTING
constexpr bool debug_syntax_highlighting = true;
#else
constexpr bool debug_syntax_highlighting = false;
#endif
#ifdef KEYBOARD_SHORTCUTS_DEBUG
constexpr bool debug_keyboard_shortcuts = true;
#else
constexpr bool debug_keyboard_shortcuts = false;
#endif
#ifdef DEBUG_MARKDOWN
constexpr bool debug_markdown = true;
#else
constexpr bool debug_markdown = false;
#endif
#ifdef REGEX_DEBUG
constexpr bool debug_regex = true;
#else
constexpr bool debug_regex = false;
#endif
#ifdef TLS_DEBUG
constexpr bool debug_tls = true;
#else
constexpr bool debug_tls = false;
#endif
#ifdef DEBUG_SPAM
constexpr bool debug_spam = true;
#else
constexpr bool debug_spam = false;
#endif
#ifdef WRAPPER_GERNERATOR_DEBUG
constexpr bool debug_wrapper_generator = true;
#else
constexpr bool debug_wrapper_generator = false;
#endif
#ifdef PARSER_DEBUG
constexpr bool debug_parser = true;
#else
constexpr bool debug_parser = false;
#endif
#ifdef TOKENIZER_TRACE
constexpr bool debug_trace_tokenizer = true;
#else
constexpr bool debug_trace_tokenizer = false;
#endif
#ifdef IMAGE_LOADER_DEBUG
constexpr bool debug_image_loader = true;
#else
constexpr bool debug_image_loader = false;
#endif
#ifdef RESOURCE_DEBUG
constexpr bool debug_resource = true;
#else
constexpr bool debug_resource = false;
#endif
#ifdef CACHE_DEBUG
constexpr bool debug_cache = true;
#else
constexpr bool debug_cache = false;
#endif
#ifdef DHCPV4_DEBUG
constexpr bool debug_dhcpv4 = true;
#else
constexpr bool debug_dhcpv4 = false;
#endif
#ifdef DHCPV4CLIENT_DEBUG
constexpr bool debug_dhcpv4_client = true;
#else
constexpr bool debug_dhcpv4_client = false;
#endif
#ifdef IMAGE_DECODER_DEBUG
constexpr bool debug_image_decoder = true;
#else
constexpr bool debug_image_decoder = false;
#endif
#ifdef SYSTEM_MENU_DEBUG
constexpr bool debug_system_menu = true;
#else
constexpr bool debug_system_menu = false;
#endif
#ifdef SYSTEMSERVER_DEBUG
constexpr bool debug_system_server = true;
#else
constexpr bool debug_system_server = false;
#endif
#ifdef SERVICE_DEBUG
constexpr bool debug_service = true;
#else
constexpr bool debug_service = false;
#endif
#ifdef COMPOSE_DEBUG
constexpr bool debug_compose = true;
#else
constexpr bool debug_compose = false;
#endif
#ifdef MINIMIZE_ANIMATION_DEBUG
constexpr bool debug_minimize_animation = true;
#else
constexpr bool debug_minimize_animation = false;
#endif
#ifdef OCCLUSIONS_DEBUG
constexpr bool debug_occlusions = true;
#else
constexpr bool debug_occlusions = false;
#endif
#ifdef DEBUG_MENUS
constexpr bool debug_menus = true;
#else
constexpr bool debug_menus = false;
#endif
#ifdef WSSCREEN_DEBUG
constexpr bool debug_wsscreen = true;
#else
constexpr bool debug_wsscreen = false;
#endif
#ifdef WINDOWMANAGER_DEBUG
constexpr bool debug_window_manager = true;
#else
constexpr bool debug_window_manager = false;
#endif
#ifdef RESIZE_DEBUG
constexpr bool debug_resize = true;
#else
constexpr bool debug_resize = false;
#endif
#ifdef MOVE_DEBUG
constexpr bool debug_move = true;
#else
constexpr bool debug_move = false;
#endif
#ifdef DOUBLECLICK_DEBUG
constexpr bool debug_double_click = true;
#else
constexpr bool debug_double_click = false;
#endif
#ifdef DISASM_DUMP
constexpr bool debug_disasm_dump = true;
#else
constexpr bool debug_disasm_dump = false;
#endif
#ifdef DEBUG_PATH
constexpr bool debug_path = true;
#else
constexpr bool debug_path = false;
#endif
#ifdef LOCK_TRACE_DEBUG
constexpr bool debug_lock_trace = true;
#else
constexpr bool debug_lock_trace = false;
#endif
#ifdef LOCK_RESTORE_DEBUG
constexpr bool debug_lock_restore = true;
#else
constexpr bool debug_lock_restore = false;
#endif
2021-01-23 14:30:51 +00:00
#ifdef FUTEXQUEUE_DEBUG
constexpr bool debug_futex_queue = true;
#else
constexpr bool debug_futex_queue = false;
#endif
#ifdef FUTEX_DEBUG
constexpr bool debug_futex = true;
#else
constexpr bool debug_futex = false;
#endif