diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-02-24 21:13:45 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-02-24 21:13:45 +0000 |
commit | 2120e2bd732b0e0612e97cf253480807d76174ed (patch) | |
tree | 72ffd831b184928329adffbd670e5a3cde288824 /lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp | |
parent | 38d1f051670df42561ababba2a6f5914e0664254 (diff) | |
download | bcm5719-llvm-2120e2bd732b0e0612e97cf253480807d76174ed.tar.gz bcm5719-llvm-2120e2bd732b0e0612e97cf253480807d76174ed.zip |
Newly created threads are to inherit from the global debug state of the process.
llvm-svn: 151393
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp | 12 |
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 |