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_ #ifndef lldb_Host_MonitoringProcessLauncher_h_
#define 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" #include "lldb/Host/ProcessLauncher.h"
namespace lldb_private namespace lldb_private
@ -20,11 +24,12 @@ class MonitoringProcessLauncher : public ProcessLauncher
public: public:
explicit MonitoringProcessLauncher(std::unique_ptr<ProcessLauncher> delegate_launcher); 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: private:
std::unique_ptr<ProcessLauncher> m_delegate_launcher; 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_ #ifndef lldb_Host_HostProcesPosix_h_
#define 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/lldb-types.h"
#include "lldb/Core/Error.h" #include "lldb/Core/Error.h"
#include "lldb/Host/HostNativeProcessBase.h" #include "lldb/Host/HostNativeProcessBase.h"
@ -24,7 +28,7 @@ class HostProcessPosix : public HostNativeProcessBase
public: public:
HostProcessPosix(); HostProcessPosix();
HostProcessPosix(lldb::process_t process); HostProcessPosix(lldb::process_t process);
virtual ~HostProcessPosix(); ~HostProcessPosix() override;
virtual Error Signal(int signo) const; virtual Error Signal(int signo) const;
static Error Signal(lldb::process_t process, int signo); 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; 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. // 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. // Also if you & in this bit the base code will not process the option.
eCustomCompletion = (1u << 9) eCustomCompletion = (1u << 9)
} CommonCompletionTypes; } CommonCompletionTypes;
struct CommonCompletionElement struct CommonCompletionElement
@ -83,6 +82,7 @@ public:
SearchFilter *searcher, SearchFilter *searcher,
bool &word_complete, bool &word_complete,
StringList &matches); StringList &matches);
static int static int
DiskDirectories (CommandInterpreter &interpreter, DiskDirectories (CommandInterpreter &interpreter,
const char *partial_file_name, const char *partial_file_name,
@ -170,16 +170,16 @@ public:
int max_return_elements, int max_return_elements,
StringList &matches); StringList &matches);
virtual ~Completer (); ~Completer() override;
virtual CallbackReturn CallbackReturn
SearchCallback (SearchFilter &filter, SearchCallback(SearchFilter &filter,
SymbolContext &context, SymbolContext &context,
Address *addr, Address *addr,
bool complete) = 0; bool complete) override = 0;
virtual Depth Depth
GetDepth () = 0; GetDepth() override = 0;
virtual size_t virtual size_t
DoCompletion (SearchFilter *filter) = 0; DoCompletion (SearchFilter *filter) = 0;
@ -190,8 +190,9 @@ public:
int m_match_start_point; int m_match_start_point;
int m_max_return_elements; int m_max_return_elements;
StringList &m_matches; StringList &m_matches;
private: private:
DISALLOW_COPY_AND_ASSIGN (Completer); DISALLOW_COPY_AND_ASSIGN(Completer);
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -200,7 +201,6 @@ public:
class SourceFileCompleter : public Completer class SourceFileCompleter : public Completer
{ {
public: public:
SourceFileCompleter (CommandInterpreter &interpreter, SourceFileCompleter (CommandInterpreter &interpreter,
bool include_support_files, bool include_support_files,
const char *completion_str, const char *completion_str,
@ -208,24 +208,24 @@ public:
int max_return_elements, int max_return_elements,
StringList &matches); StringList &matches);
virtual Searcher::Depth GetDepth (); Searcher::Depth GetDepth() override;
virtual Searcher::CallbackReturn Searcher::CallbackReturn
SearchCallback (SearchFilter &filter, SearchCallback(SearchFilter &filter,
SymbolContext &context, SymbolContext &context,
Address *addr, Address *addr,
bool complete); bool complete) override;
size_t size_t
DoCompletion (SearchFilter *filter); DoCompletion(SearchFilter *filter) override;
private: private:
bool m_include_support_files; bool m_include_support_files;
FileSpecList m_matching_files; FileSpecList m_matching_files;
const char *m_file_name; const char *m_file_name;
const char *m_dir_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 class ModuleCompleter : public Completer
{ {
public: public:
ModuleCompleter (CommandInterpreter &interpreter, ModuleCompleter (CommandInterpreter &interpreter,
const char *completion_str, const char *completion_str,
int match_start_point, int match_start_point,
int max_return_elements, int max_return_elements,
StringList &matches); StringList &matches);
virtual Searcher::Depth GetDepth (); Searcher::Depth GetDepth() override;
virtual Searcher::CallbackReturn Searcher::CallbackReturn
SearchCallback (SearchFilter &filter, SearchCallback(SearchFilter &filter,
SymbolContext &context, SymbolContext &context,
Address *addr, Address *addr,
bool complete); bool complete) override;
size_t size_t
DoCompletion (SearchFilter *filter); DoCompletion(SearchFilter *filter) override;
private: private:
const char *m_file_name; const char *m_file_name;
const char *m_dir_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 class SymbolCompleter : public Completer
{ {
public: public:
SymbolCompleter (CommandInterpreter &interpreter, SymbolCompleter (CommandInterpreter &interpreter,
const char *completion_str, const char *completion_str,
int match_start_point, int match_start_point,
int max_return_elements, int max_return_elements,
StringList &matches); StringList &matches);
virtual Searcher::Depth GetDepth (); Searcher::Depth GetDepth() override;
virtual Searcher::CallbackReturn Searcher::CallbackReturn
SearchCallback (SearchFilter &filter, SearchCallback(SearchFilter &filter,
SymbolContext &context, SymbolContext &context,
Address *addr, Address *addr,
bool complete); bool complete) override;
size_t size_t
DoCompletion (SearchFilter *filter); DoCompletion(SearchFilter *filter) override;
private: private:
// struct NameCmp { // struct NameCmp {
@ -294,14 +292,14 @@ public:
RegularExpression m_regex; RegularExpression m_regex;
typedef std::set<ConstString> collection; typedef std::set<ConstString> collection;
collection m_match_set; collection m_match_set;
DISALLOW_COPY_AND_ASSIGN (SymbolCompleter);
DISALLOW_COPY_AND_ASSIGN(SymbolCompleter);
}; };
private: private:
static CommonCompletionElement g_common_completions[]; static CommonCompletionElement g_common_completions[];
}; };
} // namespace lldb_private } // namespace lldb_private
#endif // lldb_CommandCompletions_h_
#endif // lldb_CommandCompletions_h_

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,29 +36,27 @@ namespace lldb_private {
bool default_value, bool default_value,
bool no_argument_toggle_default); bool no_argument_toggle_default);
virtual ~OptionGroupBoolean() override;
~OptionGroupBoolean ();
uint32_t
GetNumDefinitions() override
virtual uint32_t
GetNumDefinitions ()
{ {
return 1; return 1;
} }
virtual const OptionDefinition* const OptionDefinition*
GetDefinitions () GetDefinitions() override
{ {
return &m_option_definition; return &m_option_definition;
} }
virtual Error Error
SetOptionValue (CommandInterpreter &interpreter, SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx, uint32_t option_idx,
const char *option_value); const char *option_value) override;
virtual void void
OptionParsingStarting (CommandInterpreter &interpreter); OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueBoolean & OptionValueBoolean &
GetOptionValue () GetOptionValue ()
@ -75,9 +73,8 @@ namespace lldb_private {
protected: protected:
OptionValueBoolean m_value; OptionValueBoolean m_value;
OptionDefinition m_option_definition; OptionDefinition m_option_definition;
}; };
} // namespace lldb_private } // 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 // The LLVM Compiler Infrastructure
// //
@ -27,7 +27,6 @@ namespace lldb_private {
class OptionGroupFile : public OptionGroup class OptionGroupFile : public OptionGroup
{ {
public: public:
OptionGroupFile (uint32_t usage_mask, OptionGroupFile (uint32_t usage_mask,
bool required, bool required,
const char *long_option, const char *long_option,
@ -36,29 +35,27 @@ public:
lldb::CommandArgumentType argument_type, lldb::CommandArgumentType argument_type,
const char *usage_text); const char *usage_text);
virtual ~OptionGroupFile() override;
~OptionGroupFile ();
uint32_t
virtual uint32_t GetNumDefinitions() override
GetNumDefinitions ()
{ {
return 1; return 1;
} }
virtual const OptionDefinition* const OptionDefinition*
GetDefinitions () GetDefinitions() override
{ {
return &m_option_definition; return &m_option_definition;
} }
virtual Error Error
SetOptionValue (CommandInterpreter &interpreter, SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx, uint32_t option_idx,
const char *option_value); const char *option_value) override;
virtual void void
OptionParsingStarting (CommandInterpreter &interpreter); OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueFileSpec & OptionValueFileSpec &
GetOptionValue () GetOptionValue ()
@ -75,7 +72,6 @@ public:
protected: protected:
OptionValueFileSpec m_file; OptionValueFileSpec m_file;
OptionDefinition m_option_definition; OptionDefinition m_option_definition;
}; };
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@ -94,30 +90,27 @@ public:
lldb::CommandArgumentType argument_type, lldb::CommandArgumentType argument_type,
const char *usage_text); const char *usage_text);
virtual ~OptionGroupFileList() override;
~OptionGroupFileList ();
uint32_t
virtual uint32_t GetNumDefinitions() override
GetNumDefinitions ()
{ {
return 1; return 1;
} }
virtual const OptionDefinition* const OptionDefinition*
GetDefinitions () GetDefinitions() override
{ {
return &m_option_definition; return &m_option_definition;
} }
virtual Error Error
SetOptionValue (CommandInterpreter &interpreter, SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx, uint32_t option_idx,
const char *option_value); const char *option_value) override;
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
void
OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueFileSpecList & OptionValueFileSpecList &
GetOptionValue () GetOptionValue ()
@ -134,9 +127,8 @@ public:
protected: protected:
OptionValueFileSpecList m_file_list; OptionValueFileSpecList m_file_list;
OptionDefinition m_option_definition; OptionDefinition m_option_definition;
}; };
} // namespace lldb_private } // 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 // 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_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 uint64_t default_count = UINT64_MAX); // Pass UINT64_MAX to disable the "--count" option
virtual ~OptionGroupFormat() override;
~OptionGroupFormat ();
uint32_t
GetNumDefinitions() override;
virtual uint32_t const OptionDefinition*
GetNumDefinitions (); GetDefinitions() override;
virtual const OptionDefinition* Error
GetDefinitions (); SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error void
SetOptionValue (CommandInterpreter &interpreter, OptionParsingStarting(CommandInterpreter &interpreter) override;
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
lldb::Format lldb::Format
GetFormat () const GetFormat () const
@ -112,7 +110,6 @@ public:
} }
protected: protected:
bool bool
ParserGDBFormatLetter (CommandInterpreter &interpreter, ParserGDBFormatLetter (CommandInterpreter &interpreter,
char format_letter, char format_letter,
@ -124,10 +121,9 @@ protected:
OptionValueUInt64 m_count; OptionValueUInt64 m_count;
char m_prev_gdb_format; char m_prev_gdb_format;
char m_prev_gdb_size; char m_prev_gdb_size;
bool m_has_gdb_format; bool m_has_gdb_format;
}; };
} // namespace lldb_private } // 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 // The LLVM Compiler Infrastructure
// //
@ -26,26 +26,23 @@ namespace lldb_private {
class OptionGroupOutputFile : public OptionGroup class OptionGroupOutputFile : public OptionGroup
{ {
public: public:
OptionGroupOutputFile (); OptionGroupOutputFile ();
virtual ~OptionGroupOutputFile() override;
~OptionGroupOutputFile ();
uint32_t
GetNumDefinitions() override;
virtual uint32_t const OptionDefinition*
GetNumDefinitions (); GetDefinitions() override;
virtual const OptionDefinition* Error
GetDefinitions (); SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error void
SetOptionValue (CommandInterpreter &interpreter, OptionParsingStarting(CommandInterpreter &interpreter) override;
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
const OptionValueFileSpec & const OptionValueFileSpec &
GetFile () GetFile ()
@ -68,9 +65,8 @@ public:
protected: protected:
OptionValueFileSpec m_file; OptionValueFileSpec m_file;
OptionValueBoolean m_append; OptionValueBoolean m_append;
}; };
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_OptionGroupOutputFile_h_ #endif // liblldb_OptionGroupOutputFile_h_

View File

@ -27,7 +27,6 @@ namespace lldb_private {
class OptionGroupPlatform : public OptionGroup class OptionGroupPlatform : public OptionGroup
{ {
public: public:
OptionGroupPlatform (bool include_platform_option) : OptionGroupPlatform (bool include_platform_option) :
OptionGroup(), OptionGroup(),
m_platform_name (), m_platform_name (),
@ -39,24 +38,21 @@ public:
{ {
} }
virtual ~OptionGroupPlatform() override = default;
~OptionGroupPlatform ()
{
}
virtual uint32_t uint32_t
GetNumDefinitions (); GetNumDefinitions() override;
virtual const OptionDefinition* const OptionDefinition*
GetDefinitions (); GetDefinitions() override;
virtual Error Error
SetOptionValue (CommandInterpreter &interpreter, SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx, uint32_t option_idx,
const char *option_value); const char *option_value) override;
virtual void void
OptionParsingStarting (CommandInterpreter &interpreter); OptionParsingStarting(CommandInterpreter &interpreter) override;
lldb::PlatformSP lldb::PlatformSP
CreatePlatformWithOptions (CommandInterpreter &interpreter, CreatePlatformWithOptions (CommandInterpreter &interpreter,
@ -119,4 +115,4 @@ protected:
} // namespace lldb_private } // 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 // The LLVM Compiler Infrastructure
// //
@ -25,7 +25,6 @@ namespace lldb_private {
class OptionGroupString : public OptionGroup class OptionGroupString : public OptionGroup
{ {
public: public:
OptionGroupString (uint32_t usage_mask, OptionGroupString (uint32_t usage_mask,
bool required, bool required,
const char *long_option, const char *long_option,
@ -35,29 +34,27 @@ namespace lldb_private {
const char *usage_text, const char *usage_text,
const char *default_value); const char *default_value);
virtual ~OptionGroupString() override;
~OptionGroupString ();
uint32_t
GetNumDefinitions() override
virtual uint32_t
GetNumDefinitions ()
{ {
return 1; return 1;
} }
virtual const OptionDefinition* const OptionDefinition*
GetDefinitions () GetDefinitions() override
{ {
return &m_option_definition; return &m_option_definition;
} }
virtual Error Error
SetOptionValue (CommandInterpreter &interpreter, SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx, uint32_t option_idx,
const char *option_value); const char *option_value) override;
virtual void void
OptionParsingStarting (CommandInterpreter &interpreter); OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueString & OptionValueString &
GetOptionValue () GetOptionValue ()
@ -74,9 +71,8 @@ namespace lldb_private {
protected: protected:
OptionValueString m_value; OptionValueString m_value;
OptionDefinition m_option_definition; OptionDefinition m_option_definition;
}; };
} // namespace lldb_private } // 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 // The LLVM Compiler Infrastructure
// //
@ -18,6 +18,7 @@
#include "lldb/Interpreter/OptionValueUInt64.h" #include "lldb/Interpreter/OptionValueUInt64.h"
namespace lldb_private { namespace lldb_private {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// OptionGroupUInt64 // OptionGroupUInt64
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@ -25,7 +26,6 @@ namespace lldb_private {
class OptionGroupUInt64 : public OptionGroup class OptionGroupUInt64 : public OptionGroup
{ {
public: public:
OptionGroupUInt64 (uint32_t usage_mask, OptionGroupUInt64 (uint32_t usage_mask,
bool required, bool required,
const char *long_option, const char *long_option,
@ -35,29 +35,27 @@ namespace lldb_private {
const char *usage_text, const char *usage_text,
uint64_t default_value); uint64_t default_value);
virtual ~OptionGroupUInt64() override;
~OptionGroupUInt64 ();
uint32_t
GetNumDefinitions() override
virtual uint32_t
GetNumDefinitions ()
{ {
return 1; return 1;
} }
virtual const OptionDefinition* const OptionDefinition*
GetDefinitions () GetDefinitions() override
{ {
return &m_option_definition; return &m_option_definition;
} }
virtual Error Error
SetOptionValue (CommandInterpreter &interpreter, SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx, uint32_t option_idx,
const char *option_value); const char *option_value) override;
virtual void void
OptionParsingStarting (CommandInterpreter &interpreter); OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueUInt64 & OptionValueUInt64 &
GetOptionValue () GetOptionValue ()
@ -74,9 +72,8 @@ namespace lldb_private {
protected: protected:
OptionValueUInt64 m_value; OptionValueUInt64 m_value;
OptionDefinition m_option_definition; OptionDefinition m_option_definition;
}; };
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_OptionGroupUInt64_h_ #endif // liblldb_OptionGroupUInt64_h_

View File

@ -18,6 +18,7 @@
#include "lldb/Interpreter/OptionValueUUID.h" #include "lldb/Interpreter/OptionValueUUID.h"
namespace lldb_private { namespace lldb_private {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// OptionGroupUUID // OptionGroupUUID
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@ -25,26 +26,23 @@ namespace lldb_private {
class OptionGroupUUID : public OptionGroup class OptionGroupUUID : public OptionGroup
{ {
public: public:
OptionGroupUUID (); OptionGroupUUID ();
virtual ~OptionGroupUUID() override;
~OptionGroupUUID ();
uint32_t
GetNumDefinitions() override;
virtual uint32_t const OptionDefinition*
GetNumDefinitions (); GetDefinitions() override;
virtual const OptionDefinition* Error
GetDefinitions (); SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error void
SetOptionValue (CommandInterpreter &interpreter, OptionParsingStarting(CommandInterpreter &interpreter) override;
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
const OptionValueUUID & const OptionValueUUID &
GetOptionValue () const GetOptionValue () const
@ -58,4 +56,4 @@ protected:
} // namespace lldb_private } // 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 // The LLVM Compiler Infrastructure
// //
@ -26,41 +26,38 @@ namespace lldb_private {
class OptionGroupValueObjectDisplay : public OptionGroup class OptionGroupValueObjectDisplay : public OptionGroup
{ {
public: public:
OptionGroupValueObjectDisplay (); OptionGroupValueObjectDisplay ();
virtual ~OptionGroupValueObjectDisplay() override;
~OptionGroupValueObjectDisplay ();
uint32_t
GetNumDefinitions() override;
virtual uint32_t const OptionDefinition*
GetNumDefinitions (); GetDefinitions() override;
virtual const OptionDefinition* Error
GetDefinitions (); SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_value) override;
virtual Error void
SetOptionValue (CommandInterpreter &interpreter, OptionParsingStarting(CommandInterpreter &interpreter) override;
uint32_t option_idx,
const char *option_value);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
bool bool
AnyOptionWasSet () const AnyOptionWasSet () const
{ {
return show_types == true || return show_types ||
no_summary_depth != 0 || no_summary_depth != 0 ||
show_location == true || show_location ||
flat_output == true || flat_output ||
use_objc == true || use_objc ||
max_depth != UINT32_MAX || max_depth != UINT32_MAX ||
ptr_depth != 0 || ptr_depth != 0 ||
use_synth == false || !use_synth ||
be_raw == true || be_raw ||
ignore_cap == true || ignore_cap ||
run_validator == true; run_validator;
} }
DumpValueObjectOptions DumpValueObjectOptions
@ -85,4 +82,4 @@ public:
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_OptionGroupValueObjectDisplay_h_ #endif // liblldb_OptionGroupValueObjectDisplay_h_

View File

@ -26,25 +26,23 @@ namespace lldb_private {
class OptionGroupVariable : public OptionGroup class OptionGroupVariable : public OptionGroup
{ {
public: public:
OptionGroupVariable (bool show_frame_options); OptionGroupVariable (bool show_frame_options);
virtual ~OptionGroupVariable() override;
~OptionGroupVariable ();
uint32_t
GetNumDefinitions() override;
virtual uint32_t const OptionDefinition*
GetNumDefinitions (); GetDefinitions() override;
virtual const OptionDefinition* Error
GetDefinitions (); SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_arg) override;
virtual Error void
SetOptionValue (CommandInterpreter &interpreter, OptionParsingStarting(CommandInterpreter &interpreter) override;
uint32_t option_idx,
const char *option_arg);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
bool include_frame_options:1, bool include_frame_options:1,
show_args:1, // Frame option only (include_frame_options == true) show_args:1, // Frame option only (include_frame_options == true)
@ -62,4 +60,4 @@ namespace lldb_private {
} // 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 class OptionGroupWatchpoint : public OptionGroup
{ {
public: public:
OptionGroupWatchpoint ();
~OptionGroupWatchpoint() override;
static bool static bool
IsWatchSizeSupported(uint32_t watch_size); IsWatchSizeSupported(uint32_t watch_size);
OptionGroupWatchpoint (); uint32_t
GetNumDefinitions() override;
virtual
~OptionGroupWatchpoint ();
virtual uint32_t const OptionDefinition*
GetNumDefinitions (); GetDefinitions() override;
virtual const OptionDefinition* Error
GetDefinitions (); SetOptionValue(CommandInterpreter &interpreter,
uint32_t option_idx,
const char *option_arg) override;
virtual Error void
SetOptionValue (CommandInterpreter &interpreter, OptionParsingStarting(CommandInterpreter &interpreter) override;
uint32_t option_idx,
const char *option_arg);
virtual void
OptionParsingStarting (CommandInterpreter &interpreter);
// Note: // Note:
// eWatchRead == LLDB_WATCH_TYPE_READ; and // eWatchRead == LLDB_WATCH_TYPE_READ; and
@ -68,4 +66,4 @@ namespace lldb_private {
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_OptionGroupWatchpoint_h_ #endif // liblldb_OptionGroupWatchpoint_h_

View File

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

View File

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