1 //===-- CommandObjectSettings.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 "CommandObjectSettings.h"
11 
12 // C Includes
13 // C++ Includes
14 // Other libraries and framework includes
15 // Project includes
16 #include "lldb/Interpreter/CommandInterpreter.h"
17 #include "lldb/Interpreter/CommandReturnObject.h"
18 
19 using namespace lldb;
20 using namespace lldb_private;
21 
22 //-------------------------------------------------------------------------
23 // CommandObjectSettings
24 //-------------------------------------------------------------------------
25 
26 CommandObjectSettings::CommandObjectSettings () :
27     CommandObject ("settings",
28                    "Lists the debugger settings variables available to the user to 'set' or 'show'.",
29                    "settings")
30 {
31 }
32 
33 CommandObjectSettings::~CommandObjectSettings()
34 {
35 }
36 
37 
38 bool
39 CommandObjectSettings::Execute
40 (
41     CommandInterpreter &interpreter,
42     Args& command,
43     CommandReturnObject &result
44 )
45 {
46     CommandInterpreter::VariableMap::iterator pos;
47 
48     if (command.GetArgumentCount() != 0)
49     {
50         result.AppendError ("'settings' does not take any arguments");
51         result.SetStatus (eReturnStatusFailed);
52     }
53     else
54     {
55         interpreter.ShowVariableHelp (result);
56         result.SetStatus (eReturnStatusSuccessFinishNoResult);
57     }
58 
59     return result.Succeeded();
60 }
61 
62