/* Support for complaint handling during symbol reading in GDB.
- Copyright 1990, 1991, 1992, 1993, 1995, 1998, 1999, 2000, 2002 Free
- Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1995, 1998, 1999, 2000, 2002,
+ 2004 Free Software Foundation, Inc.
This file is part of GDB.
if (complaint->file != NULL)
internal_vwarning (complaint->file, complaint->line, complaint->fmt, args);
- else if (warning_hook)
- (*warning_hook) (complaint->fmt, args);
+ else if (deprecated_warning_hook)
+ (*deprecated_warning_hook) (complaint->fmt, args);
else
{
if (complaints->explanation == NULL)
{
char *msg;
struct cleanup *cleanups;
- xvasprintf (&msg, complaint->fmt, args);
+ msg = xstrvprintf (complaint->fmt, args);
cleanups = make_cleanup (xfree, msg);
wrap_here ("");
if (series != SUBSEQUENT_MESSAGE)
trailing newline, the wrap_here() is just a hint. */
if (series == ISOLATED_MESSAGE)
/* It would be really nice to use begin_line() here.
- Unfortunatly that function doesn't track GDB_STDERR and
+ Unfortunately that function doesn't track GDB_STDERR and
consequently will sometimes supress a line when it
shouldn't. */
fputs_filtered ("\n", gdb_stderr);
break;
case SUBSEQUENT_MESSAGE:
/* It would be really nice to use begin_line() here.
- Unfortunatly that function doesn't track GDB_STDERR and
+ Unfortunately that function doesn't track GDB_STDERR and
consequently will sometimes supress a line when it shouldn't. */
fputs_unfiltered ("\n", gdb_stderr);
break;
_initialize_complaints (void)
{
add_setshow_cmd ("complaints", class_support, var_zinteger,
- &stop_whining,
- "Set max number of complaints about incorrect symbols.",
- "Show max number of complaints about incorrect symbols.",
+ &stop_whining, "\
+Set max number of complaints about incorrect symbols.", "\
+Show max number of complaints about incorrect symbols.", "\
+Set to zero to disable incorrect symbol complaints.", "\
+Max number of complaints about incorrect symbols is %s.",
NULL, NULL,
&setlist, &showlist);