1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

AK+Kernel+LibC: Add vdbgprintf()

This is like dbgprintf() except it takes a va_list instead of ...
This commit is contained in:
Andreas Kling 2020-08-06 13:36:06 +02:00
parent 2f1d596dd3
commit 3055f73d48
3 changed files with 17 additions and 4 deletions

View file

@ -176,14 +176,20 @@ extern "C" int kernelputstr(const char* characters, int length)
return 0;
}
extern "C" int dbgprintf(const char* fmt, ...)
extern "C" int vdbgprintf(const char* fmt, va_list ap)
{
ScopedSpinLock lock(s_log_lock);
color_on();
va_list ap;
va_start(ap, fmt);
int ret = printf_internal(debugger_putch, nullptr, fmt, ap);
va_end(ap);
color_off();
return ret;
}
extern "C" int dbgprintf(const char* fmt, ...)
{
va_list ap;
va_start(ap, fmt);
int ret = vdbgprintf(fmt, ap);
va_end(ap);
return ret;
}