Johnny Chen | 902e018 | 2010-12-23 20:21:44 +0000 | [diff] [blame] | 1 | //===-- CommandObjectVersion.cpp --------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "CommandObjectVersion.h" |
| 11 | |
| 12 | // C Includes |
| 13 | // C++ Includes |
| 14 | // Other libraries and framework includes |
| 15 | // Project includes |
| 16 | #include "lldb/lldb-private.h" |
| 17 | #include "lldb/Interpreter/CommandInterpreter.h" |
| 18 | #include "lldb/Interpreter/CommandReturnObject.h" |
| 19 | |
| 20 | using namespace lldb; |
| 21 | using namespace lldb_private; |
| 22 | |
| 23 | //------------------------------------------------------------------------- |
| 24 | // CommandObjectVersion |
| 25 | //------------------------------------------------------------------------- |
| 26 | |
| 27 | CommandObjectVersion::CommandObjectVersion (CommandInterpreter &interpreter) : |
| 28 | CommandObject (interpreter, "version", "Show version of LLDB debugger.", "version") |
| 29 | { |
| 30 | } |
| 31 | |
| 32 | CommandObjectVersion::~CommandObjectVersion () |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | bool |
| 37 | CommandObjectVersion::Execute |
| 38 | ( |
| 39 | Args& args, |
| 40 | CommandReturnObject &result |
| 41 | ) |
| 42 | { |
Jim Ingham | 2e8cb8a | 2011-02-19 02:53:09 +0000 | [diff] [blame] | 43 | result.AppendMessageWithFormat ("%s\n", lldb_private::GetVersion()); |
Johnny Chen | 902e018 | 2010-12-23 20:21:44 +0000 | [diff] [blame] | 44 | result.SetStatus (eReturnStatusSuccessFinishResult); |
| 45 | return true; |
| 46 | } |
| 47 | |