From 6392754839ebf14b8e2044da19d23a158db77207 Mon Sep 17 00:00:00 2001 From: Kuba Brecka Date: Sat, 11 Oct 2014 01:59:32 +0000 Subject: Add a IsInstrumentationRuntimePresent SB API Reviewed at http://reviews.llvm.org/D5738 This adds an SB API into SBProcess: bool SBProcess::IsInstrumentationRuntimePresent(InstrumentationRuntimeType type); which simply tells whether a particular InstrumentationRuntime (read "ASan") plugin is present and active. llvm-svn: 219560 --- lldb/source/Target/Process.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lldb/source/Target') diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index d337d8110c8..9cb021c9283 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -6071,3 +6071,16 @@ Process::GetHistoryThreads(lldb::addr_t addr) 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; +} -- cgit v1.2.1