summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-11-17 04:46:02 +0000
committerGreg Clayton <gclayton@apple.com>2011-11-17 04:46:02 +0000
commite24c4acf6cd5ecbfed993c3b598dbc2fe24ab7ab (patch)
treedced64b42d76833da5cbbbc9da056f4c23fc57b2 /lldb/source/Plugins/Process/gdb-remote
parent857f9d6e5eef4efe9a9df1fd22f20210eeac5fc6 (diff)
downloadbcm5719-llvm-e24c4acf6cd5ecbfed993c3b598dbc2fe24ab7ab.tar.gz
bcm5719-llvm-e24c4acf6cd5ecbfed993c3b598dbc2fe24ab7ab.zip
Fixed the issue that was causing our monitor process threads to crash, it
turned out to be unitialized data in the ProcessLaunchInfo default constructor. Turning on MallocScribble in the environment helped track this down. When we launch and attach using the host layer, we now inform the process that it shouldn't detach when by calling an accessor. llvm-svn: 144882
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 1aa3c920a08..95d452f65bb 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1171,6 +1171,9 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet)
{
// thread in big endian hex
tid = Args::StringToUInt32 (value.c_str(), 0, 16);
+ // m_thread_list does have its own mutex, but we need to
+ // hold onto the mutex between the call to m_thread_list.FindThreadByID(...)
+ // and the m_thread_list.AddThread(...) so it doesn't change on us
Mutex::Locker locker (m_thread_list.GetMutex ());
thread_sp = m_thread_list.FindThreadByID(tid, false);
if (!thread_sp)
OpenPOWER on IntegriCloud