• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

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

Revisão6f0302493af0ace93943041c3374069c15c363f7 (tree)
Hora2016-11-09 00:26:46
AutorPedro Alves <palves@redh...>
CommiterPedro Alves

Mensagem de Log

Use ui_file_as_string in gdbarch.sh/gdbarch.c

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

* gdbarch.sh (verify_gdbarch): Use ui_file_as_string and
std::string.
* gdbarch.c: Regenerate.

Mudança Sumário

Diff

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
11 2016-11-08 Pedro Alves <palves@redhat.com>
22
3+ * gdbarch.sh (verify_gdbarch): Use ui_file_as_string and
4+ std::string.
5+ * gdbarch.c: Regenerate.
6+
7+2016-11-08 Pedro Alves <palves@redhat.com>
8+
39 * c-exp.y (OPERATOR NEW): Adjust to use ui_file_as_string and
410 std::string.
511
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -500,7 +500,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
500500 struct ui_file *log;
501501 struct cleanup *cleanups;
502502 long length;
503- char *buf;
504503
505504 log = mem_fileopen ();
506505 cleanups = make_cleanup_ui_file_delete (log);
@@ -697,12 +696,11 @@ verify_gdbarch (struct gdbarch *gdbarch)
697696 /* Skip verify of gcc_target_options, invalid_p == 0 */
698697 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
699698 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
700- buf = ui_file_xstrdup (log, &length);
701- make_cleanup (xfree, buf);
702- if (length > 0)
699+ std::string buf = ui_file_as_string (log);
700+ if (!buf.empty ())
703701 internal_error (__FILE__, __LINE__,
704702 _("verify_gdbarch: the following are invalid ...%s"),
705- buf);
703+ buf.c_str ());
706704 do_cleanups (cleanups);
707705 }
708706
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1878,7 +1878,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
18781878 struct ui_file *log;
18791879 struct cleanup *cleanups;
18801880 long length;
1881- char *buf;
18821881
18831882 log = mem_fileopen ();
18841883 cleanups = make_cleanup_ui_file_delete (log);
@@ -1924,12 +1923,11 @@ do
19241923 fi
19251924 done
19261925 cat <<EOF
1927- buf = ui_file_xstrdup (log, &length);
1928- make_cleanup (xfree, buf);
1929- if (length > 0)
1926+ std::string buf = ui_file_as_string (log);
1927+ if (!buf.empty ())
19301928 internal_error (__FILE__, __LINE__,
19311929 _("verify_gdbarch: the following are invalid ...%s"),
1932- buf);
1930+ buf.c_str ());
19331931 do_cleanups (cleanups);
19341932 }
19351933 EOF