SystemRuntime.cpp revision 309124
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
10// C Includes
11// C++ Includes
12// Other libraries and framework includes
13// Project includes
14#include "lldb/lldb-private.h"
15#include "lldb/Target/SystemRuntime.h"
16#include "lldb/Target/Process.h"
17#include "lldb/Core/PluginManager.h"
18
19using namespace lldb;
20using namespace lldb_private;
21
22SystemRuntime*
23SystemRuntime::FindPlugin (Process *process)
24{
25    SystemRuntimeCreateInstance create_callback = nullptr;
26    for (uint32_t idx = 0; (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(idx)) != nullptr; ++idx)
27    {
28        std::unique_ptr<SystemRuntime> instance_ap(create_callback(process));
29        if (instance_ap)
30            return instance_ap.release();
31    }
32    return nullptr;
33}
34
35//----------------------------------------------------------------------
36// SystemRuntime constructor
37//----------------------------------------------------------------------
38SystemRuntime::SystemRuntime(Process *process) :
39    m_process (process),
40    m_types ()
41{
42}
43
44SystemRuntime::~SystemRuntime() = default;
45
46void
47SystemRuntime::DidAttach ()
48{
49}
50
51void
52SystemRuntime::DidLaunch()
53{
54}
55
56void
57SystemRuntime::Detach()
58{
59}
60
61void
62SystemRuntime::ModulesDidLoad (ModuleList &module_list)
63{
64}
65
66const std::vector<ConstString> &
67SystemRuntime::GetExtendedBacktraceTypes ()
68{
69    return m_types;
70}
71
72ThreadSP
73SystemRuntime::GetExtendedBacktraceThread (ThreadSP thread, ConstString type)
74{
75    return ThreadSP();
76}
77