aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/lldb-private-types.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/lldb-private-types.h')
-rw-r--r--include/lldb/lldb-private-types.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/lldb/lldb-private-types.h b/include/lldb/lldb-private-types.h
index 4340af114be3..12a9324008d8 100644
--- a/include/lldb/lldb-private-types.h
+++ b/include/lldb/lldb-private-types.h
@@ -16,6 +16,9 @@
namespace lldb_private
{
+ class Platform;
+ class ExecutionContext;
+
//----------------------------------------------------------------------
// Every register is described in detail including its name, alternate
// name (optional), encoding, size in bytes and the default display
@@ -51,8 +54,16 @@ namespace lldb_private
const char *string_value;
const char *usage;
} OptionEnumValueElement;
+
+ struct OptionValidator
+ {
+ virtual ~OptionValidator() { }
+ virtual bool IsValid(Platform &platform, const ExecutionContext &target) const = 0;
+ virtual const char * ShortConditionString() const = 0;
+ virtual const char * LongConditionString() const = 0;
+ };
- typedef struct
+ struct OptionDefinition
{
uint32_t usage_mask; // Used to mark options that can be used together. If (1 << n & usage_mask) != 0
// then this option belongs to option set n.
@@ -60,12 +71,13 @@ namespace lldb_private
const char *long_option; // Full name for this option.
int short_option; // Single character for this option.
int option_has_arg; // no_argument, required_argument or optional_argument
+ OptionValidator* validator; // If non-NULL, option is valid iff |validator->IsValid()|, otherwise always valid.
OptionEnumValueElement *enum_values; // If non-NULL an array of enum values.
uint32_t completion_type; // Cookie the option class can use to do define the argument completion.
lldb::CommandArgumentType argument_type; // Type of argument this option takes
const char *usage_text; // Full text explaining what this options does and what (if any) argument to
// pass it.
- } OptionDefinition;
+ };
} // namespace lldb_private