blob: e53816acb9ecc12bd787f76fe1fe3234d7f2760c [file] [log] [blame]
Jason Molendaeef51062013-11-05 03:57:19 +00001//===-- SystemRuntime.cpp ---------------------------------------*- C++ -*-===//
2//
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//----------------------------------------------------------------------
31// SystemRuntime constructor
32//----------------------------------------------------------------------
Kate Stoneb9c1b512016-09-06 20:57:50 +000033SystemRuntime::SystemRuntime(Process *process)
34 : m_process(process), m_types() {}
Jason Molendaeef51062013-11-05 03:57:19 +000035
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000036SystemRuntime::~SystemRuntime() = default;
Jason Molendaeef51062013-11-05 03:57:19 +000037
Kate Stoneb9c1b512016-09-06 20:57:50 +000038void SystemRuntime::DidAttach() {}
39
40void SystemRuntime::DidLaunch() {}
41
42void SystemRuntime::Detach() {}
43
44void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {}
45
46const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
47 return m_types;
Jason Molendaeef51062013-11-05 03:57:19 +000048}
49
Kate Stoneb9c1b512016-09-06 20:57:50 +000050ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread,
51 ConstString type) {
52 return ThreadSP();
Jason Molenda5dd49162013-11-06 00:04:44 +000053}