2010-06-09 00:52:24 +08:00
|
|
|
//===-- CommandObjectSettings.h ---------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef liblldb_CommandObjectSettings_h_
|
|
|
|
#define liblldb_CommandObjectSettings_h_
|
|
|
|
|
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
// Other libraries and framework includes
|
|
|
|
// Project includes
|
|
|
|
#include "lldb/Interpreter/CommandObject.h"
|
2010-09-04 08:03:46 +08:00
|
|
|
#include "lldb/Interpreter/CommandObjectMultiword.h"
|
|
|
|
#include "lldb/Interpreter/Options.h"
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
2010-09-04 08:03:46 +08:00
|
|
|
// CommandObjectMultiwordSettings
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectMultiwordSettings : public CommandObjectMultiword
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandObjectMultiwordSettings (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectMultiwordSettings ();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsSet
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsSet : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsSet (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsSet ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandOptions ();
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
|
|
|
SetOptionValue (int option_idx, const char *option_arg);
|
|
|
|
|
|
|
|
void
|
|
|
|
ResetOptionValues ();
|
|
|
|
|
|
|
|
const lldb::OptionDefinition*
|
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
|
|
|
static lldb::OptionDefinition g_option_table[];
|
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
bool m_override;
|
|
|
|
bool m_reset;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsShow -- Show current values
|
2010-06-09 00:52:24 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
2010-09-04 08:03:46 +08:00
|
|
|
class CommandObjectSettingsShow : public CommandObject
|
2010-06-09 00:52:24 +08:00
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsShow (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsShow ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsList -- List settable variables
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsList : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsList (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsList ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
2010-09-15 14:56:39 +08:00
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-15 14:56:39 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
2010-09-04 08:03:46 +08:00
|
|
|
private:
|
|
|
|
};
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2010-09-04 08:03:46 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsRemove
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsRemove : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsRemove (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
2010-09-04 08:03:46 +08:00
|
|
|
~CommandObjectSettingsRemove ();
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
2010-09-04 08:03:46 +08:00
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsReplace
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsReplace : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsReplace (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsReplace ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsInsertBefore
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsInsertBefore : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsInsertBefore (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsInsertBefore ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingInsertAfter
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsInsertAfter : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsInsertAfter (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsInsertAfter ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsAppend
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsAppend : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsAppend (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsAppend ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectSettingsClear
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectSettingsClear : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectSettingsClear (CommandInterpreter &interpreter);
|
2010-09-04 08:03:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectSettingsClear ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-09-04 08:03:46 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual int
|
2010-09-18 09:14:36 +08:00
|
|
|
HandleArgumentCompletion (Args &input,
|
2010-09-04 08:03:46 +08:00
|
|
|
int &cursor_index,
|
|
|
|
int &cursor_char_position,
|
|
|
|
OptionElementVector &opt_element_vector,
|
|
|
|
int match_start_point,
|
|
|
|
int max_return_elements,
|
|
|
|
bool &word_complete,
|
|
|
|
StringList &matches);
|
|
|
|
|
|
|
|
private:
|
2010-06-09 00:52:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lldb_private
|
|
|
|
|
|
|
|
#endif // liblldb_CommandObjectSettings_h_
|