1 //===-- 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 10 // C Includes 11 // C++ Includes 12 // Other libraries and framework includes 13 // Project includes 14 #include "lldb/Target/SystemRuntime.h" 15 #include "lldb/Core/PluginManager.h" 16 #include "lldb/Target/Process.h" 17 #include "lldb/lldb-private.h" 18 19 using namespace lldb; 20 using namespace lldb_private; 21 22 SystemRuntime *SystemRuntime::FindPlugin(Process *process) { 23 SystemRuntimeCreateInstance create_callback = nullptr; 24 for (uint32_t idx = 0; 25 (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex( 26 idx)) != nullptr; 27 ++idx) { 28 std::unique_ptr<SystemRuntime> instance_ap(create_callback(process)); 29 if (instance_ap) 30 return instance_ap.release(); 31 } 32 return nullptr; 33 } 34 35 //---------------------------------------------------------------------- 36 // SystemRuntime constructor 37 //---------------------------------------------------------------------- 38 SystemRuntime::SystemRuntime(Process *process) 39 : m_process(process), m_types() {} 40 41 SystemRuntime::~SystemRuntime() = default; 42 43 void SystemRuntime::DidAttach() {} 44 45 void SystemRuntime::DidLaunch() {} 46 47 void SystemRuntime::Detach() {} 48 49 void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {} 50 51 const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { 52 return m_types; 53 } 54 55 ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, 56 ConstString type) { 57 return ThreadSP(); 58 } 59