blob: 6d8a2ef55225fd485f790a4e13f8ec0fde37b16d [file] [log] [blame]
Raphael Isemann80814282020-01-24 07:23:271//===-- SystemRuntime.cpp -------------------------------------------------===//
Jason Molendaeef51062013-11-05 03:57:192//
Chandler Carruth2946cd72019-01-19 08:50:563// 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:196//
7//===----------------------------------------------------------------------===//
8
Jason Molendaeef51062013-11-05 03:57:199#include "lldb/Target/SystemRuntime.h"
Jason Molendaeef51062013-11-05 03:57:1910#include "lldb/Core/PluginManager.h"
Kate Stoneb9c1b512016-09-06 20:57:5011#include "lldb/Target/Process.h"
12#include "lldb/lldb-private.h"
Jason Molendaeef51062013-11-05 03:57:1913
14using namespace lldb;
15using namespace lldb_private;
16
Kate Stoneb9c1b512016-09-06 20:57:5017SystemRuntime *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:4123 std::unique_ptr<SystemRuntime> instance_up(create_callback(process));
24 if (instance_up)
25 return instance_up.release();
Kate Stoneb9c1b512016-09-06 20:57:5026 }
27 return nullptr;
Jason Molendaeef51062013-11-05 03:57:1928}
29
Jonas Devlieghere34d4c8a2020-07-24 23:20:5530SystemRuntime::SystemRuntime(Process *process) : Runtime(process), m_types() {}
Jason Molendaeef51062013-11-05 03:57:1931
Eugene Zelenkod70a6e72016-02-18 18:52:4732SystemRuntime::~SystemRuntime() = default;
Jason Molendaeef51062013-11-05 03:57:1933
Kate Stoneb9c1b512016-09-06 20:57:5034void SystemRuntime::DidAttach() {}
35
36void SystemRuntime::DidLaunch() {}
37
38void SystemRuntime::Detach() {}
39
Jonas Devlieghere34d4c8a2020-07-24 23:20:5540void SystemRuntime::ModulesDidLoad(const ModuleList &module_list) {}
Kate Stoneb9c1b512016-09-06 20:57:5041
42const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
43 return m_types;
Jason Molendaeef51062013-11-05 03:57:1944}
45
Kate Stoneb9c1b512016-09-06 20:57:5046ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread,
47 ConstString type) {
48 return ThreadSP();
Jason Molenda5dd49162013-11-06 00:04:4449}