diff options
author | Pedro Alves <palves@redhat.com> | 2016-10-17 14:11:24 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-10-17 14:39:38 +0100 |
commit | a99580bb8b3dd5143d7a4a6918971653fac7fb75 (patch) | |
tree | 0bdf729e3b19e1bd8c10041117fb6392ff6db397 | |
parent | e5a5753ef55e5ee91e2c670dffbcd483585a793d (diff) | |
download | binutils-gdb-a99580bb8b3dd5143d7a4a6918971653fac7fb75.tar.gz |
Use ui_file_as_string in arm-tdep.c
gdb/ChangeLog:
yyyy-mm-yy Pedro Alves <palves@redhat.com>
* arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and
std::string.
-rw-r--r-- | gdb/arm-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 27a3ebe1722..31ebdc352f6 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9558,7 +9558,7 @@ _initialize_arm_tdep (void) const char *setdesc; const char *const *regnames; int i; - static char *helptext; + static std::string helptext; char regdesc[1024], *rdptr = regdesc; size_t rest = sizeof (regdesc); @@ -9629,14 +9629,14 @@ _initialize_arm_tdep (void) _("The valid values are:\n"), regdesc, _("The default is \"std\".")); - helptext = ui_file_xstrdup (stb, NULL); + helptext = ui_file_as_string (stb); ui_file_delete (stb); add_setshow_enum_cmd("disassembler", no_class, valid_disassembly_styles, &disassembly_style, _("Set the disassembly style."), _("Show the disassembly style."), - helptext, + helptext.c_str (), set_disassembly_style_sfunc, NULL, /* FIXME: i18n: The disassembly style is \"%s\". */ |