aboutsummaryrefslogtreecommitdiffstats
path: root/source/Commands/CommandObjectGUI.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /source/Commands/CommandObjectGUI.cpp
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
downloadsrc-14f1b3e8826ce43b978db93a62d1166055db5394.tar.gz
src-14f1b3e8826ce43b978db93a62d1166055db5394.zip
Vendor import of lldb trunk r290819:vendor/lldb/lldb-trunk-r290819
Notes
Notes: svn path=/vendor/lldb/dist/; revision=311128 svn path=/vendor/lldb/lldb-trunk-r290819/; revision=311129; tag=vendor/lldb/lldb-trunk-r290819
Diffstat (limited to 'source/Commands/CommandObjectGUI.cpp')
-rw-r--r--source/Commands/CommandObjectGUI.cpp65
1 files changed, 26 insertions, 39 deletions
diff --git a/source/Commands/CommandObjectGUI.cpp b/source/Commands/CommandObjectGUI.cpp
index 0991c7e84874..d65e12e30982 100644
--- a/source/Commands/CommandObjectGUI.cpp
+++ b/source/Commands/CommandObjectGUI.cpp
@@ -13,9 +13,9 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
+#include "lldb/lldb-private.h"
using namespace lldb;
using namespace lldb_private;
@@ -24,48 +24,35 @@ using namespace lldb_private;
// CommandObjectGUI
//-------------------------------------------------------------------------
-CommandObjectGUI::CommandObjectGUI (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter, "gui", "Switch into the curses based GUI mode.", "gui")
-{
-}
+CommandObjectGUI::CommandObjectGUI(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "gui",
+ "Switch into the curses based GUI mode.", "gui") {}
-CommandObjectGUI::~CommandObjectGUI ()
-{
-}
+CommandObjectGUI::~CommandObjectGUI() {}
-bool
-CommandObjectGUI::DoExecute (Args& args, CommandReturnObject &result)
-{
+bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
#ifndef LLDB_DISABLE_CURSES
- if (args.GetArgumentCount() == 0)
- {
- Debugger &debugger = m_interpreter.GetDebugger();
-
- lldb::StreamFileSP input_sp = debugger.GetInputFile();
- if (input_sp &&
- input_sp->GetFile().GetIsRealTerminal() &&
- input_sp->GetFile().GetIsInteractive())
- {
- IOHandlerSP io_handler_sp (new IOHandlerCursesGUI (debugger));
- if (io_handler_sp)
- debugger.PushIOHandler(io_handler_sp);
- result.SetStatus (eReturnStatusSuccessFinishResult);
- }
- else
- {
- result.AppendError("the gui command requires an interactive terminal.");
- result.SetStatus (eReturnStatusFailed);
- }
- }
- else
- {
- result.AppendError("the gui command takes no arguments.");
- result.SetStatus (eReturnStatusFailed);
+ if (args.GetArgumentCount() == 0) {
+ Debugger &debugger = m_interpreter.GetDebugger();
+
+ lldb::StreamFileSP input_sp = debugger.GetInputFile();
+ if (input_sp && input_sp->GetFile().GetIsRealTerminal() &&
+ input_sp->GetFile().GetIsInteractive()) {
+ IOHandlerSP io_handler_sp(new IOHandlerCursesGUI(debugger));
+ if (io_handler_sp)
+ debugger.PushIOHandler(io_handler_sp);
+ result.SetStatus(eReturnStatusSuccessFinishResult);
+ } else {
+ result.AppendError("the gui command requires an interactive terminal.");
+ result.SetStatus(eReturnStatusFailed);
}
- return true;
+ } else {
+ result.AppendError("the gui command takes no arguments.");
+ result.SetStatus(eReturnStatusFailed);
+ }
+ return true;
#else
- result.AppendError("lldb was not build with gui support");
- return false;
+ result.AppendError("lldb was not build with gui support");
+ return false;
#endif
}
-