SystemRuntime.cpp revision 341825
1//===-- SystemRuntime.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// C Includes
11// C++ Includes
12// Other libraries and framework includes
13// Project includes
14#include "lldb/Target/SystemRuntime.h"
15#include "lldb/Core/PluginManager.h"
16#include "lldb/Target/Process.h"
17#include "lldb/lldb-private.h"
18
19using namespace lldb;
20using namespace lldb_private;
21
22SystemRuntime *SystemRuntime::FindPlugin(Process *process) {
23  SystemRuntimeCreateInstance create_callback = nullptr;
24  for (uint32_t idx = 0;
25       (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(
26            idx)) != nullptr;
27       ++idx) {
28    std::unique_ptr<SystemRuntime> instance_ap(create_callback(process));
29    if (instance_ap)
30      return instance_ap.release();
31  }
32  return nullptr;
33}
34
35//----------------------------------------------------------------------
36// SystemRuntime constructor
37//----------------------------------------------------------------------
38SystemRuntime::SystemRuntime(Process *process)
39    : m_process(process), m_types() {}
40
41SystemRuntime::~SystemRuntime() = default;
42
43void SystemRuntime::DidAttach() {}
44
45void SystemRuntime::DidLaunch() {}
46
47void SystemRuntime::Detach() {}
48
49void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {}
50
51const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
52  return m_types;
53}
54
55ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread,
56                                                   ConstString type) {
57  return ThreadSP();
58}
59