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>
This commit is contained in:
Tom Tromey
2024-03-21 11:15:56 -06:00
parent af25053d5f
commit c05dd51122
11 changed files with 30 additions and 35 deletions

View File

@@ -213,7 +213,7 @@ struct target_desc *mips_tdesc_gp32;
struct target_desc *mips_tdesc_gp64;
/* The current set of options to be passed to the disassembler. */
static char *mips_disassembler_options;
static std::string mips_disassembler_options;
/* Implicit disassembler options for individual ABIs. These tell
libopcodes to use general-purpose register names corresponding