]> Git Repo - binutils.git/commitdiff
Use ui_file_as_string in gdb/arm-tdep.c
authorPedro Alves <[email protected]>
Tue, 8 Nov 2016 15:26:44 +0000 (15:26 +0000)
committerPedro Alves <[email protected]>
Tue, 8 Nov 2016 15:26:44 +0000 (15:26 +0000)
gdb/ChangeLog:
2016-11-08  Pedro Alves  <[email protected]>

* arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and
std::string.

gdb/ChangeLog
gdb/arm-tdep.c

index 769187fad9bee79de5ea079ba1170540432c1226..52b471b12e64563d2fe8618eb4319757430f40ca 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-08  Pedro Alves  <[email protected]>
+
+       * arm-tdep.c (_initialize_arm_tdep): Use ui_file_as_string and
+       std::string.
+
 2016-11-08  Pedro Alves  <[email protected]>
 
        * utils.c (error_stream): Use ui_file_as_string and std::string.
index 31d33c161c9bc4f8f313d53e790ffca9e97d03c1..78fc2643bd40037624116814dab4091e7cf3a804 100644 (file)
@@ -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\".  */
This page took 0.056053 seconds and 4 git commands to generate.