Add heap_debug_set_debugger_calls() which allows to disable debugger calls for
the heap debug panics. Instead syslog output is generated if turned off. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35481 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c1502cf1b8
commit
ac653a30df
@ -16,6 +16,7 @@ status_t heap_debug_stop_wall_checking();
|
||||
|
||||
void heap_debug_set_memory_reuse(bool enabled);
|
||||
void heap_debug_set_paranoid_validation(bool enabled);
|
||||
void heap_debug_set_debugger_calls(bool enabled);
|
||||
void heap_debug_validate_heaps();
|
||||
void heap_debug_validate_walls();
|
||||
|
||||
|
@ -32,6 +32,13 @@
|
||||
#define ASSERT(x) if (!(x)) panic("assert failed: %s", #x);
|
||||
|
||||
|
||||
static bool sDebuggerCalls = true;
|
||||
static bool sReuseMemory = true;
|
||||
static bool sParanoidValidation = false;
|
||||
static thread_id sWallCheckThread = -1;
|
||||
static bool sStopWallChecking = false;
|
||||
|
||||
|
||||
void
|
||||
panic(const char *format, ...)
|
||||
{
|
||||
@ -42,7 +49,10 @@ panic(const char *format, ...)
|
||||
vsnprintf(buffer, sizeof(buffer), format, args);
|
||||
va_end(args);
|
||||
|
||||
debugger(buffer);
|
||||
if (sDebuggerCalls)
|
||||
debugger(buffer);
|
||||
else
|
||||
debug_printf(buffer);
|
||||
}
|
||||
|
||||
|
||||
@ -52,11 +62,6 @@ panic(const char *format, ...)
|
||||
#define HEAP_GROW_SIZE 2 * 1024 * 1024
|
||||
#define HEAP_AREA_USE_THRESHOLD 1 * 1024 * 1024
|
||||
|
||||
static bool sReuseMemory = true;
|
||||
static bool sParanoidValidation = false;
|
||||
static thread_id sWallCheckThread = -1;
|
||||
static bool sStopWallChecking = false;
|
||||
|
||||
typedef struct heap_leak_check_info_s {
|
||||
size_t size;
|
||||
thread_id thread;
|
||||
@ -1656,6 +1661,13 @@ heap_debug_set_memory_reuse(bool enabled)
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
heap_debug_set_debugger_calls(bool enabled)
|
||||
{
|
||||
sDebuggerCalls = enabled;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
heap_debug_validate_heaps()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user