diff options
Diffstat (limited to 'include/dis-asm.h')
-rw-r--r-- | include/dis-asm.h | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/include/dis-asm.h b/include/dis-asm.h index cb72b7db5d9..77b9e61e7ea 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -222,16 +222,53 @@ typedef struct disassemble_info } disassemble_info; -/* This struct is used to pass information about valid disassembler options - and their descriptions from the target to the generic GDB functions that - set and display them. */ +/* This struct is used to pass information about valid disassembler + option arguments from the target to the generic GDB functions + that set and display them. */ typedef struct { + /* Option argument name to use in descriptions. */ + const char *name; + + /* Vector of acceptable option argument values, NULL-terminated. */ + const char **values; +} disasm_option_arg_t; + +/* This struct is used to pass information about valid disassembler + options, their descriptions and arguments from the target to the + generic GDB functions that set and display them. Options are + defined by tuples of vector entries at each index. */ + +typedef struct +{ + /* Vector of option names, NULL-terminated. */ const char **name; + + /* Vector of option descriptions or NULL if none to be shown. */ const char **description; + + /* Vector of option argument information pointers or NULL if no + option accepts an argument. NULL entries denote individual + options that accept no argument. */ + const disasm_option_arg_t **arg; } disasm_options_t; +/* This struct is used to pass information about valid disassembler + options and arguments from the target to the generic GDB functions + that set and display them. */ + +typedef struct +{ + /* Valid disassembler options. Individual options that support + an argument will refer to entries in the ARGS vector. */ + disasm_options_t options; + + /* Vector of acceptable option arguments, NULL-terminated. This + collects all possible option argument choices, some of which + may be shared by different options from the OPTIONS member. */ + disasm_option_arg_t *args; +} disasm_options_and_args_t; /* Standard disassemblers. Disassemble one instruction at the given target address. Return number of octets processed. */ @@ -266,9 +303,10 @@ extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *); extern void disassemble_init_powerpc (struct disassemble_info *); extern void disassemble_init_s390 (struct disassemble_info *); extern void disassemble_init_wasm32 (struct disassemble_info *); -extern const disasm_options_t *disassembler_options_powerpc (void); -extern const disasm_options_t *disassembler_options_arm (void); -extern const disasm_options_t *disassembler_options_s390 (void); +extern const disasm_options_and_args_t *disassembler_options_arm (void); +extern const disasm_options_and_args_t *disassembler_options_mips (void); +extern const disasm_options_and_args_t *disassembler_options_powerpc (void); +extern const disasm_options_and_args_t *disassembler_options_s390 (void); /* Fetch the disassembler for a given architecture ARC, endianess (big endian if BIG is true), bfd_mach value MACH, and ABFD, if that support |