1 //===-- InstrumentationRuntime.cpp ------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lldb/lldb-private.h"
11 #include "lldb/Target/Process.h"
12 #include "lldb/Core/PluginManager.h"
13 #include "lldb/Target/InstrumentationRuntime.h"
16 using namespace lldb_private;
19 InstrumentationRuntime::ModulesDidLoad(lldb_private::ModuleList &module_list, lldb_private::Process *process, InstrumentationRuntimeCollection &runtimes)
21 InstrumentationRuntimeCreateInstance create_callback = NULL;
22 InstrumentationRuntimeGetType get_type_callback;
23 for (uint32_t idx = 0; ; ++idx)
25 create_callback = PluginManager::GetInstrumentationRuntimeCreateCallbackAtIndex(idx);
26 if (create_callback == NULL)
28 get_type_callback = PluginManager::GetInstrumentationRuntimeGetTypeCallbackAtIndex(idx);
29 InstrumentationRuntimeType type = get_type_callback();
31 InstrumentationRuntimeCollection::iterator pos;
32 pos = runtimes.find (type);
33 if (pos == runtimes.end()) {
34 runtimes[type] = create_callback(process->shared_from_this());
40 InstrumentationRuntime::ModulesDidLoad(lldb_private::ModuleList &module_list)
45 InstrumentationRuntime::IsActive()