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/lldb-private.h" 15 #include "lldb/Target/SystemRuntime.h" 16 #include "lldb/Target/Process.h" 17 #include "lldb/Core/PluginManager.h" 18 19 using namespace lldb; 20 using namespace lldb_private; 21 22 SystemRuntime* 23 SystemRuntime::FindPlugin (Process *process) 24 { 25 SystemRuntimeCreateInstance create_callback = nullptr; 26 for (uint32_t idx = 0; (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(idx)) != nullptr; ++idx) 27 { 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), 40 m_types () 41 { 42 } 43 44 SystemRuntime::~SystemRuntime() = default; 45 46 void 47 SystemRuntime::DidAttach () 48 { 49 } 50 51 void 52 SystemRuntime::DidLaunch() 53 { 54 } 55 56 void 57 SystemRuntime::Detach() 58 { 59 } 60 61 void 62 SystemRuntime::ModulesDidLoad (ModuleList &module_list) 63 { 64 } 65 66 const std::vector<ConstString> & 67 SystemRuntime::GetExtendedBacktraceTypes () 68 { 69 return m_types; 70 } 71 72 ThreadSP 73 SystemRuntime::GetExtendedBacktraceThread (ThreadSP thread, ConstString type) 74 { 75 return ThreadSP(); 76 } 77