Skip to content

Commit 8d3e824

Browse files
committed
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. <rdar://problem/11941758> llvm-svn: 160829
1 parent e807e45 commit 8d3e824

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Target/ExecutionContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ ExecutionContextRef::SetTargetPtr (Target* target, bool adopt_selected)
643643
if (!thread_sp)
644644
thread_sp = process_sp->GetThreadList().GetThreadAtIndex(0);
645645

646-
if (thread_sp)
646+
if (thread_sp && process_sp->GetState() == lldb::eStateStopped)
647647
{
648648
SetThreadSP (thread_sp);
649649
lldb::StackFrameSP frame_sp (thread_sp->GetSelectedFrame());

0 commit comments

Comments
 (0)