diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-06-17 00:51:15 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-06-17 00:51:15 +0000 |
| commit | 2cd8327605091d34bfcbc0a61901c7ad3bfb996c (patch) | |
| tree | 6457de37f45c5aec1075635f32796822882f6b2b /lldb/source/API/SBTarget.cpp | |
| parent | 7d237c188283acb503a0d87be364a04e63f12a46 (diff) | |
| download | bcm5719-llvm-2cd8327605091d34bfcbc0a61901c7ad3bfb996c.tar.gz bcm5719-llvm-2cd8327605091d34bfcbc0a61901c7ad3bfb996c.zip | |
o TestHelloWorld.py:
Add a test case for the SBTarget::AttachToProcessWithID() API call.
o main.c:
The change goes with the added test case test_with_dwarf_and_attach_to_process_with_id_api() above.
o SBTarget.cpp:
Checks whether we're in synchronous mode. If yes, let's wait for the process to stop right after attaching.
llvm-svn: 133223
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 629308f7cfb..78b67db3b0c 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -290,6 +290,10 @@ SBTarget::AttachToProcessWithID if (sb_process.IsValid()) { error.SetError (sb_process->Attach (pid)); + // 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 { |

