diff options
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 0c800c5..07b3ce5 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -500,7 +500,6 @@ verify_gdbarch (struct gdbarch *gdbarch) struct ui_file *log; struct cleanup *cleanups; long length; - char *buf; log = mem_fileopen (); cleanups = make_cleanup_ui_file_delete (log); @@ -697,12 +696,11 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of gcc_target_options, invalid_p == 0 */ /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */ /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */ - buf = ui_file_xstrdup (log, &length); - make_cleanup (xfree, buf); - if (length > 0) + std::string buf = ui_file_as_string (log); + if (!buf.empty ()) internal_error (__FILE__, __LINE__, _("verify_gdbarch: the following are invalid ...%s"), - buf); + buf.c_str ()); do_cleanups (cleanups); } |