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
This commit is contained in:
parent
9eef18c58c
commit
737f43628a
|
@ -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"
|
||||
|
@ -150,21 +149,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)
|
||||
{
|
||||
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue