aboutsummaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/debug.h b/src/debug.h
index 2ccbe58ba..b7521fec2 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <exception>
#include <assert.h>
#include "gettime.h"
+#include "log.h"
#if (defined(WIN32) || defined(_WIN32_WCE))
#define WIN32_LEAN_AND_MEAN
@@ -36,9 +37,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#endif
#define __NORETURN __declspec(noreturn)
#define __FUNCTION_NAME __FUNCTION__
+ #define NORETURN __declspec(noreturn)
+ #define FUNCTION_NAME __FUNCTION__
#else
#define __NORETURN __attribute__ ((__noreturn__))
#define __FUNCTION_NAME __PRETTY_FUNCTION__
+ #define NORETURN __attribute__ ((__noreturn__))
+ #define FUNCTION_NAME __PRETTY_FUNCTION__
#endif
// Whether to catch all std::exceptions.
@@ -50,30 +55,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define CATCH_UNHANDLED_EXCEPTIONS 0
#endif
-/*
- Debug output
-*/
-
-#define DTIME (getTimestamp()+": ")
-
-extern void debugstreams_init(bool disable_stderr, const char *filename);
-extern void debugstreams_deinit();
-
-// This is used to redirect output to /dev/null
-class Nullstream : public std::ostream {
-public:
- Nullstream():
- std::ostream(0)
- {
- }
-private:
-};
-
-extern std::ostream dstream;
-extern std::ostream dstream_no_stderr;
-extern Nullstream dummyout;
-
-
/* Abort program execution immediately
*/
__NORETURN extern void fatal_error_fn(
@@ -108,6 +89,8 @@ __NORETURN extern void sanity_check_fn(
void debug_set_exception_handler();
+#define DTIME ""
+
/*
DebugStack
*/