blob: 574c01cb5ae1ea18ac9d94c37499bd764c431f97 [file] [log] [blame]
Jason Molendaeef51062013-11-05 03:57:19 +00001//===-- 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
Jason Molendaeef51062013-11-05 03:57:19 +000010#include "lldb/Target/SystemRuntime.h"
Jason Molendaeef51062013-11-05 03:57:19 +000011#include "lldb/Core/PluginManager.h"
Kate Stoneb9c1b512016-09-06 20:57:50 +000012#include "lldb/Target/Process.h"
13#include "lldb/lldb-private.h"
Jason Molendaeef51062013-11-05 03:57:19 +000014
15using namespace lldb;
16using namespace lldb_private;
17
Kate Stoneb9c1b512016-09-06 20:57:50 +000018SystemRuntime *SystemRuntime::FindPlugin(Process *process) {
19 SystemRuntimeCreateInstance create_callback = nullptr;
20 for (uint32_t idx = 0;
21 (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(
22 idx)) != nullptr;
23 ++idx) {
24 std::unique_ptr<SystemRuntime> instance_ap(create_callback(process));
25 if (instance_ap)
26 return instance_ap.release();
27 }
28 return nullptr;
Jason Molendaeef51062013-11-05 03:57:19 +000029}
30
Jason Molendaeef51062013-11-05 03:57:19 +000031//----------------------------------------------------------------------
32// SystemRuntime constructor
33//----------------------------------------------------------------------
Kate Stoneb9c1b512016-09-06 20:57:50 +000034SystemRuntime::SystemRuntime(Process *process)
35 : m_process(process), m_types() {}
Jason Molendaeef51062013-11-05 03:57:19 +000036
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000037SystemRuntime::~SystemRuntime() = default;
Jason Molendaeef51062013-11-05 03:57:19 +000038
Kate Stoneb9c1b512016-09-06 20:57:50 +000039void SystemRuntime::DidAttach() {}
40
41void SystemRuntime::DidLaunch() {}
42
43void SystemRuntime::Detach() {}
44
45void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {}
46
47const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
48 return m_types;
Jason Molendaeef51062013-11-05 03:57:19 +000049}
50
Kate Stoneb9c1b512016-09-06 20:57:50 +000051ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread,
52 ConstString type) {
53 return ThreadSP();
Jason Molenda5dd49162013-11-06 00:04:44 +000054}