Newly created threads are to inherit from the global debug state of the process.

llvm-svn: 151393
This commit is contained in:
Johnny Chen 2012-02-24 21:13:45 +00:00
parent 38d1f05167
commit 2120e2bd73
1 changed files with 11 additions and 1 deletions

View File

@ -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