Index: include/lldb/API/SBProcess.h =================================================================== --- include/lldb/API/SBProcess.h +++ include/lldb/API/SBProcess.h @@ -319,6 +319,9 @@ lldb::SBThreadCollection GetHistoryThreads (addr_t addr); + + bool + IsInstrumentationRuntimePresent(InstrumentationRuntimeType type); protected: friend class SBAddress; Index: include/lldb/Target/Process.h =================================================================== --- include/lldb/Target/Process.h +++ include/lldb/Target/Process.h @@ -2928,6 +2928,9 @@ lldb::ThreadCollectionSP GetHistoryThreads(lldb::addr_t addr); + lldb::InstrumentationRuntimeSP + GetInstrumentationRuntime(lldb::InstrumentationRuntimeType type); + protected: //------------------------------------------------------------------ Index: scripts/Python/interface/SBProcess.i =================================================================== --- scripts/Python/interface/SBProcess.i +++ scripts/Python/interface/SBProcess.i @@ -391,6 +391,9 @@ lldb::SBThreadCollection GetHistoryThreads (addr_t addr); + + bool + IsInstrumentationRuntimePresent(lldb::InstrumentationRuntimeType type); %pythoncode %{ def __get_is_alive__(self): Index: source/API/SBProcess.cpp =================================================================== --- source/API/SBProcess.cpp +++ source/API/SBProcess.cpp @@ -1394,3 +1394,18 @@ } 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(); +} Index: source/Target/Process.cpp =================================================================== --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -6071,3 +6071,16 @@ return threads; } + +InstrumentationRuntimeSP +Process::GetInstrumentationRuntime(lldb::InstrumentationRuntimeType type) +{ + InstrumentationRuntimeCollection::iterator pos; + pos = m_instrumentation_runtimes.find (type); + if (pos == m_instrumentation_runtimes.end()) + { + return InstrumentationRuntimeSP(); + } + else + return (*pos).second; +}