X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Futils.c;h=751f09949d624da8c10d20e279d60d114028dc63;hb=d16c5475b560adbad2d9bc78ec3718658f4090e3;hp=c7ba05197d2c1fe7ac4849c1ca44282dce4be6c5;hpb=56dbf31760f721893a44d3da26adfccf548995c7;p=binutils-gdb.git diff --git a/gdb/utils.c b/gdb/utils.c index c7ba05197d2..751f09949d6 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. */