summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/arm
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/arm')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
index 7691aa36df0..55d0e0c4884 100644
--- a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
@@ -117,7 +117,17 @@ DNBArchMachARM::Initialize()
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
OpenPOWER on IntegriCloud