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).

llvm-svn: 115738
This commit is contained in:
Greg Clayton
2010-10-06 03:53:16 +00:00
parent 964f521e85
commit 5d5028b54e
5 changed files with 179 additions and 55 deletions

View File

@@ -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 @@ SBProcess::Continue ()
{
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");