diff options
author | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
commit | 0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (patch) | |
tree | 09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/API/SBProcess.cpp | |
parent | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff) | |
download | FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.zip FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.tar.gz |
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
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
Diffstat (limited to 'source/API/SBProcess.cpp')
-rw-r--r-- | source/API/SBProcess.cpp | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp index 41efd86..9a0b23b 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(); +} |