LLDB  mainline
SystemRuntime.cpp
Go to the documentation of this file.
1 //===-- SystemRuntime.cpp -------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
11 #include "lldb/Target/Process.h"
12 #include "lldb/lldb-private.h"
13 
14 using namespace lldb;
15 using namespace lldb_private;
16 
17 SystemRuntime *SystemRuntime::FindPlugin(Process *process) {
18  SystemRuntimeCreateInstance create_callback = nullptr;
19  for (uint32_t idx = 0;
20  (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(
21  idx)) != nullptr;
22  ++idx) {
23  std::unique_ptr<SystemRuntime> instance_up(create_callback(process));
24  if (instance_up)
25  return instance_up.release();
26  }
27  return nullptr;
28 }
29 
30 SystemRuntime::SystemRuntime(Process *process) : Runtime(process), m_types() {}
31 
33 
35 
37 
39 
40 void SystemRuntime::ModulesDidLoad(const ModuleList &module_list) {}
41 
42 const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
43  return m_types;
44 }
45 
47  ConstString type) {
48  return ThreadSP();
49 }
lldb_private::SystemRuntime::DidLaunch
virtual void DidLaunch()
Called after launching a process.
Definition: SystemRuntime.cpp:36
lldb_private::SystemRuntime::DidAttach
virtual void DidAttach()
Called after attaching to a process.
Definition: SystemRuntime.cpp:34
lldb_private::Process
Definition: Process.h:340
lldb_private::SystemRuntime
Definition: SystemRuntime.h:43
Process.h
lldb_private::ModuleList
Definition: ModuleList.h:72
lldb_private::SystemRuntime::GetExtendedBacktraceTypes
virtual const std::vector< ConstString > & GetExtendedBacktraceTypes()
Return a list of thread origin extended backtraces that may be available.
Definition: SystemRuntime.cpp:42
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::Runtime
Definition: Runtime.h:15
lldb-private.h
lldb_private::SystemRuntime::ModulesDidLoad
virtual void ModulesDidLoad(const ModuleList &module_list) override
Called when modules have been loaded in the process.
Definition: SystemRuntime.cpp:40
uint32_t
lldb_private::SystemRuntime::GetExtendedBacktraceThread
virtual lldb::ThreadSP GetExtendedBacktraceThread(lldb::ThreadSP thread, ConstString type)
Return a Thread which shows the origin of this thread's creation.
Definition: SystemRuntime.cpp:46
lldb_private::SystemRuntime::m_types
std::vector< ConstString > m_types
Definition: SystemRuntime.h:298
PluginManager.h
SystemRuntime.h
lldb_private::SystemRuntime::~SystemRuntime
~SystemRuntime() override
Destructor.
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::SystemRuntime::Detach
virtual void Detach()
Called before detaching from a process.
Definition: SystemRuntime.cpp:38
lldb
Definition: SBAddress.h:15