summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/API/SBProcess.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
committeremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
commitfa0e7b41694bc598cd3df2405d0384ea29d7537e (patch)
tree5e5b6a0774e0d93bb4cfa2f9f83b9c41b38c4448 /contrib/llvm/tools/lldb/source/API/SBProcess.cpp
parentd2b9c88b24f95cd9f8e7bd621cfa454ce759c687 (diff)
parent0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (diff)
downloadFreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.zip
FreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.tar.gz
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/API/SBProcess.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/API/SBProcess.cpp44
1 files changed, 32 insertions, 12 deletions
diff --git a/contrib/llvm/tools/lldb/source/API/SBProcess.cpp b/contrib/llvm/tools/lldb/source/API/SBProcess.cpp
index 41efd86..9a0b23b 100644
--- a/contrib/llvm/tools/lldb/source/API/SBProcess.cpp
+++ b/contrib/llvm/tools/lldb/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();
+}
OpenPOWER on IntegriCloud