[haiku-commits] r42319 - haiku/trunk/src/system/kernel/debug

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 26 Jun 2011 00:48:39 +0200 (CEST)

Author: mmlr
Date: 2011-06-26 00:48:38 +0200 (Sun, 26 Jun 2011)
New Revision: 42319
Changeset: https://dev.haiku-os.org/changeset/42319

Modified:
   haiku/trunk/src/system/kernel/debug/debug.cpp
Log:
Use sInDebugger instead of sDebuggerOnCPU to determine if the debugger is
running. The former has a broader scope and lasts until the debugger exit is
actually done whereas the latter is already reset when the inner loop is exited.
This fixes the issue Ingo saw where the USB physical memory manager wasn't able
to free resources used for the debug transfer. It has reserved debug memory that
it uses depending on debug_debugger_running() and was therefore confused when
it returned false when called from the kernel debugger module exit hook.


Modified: haiku/trunk/src/system/kernel/debug/debug.cpp
===================================================================
--- haiku/trunk/src/system/kernel/debug/debug.cpp       2011-06-25 20:48:54 UTC 
(rev 42318)
+++ haiku/trunk/src/system/kernel/debug/debug.cpp       2011-06-25 22:48:38 UTC 
(rev 42319)
@@ -1617,7 +1617,7 @@
 bool
 debug_debugger_running(void)
 {
-       return sDebuggerOnCPU != -1;
+       return sInDebugger > 0;
 }
 
 


Other related posts:

  • » [haiku-commits] r42319 - haiku/trunk/src/system/kernel/debug - mmlr