SystemRuntime.cpp revision 355940
1//===-- SystemRuntime.cpp ---------------------------------------*- C++ -*-===// 2// 3// 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 6// 7//===----------------------------------------------------------------------===// 8 9#include "lldb/Target/SystemRuntime.h" 10#include "lldb/Core/PluginManager.h" 11#include "lldb/Target/Process.h" 12#include "lldb/lldb-private.h" 13 14using namespace lldb; 15using namespace lldb_private; 16 17SystemRuntime *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) { 23 std::unique_ptr<SystemRuntime> instance_up(create_callback(process)); 24 if (instance_up) 25 return instance_up.release(); 26 } 27 return nullptr; 28} 29 30// SystemRuntime constructor 31SystemRuntime::SystemRuntime(Process *process) 32 : m_process(process), m_types() {} 33 34SystemRuntime::~SystemRuntime() = default; 35 36void 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; 46} 47 48ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, 49 ConstString type) { 50 return ThreadSP(); 51} 52