blob: 7386c4efa7305873bc7c9d4e389980ab2f7f3916 [file] [log] [blame]
Kuba Breckaafdf8422014-10-10 23:43:03 +00001//===-- 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//
Eugene Zelenko9394d7722016-02-18 00:10:17 +00008//===---------------------------------------------------------------------===//
Kuba Breckaafdf8422014-10-10 23:43:03 +00009
Eugene Zelenko9394d7722016-02-18 00:10:17 +000010// C Includes
11// C++ Includes
12// Other libraries and framework includes
13// Project includes
Kuba Breckaafdf8422014-10-10 23:43:03 +000014#include "lldb/lldb-private.h"
15#include "lldb/Target/Process.h"
16#include "lldb/Core/PluginManager.h"
17#include "lldb/Target/InstrumentationRuntime.h"
18
19using namespace lldb;
20using namespace lldb_private;
21
22void
23InstrumentationRuntime::ModulesDidLoad(lldb_private::ModuleList &module_list, lldb_private::Process *process, InstrumentationRuntimeCollection &runtimes)
24{
Eugene Zelenko9394d7722016-02-18 00:10:17 +000025 InstrumentationRuntimeCreateInstance create_callback = nullptr;
Kuba Breckaafdf8422014-10-10 23:43:03 +000026 InstrumentationRuntimeGetType get_type_callback;
27 for (uint32_t idx = 0; ; ++idx)
28 {
29 create_callback = PluginManager::GetInstrumentationRuntimeCreateCallbackAtIndex(idx);
Eugene Zelenko9394d7722016-02-18 00:10:17 +000030 if (create_callback == nullptr)
Kuba Breckaafdf8422014-10-10 23:43:03 +000031 break;
32 get_type_callback = PluginManager::GetInstrumentationRuntimeGetTypeCallbackAtIndex(idx);
33 InstrumentationRuntimeType type = get_type_callback();
34
35 InstrumentationRuntimeCollection::iterator pos;
36 pos = runtimes.find (type);
37 if (pos == runtimes.end()) {
38 runtimes[type] = create_callback(process->shared_from_this());
39 }
40 }
41}
42
43void
44InstrumentationRuntime::ModulesDidLoad(lldb_private::ModuleList &module_list)
45{
46}
47
48bool
49InstrumentationRuntime::IsActive()
50{
51 return false;
52}