1cfca06d7SDimitry Andric //===-- SystemRuntime.cpp -------------------------------------------------===// 2f21a844fSEd Maste // 35f29bb8aSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45f29bb8aSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 55f29bb8aSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6f21a844fSEd Maste // 7f21a844fSEd Maste //===----------------------------------------------------------------------===// 8f21a844fSEd Maste 9f21a844fSEd Maste #include "lldb/Target/SystemRuntime.h" 10f21a844fSEd Maste #include "lldb/Core/PluginManager.h" 1114f1b3e8SDimitry Andric #include "lldb/Target/Process.h" 1214f1b3e8SDimitry Andric #include "lldb/lldb-private.h" 13f21a844fSEd Maste 14f21a844fSEd Maste using namespace lldb; 15f21a844fSEd Maste using namespace lldb_private; 16f21a844fSEd Maste FindPlugin(Process * process)1714f1b3e8SDimitry AndricSystemRuntime *SystemRuntime::FindPlugin(Process *process) { 18f3fbd1c0SDimitry Andric SystemRuntimeCreateInstance create_callback = nullptr; 1914f1b3e8SDimitry Andric for (uint32_t idx = 0; 2014f1b3e8SDimitry Andric (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex( 2114f1b3e8SDimitry Andric idx)) != nullptr; 2214f1b3e8SDimitry Andric ++idx) { 235f29bb8aSDimitry Andric std::unique_ptr<SystemRuntime> instance_up(create_callback(process)); 245f29bb8aSDimitry Andric if (instance_up) 255f29bb8aSDimitry Andric return instance_up.release(); 26f21a844fSEd Maste } 27f3fbd1c0SDimitry Andric return nullptr; 28f21a844fSEd Maste } 29f21a844fSEd Maste SystemRuntime(Process * process)30b60736ecSDimitry AndricSystemRuntime::SystemRuntime(Process *process) : Runtime(process), m_types() {} 31f21a844fSEd Maste 32f3fbd1c0SDimitry Andric SystemRuntime::~SystemRuntime() = default; 33f21a844fSEd Maste DidAttach()3414f1b3e8SDimitry Andricvoid SystemRuntime::DidAttach() {} 35f21a844fSEd Maste DidLaunch()3614f1b3e8SDimitry Andricvoid SystemRuntime::DidLaunch() {} 37f21a844fSEd Maste Detach()3814f1b3e8SDimitry Andricvoid SystemRuntime::Detach() {} 39866dcdacSEd Maste ModulesDidLoad(const ModuleList & module_list)40b60736ecSDimitry Andricvoid SystemRuntime::ModulesDidLoad(const ModuleList &module_list) {} 41f21a844fSEd Maste GetExtendedBacktraceTypes()4214f1b3e8SDimitry Andricconst std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { 4386758c71SEd Maste return m_types; 44f21a844fSEd Maste } 45f21a844fSEd Maste GetExtendedBacktraceThread(ThreadSP thread,ConstString type)4614f1b3e8SDimitry AndricThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, 4714f1b3e8SDimitry Andric ConstString type) { 48f21a844fSEd Maste return ThreadSP(); 49f21a844fSEd Maste } 50