diff options
author | Fred Fish <fnf@specifix.com> | 1992-12-15 12:18:53 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-12-15 12:18:53 +0000 |
commit | 51b80b0072e928c9163087e1fcbc71e52301f524 (patch) | |
tree | 90bb7bbe1b85b516f3439749f81af4c42a6085ef /gdb/stabsread.c | |
parent | 631f7a9f7c9d520973aec40b9ef090cc59b3caa0 (diff) | |
download | gdb-51b80b0072e928c9163087e1fcbc71e52301f524.zip gdb-51b80b0072e928c9163087e1fcbc71e52301f524.tar.gz gdb-51b80b0072e928c9163087e1fcbc71e52301f524.tar.bz2 |
* complaints.c: New file, code moved from utils.c.
* complaints.c (complain): Made into a varargs function.
* complaints.h: New file, code moved from symfile.h.
* Makefile.in (SFILES_MAINDIR): Add complaints.c.
* Makefile.in (HFILES): Add complaints.h.
* Makefile.in (OBS): Add complaints.o.
* symfile.c (complaint_root, stop_whining, complaint_series,
complain, clear_complaints, add_show_from_set for stop_whining):
Moved to complaints.c.
* symfile.h (struct complaint, complaint_root decl, complain
prototype, clear_complaints prototype): Moved to complaints.h.
* buildsym.c, coffread.c, dbxread.c, dwarfread.c, elfread.c,
gdbtypes.c, mipsread.c, stbsread.c, symfile.c: Include
complaints.h. Remove casts from arguments to complain(),
which is now a varargs function, and remove unnecessary
placeholder zero args.
* defs.h (begin_line): Add prototype.
* defs.h (vprintf_filtered): Add prototype.
* dwarfread.c (varargs.h): Remove, no longer needed.
* dwarfread.c (dwarfwarn): Remove prototype and function.
* dwarfread.c (complaints): Define a bunch of complaints.
* dwarfread.c (SQUAWK): Remove macro defs, convert all
usages to standard complain() calls.
* utils.c (begin_line): New function that ensures that
whatever gets filter-printed next starts on its own line.
* utils.c (vprintf_filtered): New func, like vfprintf_filtered,
but to stdout (calls vfprintf_filtered internally).
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index dfbd3cb..ec7900b 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -29,10 +29,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "obstack.h" #include "symtab.h" #include "gdbtypes.h" -#include "symfile.h" /* Needed for "struct complaint" */ +#include "symfile.h" #include "objfiles.h" #include "aout/stab_gnu.h" /* We always use GNU stabs, not native */ #include "buildsym.h" +#include "complaints.h" /* Ask stabsread.h to define the vars it normally declares `extern'. */ #define EXTERN /**/ @@ -943,7 +944,7 @@ struct type * error_type (pp) char **pp; { - complain (&error_type_complaint, 0); + complain (&error_type_complaint); while (1) { /* Skip to end of symbol. */ @@ -1229,7 +1230,7 @@ read_type (pp, objfile) (*pp)++; return_type = read_type (pp, objfile); if (*(*pp)++ != ';') - complain (&invalid_member_complaint, (char *) symnum); + complain (&invalid_member_complaint, symnum); type = allocate_stub_method (return_type); if (typenums[0] != -1) *dbx_lookup_type (typenums) = type; @@ -1504,7 +1505,7 @@ read_member_functions (fip, pp, type, objfile) case '.': break; default: - complain (&const_vol_complaint, (char *) (long) **pp); + complain (&const_vol_complaint, **pp); break; } @@ -1565,7 +1566,7 @@ read_member_functions (fip, pp, type, objfile) default: /* error */ - complain (&member_fn_complaint, (char *) (long) (*pp)[-1]); + complain (&member_fn_complaint, (*pp)[-1]); /* Fall through into normal member function. */ case '.': @@ -1659,7 +1660,7 @@ read_cpp_abbrev (fip, pp, type, objfile) name = type_name_no_tag (context); if (name == NULL) { - complain (&invalid_cpp_type_complaint, (char *) symnum); + complain (&invalid_cpp_type_complaint, symnum); name = "FOO"; } fip -> list -> field.name = @@ -1791,7 +1792,7 @@ read_one_struct_field (fip, pp, p, type, objfile) stuff. */ if (fip -> list -> field.bitpos == 0 && fip -> list -> field.bitsize == 0) { - complain (&dbx_class_complaint, 0); + complain (&dbx_class_complaint); /* Ignore this field. */ fip -> list = fip -> list -> next; } @@ -2908,7 +2909,7 @@ read_range_type (pp, typenums, objfile) TYPE_TARGET_TYPE (result_type) = *dbx_lookup_type(rangenums); if (TYPE_TARGET_TYPE (result_type) == 0) { - complain (&range_type_base_complaint, (char *) rangenums[1]); + complain (&range_type_base_complaint, rangenums[1]); TYPE_TARGET_TYPE (result_type) = lookup_fundamental_type (objfile, FT_INTEGER); } |