Added the first of hopefully many python example scripts that show how to
use the python API that is exposed through SWIG to do some cool stuff.
Also fixed synchronous debugging so that all process control APIs exposed
through the python API will now wait for the process to stop if you set
the async mode to false (see disasm.py).
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115738 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 1a72f58..a288833 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -15,6 +15,7 @@
#include "lldb/Interpreter/Args.h"
#include "lldb/Core/DataBufferHeap.h"
#include "lldb/Core/DataExtractor.h"
+#include "lldb/Core/Debugger.h"
#include "lldb/Core/State.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamFile.h"
@@ -287,7 +288,15 @@
{
SBError sb_error;
if (IsValid())
- sb_error.SetError(m_opaque_sp->Resume());
+ {
+ Error error (m_opaque_sp->Resume());
+ if (error.Success())
+ {
+ if (m_opaque_sp->GetTarget().GetDebugger().GetAsyncExecution () == false)
+ m_opaque_sp->WaitForProcessToStop (NULL);
+ }
+ sb_error.SetError(error);
+ }
else
sb_error.SetErrorString ("SBProcess is invalid");