mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-28 20:43:45 +08:00
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.
This commit is contained in:
parent
56dbf31760
commit
d16c5475b5
@ -1,3 +1,7 @@
|
||||
2016-11-08 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* utils.c (error_stream): Use ui_file_as_string and std::string.
|
||||
|
||||
2016-11-08 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* ui-out.c (ui_out_field_stream): Use ui_file_as_string.
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user