LLDB  mainline
SystemInitializerFull.cpp
Go to the documentation of this file.
1 //===-- SystemInitializerFull.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/Core/Debugger.h"
13 #include "lldb/Host/Config.h"
14 #include "lldb/Host/Host.h"
17 #include "lldb/Utility/Timer.h"
18 #include "llvm/Support/TargetSelect.h"
19 
20 #pragma clang diagnostic push
21 #pragma clang diagnostic ignored "-Wglobal-constructors"
22 #include "llvm/ExecutionEngine/MCJIT.h"
23 #pragma clang diagnostic pop
24 
25 #include <string>
26 
27 #define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
28 #include "Plugins/Plugins.def"
29 
30 using namespace lldb_private;
31 
34 
37  return e;
38 
39  // Initialize LLVM and Clang
40  llvm::InitializeAllTargets();
41  llvm::InitializeAllAsmPrinters();
42  llvm::InitializeAllTargetMCs();
43  llvm::InitializeAllDisassemblers();
44 
45 #define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
46 #include "Plugins/Plugins.def"
47 
48  // Scan for any system or user LLDB plug-ins
50 
51  // The process settings need to know about installed plug-ins, so the
52  // Settings must be initialized AFTER PluginManager::Initialize is called.
54 
55  return llvm::Error::success();
56 }
57 
59  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
60  Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
61 
63 
64  // Terminate and unload and loaded system or user LLDB plug-ins
66 
67 #define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
68 #include "Plugins/Plugins.def"
69 
70  // Now shutdown the common parts, in reverse order.
72 }
A class that represents a running process on the host machine.
llvm::Error Error
A timer class that simplifies common timing metrics.
Definition: Timer.h:23
static void SettingsInitialize()
Definition: Debugger.cpp:488
static void SettingsTerminate()
Definition: Debugger.cpp:490