aboutsummaryrefslogtreecommitdiff
path: root/source/API/SBProcess.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
committerEd Maste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
commit205afe679855a4ce8149cdaa94d3f0868ce796dc (patch)
tree09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/API/SBProcess.cpp
parent0cac4ca3916ac24ab6139d03cbfd18db9e715bfe (diff)
downloadsrc-205afe679855a4ce8149cdaa94d3f0868ce796dc.tar.gz
src-205afe679855a4ce8149cdaa94d3f0868ce796dc.zip
Import LLDB as of upstream SVN r225923 (git 2b588ecd)vendor/lldb/lldb-r225923
This corresponds with the branchpoint for the 3.6 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/lldb/dist/; revision=278332 svn path=/vendor/lldb/lldb-r225923/; revision=278333; tag=vendor/lldb/lldb-r225923
Diffstat (limited to 'source/API/SBProcess.cpp')
-rw-r--r--source/API/SBProcess.cpp44
1 files changed, 32 insertions, 12 deletions
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 41efd86177d6..9a0b23bc93d2 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -38,6 +38,7 @@
#include "lldb/API/SBEvent.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBThread.h"
+#include "lldb/API/SBThreadCollection.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBStringList.h"
#include "lldb/API/SBUnixSignals.h"
@@ -738,18 +739,10 @@ SBProcess::Continue ()
{
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
- Error error (process_sp->Resume());
- if (error.Success())
- {
- if (process_sp->GetTarget().GetDebugger().GetAsyncExecution () == false)
- {
- if (log)
- log->Printf ("SBProcess(%p)::Continue () waiting for process to stop...",
- static_cast<void*>(process_sp.get()));
- process_sp->WaitForProcessToStop (NULL);
- }
- }
- sb_error.SetError(error);
+ if (process_sp->GetTarget().GetDebugger().GetAsyncExecution ())
+ sb_error.ref() = process_sp->Resume ();
+ else
+ sb_error.ref() = process_sp->ResumeSynchronous (NULL);
}
else
sb_error.SetErrorString ("SBProcess is invalid");
@@ -1381,3 +1374,30 @@ SBProcess::GetExtendedBacktraceTypeAtIndex (uint32_t idx)
}
return NULL;
}
+
+SBThreadCollection
+SBProcess::GetHistoryThreads (addr_t addr)
+{
+ ProcessSP process_sp(GetSP());
+ SBThreadCollection threads;
+ if (process_sp)
+ {
+ threads = SBThreadCollection(process_sp->GetHistoryThreads(addr));
+ }
+ return threads;
+}
+
+bool
+SBProcess::IsInstrumentationRuntimePresent(InstrumentationRuntimeType type)
+{
+ ProcessSP process_sp(GetSP());
+ if (! process_sp)
+ return false;
+
+ InstrumentationRuntimeSP runtime_sp = process_sp->GetInstrumentationRuntime(type);
+
+ if (! runtime_sp.get())
+ return false;
+
+ return runtime_sp->IsActive();
+}