135617911SEd Maste //===-- SystemRuntime.cpp ---------------------------------------*- C++ -*-===// 235617911SEd Maste // 335617911SEd Maste // The LLVM Compiler Infrastructure 435617911SEd Maste // 535617911SEd Maste // This file is distributed under the University of Illinois Open Source 635617911SEd Maste // License. See LICENSE.TXT for details. 735617911SEd Maste // 835617911SEd Maste //===----------------------------------------------------------------------===// 935617911SEd Maste 1035617911SEd Maste #include "lldb/Target/SystemRuntime.h" 1135617911SEd Maste #include "lldb/Core/PluginManager.h" 12435933ddSDimitry Andric #include "lldb/Target/Process.h" 13435933ddSDimitry Andric #include "lldb/lldb-private.h" 1435617911SEd Maste 1535617911SEd Maste using namespace lldb; 1635617911SEd Maste using namespace lldb_private; 1735617911SEd Maste FindPlugin(Process * process)18435933ddSDimitry AndricSystemRuntime *SystemRuntime::FindPlugin(Process *process) { 194bb0738eSEd Maste SystemRuntimeCreateInstance create_callback = nullptr; 20435933ddSDimitry Andric for (uint32_t idx = 0; 21435933ddSDimitry Andric (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex( 22435933ddSDimitry Andric idx)) != nullptr; 23435933ddSDimitry Andric ++idx) { 2435617911SEd Maste std::unique_ptr<SystemRuntime> instance_ap(create_callback(process)); 254bb0738eSEd Maste if (instance_ap) 2635617911SEd Maste return instance_ap.release(); 2735617911SEd Maste } 284bb0738eSEd Maste return nullptr; 2935617911SEd Maste } 3035617911SEd Maste 3135617911SEd Maste //---------------------------------------------------------------------- 3235617911SEd Maste // SystemRuntime constructor 3335617911SEd Maste //---------------------------------------------------------------------- SystemRuntime(Process * process)34435933ddSDimitry AndricSystemRuntime::SystemRuntime(Process *process) 35435933ddSDimitry Andric : m_process(process), m_types() {} 3635617911SEd Maste 374bb0738eSEd Maste SystemRuntime::~SystemRuntime() = default; 3835617911SEd Maste DidAttach()39435933ddSDimitry Andricvoid SystemRuntime::DidAttach() {} 4035617911SEd Maste DidLaunch()41435933ddSDimitry Andricvoid SystemRuntime::DidLaunch() {} 4235617911SEd Maste Detach()43435933ddSDimitry Andricvoid SystemRuntime::Detach() {} 4412b93ac6SEd Maste ModulesDidLoad(ModuleList & module_list)45435933ddSDimitry Andricvoid SystemRuntime::ModulesDidLoad(ModuleList &module_list) {} 4635617911SEd Maste GetExtendedBacktraceTypes()47435933ddSDimitry Andricconst std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { 48b952cd58SEd Maste return m_types; 4935617911SEd Maste } 5035617911SEd Maste GetExtendedBacktraceThread(ThreadSP thread,ConstString type)51435933ddSDimitry AndricThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, 52435933ddSDimitry Andric ConstString type) { 5335617911SEd Maste return ThreadSP(); 5435617911SEd Maste } 55