]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Target/InstrumentationRuntime.cpp
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Target / InstrumentationRuntime.cpp
1 //===-- InstrumentationRuntime.cpp ------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "lldb/lldb-private.h"
11 #include "lldb/Target/Process.h"
12 #include "lldb/Core/PluginManager.h"
13 #include "lldb/Target/InstrumentationRuntime.h"
14
15 using namespace lldb;
16 using namespace lldb_private;
17
18 void
19 InstrumentationRuntime::ModulesDidLoad(lldb_private::ModuleList &module_list, lldb_private::Process *process, InstrumentationRuntimeCollection &runtimes)
20 {
21     InstrumentationRuntimeCreateInstance create_callback = NULL;
22     InstrumentationRuntimeGetType get_type_callback;
23     for (uint32_t idx = 0; ; ++idx)
24     {
25         create_callback = PluginManager::GetInstrumentationRuntimeCreateCallbackAtIndex(idx);
26         if (create_callback == NULL)
27             break;
28         get_type_callback = PluginManager::GetInstrumentationRuntimeGetTypeCallbackAtIndex(idx);
29         InstrumentationRuntimeType type = get_type_callback();
30         
31         InstrumentationRuntimeCollection::iterator pos;
32         pos = runtimes.find (type);
33         if (pos == runtimes.end()) {
34             runtimes[type] = create_callback(process->shared_from_this());
35         }
36     }
37 }
38
39 void
40 InstrumentationRuntime::ModulesDidLoad(lldb_private::ModuleList &module_list)
41 {
42 }
43
44 bool
45 InstrumentationRuntime::IsActive()
46 {
47     return false;
48 }