diff options
author | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:44 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:44 +0000 |
commit | d16c5475b560adbad2d9bc78ec3718658f4090e3 (patch) | |
tree | 60b9ef55ead8b5875e305cbcf692094ba601057e /gdb/utils.c | |
parent | 56dbf31760f721893a44d3da26adfccf548995c7 (diff) | |
download | gdb-d16c5475b560adbad2d9bc78ec3718658f4090e3.zip gdb-d16c5475b560adbad2d9bc78ec3718658f4090e3.tar.gz gdb-d16c5475b560adbad2d9bc78ec3718658f4090e3.tar.bz2 |
Use ui_file_as_string in gdb/utils.c
gdb/ChangeLog:
2016-11-08 Pedro Alves <palves@redhat.com>
* utils.c (error_stream): Use ui_file_as_string and std::string.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 5 |
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. */ |