diff options
Diffstat (limited to 'opcodes/s390-dis.c')
-rw-r--r-- | opcodes/s390-dis.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c index 6763d9f..79d9f53 100644 --- a/opcodes/s390-dis.c +++ b/opcodes/s390-dis.c @@ -379,17 +379,23 @@ print_insn_s390 (bfd_vma memaddr, struct disassemble_info *info) return 0; } -const disasm_options_t * +const disasm_options_and_args_t * disassembler_options_s390 (void) { - static disasm_options_t *opts = NULL; + static disasm_options_and_args_t *opts_and_args; - if (opts == NULL) + if (opts_and_args == NULL) { size_t i, num_options = ARRAY_SIZE (options); - opts = XNEW (disasm_options_t); + disasm_options_t *opts; + + opts_and_args = XNEW (disasm_options_and_args_t); + opts_and_args->args = NULL; + + opts = &opts_and_args->options; opts->name = XNEWVEC (const char *, num_options + 1); opts->description = XNEWVEC (const char *, num_options + 1); + opts->arg = NULL; for (i = 0; i < num_options; i++) { opts->name[i] = options[i].name; @@ -400,7 +406,7 @@ disassembler_options_s390 (void) opts->description[i] = NULL; } - return opts; + return opts_and_args; } void |