Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [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 | |
Eugene Zelenko | d70a6e7 | 2016-02-18 18:52:47 | [diff] [blame] | 10 | // C Includes |
| 11 | // C++ Includes |
| 12 | // Other libraries and framework includes |
| 13 | // Project includes |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 14 | #include "lldb/Target/SystemRuntime.h" |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 15 | #include "lldb/Core/PluginManager.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 | [diff] [blame^] | 16 | #include "lldb/Target/Process.h" |
| 17 | #include "lldb/lldb-private.h" |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 18 | |
| 19 | using namespace lldb; |
| 20 | using namespace lldb_private; |
| 21 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 | [diff] [blame^] | 22 | SystemRuntime *SystemRuntime::FindPlugin(Process *process) { |
| 23 | SystemRuntimeCreateInstance create_callback = nullptr; |
| 24 | for (uint32_t idx = 0; |
| 25 | (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex( |
| 26 | idx)) != nullptr; |
| 27 | ++idx) { |
| 28 | std::unique_ptr<SystemRuntime> instance_ap(create_callback(process)); |
| 29 | if (instance_ap) |
| 30 | return instance_ap.release(); |
| 31 | } |
| 32 | return nullptr; |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 33 | } |
| 34 | |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 35 | //---------------------------------------------------------------------- |
| 36 | // SystemRuntime constructor |
| 37 | //---------------------------------------------------------------------- |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 | [diff] [blame^] | 38 | SystemRuntime::SystemRuntime(Process *process) |
| 39 | : m_process(process), m_types() {} |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 40 | |
Eugene Zelenko | d70a6e7 | 2016-02-18 18:52:47 | [diff] [blame] | 41 | SystemRuntime::~SystemRuntime() = default; |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 42 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 | [diff] [blame^] | 43 | void SystemRuntime::DidAttach() {} |
| 44 | |
| 45 | void SystemRuntime::DidLaunch() {} |
| 46 | |
| 47 | void SystemRuntime::Detach() {} |
| 48 | |
| 49 | void SystemRuntime::ModulesDidLoad(ModuleList &module_list) {} |
| 50 | |
| 51 | const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() { |
| 52 | return m_types; |
Jason Molenda | eef5106 | 2013-11-05 03:57:19 | [diff] [blame] | 53 | } |
| 54 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 | [diff] [blame^] | 55 | ThreadSP SystemRuntime::GetExtendedBacktraceThread(ThreadSP thread, |
| 56 | ConstString type) { |
| 57 | return ThreadSP(); |
Jason Molenda | 5dd4916 | 2013-11-06 00:04:44 | [diff] [blame] | 58 | } |