GNU Binutils with patches for OS216
Révision | 3d8b0d9483f6eabc2c1739ac3dd64c30061a6a72 (tree) |
---|---|
l'heure | 2016-11-09 00:26:45 |
Auteur | Pedro Alves <palves@redh...> |
Commiter | Pedro Alves |
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.
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2016-11-08 Pedro Alves <palves@redhat.com> |
2 | 2 | |
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 | + | |
3 | 8 | * remote.c (escape_buffer): Use ui_file_as_string and return |
4 | 9 | std::string. |
5 | 10 | (putpkt_binary, read_frame): Adjust to use std::string. |
@@ -653,13 +653,12 @@ do_show_command (const char *arg, int from_tty, struct cmd_list_element *c) | ||
653 | 653 | ui_out_field_stream (uiout, "value", stb); |
654 | 654 | else |
655 | 655 | { |
656 | - char *value = ui_file_xstrdup (stb, NULL); | |
656 | + std::string value = ui_file_as_string (stb); | |
657 | 657 | |
658 | - make_cleanup (xfree, value); | |
659 | 658 | 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 ()); | |
661 | 660 | 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 ()); | |
663 | 662 | } |
664 | 663 | do_cleanups (old_chain); |
665 | 664 |