From a8992af5b44df6491caf68be4f067859ccafa19e Mon Sep 17 00:00:00 2001 From: shatty Date: Sun, 21 Nov 2004 03:48:22 +0000 Subject: [PATCH] stub Debug.h functions including possibly-working flag debug flag functions git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10077 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/os/debug.c | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/kernel/libroot/os/debug.c b/src/kernel/libroot/os/debug.c index 80a1c36e10..ca4dd4998c 100644 --- a/src/kernel/libroot/os/debug.c +++ b/src/kernel/libroot/os/debug.c @@ -29,3 +29,63 @@ disable_debugger(int state) return 0; } + +// relating to Debug.h +// TODO: verify these functions +// TODO: add implementations for printfs + +#include + +bool _rtDebugFlag = false; + +bool +_debugFlag(void) +{ + return _rtDebugFlag; +} + + +bool +_setDebugFlag(bool flag) +{ + bool previous = _rtDebugFlag; + _rtDebugFlag = flag; + return previous; +} + + +int +_debugPrintf(const char * message, ...) +{ + puts("*** _debugPrintf call - not yet implemented ***"); + printf("%s\n", message); + return 0; +} + + +int +_sPrintf(const char * message, ...) +{ + puts("*** _sPrintf call - not yet implemented ***"); + printf("%s\n", message); + return 0; +} + + +int +_xdebugPrintf(const char * message, ...) +{ + puts("*** _xdebugPrintf call - not yet implemented ***"); + printf("%s\n", message); + return 0; +} + + +int +_debuggerAssert(const char * file, int line, char * message) +{ + puts("*** _debuggerAssert call - not yet implemented ***"); + printf("%s:%d:%s\n", file, line, message); + return 0; +} +