serenity/Kernel/kstdio.h
Andreas Kling 0adbacf59e Kernel: Demangle userspace ELF symbols in backtraces
Turns out we can use abi::__cxa_demangle() for this, and all we need to
provide is sprintf(), realloc() and free(), so this patch exposes them.

We now have fully demangled C++ backtraces :^)
2019-11-27 14:06:24 +01:00

21 lines
374 B
C

#pragma once
#include <AK/Types.h>
extern "C" {
int dbgprintf(const char* fmt, ...);
int dbgputstr(const char*, int);
int kprintf(const char* fmt, ...);
int sprintf(char* buf, const char* fmt, ...);
void set_serial_debug(bool on_or_off);
int get_serial_debug();
}
#ifndef USERLAND
# define printf dbgprintf
#endif
#ifndef __serenity__
#define dbgprintf printf
#endif