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
14using namespace lldb;
15using namespace lldb_private;
16
18 for (auto create_callback :
20 std::unique_ptr<SystemRuntime> instance_up(create_callback(process));
21 if (instance_up)
22 return instance_up.release();
23 }
24 return nullptr;
25}
26
28
30
32
34
36
37void SystemRuntime::ModulesDidLoad(const ModuleList &module_list) {}
38
39const std::vector<ConstString> &SystemRuntime::GetExtendedBacktraceTypes() {
40 return m_types;
41}
42
A uniqued constant string class.
Definition ConstString.h:40
A collection class for Module objects.
Definition ModuleList.h:125
static llvm::SmallVector< SystemRuntimeCreateInstance > GetSystemRuntimeCreateCallbacks()
A plug-in interface definition class for debugging a process.
Definition Process.h:354
Runtime(Process *process)
Definition Runtime.h:17
virtual void DidAttach()
Called after attaching to a process.
virtual lldb::ThreadSP GetExtendedBacktraceThread(lldb::ThreadSP thread, ConstString type)
Return a Thread which shows the origin of this thread's creation.
virtual void Detach()
Called before detaching from a process.
SystemRuntime(Process *process)
Construct with a process.
void ModulesDidLoad(const ModuleList &module_list) override
Called when modules have been loaded in the process.
virtual const std::vector< ConstString > & GetExtendedBacktraceTypes()
Return a list of thread origin extended backtraces that may be available.
std::vector< ConstString > m_types
virtual void DidLaunch()
Called after launching a process.
~SystemRuntime() override
Destructor.
static SystemRuntime * FindPlugin(Process *process)
Find a system runtime plugin for a given process.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Thread > ThreadSP