1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +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:
asynts 2021-01-23 23:59:27 +01:00 committed by Andreas Kling
parent bb483f7ef4
commit 8465683dcf
98 changed files with 414 additions and 972 deletions

View file

@ -362,7 +362,7 @@ void E1000NetworkAdapter::initialize_tx_descriptors()
void E1000NetworkAdapter::out8(u16 address, u8 data)
{
dbgln<debug_e1000>("E1000: OUT8 {:#02x} @ {:#04x}", data, address);
dbgln<E1000_DEBUG>("E1000: OUT8 {:#02x} @ {:#04x}", data, address);
if (m_use_mmio) {
auto* ptr = (volatile u8*)(m_mmio_base.get() + address);
*ptr = data;
@ -373,7 +373,7 @@ void E1000NetworkAdapter::out8(u16 address, u8 data)
void E1000NetworkAdapter::out16(u16 address, u16 data)
{
dbgln<debug_e1000>("E1000: OUT16 {:#04x} @ {:#04x}", data, address);
dbgln<E1000_DEBUG>("E1000: OUT16 {:#04x} @ {:#04x}", data, address);
if (m_use_mmio) {
auto* ptr = (volatile u16*)(m_mmio_base.get() + address);
*ptr = data;
@ -384,7 +384,7 @@ void E1000NetworkAdapter::out16(u16 address, u16 data)
void E1000NetworkAdapter::out32(u16 address, u32 data)
{
dbgln<debug_e1000>("E1000: OUT32 {:#08x} @ {:#04x}", data, address);
dbgln<E1000_DEBUG>("E1000: OUT32 {:#08x} @ {:#04x}", data, address);
if (m_use_mmio) {
auto* ptr = (volatile u32*)(m_mmio_base.get() + address);
*ptr = data;
@ -395,7 +395,7 @@ void E1000NetworkAdapter::out32(u16 address, u32 data)
u8 E1000NetworkAdapter::in8(u16 address)
{
dbgln<debug_e1000>("E1000: IN8 @ {:#04x}", address);
dbgln<E1000_DEBUG>("E1000: IN8 @ {:#04x}", address);
if (m_use_mmio)
return *(volatile u8*)(m_mmio_base.get() + address);
return m_io_base.offset(address).in<u8>();
@ -403,7 +403,7 @@ u8 E1000NetworkAdapter::in8(u16 address)
u16 E1000NetworkAdapter::in16(u16 address)
{
dbgln<debug_e1000>("E1000: IN16 @ {:#04x}", address);
dbgln<E1000_DEBUG>("E1000: IN16 @ {:#04x}", address);
if (m_use_mmio)
return *(volatile u16*)(m_mmio_base.get() + address);
return m_io_base.offset(address).in<u16>();
@ -411,7 +411,7 @@ u16 E1000NetworkAdapter::in16(u16 address)
u32 E1000NetworkAdapter::in32(u16 address)
{
dbgln<debug_e1000>("E1000: IN32 @ {:#04x}", address);
dbgln<E1000_DEBUG>("E1000: IN32 @ {:#04x}", address);
if (m_use_mmio)
return *(volatile u32*)(m_mmio_base.get() + address);
return m_io_base.offset(address).in<u32>();