Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 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 | |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 10 | #include "lldb/Target/SystemRuntime.h" |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 11 | #include "lldb/Core/PluginManager.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 12 | #include "lldb/Target/Process.h" |
| 13 | #include "lldb/lldb-private.h" |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 14 | |
| 15 | using namespace lldb; |
| 16 | using namespace lldb_private; |
| 17 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 18 | SystemRuntime *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; |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 29 | } |
| 30 | |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 31 | //---------------------------------------------------------------------- |
| 32 | // SystemRuntime constructor |
| 33 | //---------------------------------------------------------------------- |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 34 | SystemRuntime::SystemRuntime(Process *process) |
| 35 | : m_process(process), m_types() {} |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 36 | |
Eugene Zelenko | d70a6e7 | 2016-02-18 18:52:47 +0000 | [diff] [blame] | 37 | SystemRuntime::~SystemRuntime() = default; |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 38 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 39 | void SystemRuntime::DidAttach() {} |
| 40 | |
| 41 | void SystemRuntime::DidLaunch() {} |
| 42 | |
| 43 | void SystemRuntime::Detach() {} |
| 44 | |
| 45 | void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {} |
| 46 | |
| 47 | const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { |
| 48 | return m_types; |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 +0000 | [diff] [blame] | 49 | } |
| 50 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 51 | ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, |
| 52 | ConstString type) { |
| 53 | return ThreadSP(); |
Jason Molenda | 5dd4916 | 2013-11-06 00:04:44 +0000 | [diff] [blame] | 54 | } |