diff options
author | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:44 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:44 +0000 |
commit | 09b0e4b047b44063cf4c8c00527886743619c24e (patch) | |
tree | 6d544a092eb24e538121257d9edfe228238597ce | |
parent | d16c5475b560adbad2d9bc78ec3718658f4090e3 (diff) | |
download | gdb-09b0e4b047b44063cf4c8c00527886743619c24e.zip gdb-09b0e4b047b44063cf4c8c00527886743619c24e.tar.gz gdb-09b0e4b047b44063cf4c8c00527886743619c24e.tar.bz2 |
Use ui_file_as_string in gdb/arm-tdep.c
gdb/ChangeLog:
2016-11-08 Pedro Alves <palves@redhat.com>
* arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and
std::string.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 769187f..52b471b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2016-11-08 Pedro Alves <palves@redhat.com> + * arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and + std::string. + +2016-11-08 Pedro Alves <palves@redhat.com> + * utils.c (error_stream): Use ui_file_as_string and std::string. 2016-11-08 Pedro Alves <palves@redhat.com> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 31d33c1..78fc264 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9584,7 +9584,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); @@ -9655,14 +9655,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\". */ |