* utils.c (vfprintf_maybe_filtered, vfprintf_unfiltered): Call
fputs_unfiltered and exit directly, rather than fatal. The latter calls vfprintf_unfiltered! * gdbtypes.h, gdbtypes.c (can_dereference): New function. * value.h, printcmd.c (print_value_flags): Move from here... * annotate.c: ...to here, and make it use can_dereference.
This commit is contained in:
parent
ee8b834600
commit
9c036bd836
6 changed files with 44 additions and 15 deletions
10
gdb/utils.c
10
gdb/utils.c
|
@ -1389,7 +1389,10 @@ vfprintf_maybe_filtered (stream, format, args, filter)
|
|||
|
||||
vasprintf (&linebuffer, format, args);
|
||||
if (linebuffer == NULL)
|
||||
fatal ("virtual memory exhausted.");
|
||||
{
|
||||
fputs_unfiltered ("\ngdb: virtual memory exhausted.\n", gdb_stderr);
|
||||
exit (1);
|
||||
}
|
||||
old_cleanups = make_cleanup (free, linebuffer);
|
||||
fputs_maybe_filtered (linebuffer, stream, filter);
|
||||
do_cleanups (old_cleanups);
|
||||
|
@ -1416,7 +1419,10 @@ vfprintf_unfiltered (stream, format, args)
|
|||
|
||||
vasprintf (&linebuffer, format, args);
|
||||
if (linebuffer == NULL)
|
||||
fatal ("virtual memory exhausted.");
|
||||
{
|
||||
fputs_unfiltered ("\ngdb: virtual memory exhausted.\n", gdb_stderr);
|
||||
exit (1);
|
||||
}
|
||||
old_cleanups = make_cleanup (free, linebuffer);
|
||||
fputs_unfiltered (linebuffer, stream);
|
||||
do_cleanups (old_cleanups);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue