180814287SRaphael Isemann //===-- SystemRuntime.cpp -------------------------------------------------===// 2eef51066SJason Molenda // 32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6eef51066SJason Molenda // 7eef51066SJason Molenda //===----------------------------------------------------------------------===// 8eef51066SJason Molenda 9eef51066SJason Molenda #include "lldb/Target/SystemRuntime.h" 10eef51066SJason Molenda #include "lldb/Core/PluginManager.h" 11b9c1b51eSKate Stone #include "lldb/Target/Process.h" 12b9c1b51eSKate Stone #include "lldb/lldb-private.h" 13eef51066SJason Molenda 14eef51066SJason Molenda using namespace lldb; 15eef51066SJason Molenda using namespace lldb_private; 16eef51066SJason Molenda FindPlugin(Process * process)17b9c1b51eSKate StoneSystemRuntime *SystemRuntime::FindPlugin(Process *process) { 18d70a6e71SEugene Zelenko SystemRuntimeCreateInstance create_callback = nullptr; 19b9c1b51eSKate Stone for (uint32_t idx = 0; 20b9c1b51eSKate Stone (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex( 21b9c1b51eSKate Stone idx)) != nullptr; 22b9c1b51eSKate Stone ++idx) { 23d5b44036SJonas Devlieghere std::unique_ptr<SystemRuntime> instance_up(create_callback(process)); 24d5b44036SJonas Devlieghere if (instance_up) 25d5b44036SJonas Devlieghere return instance_up.release(); 26eef51066SJason Molenda } 27d70a6e71SEugene Zelenko return nullptr; 28eef51066SJason Molenda } 29eef51066SJason Molenda SystemRuntime(Process * process)30*34d4c8a5SJonas DevlieghereSystemRuntime::SystemRuntime(Process *process) : Runtime(process), m_types() {} 31eef51066SJason Molenda 32d70a6e71SEugene Zelenko SystemRuntime::~SystemRuntime() = default; 33eef51066SJason Molenda DidAttach()34b9c1b51eSKate Stonevoid SystemRuntime::DidAttach() {} 35eef51066SJason Molenda DidLaunch()36b9c1b51eSKate Stonevoid SystemRuntime::DidLaunch() {} 37eef51066SJason Molenda Detach()38b9c1b51eSKate Stonevoid SystemRuntime::Detach() {} 392fd83355SJason Molenda ModulesDidLoad(const ModuleList & module_list)40*34d4c8a5SJonas Devliegherevoid SystemRuntime::ModulesDidLoad(const ModuleList &module_list) {} 41eef51066SJason Molenda GetExtendedBacktraceTypes()42b9c1b51eSKate Stoneconst std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { 43750ea692SJason Molenda return m_types; 44eef51066SJason Molenda } 455dd4916fSJason Molenda GetExtendedBacktraceThread(ThreadSP thread,ConstString type)46b9c1b51eSKate StoneThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, 47b9c1b51eSKate Stone ConstString type) { 485dd4916fSJason Molenda return ThreadSP(); 495dd4916fSJason Molenda } 50