forked from OSchip/llvm-project
Don't have the debugger default to ignoring EOF. This is only what the driver
(or anything running in a terminal) wants. Not what a UI (Xcode) would want where it creates a debugger per debug window. The current code had an infinite loop after a debug session ended. llvm-svn: 132280
This commit is contained in:
parent
2e84c82750
commit
fc3f027d33
|
@ -205,6 +205,12 @@ public:
|
|||
void
|
||||
SetScriptLanguage (lldb::ScriptLanguage script_lang);
|
||||
|
||||
bool
|
||||
GetCloseInputOnEOF () const;
|
||||
|
||||
void
|
||||
SetCloseInputOnEOF (bool b);
|
||||
|
||||
private:
|
||||
|
||||
#ifndef SWIG
|
||||
|
|
|
@ -415,6 +415,12 @@ public:
|
|||
static int
|
||||
TestDebuggerRefCount ();
|
||||
|
||||
bool
|
||||
GetCloseInputOnEOF () const;
|
||||
|
||||
void
|
||||
SetCloseInputOnEOF (bool b);
|
||||
|
||||
protected:
|
||||
|
||||
static void
|
||||
|
|
|
@ -3509,7 +3509,7 @@
|
|||
2689FFD613353D7A00698AC0 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 57;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DYLIB_CURRENT_VERSION = 57;
|
||||
|
@ -3549,7 +3549,7 @@
|
|||
2689FFD713353D7A00698AC0 /* BuildAndIntegration */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 57;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DYLIB_CURRENT_VERSION = 57;
|
||||
|
|
|
@ -861,3 +861,17 @@ SBDebugger::SetCurrentPlatform (const char *platform_name)
|
|||
return sb_error;
|
||||
}
|
||||
|
||||
bool
|
||||
SBDebugger::GetCloseInputOnEOF () const
|
||||
{
|
||||
if (m_opaque_sp)
|
||||
return m_opaque_sp->GetCloseInputOnEOF ();
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
SBDebugger::SetCloseInputOnEOF (bool b)
|
||||
{
|
||||
if (m_opaque_sp)
|
||||
m_opaque_sp->SetCloseInputOnEOF (b);
|
||||
}
|
||||
|
|
|
@ -233,7 +233,6 @@ Debugger::Debugger () :
|
|||
m_input_readers (),
|
||||
m_input_reader_data ()
|
||||
{
|
||||
m_input_comm.SetCloseOnEOF(false);
|
||||
m_command_interpreter_ap->Initialize ();
|
||||
// Always add our default platform to the platform list
|
||||
PlatformSP default_platform_sp (Platform::GetDefaultPlatform());
|
||||
|
@ -255,6 +254,18 @@ Debugger::~Debugger ()
|
|||
}
|
||||
|
||||
|
||||
bool
|
||||
Debugger::GetCloseInputOnEOF () const
|
||||
{
|
||||
return m_input_comm.GetCloseOnEOF();
|
||||
}
|
||||
|
||||
void
|
||||
Debugger::SetCloseInputOnEOF (bool b)
|
||||
{
|
||||
m_input_comm.SetCloseOnEOF(b);
|
||||
}
|
||||
|
||||
bool
|
||||
Debugger::GetAsyncExecution ()
|
||||
{
|
||||
|
|
|
@ -91,6 +91,9 @@ Driver::Driver () :
|
|||
m_option_data (),
|
||||
m_waiting_for_command (false)
|
||||
{
|
||||
// We want to be able to handle CTRL+D in the terminal to have it terminate
|
||||
// certain input
|
||||
m_debugger.SetCloseInputOnEOF (false);
|
||||
g_debugger_name = (char *) m_debugger.GetInstanceName();
|
||||
if (g_debugger_name == NULL)
|
||||
g_debugger_name = (char *) "";
|
||||
|
|
Loading…
Reference in New Issue