aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectQuit.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-06-08 16:52:24 +0000
committerChris Lattner <sabre@nondot.org>2010-06-08 16:52:24 +0000
commit30fdc8d841c9d24ac5f3d452b6ece84ee0ac991c (patch)
treef70013106f6a461a14abcd71c65f48a95a2979a6 /lldb/source/Commands/CommandObjectQuit.cpp
parent312c4c799da215b337f790fda330f70c4aa757cf (diff)
downloadllvm-30fdc8d841c9d24ac5f3d452b6ece84ee0ac991c.zip
llvm-30fdc8d841c9d24ac5f3d452b6ece84ee0ac991c.tar.gz
llvm-30fdc8d841c9d24ac5f3d452b6ece84ee0ac991c.tar.bz2
Initial checkin of lldb code from internal Apple repo.
llvm-svn: 105619
Diffstat (limited to 'lldb/source/Commands/CommandObjectQuit.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectQuit.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectQuit.cpp b/lldb/source/Commands/CommandObjectQuit.cpp
new file mode 100644
index 0000000..b66f4b1
--- /dev/null
+++ b/lldb/source/Commands/CommandObjectQuit.cpp
@@ -0,0 +1,48 @@
+//===-- CommandObjectQuit.cpp -----------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "CommandObjectQuit.h"
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include "CommandInterpreter.h"
+#include "CommandReturnObject.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+//-------------------------------------------------------------------------
+// CommandObjectQuit
+//-------------------------------------------------------------------------
+
+CommandObjectQuit::CommandObjectQuit () :
+ CommandObject ("quit", "Quits out of the LLDB debugger.", "quit")
+{
+}
+
+CommandObjectQuit::~CommandObjectQuit ()
+{
+}
+
+bool
+CommandObjectQuit::Execute
+(
+ Args& command,
+ CommandContext *context,
+ CommandInterpreter *interpreter,
+ CommandReturnObject &result
+)
+{
+ interpreter->BroadcastEvent (CommandInterpreter::eBroadcastBitQuitCommandReceived);
+ result.SetStatus (eReturnStatusQuit);
+ return true;
+}
+