Replaced the temporary storage used in the kernel debug command parser. We now

have a simple dedicated heap for the kernel debugger with stacked allocation
pools (deleting a pool frees all memory allocated in it). The heap should
eventually be used for all commands that need temporary storage too large for
the stack instead of each using its own static buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30949 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-06-03 12:28:49 +00:00
parent 5734ece852
commit 360d4974b9
7 changed files with 407 additions and 64 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008, Ingo Weinhold, [email protected]
* Copyright 2008-2009, Ingo Weinhold, [email protected]
* Copyright 2002-2008, Axel Dörfler, [email protected]
* Distributed under the terms of the MIT License.
*
@@ -16,6 +16,7 @@
#include <KernelExport.h>
#include <debug.h>
#include <debug_heap.h>
#include <lock.h>
#include <thread.h>
#include <util/AutoLock.h>
@@ -273,6 +274,9 @@ invoke_debugger_command(struct debugger_command *command, int argc, char** argv)
// replace argv[0] with the actual command name
argv[0] = (char *)command->name;
DebugAllocPoolScope allocPoolScope;
// Will automatically clean up all allocations the command leaves over.
// Invoking the command directly might be useful when debugging debugger
// commands.
if (gInvokeCommandDirectly)