aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index c7ba051..751f099 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -480,10 +480,9 @@ verror (const char *string, va_list args)
void
error_stream (struct ui_file *stream)
{
- char *message = ui_file_xstrdup (stream, NULL);
+ std::string message = ui_file_as_string (stream);
- make_cleanup (xfree, message);
- error (("%s"), message);
+ error (("%s"), message.c_str ());
}
/* Emit a message and abort. */