diff options
| author | Todd Fiala <todd.fiala@gmail.com> | 2014-08-27 19:56:58 +0000 |
|---|---|---|
| committer | Todd Fiala <todd.fiala@gmail.com> | 2014-08-27 19:56:58 +0000 |
| commit | 737f43628a09322c0c77ee9b9209f8d88ef3342d (patch) | |
| tree | 9a22aacb1c47e9f1cc8e6a5b8bb47020b7be42b5 | |
| parent | 9eef18c58ce759a6ae9e6303664a1f8a24139871 (diff) | |
| download | bcm5719-llvm-737f43628a09322c0c77ee9b9209f8d88ef3342d.tar.gz bcm5719-llvm-737f43628a09322c0c77ee9b9209f8d88ef3342d.zip | |
llgs: remove all Initialize() calls except for Debugger::Initialize().
See thread here:
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140825/012580.html
The original change I made there was due to a segfault. That was
caused by me directly calling PluginManager::Initialize (), with
PluginManager::Initialize() depending on HostInfo::Initialize () to
have been called already (which it wasn't).
The call to PluginManager::Initialize () was erroneous (at least at the
current time) since that method is already called by Debugger::Initialize()'s
implementation.
We will want to revisit initializing a smaller core of the debugger
suitable for lldb-gdbserver and lldb-platform.
llvm-svn: 216581
| -rw-r--r-- | lldb/tools/lldb-gdbserver/lldb-gdbserver.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lldb/tools/lldb-gdbserver/lldb-gdbserver.cpp b/lldb/tools/lldb-gdbserver/lldb-gdbserver.cpp index 35fc77ea813..cb243783588 100644 --- a/lldb/tools/lldb-gdbserver/lldb-gdbserver.cpp +++ b/lldb/tools/lldb-gdbserver/lldb-gdbserver.cpp @@ -32,7 +32,6 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/StreamFile.h" -#include "lldb/Host/HostInfo.h" #include "lldb/Host/OptionParser.h" #include "lldb/Host/Socket.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -151,21 +150,6 @@ dump_available_platforms (FILE *output_file) } static void -initialize_lldb_gdbserver () -{ - HostInfo::Initialize (); - PluginManager::Initialize (); - Debugger::Initialize (NULL); -} - -static void -terminate_lldb_gdbserver () -{ - Debugger::Terminate (); - PluginManager::Terminate (); -} - -static void run_lldb_commands (const lldb::DebuggerSP &debugger_sp, const std::vector<std::string> lldb_commands) { for (const auto &lldb_command : lldb_commands) @@ -510,7 +494,7 @@ main (int argc, char *argv[]) std::string named_pipe_path; bool reverse_connect = false; - initialize_lldb_gdbserver (); + Debugger::Initialize (NULL); lldb::DebuggerSP debugger_sp = Debugger::CreateInstance (); @@ -684,7 +668,7 @@ main (int argc, char *argv[]) ConnectToRemote (gdb_server, reverse_connect, host_and_port, progname, named_pipe_path.c_str ()); - terminate_lldb_gdbserver (); + Debugger::Terminate (); fprintf(stderr, "lldb-gdbserver exiting...\n"); |

