LLDB  mainline
SystemRuntime.cpp
Go to the documentation of this file.
1 //===-- SystemRuntime.cpp ---------------------------------------*- C++ -*-===//
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 constructor
31 SystemRuntime::SystemRuntime(Process *process)
32  : m_process(process), m_types() {}
33 
35 
37 
39 
41 
43 
44 const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
45  return m_types;
46 }
47 
49  ConstString type) {
50  return ThreadSP();
51 }
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
~SystemRuntime() override
Destructor.
virtual void ModulesDidLoad(lldb_private::ModuleList &module_list)
Called when modules have been loaded in the process.
A collection class for Module objects.
Definition: ModuleList.h:91
virtual void Detach()
Called before detaching from a process.
virtual lldb::ThreadSP GetExtendedBacktraceThread(lldb::ThreadSP thread, ConstString type)
Return a Thread which shows the origin of this thread&#39;s creation.
A plug-in interface definition class for debugging a process.
Definition: Process.h:353
std::vector< ConstString > m_types
A uniqued constant string class.
Definition: ConstString.h:38
virtual const std::vector< ConstString > & GetExtendedBacktraceTypes()
Return a list of thread origin extended backtraces that may be available.
Definition: SBAddress.h:15
virtual void DidLaunch()
Called after launching a process.
virtual void DidAttach()
Called after attaching to a process.
A plug-in interface definition class for system runtimes.
Definition: SystemRuntime.h:42