[Lldb-commits] [lldb] r160829 - /lldb/trunk/source/Target/ExecutionContext.cpp

Jason Molenda jmolenda at apple.com
Thu Jul 26 15:55:19 PDT 2012

Author: jmolenda
Date: Thu Jul 26 17:55:19 2012
New Revision: 160829

URL: http://llvm.org/viewvc/llvm-project?rev=160829&view=rev
Don't have ExecutionContextRef::SetTargetPtr fill in the frame
information if we're not stopped.  This could try to read registers
etc when the process is still running and debug builds of lldb would
assert down in GDBRemoteRegisterContext.cpp ReadRegisterBytes because
we couldn't get the sequence mutex for talking to the remote system.
Non-debug builds would just silently fail when doing this.


Modified: lldb/trunk/source/Target/ExecutionContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ExecutionContext.cpp?rev=160829&r1=160828&r2=160829&view=diff
--- lldb/trunk/source/Target/ExecutionContext.cpp (original)
+++ lldb/trunk/source/Target/ExecutionContext.cpp Thu Jul 26 17:55:19 2012
@@ -643,7 +643,7 @@
                         if (!thread_sp)
                             thread_sp = process_sp->GetThreadList().GetThreadAtIndex(0);
-                        if (thread_sp)
+                        if (thread_sp && process_sp->GetState() == lldb::eStateStopped)
                             SetThreadSP (thread_sp);
                             lldb::StackFrameSP frame_sp (thread_sp->GetSelectedFrame());

More information about the lldb-commits mailing list