summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_debug.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-03 12:13:06 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-03 12:13:06 +0000
commit6b424a0550a5196818641857974f4cb04d61b933 (patch)
tree041142cdef81cc596f255c81fb8457fe5c36c737 /src/gallium/auxiliary/util/u_debug.h
parent0b0e7057128c213bee8d2158b976869475f7cb42 (diff)
util: Reimplement all utility functions in terms of the new OS abstraction.
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug.h')
-rw-r--r--src/gallium/auxiliary/util/u_debug.h37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index c9cd56f3053..eadc08fe2a0 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -39,7 +39,7 @@
#define U_DEBUG_H_
-#include "pipe/p_compiler.h"
+#include "os/os_misc.h"
#ifdef __cplusplus
@@ -47,17 +47,6 @@ extern "C" {
#endif
-#if defined(DBG) || defined(DEBUG)
-#ifndef DEBUG
-#define DEBUG 1
-#endif
-#else
-#ifndef NDEBUG
-#define NDEBUG 1
-#endif
-#endif
-
-
#if defined(__GNUC__)
#define _util_printf_format(fmt, list) __attribute__ ((format (printf, fmt, list)))
#else
@@ -148,13 +137,7 @@ void debug_print_format(const char *msg, unsigned fmt );
* Hard-coded breakpoint.
*/
#ifdef DEBUG
-#if (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)) && defined(PIPE_CC_GCC)
-#define debug_break() __asm("int3")
-#elif defined(PIPE_CC_MSVC)
-#define debug_break() __debugbreak()
-#else
-void debug_break(void);
-#endif
+#define debug_break() os_break()
#else /* !DEBUG */
#define debug_break() ((void)0)
#endif /* !DEBUG */
@@ -321,22 +304,6 @@ debug_get_flags_option(const char *name,
unsigned long dfault);
-void *
-debug_malloc(const char *file, unsigned line, const char *function,
- size_t size);
-
-void
-debug_free(const char *file, unsigned line, const char *function,
- void *ptr);
-
-void *
-debug_calloc(const char *file, unsigned line, const char *function,
- size_t count, size_t size );
-
-void *
-debug_realloc(const char *file, unsigned line, const char *function,
- void *old_ptr, size_t old_size, size_t new_size );
-
unsigned long
debug_memory_begin(void);