• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révision3d8b0d9483f6eabc2c1739ac3dd64c30061a6a72 (tree)
l'heure2016-11-09 00:26:45
AuteurPedro Alves <palves@redh...>
CommiterPedro Alves

Message de Log

Use ui_file_as_string in gdb/cli/cli-setshow.c

gdb/ChangeLog:
2016-11-08 Pedro Alves <palves@redhat.com>

* cli/cli-setshow.c (do_show_command): Adjust to use
ui_file_as_string and std::string.

Change Summary

Modification

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
11 2016-11-08 Pedro Alves <palves@redhat.com>
22
3+ * cli/cli-setshow.c (do_show_command): Adjust to use
4+ ui_file_as_string and std::string.
5+
6+2016-11-08 Pedro Alves <palves@redhat.com>
7+
38 * remote.c (escape_buffer): Use ui_file_as_string and return
49 std::string.
510 (putpkt_binary, read_frame): Adjust to use std::string.
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -653,13 +653,12 @@ do_show_command (const char *arg, int from_tty, struct cmd_list_element *c)
653653 ui_out_field_stream (uiout, "value", stb);
654654 else
655655 {
656- char *value = ui_file_xstrdup (stb, NULL);
656+ std::string value = ui_file_as_string (stb);
657657
658- make_cleanup (xfree, value);
659658 if (c->show_value_func != NULL)
660- c->show_value_func (gdb_stdout, from_tty, c, value);
659+ c->show_value_func (gdb_stdout, from_tty, c, value.c_str ());
661660 else
662- deprecated_show_value_hack (gdb_stdout, from_tty, c, value);
661+ deprecated_show_value_hack (gdb_stdout, from_tty, c, value.c_str ());
663662 }
664663 do_cleanups (old_chain);
665664