AK: Don't add newline for outf/dbgf/warnf.

In the future all (normal) output should be written by any of the
following functions:

    out    (currently called new_out)
    outln
    dbg    (currently called new_dbg)
    dbgln
    warn   (currently called new_warn)
    warnln

However, there are still a ton of uses of the old out/warn/dbg in the
code base so the new functions are called new_out/new_warn/new_dbg. I am
going to rename them as soon as all the other usages are gone (this
might take a while.)

I also added raw_out/raw_dbg/raw_warn which don't do any escaping,
this should be useful if no formatting is required and if the input
contains tons of curly braces. (I am not entirely sure if this function
will stay, but I am adding it for now.)
This commit is contained in:
asynts 2020-10-04 15:35:43 +02:00 committed by Andreas Kling
parent 4237089a21
commit d5ffb51a83
Notes: sideshowbarker 2024-07-19 02:04:25 +09:00
16 changed files with 202 additions and 96 deletions

View file

@ -68,7 +68,7 @@ MmapRegion::~MmapRegion()
ValueWithShadow<u8> MmapRegion::read8(FlatPtr offset)
{
if (!is_readable()) {
warnf("8-bit read from unreadable MmapRegion @ {:p}", base() + offset);
warnln("8-bit read from unreadable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -85,7 +85,7 @@ ValueWithShadow<u8> MmapRegion::read8(FlatPtr offset)
ValueWithShadow<u16> MmapRegion::read16(u32 offset)
{
if (!is_readable()) {
warnf("16-bit read from unreadable MmapRegion @ {:p}", base() + offset);
warnln("16-bit read from unreadable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -102,7 +102,7 @@ ValueWithShadow<u16> MmapRegion::read16(u32 offset)
ValueWithShadow<u32> MmapRegion::read32(u32 offset)
{
if (!is_readable()) {
warnf("32-bit read from unreadable MmapRegion @ {:p}", base() + offset);
warnln("32-bit read from unreadable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -119,7 +119,7 @@ ValueWithShadow<u32> MmapRegion::read32(u32 offset)
ValueWithShadow<u64> MmapRegion::read64(u32 offset)
{
if (!is_readable()) {
warnf("64-bit read from unreadable MmapRegion @ {:p}", base() + offset);
warnln("64-bit read from unreadable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -136,7 +136,7 @@ ValueWithShadow<u64> MmapRegion::read64(u32 offset)
void MmapRegion::write8(u32 offset, ValueWithShadow<u8> value)
{
if (!is_writable()) {
warnf("8-bit write from unwritable MmapRegion @ {:p}", base() + offset);
warnln("8-bit write from unwritable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -154,7 +154,7 @@ void MmapRegion::write8(u32 offset, ValueWithShadow<u8> value)
void MmapRegion::write16(u32 offset, ValueWithShadow<u16> value)
{
if (!is_writable()) {
warnf("16-bit write from unwritable MmapRegion @ {:p}", base() + offset);
warnln("16-bit write from unwritable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -172,7 +172,7 @@ void MmapRegion::write16(u32 offset, ValueWithShadow<u16> value)
void MmapRegion::write32(u32 offset, ValueWithShadow<u32> value)
{
if (!is_writable()) {
warnf("32-bit write from unwritable MmapRegion @ {:p}", base() + offset);
warnln("32-bit write from unwritable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}
@ -191,7 +191,7 @@ void MmapRegion::write32(u32 offset, ValueWithShadow<u32> value)
void MmapRegion::write64(u32 offset, ValueWithShadow<u64> value)
{
if (!is_writable()) {
warnf("64-bit write from unwritable MmapRegion @ {:p}", base() + offset);
warnln("64-bit write from unwritable MmapRegion @ {:p}", base() + offset);
Emulator::the().dump_backtrace();
TODO();
}