blob: 522b535039ffc5e90a4b2f07235ef76749c985ce [file] [log] [blame]
Jason Molendaeef51062013-11-05 03:57:19 +00001//===-- 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 Zelenkod70a6e72016-02-18 18:52:47 +000010// C Includes
11// C++ Includes
12// Other libraries and framework includes
13// Project includes
Jason Molendaeef51062013-11-05 03:57:19 +000014#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{
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000025 SystemRuntimeCreateInstance create_callback = nullptr;
26 for (uint32_t idx = 0; (create_callback = PluginManager::GetSystemRuntimeCreateCallbackAtIndex(idx)) != nullptr; ++idx)
Jason Molendaeef51062013-11-05 03:57:19 +000027 {
28 std::unique_ptr<SystemRuntime> instance_ap(create_callback(process));
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000029 if (instance_ap)
Jason Molendaeef51062013-11-05 03:57:19 +000030 return instance_ap.release();
31 }
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000032 return nullptr;
Jason Molendaeef51062013-11-05 03:57:19 +000033}
34
Jason Molendaeef51062013-11-05 03:57:19 +000035//----------------------------------------------------------------------
36// SystemRuntime constructor
37//----------------------------------------------------------------------
38SystemRuntime::SystemRuntime(Process *process) :
Jason Molenda750ea692013-11-12 07:02:07 +000039 m_process (process),
40 m_types ()
Jason Molendaeef51062013-11-05 03:57:19 +000041{
42}
43
Eugene Zelenkod70a6e72016-02-18 18:52:47 +000044SystemRuntime::~SystemRuntime() = default;
Jason Molendaeef51062013-11-05 03:57:19 +000045
46void
47SystemRuntime::DidAttach ()
48{
49}
50
51void
52SystemRuntime::DidLaunch()
53{
54}
55
56void
Jason Molenda2fd83352014-02-05 05:44:54 +000057SystemRuntime::Detach()
58{
59}
60
61void
Jason Molendaeef51062013-11-05 03:57:19 +000062SystemRuntime::ModulesDidLoad (ModuleList &module_list)
63{
64}
65
Jason Molenda750ea692013-11-12 07:02:07 +000066const std::vector<ConstString> &
Jason Molenda95d005c2013-11-06 03:07:33 +000067SystemRuntime::GetExtendedBacktraceTypes ()
Jason Molendaeef51062013-11-05 03:57:19 +000068{
Jason Molenda750ea692013-11-12 07:02:07 +000069 return m_types;
Jason Molendaeef51062013-11-05 03:57:19 +000070}
Jason Molenda5dd49162013-11-06 00:04:44 +000071
72ThreadSP
Jason Molenda008c45f2013-11-12 23:33:32 +000073SystemRuntime::GetExtendedBacktraceThread (ThreadSP thread, ConstString type)
Jason Molenda5dd49162013-11-06 00:04:44 +000074{
75 return ThreadSP();
76}