From a80790203152f7097562437ee4cc9fee2152c766 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Fri, 17 Jun 2011 19:21:30 +0000 Subject: Add a bunch of test cases to TestHelloWorld.py to exercise combinations of dwarf/dsym debug setup. Among them are test cases to exercise SBTarget.AttachToProcessWithName(); we attach to "hello_world", and verify that, after attachment, the currently selected target indeed matches "hello_world". llvm-svn: 133279 --- lldb/source/API/SBTarget.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/API') diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 78b67db3b0c..03333d940eb 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -330,6 +330,10 @@ SBTarget::AttachToProcessWithName if (sb_process.IsValid()) { error.SetError (sb_process->Attach (name, wait_for)); + // If we are doing synchronous mode, then wait for the + // process to stop! + if (m_opaque_sp->GetDebugger().GetAsyncExecution () == false) + sb_process->WaitForProcessToStop (NULL); } else { -- cgit v1.2.3