[Lldb-commits] [lldb] r151393 - /lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp

Johnny Chen johnny.chen at apple.com
Fri Feb 24 13:13:45 PST 2012


Author: johnny
Date: Fri Feb 24 15:13:45 2012
New Revision: 151393

URL: http://llvm.org/viewvc/llvm-project?rev=151393&view=rev
Log:
Newly created threads are to inherit from the global debug state of the process.

Modified:
    lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp

Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp?rev=151393&r1=151392&r2=151393&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp Fri Feb 24 15:13:45 2012
@@ -117,7 +117,17 @@
 DNBArchProtocol *
 DNBArchMachARM::Create (MachThread *thread)
 {
-    return new DNBArchMachARM (thread);
+    DNBArchMachARM *obj = new DNBArchMachARM (thread);
+
+    // When new thread comes along, it tries to inherit from the global debug state, if it is valid.
+    if (Valid_Global_Debug_State)
+    {
+        obj->m_state.dbg = Global_Debug_State;
+        kern_return_t kret = obj->SetDBGState();
+        DNBLogThreadedIf(LOG_WATCHPOINTS,
+                         "DNBArchMachARM::Create() Inherit and SetDBGState() => 0x%8.8x.", kret);
+    }
+    return obj;
 }
 
 const uint8_t * const





More information about the lldb-commits mailing list