mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
Everywhere: Debug macros instead of constexpr.
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
This commit is contained in:
parent
bb483f7ef4
commit
8465683dcf
98 changed files with 414 additions and 972 deletions
|
@ -106,7 +106,7 @@ void BXVGADevice::revert_resolution()
|
|||
|
||||
void BXVGADevice::set_resolution_registers(size_t width, size_t height)
|
||||
{
|
||||
dbgln<debug_bxvga>("BXVGADevice resolution registers set to - {}x{}", width, height);
|
||||
dbgln<BXVGA_DEBUG>("BXVGADevice resolution registers set to - {}x{}", width, height);
|
||||
set_register(VBE_DISPI_INDEX_ENABLE, VBE_DISPI_DISABLED);
|
||||
set_register(VBE_DISPI_INDEX_XRES, (u16)width);
|
||||
set_register(VBE_DISPI_INDEX_YRES, (u16)height);
|
||||
|
@ -119,7 +119,7 @@ void BXVGADevice::set_resolution_registers(size_t width, size_t height)
|
|||
|
||||
bool BXVGADevice::test_resolution(size_t width, size_t height)
|
||||
{
|
||||
dbgln<debug_bxvga>("BXVGADevice resolution test - {}x{}", width, height);
|
||||
dbgln<BXVGA_DEBUG>("BXVGADevice resolution test - {}x{}", width, height);
|
||||
set_resolution_registers(width, height);
|
||||
bool resolution_changed = validate_setup_resolution(width, height);
|
||||
revert_resolution();
|
||||
|
@ -239,7 +239,7 @@ int BXVGADevice::ioctl(FileDescription&, unsigned request, FlatPtr arg)
|
|||
if (resolution.width > MAX_RESOLUTION_WIDTH || resolution.height > MAX_RESOLUTION_HEIGHT)
|
||||
return -EINVAL;
|
||||
if (!set_resolution(resolution.width, resolution.height)) {
|
||||
dbgln<debug_bxvga>("Reverting resolution: [{}x{}]", m_framebuffer_width, m_framebuffer_height);
|
||||
dbgln<BXVGA_DEBUG>("Reverting resolution: [{}x{}]", m_framebuffer_width, m_framebuffer_height);
|
||||
resolution.pitch = m_framebuffer_pitch;
|
||||
resolution.width = m_framebuffer_width;
|
||||
resolution.height = m_framebuffer_height;
|
||||
|
@ -247,7 +247,7 @@ int BXVGADevice::ioctl(FileDescription&, unsigned request, FlatPtr arg)
|
|||
return -EFAULT;
|
||||
return -EINVAL;
|
||||
}
|
||||
dbgln<debug_bxvga>("New resolution: [{}x{}]", m_framebuffer_width, m_framebuffer_height);
|
||||
dbgln<BXVGA_DEBUG>("New resolution: [{}x{}]", m_framebuffer_width, m_framebuffer_height);
|
||||
resolution.pitch = m_framebuffer_pitch;
|
||||
resolution.width = m_framebuffer_width;
|
||||
resolution.height = m_framebuffer_height;
|
||||
|
|
|
@ -99,7 +99,7 @@ void PS2MouseDevice::irq_handle_byte_read(u8 byte)
|
|||
|
||||
auto commit_packet = [&] {
|
||||
m_data_state = 0;
|
||||
dbgln<debug_ps2mouse>("PS2Mouse: {}, {} {} {}",
|
||||
dbgln<PS2MOUSE_DEBUG>("PS2Mouse: {}, {} {} {}",
|
||||
m_data.bytes[1],
|
||||
m_data.bytes[2],
|
||||
(m_data.bytes[0] & 1) ? "Left" : "",
|
||||
|
@ -283,7 +283,7 @@ KResultOr<size_t> PS2MouseDevice::read(FileDescription&, size_t, UserOrKernelBuf
|
|||
auto packet = m_queue.dequeue();
|
||||
lock.unlock();
|
||||
|
||||
if constexpr (debug_ps2mouse) {
|
||||
if constexpr (PS2MOUSE_DEBUG) {
|
||||
dbgln("PS2 Mouse Read: Buttons {:x}", packet.buttons);
|
||||
dbgln("PS2 Mouse: X {}, Y {}, Z {}, Relative {}", packet.x, packet.y, packet.z, packet.buttons);
|
||||
dbgln("PS2 Mouse Read: Filter packets");
|
||||
|
|
|
@ -177,7 +177,7 @@ void VMWareBackdoor::send_high_bandwidth(VMWareCommand& command)
|
|||
{
|
||||
vmware_high_bandwidth_send(command);
|
||||
|
||||
dbgln<debug_vmware_backdoor>("VMWareBackdoor Command High bandwidth Send Results: EAX {:#x} EBX {:#x} ECX {:#x} EDX {:#x}",
|
||||
dbgln<VMWARE_BACKDOOR_DEBUG>("VMWareBackdoor Command High bandwidth Send Results: EAX {:#x} EBX {:#x} ECX {:#x} EDX {:#x}",
|
||||
command.ax,
|
||||
command.bx,
|
||||
command.cx,
|
||||
|
@ -188,7 +188,7 @@ void VMWareBackdoor::get_high_bandwidth(VMWareCommand& command)
|
|||
{
|
||||
vmware_high_bandwidth_get(command);
|
||||
|
||||
dbgln<debug_vmware_backdoor>("VMWareBackdoor Command High bandwidth Get Results: EAX {:#x} EBX {:#x} ECX {:#x} EDX {:#x}",
|
||||
dbgln<VMWARE_BACKDOOR_DEBUG>("VMWareBackdoor Command High bandwidth Get Results: EAX {:#x} EBX {:#x} ECX {:#x} EDX {:#x}",
|
||||
command.ax,
|
||||
command.bx,
|
||||
command.cx,
|
||||
|
@ -199,7 +199,7 @@ void VMWareBackdoor::send(VMWareCommand& command)
|
|||
{
|
||||
vmware_out(command);
|
||||
|
||||
dbgln<debug_vmware_backdoor>("VMWareBackdoor Command Send Results: EAX {:#x} EBX {:#x} ECX {:#x} EDX {:#x}",
|
||||
dbgln<VMWARE_BACKDOOR_DEBUG>("VMWareBackdoor Command Send Results: EAX {:#x} EBX {:#x} ECX {:#x} EDX {:#x}",
|
||||
command.ax,
|
||||
command.bx,
|
||||
command.cx,
|
||||
|
@ -233,7 +233,7 @@ Optional<MousePacket> VMWareBackdoor::receive_mouse_packet()
|
|||
int y = (command.cx);
|
||||
int z = (command.dx);
|
||||
|
||||
if constexpr (debug_ps2mouse) {
|
||||
if constexpr (PS2MOUSE_DEBUG) {
|
||||
dbgln("Absolute Mouse: Buttons {:x}", buttons);
|
||||
dbgln("Mouse: x={}, y={}, z={}", x, y, z);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue