Fix Clang-tidy modernize-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.

Differential Revision: http://reviews.llvm.org/D13602

llvm-svn: 251054
This commit is contained in:
Eugene Zelenko 2015-10-22 19:59:21 +00:00
parent 1740d72867
commit bd832d5131
23 changed files with 398 additions and 460 deletions

View File

@ -10,6 +10,10 @@
#ifndef lldb_Host_MonitoringProcessLauncher_h_
#define lldb_Host_MonitoringProcessLauncher_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Host/ProcessLauncher.h"
namespace lldb_private
@ -20,11 +24,12 @@ class MonitoringProcessLauncher : public ProcessLauncher
public:
explicit MonitoringProcessLauncher(std::unique_ptr<ProcessLauncher> delegate_launcher);
virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error);
HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error) override;
private:
std::unique_ptr<ProcessLauncher> m_delegate_launcher;
};
}
#endif
} // namespace lldb_private
#endif // lldb_Host_MonitoringProcessLauncher_h_

View File

@ -10,6 +10,10 @@
#ifndef lldb_Host_HostProcesPosix_h_
#define lldb_Host_HostProcesPosix_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-types.h"
#include "lldb/Core/Error.h"
#include "lldb/Host/HostNativeProcessBase.h"
@ -24,7 +28,7 @@ class HostProcessPosix : public HostNativeProcessBase
public:
HostProcessPosix();
HostProcessPosix(lldb::process_t process);
virtual ~HostProcessPosix();
~HostProcessPosix() override;
virtual Error Signal(int signo) const;
static Error Signal(lldb::process_t process, int signo);
@ -37,6 +41,7 @@ class HostProcessPosix : public HostNativeProcessBase
HostThread StartMonitoring(HostProcess::MonitorCallback callback, void *callback_baton, bool monitor_signals) override;
};
}
#endif
} // namespace lldb_private
#endif // lldb_Host_HostProcesPosix_h_

View File

@ -54,7 +54,6 @@ public:
// so you can add custom enums starting from here in your Option class.
// Also if you & in this bit the base code will not process the option.
eCustomCompletion = (1u << 9)
} CommonCompletionTypes;
struct CommonCompletionElement
@ -83,6 +82,7 @@ public:
SearchFilter *searcher,
bool &word_complete,
StringList &matches);
static int
DiskDirectories (CommandInterpreter &interpreter,
const char *partial_file_name,
@ -170,16 +170,16 @@ public:
int max_return_elements,
StringList &matches);
virtual ~Completer ();
~Completer() override;
virtual CallbackReturn
SearchCallback (SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete) = 0;
CallbackReturn
SearchCallback(SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete) override = 0;
virtual Depth
GetDepth () = 0;
Depth
GetDepth() override = 0;
virtual size_t
DoCompletion (SearchFilter *filter) = 0;
@ -190,8 +190,9 @@ public:
int m_match_start_point;
int m_max_return_elements;
StringList &m_matches;
private:
DISALLOW_COPY_AND_ASSIGN (Completer);
DISALLOW_COPY_AND_ASSIGN(Completer);
};
//----------------------------------------------------------------------
@ -200,7 +201,6 @@ public:
class SourceFileCompleter : public Completer
{
public:
SourceFileCompleter (CommandInterpreter &interpreter,
bool include_support_files,
const char *completion_str,
@ -208,24 +208,24 @@ public:
int max_return_elements,
StringList &matches);
virtual Searcher::Depth GetDepth ();
Searcher::Depth GetDepth() override;
virtual Searcher::CallbackReturn
SearchCallback (SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete);
Searcher::CallbackReturn
SearchCallback(SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete) override;
size_t
DoCompletion (SearchFilter *filter);
DoCompletion(SearchFilter *filter) override;
private:
bool m_include_support_files;
FileSpecList m_matching_files;
const char *m_file_name;
const char *m_dir_name;
DISALLOW_COPY_AND_ASSIGN (SourceFileCompleter);
DISALLOW_COPY_AND_ASSIGN(SourceFileCompleter);
};
//----------------------------------------------------------------------
@ -234,29 +234,28 @@ public:
class ModuleCompleter : public Completer
{
public:
ModuleCompleter (CommandInterpreter &interpreter,
const char *completion_str,
int match_start_point,
int max_return_elements,
StringList &matches);
virtual Searcher::Depth GetDepth ();
Searcher::Depth GetDepth() override;
virtual Searcher::CallbackReturn
SearchCallback (SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete);
Searcher::CallbackReturn
SearchCallback(SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete) override;
size_t
DoCompletion (SearchFilter *filter);
DoCompletion(SearchFilter *filter) override;
private:
const char *m_file_name;
const char *m_dir_name;
DISALLOW_COPY_AND_ASSIGN (ModuleCompleter);
DISALLOW_COPY_AND_ASSIGN(ModuleCompleter);
};
//----------------------------------------------------------------------
@ -265,23 +264,22 @@ public:
class SymbolCompleter : public Completer
{
public:
SymbolCompleter (CommandInterpreter &interpreter,
const char *completion_str,
int match_start_point,
int max_return_elements,
StringList &matches);
virtual Searcher::Depth GetDepth ();
Searcher::Depth GetDepth() override;
virtual Searcher::CallbackReturn
SearchCallback (SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete);
Searcher::CallbackReturn
SearchCallback(SearchFilter &filter,
SymbolContext &context,
Address *addr,
bool complete) override;
size_t
DoCompletion (SearchFilter *filter);
DoCompletion(SearchFilter *filter) override;
private:
// struct NameCmp {
@ -294,14 +292,14 @@ public:
RegularExpression m_regex;
typedef std::set<ConstString> collection;
collection m_match_set;
DISALLOW_COPY_AND_ASSIGN (SymbolCompleter);
DISALLOW_COPY_AND_ASSIGN(SymbolCompleter);
};
private:
static CommonCompletionElement g_common_completions[];
};
} // namespace lldb_private
#endif // lldb_CommandCompletions_h_
#endif // lldb_CommandCompletions_h_

View File

@ -17,7 +17,6 @@
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Core/Stream.h"
#include "lldb/Host/Mutex.h"

View File

@ -200,8 +200,6 @@ class CommandInterpreter :
public IOHandlerDelegate
{
public:
typedef std::map<std::string, OptionArgVectorSP> OptionArgMap;
enum
@ -229,11 +227,17 @@ public:
eCommandTypesAllThem = 0xFFFF // all commands
};
CommandInterpreter(Debugger &debugger,
lldb::ScriptLanguage script_language,
bool synchronous_execution);
~CommandInterpreter() override;
// These two functions fill out the Broadcaster interface:
static ConstString &GetStaticBroadcasterClass ();
virtual ConstString &GetBroadcasterClass() const
ConstString &GetBroadcasterClass() const override
{
return GetStaticBroadcasterClass();
}
@ -242,13 +246,6 @@ public:
SourceInitFile (bool in_cwd,
CommandReturnObject &result);
CommandInterpreter (Debugger &debugger,
lldb::ScriptLanguage script_language,
bool synchronous_execution);
virtual
~CommandInterpreter ();
bool
AddCommand (const char *name,
const lldb::CommandObjectSP &cmd_sp,
@ -306,7 +303,6 @@ public:
OptionArgVectorSP
GetAliasOptions (const char *alias_name);
bool
ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp,
const char *options_args,
@ -394,7 +390,6 @@ public:
// Otherwise, returns the number of matches.
//
// FIXME: Only max_return_elements == -1 is supported at present.
int
HandleCompletion (const char *current_line,
const char *cursor,
@ -407,7 +402,6 @@ public:
// Help command can call it for the first argument.
// word_complete tells whether the completions are considered a "complete" response (so the
// completer should complete the quote & put a space after the word.
int
HandleCompletionMatches (Args &input,
int &cursor_index,
@ -417,7 +411,6 @@ public:
bool &word_complete,
StringList &matches);
int
GetCommandNamesMatchingPartialString (const char *cmd_cstr,
bool include_aliases,
@ -497,7 +490,6 @@ public:
void
SetScriptLanguage (lldb::ScriptLanguage lang);
bool
HasCommands ();
@ -668,20 +660,20 @@ protected:
//------------------------------------------------------------------
// IOHandlerDelegate functions
//------------------------------------------------------------------
virtual void
IOHandlerInputComplete (IOHandler &io_handler,
std::string &line);
void
IOHandlerInputComplete(IOHandler &io_handler,
std::string &line) override;
virtual ConstString
IOHandlerGetControlSequence (char ch)
ConstString
IOHandlerGetControlSequence(char ch) override
{
if (ch == 'd')
return ConstString("quit\n");
return ConstString();
}
virtual bool
IOHandlerInterrupt (IOHandler &io_handler);
bool
IOHandlerInterrupt(IOHandler &io_handler) override;
size_t
GetProcessOutput ();
@ -692,9 +684,7 @@ protected:
lldb::CommandObjectSP
GetCommandSP (const char *cmd, bool include_aliases = true, bool exact = true, StringList *matches = NULL);
private:
Error
PreprocessCommand (std::string &command);
@ -704,7 +694,6 @@ private:
CommandObject *
ResolveCommandImpl(std::string &command_line, CommandReturnObject &result);
Debugger &m_debugger; // The debugger session that this interpreter is associated with
ExecutionContextRef m_exe_ctx_ref; // The current execution context to use when handling commands
bool m_synchronous_execution;
@ -726,10 +715,8 @@ private:
uint32_t m_num_errors;
bool m_quit_requested;
bool m_stopped_for_crash;
};
} // namespace lldb_private
#endif // liblldb_CommandInterpreter_h_
#endif // liblldb_CommandInterpreter_h_

View File

@ -10,11 +10,14 @@
#ifndef liblldb_CommandObject_h_
#define liblldb_CommandObject_h_
// C Includes
// C++ Includes
#include <map>
#include <set>
#include <string>
#include <vector>
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandCompletions.h"
@ -28,7 +31,6 @@ namespace lldb_private {
class CommandObject
{
public:
typedef const char *(ArgumentHelpCallbackFunction) ();
struct ArgumentHelpCallback
@ -46,7 +48,6 @@ public:
{
return (help_callback != NULL);
}
};
struct ArgumentTableEntry // Entries in the main argument information table
@ -85,7 +86,6 @@ public:
virtual
~CommandObject ();
static const char *
GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type);
@ -326,7 +326,6 @@ public:
/// @return
/// The number of completions.
//------------------------------------------------------------------
virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
@ -488,13 +487,11 @@ protected:
// to the specified command argument entry.
static void
AddIDsArgumentData(CommandArgumentEntry &arg, lldb::CommandArgumentType ID, lldb::CommandArgumentType IDRange);
};
class CommandObjectParsed : public CommandObject
{
public:
CommandObjectParsed (CommandInterpreter &interpreter,
const char *name,
const char *help = NULL,
@ -502,25 +499,26 @@ public:
uint32_t flags = 0) :
CommandObject (interpreter, name, help, syntax, flags) {}
virtual
~CommandObjectParsed () {}
~CommandObjectParsed() override = default;
virtual bool
Execute (const char *args_string, CommandReturnObject &result);
bool
Execute(const char *args_string, CommandReturnObject &result) override;
protected:
virtual bool
DoExecute (Args& command,
CommandReturnObject &result) = 0;
virtual bool
WantsRawCommandString() { return false; }
bool
WantsRawCommandString() override
{
return false;
}
};
class CommandObjectRaw : public CommandObject
{
public:
CommandObjectRaw (CommandInterpreter &interpreter,
const char *name,
const char *help = NULL,
@ -528,22 +526,22 @@ public:
uint32_t flags = 0) :
CommandObject (interpreter, name, help, syntax, flags) {}
virtual
~CommandObjectRaw () {}
~CommandObjectRaw() override = default;
virtual bool
Execute (const char *args_string, CommandReturnObject &result);
bool
Execute(const char *args_string, CommandReturnObject &result) override;
protected:
virtual bool
DoExecute (const char *command, CommandReturnObject &result) = 0;
virtual bool
WantsRawCommandString() { return true; }
bool
WantsRawCommandString() override
{
return true;
}
};
} // namespace lldb_private
#endif // liblldb_CommandObject_h_
#endif // liblldb_CommandObject_h_

View File

@ -12,8 +12,6 @@
// C Includes
// C++ Includes
#include <map>
// Other libraries and framework includes
// Project includes
#include "lldb/Interpreter/CommandObject.h"
@ -36,51 +34,60 @@ public:
const char *syntax = NULL,
uint32_t flags = 0);
virtual
~CommandObjectMultiword ();
~CommandObjectMultiword() override;
virtual bool
IsMultiwordObject () { return true; }
bool
IsMultiwordObject() override
{
return true;
}
virtual bool
LoadSubCommand (const char *cmd_name,
const lldb::CommandObjectSP& command_obj);
bool
LoadSubCommand(const char *cmd_name,
const lldb::CommandObjectSP& command_obj) override;
virtual void
GenerateHelpText (Stream &output_stream);
void
GenerateHelpText(Stream &output_stream) override;
virtual lldb::CommandObjectSP
GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL);
lldb::CommandObjectSP
GetSubcommandSP(const char *sub_cmd, StringList *matches = NULL) override;
virtual CommandObject *
GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL);
CommandObject *
GetSubcommandObject(const char *sub_cmd, StringList *matches = NULL) override;
virtual void
AproposAllSubCommands (const char *prefix,
const char *search_word,
StringList &commands_found,
StringList &commands_help);
void
AproposAllSubCommands(const char *prefix,
const char *search_word,
StringList &commands_found,
StringList &commands_help) override;
virtual bool
WantsRawCommandString() { return false; }
bool
WantsRawCommandString() override
{
return false;
}
virtual int
HandleCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches);
int
HandleCompletion(Args &input,
int &cursor_index,
int &cursor_char_position,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches) override;
virtual const char *GetRepeatCommand (Args &current_command_args, uint32_t index);
const char *
GetRepeatCommand (Args &current_command_args, uint32_t index) override;
virtual bool
Execute (const char *args_string,
CommandReturnObject &result);
bool
Execute(const char *args_string,
CommandReturnObject &result) override;
virtual bool
IsRemovable() const { return m_can_be_removed; }
bool
IsRemovable() const override
{
return m_can_be_removed;
}
void
SetRemovable (bool removable)
@ -94,7 +101,6 @@ protected:
bool m_can_be_removed;
};
class CommandObjectProxy : public CommandObject
{
public:
@ -104,84 +110,80 @@ public:
const char *syntax = NULL,
uint32_t flags = 0);
virtual
~CommandObjectProxy ();
~CommandObjectProxy() override;
// Subclasses must provide a command object that will be transparently
// used for this object.
virtual CommandObject *
GetProxyCommandObject() = 0;
virtual const char *
GetHelpLong ();
const char *
GetHelpLong() override;
virtual bool
IsRemovable() const;
bool
IsRemovable() const override;
virtual bool
IsMultiwordObject ();
bool
IsMultiwordObject() override;
virtual lldb::CommandObjectSP
GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL);
lldb::CommandObjectSP
GetSubcommandSP(const char *sub_cmd, StringList *matches = NULL) override;
virtual CommandObject *
GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL);
CommandObject *
GetSubcommandObject(const char *sub_cmd, StringList *matches = NULL) override;
virtual void
AproposAllSubCommands (const char *prefix,
const char *search_word,
StringList &commands_found,
StringList &commands_help);
void
AproposAllSubCommands(const char *prefix,
const char *search_word,
StringList &commands_found,
StringList &commands_help) override;
virtual bool
LoadSubCommand (const char *cmd_name,
const lldb::CommandObjectSP& command_obj);
bool
LoadSubCommand(const char *cmd_name,
const lldb::CommandObjectSP& command_obj) override;
virtual bool
WantsRawCommandString();
bool
WantsRawCommandString() override;
virtual bool
WantsCompletion();
bool
WantsCompletion() override;
virtual Options *
GetOptions ();
Options *
GetOptions() override;
int
HandleCompletion(Args &input,
int &cursor_index,
int &cursor_char_position,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches) override;
virtual int
HandleCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches);
int
HandleArgumentCompletion(Args &input,
int &cursor_index,
int &cursor_char_position,
OptionElementVector &opt_element_vector,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches) override;
virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
OptionElementVector &opt_element_vector,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches);
const char *
GetRepeatCommand(Args &current_command_args,
uint32_t index) override;
virtual const char *
GetRepeatCommand (Args &current_command_args,
uint32_t index);
virtual bool
Execute (const char *args_string,
CommandReturnObject &result);
bool
Execute(const char *args_string,
CommandReturnObject &result) override;
protected:
// These two want to iterate over the subcommand dictionary.
friend class CommandInterpreter;
friend class CommandObjectSyntax;
};
} // namespace lldb_private
#endif // liblldb_CommandObjectMultiword_h_
#endif // liblldb_CommandObjectMultiword_h_

View File

@ -28,7 +28,6 @@ namespace lldb_private {
class CommandObjectRegexCommand : public CommandObjectRaw
{
public:
CommandObjectRegexCommand (CommandInterpreter &interpreter,
const char *name,
const char *help,
@ -37,8 +36,7 @@ public:
uint32_t completion_type_mask,
bool is_removable);
virtual
~CommandObjectRegexCommand ();
~CommandObjectRegexCommand() override;
bool
IsRemovable () const override { return m_is_removable; }
@ -83,4 +81,4 @@ private:
} // namespace lldb_private
#endif // liblldb_CommandObjectRegexCommand_h_
#endif // liblldb_CommandObjectRegexCommand_h_

View File

@ -10,6 +10,10 @@
#ifndef liblldb_CommandOptionValidators_h_
#define liblldb_CommandOptionValidators_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private-types.h"
namespace lldb_private {
@ -19,12 +23,11 @@ class ExecutionContext;
class PosixPlatformCommandOptionValidator : public OptionValidator
{
virtual bool IsValid(Platform &platform, const ExecutionContext &target) const;
virtual const char* ShortConditionString() const;
virtual const char* LongConditionString() const;
bool IsValid(Platform &platform, const ExecutionContext &target) const override;
const char* ShortConditionString() const override;
const char* LongConditionString() const override;
};
} // namespace lldb_private
#endif // liblldb_CommandOptionValidators_h_
#endif // liblldb_CommandOptionValidators_h_

View File

@ -29,23 +29,21 @@ public:
OptionGroupArchitecture ();
virtual
~OptionGroupArchitecture ();
~OptionGroupArchitecture() override;
uint32_t
GetNumDefinitions() override;
virtual uint32_t
GetNumDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
bool
GetArchitecture (Platform *platform, ArchSpec &arch);
@ -55,6 +53,7 @@ public:
{
return !m_arch_str.empty();
}
const char *
GetArchitectureName ()
{
@ -70,4 +69,4 @@ protected:
} // namespace lldb_private
#endif // liblldb_OptionGroupArchitecture_h_
#endif // liblldb_OptionGroupArchitecture_h_

View File

@ -36,29 +36,27 @@ namespace lldb_private {
bool default_value,
bool no_argument_toggle_default);
virtual
~OptionGroupBoolean ();
~OptionGroupBoolean() override;
virtual uint32_t
GetNumDefinitions ()
uint32_t
GetNumDefinitions() override
{
return 1;
}
virtual const OptionDefinition*
GetDefinitions ()
const OptionDefinition*
GetDefinitions() override
{
return &m_option_definition;
}
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueBoolean &
GetOptionValue ()
@ -75,9 +73,8 @@ namespace lldb_private {
protected:
OptionValueBoolean m_value;
OptionDefinition m_option_definition;
};
} // namespace lldb_private
#endif // liblldb_OptionGroupBoolean_h_
#endif // liblldb_OptionGroupBoolean_h_

View File

@ -1,4 +1,4 @@
//===-- OptionGroupFile.h -------------------------------*- C++ -*-===//
//===-- OptionGroupFile.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -27,7 +27,6 @@ namespace lldb_private {
class OptionGroupFile : public OptionGroup
{
public:
OptionGroupFile (uint32_t usage_mask,
bool required,
const char *long_option,
@ -36,29 +35,27 @@ public:
lldb::CommandArgumentType argument_type,
const char *usage_text);
virtual
~OptionGroupFile ();
~OptionGroupFile() override;
virtual uint32_t
GetNumDefinitions ()
uint32_t
GetNumDefinitions() override
{
return 1;
}
virtual const OptionDefinition*
GetDefinitions ()
const OptionDefinition*
GetDefinitions() override
{
return &m_option_definition;
}
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueFileSpec &
GetOptionValue ()
@ -75,7 +72,6 @@ public:
protected:
OptionValueFileSpec m_file;
OptionDefinition m_option_definition;
};
//-------------------------------------------------------------------------
@ -94,30 +90,27 @@ public:
lldb::CommandArgumentType argument_type,
const char *usage_text);
virtual
~OptionGroupFileList ();
~OptionGroupFileList() override;
virtual uint32_t
GetNumDefinitions ()
uint32_t
GetNumDefinitions() override
{
return 1;
}
virtual const OptionDefinition*
GetDefinitions ()
const OptionDefinition*
GetDefinitions() override
{
return &m_option_definition;
}
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueFileSpecList &
GetOptionValue ()
@ -134,9 +127,8 @@ public:
protected:
OptionValueFileSpecList m_file_list;
OptionDefinition m_option_definition;
};
} // namespace lldb_private
#endif // liblldb_OptionGroupFile_h_
#endif // liblldb_OptionGroupFile_h_

View File

@ -1,4 +1,4 @@
//===-- OptionGroupFormat.h -------------------------------*- C++ -*-===//
//===-- OptionGroupFormat.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -37,23 +37,21 @@ public:
uint64_t default_byte_size = UINT64_MAX, // Pass UINT64_MAX to disable the "--size" option
uint64_t default_count = UINT64_MAX); // Pass UINT64_MAX to disable the "--count" option
virtual
~OptionGroupFormat ();
~OptionGroupFormat() override;
uint32_t
GetNumDefinitions() override;
virtual uint32_t
GetNumDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
lldb::Format
GetFormat () const
@ -112,7 +110,6 @@ public:
}
protected:
bool
ParserGDBFormatLetter (CommandInterpreter &interpreter,
char format_letter,
@ -124,10 +121,9 @@ protected:
OptionValueUInt64 m_count;
char m_prev_gdb_format;
char m_prev_gdb_size;
bool m_has_gdb_format;
};
} // namespace lldb_private
#endif // liblldb_OptionGroupFormat_h_
#endif // liblldb_OptionGroupFormat_h_

View File

@ -1,4 +1,4 @@
//===-- OptionGroupOutputFile.h -------------------------------*- C++ -*-===//
//===-- OptionGroupOutputFile.h ---------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -26,26 +26,23 @@ namespace lldb_private {
class OptionGroupOutputFile : public OptionGroup
{
public:
OptionGroupOutputFile ();
virtual
~OptionGroupOutputFile ();
~OptionGroupOutputFile() override;
uint32_t
GetNumDefinitions() override;
virtual uint32_t
GetNumDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
const OptionValueFileSpec &
GetFile ()
@ -68,9 +65,8 @@ public:
protected:
OptionValueFileSpec m_file;
OptionValueBoolean m_append;
};
} // namespace lldb_private
#endif // liblldb_OptionGroupOutputFile_h_
#endif // liblldb_OptionGroupOutputFile_h_

View File

@ -27,7 +27,6 @@ namespace lldb_private {
class OptionGroupPlatform : public OptionGroup
{
public:
OptionGroupPlatform (bool include_platform_option) :
OptionGroup(),
m_platform_name (),
@ -39,24 +38,21 @@ public:
{
}
virtual
~OptionGroupPlatform ()
{
}
~OptionGroupPlatform() override = default;
virtual uint32_t
GetNumDefinitions ();
uint32_t
GetNumDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
lldb::PlatformSP
CreatePlatformWithOptions (CommandInterpreter &interpreter,
@ -119,4 +115,4 @@ protected:
} // namespace lldb_private
#endif // liblldb_OptionGroupPlatform_h_
#endif // liblldb_OptionGroupPlatform_h_

View File

@ -1,4 +1,4 @@
//===-- OptionGroupString.h ------------------------------------*- C++ -*-===//
//===-- OptionGroupString.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -25,7 +25,6 @@ namespace lldb_private {
class OptionGroupString : public OptionGroup
{
public:
OptionGroupString (uint32_t usage_mask,
bool required,
const char *long_option,
@ -35,29 +34,27 @@ namespace lldb_private {
const char *usage_text,
const char *default_value);
virtual
~OptionGroupString ();
~OptionGroupString() override;
virtual uint32_t
GetNumDefinitions ()
uint32_t
GetNumDefinitions() override
{
return 1;
}
virtual const OptionDefinition*
GetDefinitions ()
const OptionDefinition*
GetDefinitions() override
{
return &m_option_definition;
}
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueString &
GetOptionValue ()
@ -74,9 +71,8 @@ namespace lldb_private {
protected:
OptionValueString m_value;
OptionDefinition m_option_definition;
};
} // namespace lldb_private
#endif // liblldb_OptionGroupString_h_
#endif // liblldb_OptionGroupString_h_

View File

@ -1,4 +1,4 @@
//===-- OptionGroupUInt64.h ------------------------------------*- C++ -*-===//
//===-- OptionGroupUInt64.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -18,6 +18,7 @@
#include "lldb/Interpreter/OptionValueUInt64.h"
namespace lldb_private {
//-------------------------------------------------------------------------
// OptionGroupUInt64
//-------------------------------------------------------------------------
@ -25,7 +26,6 @@ namespace lldb_private {
class OptionGroupUInt64 : public OptionGroup
{
public:
OptionGroupUInt64 (uint32_t usage_mask,
bool required,
const char *long_option,
@ -35,29 +35,27 @@ namespace lldb_private {
const char *usage_text,
uint64_t default_value);
virtual
~OptionGroupUInt64 ();
~OptionGroupUInt64() override;
virtual uint32_t
GetNumDefinitions ()
uint32_t
GetNumDefinitions() override
{
return 1;
}
virtual const OptionDefinition*
GetDefinitions ()
const OptionDefinition*
GetDefinitions() override
{
return &m_option_definition;
}
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueUInt64 &
GetOptionValue ()
@ -74,9 +72,8 @@ namespace lldb_private {
protected:
OptionValueUInt64 m_value;
OptionDefinition m_option_definition;
};
} // namespace lldb_private
#endif // liblldb_OptionGroupUInt64_h_
#endif // liblldb_OptionGroupUInt64_h_

View File

@ -18,6 +18,7 @@
#include "lldb/Interpreter/OptionValueUUID.h"
namespace lldb_private {
//-------------------------------------------------------------------------
// OptionGroupUUID
//-------------------------------------------------------------------------
@ -25,26 +26,23 @@ namespace lldb_private {
class OptionGroupUUID : public OptionGroup
{
public:
OptionGroupUUID ();
virtual
~OptionGroupUUID ();
~OptionGroupUUID() override;
uint32_t
GetNumDefinitions() override;
virtual uint32_t
GetNumDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
const OptionValueUUID &
GetOptionValue () const
@ -58,4 +56,4 @@ protected:
} // namespace lldb_private
#endif // liblldb_OptionGroupUUID_h_
#endif // liblldb_OptionGroupUUID_h_

View File

@ -1,4 +1,4 @@
//===-- OptionGroupValueObjectDisplay.h -------------------------------*- C++ -*-===//
//===-- OptionGroupValueObjectDisplay.h -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -26,41 +26,38 @@ namespace lldb_private {
class OptionGroupValueObjectDisplay : public OptionGroup
{
public:
OptionGroupValueObjectDisplay ();
virtual
~OptionGroupValueObjectDisplay ();
~OptionGroupValueObjectDisplay() override;
uint32_t
GetNumDefinitions() override;
virtual uint32_t
GetNumDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
bool
AnyOptionWasSet () const
{
return show_types == true ||
no_summary_depth != 0 ||
show_location == true ||
flat_output == true ||
use_objc == true ||
return show_types ||
no_summary_depth != 0 ||
show_location ||
flat_output ||
use_objc ||
max_depth != UINT32_MAX ||
ptr_depth != 0 ||
use_synth == false ||
be_raw == true ||
ignore_cap == true ||
run_validator == true;
!use_synth ||
be_raw ||
ignore_cap ||
run_validator;
}
DumpValueObjectOptions
@ -85,4 +82,4 @@ public:
} // namespace lldb_private
#endif // liblldb_OptionGroupValueObjectDisplay_h_
#endif // liblldb_OptionGroupValueObjectDisplay_h_

View File

@ -26,25 +26,23 @@ namespace lldb_private {
class OptionGroupVariable : public OptionGroup
{
public:
OptionGroupVariable (bool show_frame_options);
virtual
~OptionGroupVariable ();
~OptionGroupVariable() override;
virtual uint32_t
GetNumDefinitions ();
uint32_t
GetNumDefinitions() override;
virtual const OptionDefinition*
GetDefinitions ();
const OptionDefinition*
GetDefinitions() override;
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_arg);
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_arg) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
bool include_frame_options:1,
show_args:1, // Frame option only (include_frame_options == true)
@ -62,4 +60,4 @@ namespace lldb_private {
} // namespace lldb_private
#endif // liblldb_OptionGroupVariable_h_
#endif // liblldb_OptionGroupVariable_h_

View File

@ -25,28 +25,26 @@ namespace lldb_private {
class OptionGroupWatchpoint : public OptionGroup
{
public:
OptionGroupWatchpoint ();
~OptionGroupWatchpoint() override;
static bool
IsWatchSizeSupported(uint32_t watch_size);
OptionGroupWatchpoint ();
uint32_t
GetNumDefinitions() override;
virtual
~OptionGroupWatchpoint ();
const OptionDefinition*
GetDefinitions() override;
virtual uint32_t
GetNumDefinitions ();
Error
SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_arg) override;
virtual const OptionDefinition*
GetDefinitions ();
virtual Error
SetOptionValue (CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_arg);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
// Note:
// eWatchRead == LLDB_WATCH_TYPE_READ; and
@ -68,4 +66,4 @@ namespace lldb_private {
} // namespace lldb_private
#endif // liblldb_OptionGroupWatchpoint_h_
#endif // liblldb_OptionGroupWatchpoint_h_

View File

@ -11,7 +11,6 @@
#define liblldb_Options_h_
// C Includes
// C++ Includes
#include <set>
#include <vector>
@ -32,7 +31,6 @@ namespace lldb_private {
return isprint(ch);
}
//----------------------------------------------------------------------
/// @class Options Options.h "lldb/Interpreter/Options.h"
/// @brief A command line option parsing protocol class.
@ -119,7 +117,6 @@ namespace lldb_private {
class Options
{
public:
Options (CommandInterpreter &interpreter);
virtual
@ -153,7 +150,6 @@ public:
// Verify that the options given are in the options table and can
// be used together, but there may be some required options that are
// missing (used to verify options that get folded into command aliases).
bool
VerifyPartialOptions (CommandReturnObject &result);
@ -359,14 +355,10 @@ protected:
class OptionGroup
{
public:
OptionGroup ()
{
}
OptionGroup() = default;
virtual
~OptionGroup ()
{
}
~OptionGroup() = default;
virtual uint32_t
GetNumDefinitions () = 0;
@ -395,7 +387,6 @@ protected:
class OptionGroupOptions : public Options
{
public:
OptionGroupOptions (CommandInterpreter &interpreter) :
Options (interpreter),
m_option_defs (),
@ -404,11 +395,7 @@ protected:
{
}
virtual
~OptionGroupOptions ()
{
}
~OptionGroupOptions() override = default;
//----------------------------------------------------------------------
/// Append options from a OptionGroup class.
@ -459,18 +446,18 @@ protected:
return m_did_finalize;
}
virtual Error
SetOptionValue (uint32_t option_idx,
const char *option_arg);
Error
SetOptionValue(uint32_t option_idx,
const char *option_arg) override;
virtual void
OptionParsingStarting ();
void
OptionParsingStarting() override;
virtual Error
OptionParsingFinished ();
Error
OptionParsingFinished() override;
const OptionDefinition*
GetDefinitions ()
GetDefinitions() override
{
assert (m_did_finalize);
return &m_option_defs[0];
@ -496,7 +483,6 @@ protected:
bool m_did_finalize;
};
} // namespace lldb_private
#endif // liblldb_Options_h_
#endif // liblldb_Options_h_

View File

@ -10,6 +10,10 @@
#ifndef liblldb_ScriptInterpreter_h_
#define liblldb_ScriptInterpreter_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Core/Broadcaster.h"
@ -19,20 +23,16 @@
#include "lldb/Utility/PseudoTerminal.h"
namespace lldb_private {
class ScriptInterpreterLocker
{
public:
ScriptInterpreterLocker ()
{
}
ScriptInterpreterLocker() = default;
virtual ~ScriptInterpreterLocker() = default;
virtual ~ScriptInterpreterLocker ()
{
}
private:
DISALLOW_COPY_AND_ASSIGN (ScriptInterpreterLocker);
};
@ -40,7 +40,6 @@ private:
class ScriptInterpreter : public PluginInterface
{
public:
typedef enum
{
eScriptReturnTypeCharPtr,
@ -62,7 +61,7 @@ public:
ScriptInterpreter (CommandInterpreter &interpreter, lldb::ScriptLanguage script_lang);
virtual ~ScriptInterpreter ();
~ScriptInterpreter() override;
struct ExecuteScriptOptions
{
@ -324,7 +323,6 @@ public:
SetBreakpointCommandCallbackFunction (BreakpointOptions *bp_options,
const char *function_name)
{
return;
}
/// Set a one-liner as the callback for the watchpoint.
@ -332,7 +330,6 @@ public:
SetWatchpointCommandCallback (WatchpointOptions *wp_options,
const char *oneliner)
{
return;
}
virtual bool
@ -459,7 +456,7 @@ public:
virtual bool
GetDocumentationForItem (const char* item, std::string& dest)
{
dest.clear();
dest.clear();
return false;
}
@ -514,8 +511,8 @@ public:
int
GetMasterFileDescriptor ();
CommandInterpreter &
GetCommandInterpreter ();
CommandInterpreter &
GetCommandInterpreter();
static std::string
LanguageToString (lldb::ScriptLanguage language);
@ -530,4 +527,4 @@ protected:
} // namespace lldb_private
#endif // #ifndef liblldb_ScriptInterpreter_h_
#endif // liblldb_ScriptInterpreter_h_