diff options
author | Tom Tromey <tromey@adacore.com> | 2024-03-21 11:15:56 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-03-22 13:17:43 -0600 |
commit | c05dd51122c2d654031b04e02ad0ea5b53ffe5e2 (patch) | |
tree | df883998b862b998f58d2b1edefa8bc96a84c725 /gdb/gdbarch.c | |
parent | af25053d5f9e1867bd0df1d5f168c803e1d7d015 (diff) | |
download | gdb-c05dd51122c2d654031b04e02ad0ea5b53ffe5e2.zip gdb-c05dd51122c2d654031b04e02ad0ea5b53ffe5e2.tar.gz gdb-c05dd51122c2d654031b04e02ad0ea5b53ffe5e2.tar.bz2 |
Use std::string for disassembler options
I noticed that the disassembler_options code uses manual memory
management. It seemed simpler to replace this with std::string.
Approved-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 80a04bf..9319571 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -252,7 +252,7 @@ struct gdbarch gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp = default_gnu_triplet_regexp; gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size = default_addressable_memory_unit_size; const char * disassembler_options_implicit = 0; - char ** disassembler_options = 0; + std::string * disassembler_options = 0; const disasm_options_and_args_t * valid_disassembler_options = 0; gdbarch_type_align_ftype *type_align = default_type_align; gdbarch_get_pc_address_flags_ftype *get_pc_address_flags = default_get_pc_address_flags; @@ -5362,7 +5362,7 @@ set_gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch, gdbarch->disassembler_options_implicit = disassembler_options_implicit; } -char ** +std::string * gdbarch_disassembler_options (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); @@ -5374,7 +5374,7 @@ gdbarch_disassembler_options (struct gdbarch *gdbarch) void set_gdbarch_disassembler_options (struct gdbarch *gdbarch, - char ** disassembler_options) + std::string * disassembler_options) { gdbarch->disassembler_options = disassembler_options; } |