blob: cd3d8ba2c7b091410d73ec32cbef0606e13d5e32 [file] [log] [blame]
Raphael Isemann80814282020-01-24 08:23:27 +01001//===-- SystemRuntime.cpp -------------------------------------------------===//
Jason Molendaeef51062013-11-05 03:57:19 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Jason Molendaeef51062013-11-05 03:57:19 +00006//
7//===----------------------------------------------------------------------===//
8
Jason Molendaeef51062013-11-05 03:57:19 +00009#include "lldb/Target/SystemRuntime.h"
Jason Molendaeef51062013-11-05 03:57:19 +000010#include "lldb/Core/PluginManager.h"
Kate Stoneb9c1b512016-09-06 20:57:50 +000011#include "lldb/Target/Process.h"
12#include "lldb/lldb-private.h"
Jason Molendaeef51062013-11-05 03:57:19 +000013
14using namespace lldb;
15using namespace lldb_private;
16
Kate Stoneb9c1b512016-09-06 20:57:50 +000017SystemRuntime *SystemRuntime::FindPlugin(Process *process) {
18 SystemRuntimeCreateInstance create_callback = nullptr;
19 for (uint32_t idx = 0;
20 (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(
21 idx)) != nullptr;
22 ++idx) {
Jonas Devlieghered5b44032019-02-13 06:25:41 +000023 std::unique_ptr<SystemRuntime> instance_up(create_callback(process));
24 if (instance_up)
25 return instance_up.release();
Kate Stoneb9c1b512016-09-06 20:57:50 +000026 }
27 return nullptr;
Jason Molendaeef51062013-11-05 03:57:19 +000028}
29
Jason Molendaeef51062013-11-05 03:57:19 +000030// SystemRuntime constructor
Kate Stoneb9c1b512016-09-06 20:57:50 +000031SystemRuntime::SystemRuntime(Process *process)
32 : m_process(process), m_types() {}
Jason Molendaeef51062013-11-05 03:57:19 +000033
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000034SystemRuntime::~SystemRuntime() = default;
Jason Molendaeef51062013-11-05 03:57:19 +000035
Kate Stoneb9c1b512016-09-06 20:57:50 +000036void SystemRuntime::DidAttach() {}
37
38void SystemRuntime::DidLaunch() {}
39
40void SystemRuntime::Detach() {}
41
42void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {}
43
44const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
45 return m_types;
Jason Molendaeef51062013-11-05 03:57:19 +000046}
47
Kate Stoneb9c1b512016-09-06 20:57:50 +000048ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread,
49 ConstString type) {
50 return ThreadSP();
Jason Molenda5dd49162013-11-06 00:04:44 +000051}