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 #include "lldb/Target/SystemRuntime.h" 11 #include "lldb/Core/PluginManager.h" 12 #include "lldb/Target/Process.h" 13 #include "lldb/lldb-private.h" 14 15 using namespace lldb; 16 using namespace lldb_private; 17 FindPlugin(Process * process)18SystemRuntime *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; 29 } 30 31 //---------------------------------------------------------------------- 32 // SystemRuntime constructor 33 //---------------------------------------------------------------------- SystemRuntime(Process * process)34SystemRuntime::SystemRuntime(Process *process) 35 : m_process(process), m_types() {} 36 37 SystemRuntime::~SystemRuntime() = default; 38 DidAttach()39void SystemRuntime::DidAttach() {} 40 DidLaunch()41void SystemRuntime::DidLaunch() {} 42 Detach()43void SystemRuntime::Detach() {} 44 ModulesDidLoad(ModuleList & module_list)45void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {} 46 GetExtendedBacktraceTypes()47const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { 48 return m_types; 49 } 50 GetExtendedBacktraceThread(ThreadSP thread,ConstString type)51ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, 52 ConstString type) { 53 return ThreadSP(); 54 } 55