* 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).
a optional type to decorate as an array type, the type of the
index, and the bounds of the array. Records this additional info
in the array type for use with languages with nonzero array
bounds.
* gdbtypes.h (enum type_code): Update comment for TYPE_CODE_ARRAY
to note that arrays may have bounds.
* gdbtypes.h (create_array_type): Update prototype.
* c-exp.y (ptype production): Adjust for new create_array_type
calling conventions.
* coffread.c (decode_type): Call create_array_type rather than
handcrafting array types.
* convex-tdep.c (value_type): Remove, now use create_array_type.
* convex-tdep.c (value_of_trapped_internalvar): Convert calls to
vector_type into calls to create_array_type.
* dwarfread.c (decode_subscr_data): Name changed to
decode_subscript_data_item throughout.
* dwarfread.c (decode_subscript_data_item): Rewrite to use
create_array_type. Now records index type and range as well.
* dwarfread.c (dwarf_read_array_type): Rewrite as part of
change to use create_array_type.
* dwarfread.c (read_subroutine_type): Test existing user defined
types before decorating them, to ensure they are blank, and
complain about it if they are not.
* dwarfread.c (decode_fund_type): For unrecognized types, always
return some valid type (type integer). If the unrecognized type
cannot be an implementation defined type, complain as well.
* m88k-tdep.c (pushed_size): Update comment for TYPE_CODE_ARRAY.
* m88k-tdep.c (store_param): Update comment for TYPE_CODE_ARRAY.
* mipsread.c (upgrade_type): Add FIXME comment that code to
handcraft arrays should be replaced with call to create_array_type.
* stabsread.c (read_array_type): Replace code to handcraft
array types with call to create_array_type.
* valprint.c (type_print_varspec_prefix): Minor formatting
change, join lines that don't need to be split.
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint.
* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
utils.c, valarith.c, valops.c, valprint.c, values.c:
Replace bcopy() use with memcpy(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
target.c, values.c:
Replace bzero() use with memset(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* i386-tdep.c, main.c, valprint.c:
Replace bcmp() use with memcmp(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* coffread.c (coff_end_symtab): Cast 2nd arg of complain() to
correct type.
* defs.h (NORETURN): Define away for Lucid compiler.
* remote.c (remote_timer, remote_interrupt): Signal handlers
take one int arg.
* ser-termios.c (serial_write, serial_close): Return whatever
value the write/close call returns, rather than falling off end.
* inferior.h (PTRACE_ARG3_TYPE): Third arg to ptrace is int on
more systems than it is "char *". Define PTRACE_ARG3_TYPE to
default to int.
* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
inferior.h (call_ptrace): Use PTRACE_ARG3_TYPE to declare type
of third arg.
* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
symm-xdep.c, ultra3-xdep.c: Use PTRACE_ARG3_TYPE to cast ptrace
argument 3.
* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
store_inferior_registers): Supply missing fourth argument to
ptrace().
* coffread.c (record_minimal_symbol): Pass the minsym type to it.
Callers changed.
(coff_end_symtab): Sort blocks if needed. Complain if misordered.
(read_coff_symtab): Move patch_opaque_types call from
coff_symfile_read. Restrict it to symtabs from this objfile.
(process_coff_symbol: C_TPDEF): Don't put ordinary foward
references on opaque type chain; just let coff_lookup_type handle 'em.
(decode_type): Complain about tagndx values on
non-struct/union/enum types, which the EPI compiler tends to produce.
* symtab.c (list_symbols): Make minimal symbol variable-finding work.
* tm-68k.h (FIX_CALL_DUMMY): Avoid alignment and byte order
dependency.
* elfread.c (elf_symfile_read): Update bfd_elf_find_section
usage to match new prototype. Include libbfd.h to get prototype.
elfread.c (coff_symfile_finish): Add function, prototype, and
add to the xxxx_sym_fns struct for each file type. Also reformat
the xxxx_sym_fns vector to a standard format and add comments.
* coffread.c, mipsread.c, xcoffread.c, coffread.c, dbxread.c,
elfread.c (xxx_symfile_new_init, xxx_symfile_init, xxx_symfile_read):
Pass pointer to struct objfile rather than pointer to sym_fns.
Change references inside each function accordingly. Allocate any
symbol file specific info in the per-objfile memory region.
* dbxread.c (free_and_init_header_files): Break function into
free_header_files(), called from dbx_symfile_finish(), and
init_header_files(), called from dbx_new_init().
* dbxread.c (dbx_new_init): Move deallocation things to new
dbx_symfile_finish function.
* elfread.c (elf_new_init): Call buildsym_new_init().
* objfiles.c (free_objfile): Call the appropriate symfile_finish()
routine for the objfile before deallocating other stuff.
* sparc-tdep.c (get_longjmp_target): Cast target_read_memory arg.
* symfile.h: Move struct sym_fns to before struct objfile def.
Add sym_finish function pointer and change prototypes of other
function pointers to reflect passing struct objfile pointer rather
than struct sym_fns pointer.
* symfile.c: Remove now obsolete symtab_fns pointer.
* symfile.c (symfile_init): Renamed to find_sym_fns, and now only
locates the correct sym_fns struct for the given objfile.
* symfile.c (syms_from_objfile, symbol_file_add): Restructured
for better support of mapped symbol tables.
* symfile.c (symbol_file_command): Remove obsolete code using
symfile_fns.
* symfile.h: Remove duplicate declarations for symfile_objfile,
entry_point, and object_files.
* target.c (target_info): Compare symfile_objfile to NULL.
* xcoffread.c (aixcoff_new_init): Move deallocation stuff to
aixcoff_symfile_finish().
Complain if no auxents on .bf and .ef FCN symbols, and assume
lots of line numbers.
(init_linenos, enter_linenos): Use a sentinel at the end of the
read-in linenos, to make for a fast, safe loop-end test.
(add_symbol_file): Call it to do the real work.
(syms_from_bfd): Initialize entry_point before calling symfile_init.
* symtab.h, symfile.c, coffread.c, mipsread.c, dwarfread.c:
Avoid declaring or setting entry_point (symfile.h & symfile.c cope).
* configure.in, Makefile.in: Avoid rebuilding "depend" as much.
Avoid declaring Makefile dependencies, because GNU Make stupidly
tries to update it if we do.
* coffread.c: Revise for minor changes to bfd internal coff
indexes.
* configure: If -template= is given a relative path, make it
absolute before recurring in subdirectories.
Get getopt and obstack from -liberty rather than compiling them here.
* coffread.c: turn a printf into a complain(), and try to deal more
gracefully with botched-looking lineno pointers.
* dbxread.c: Use bfd_get_symcount rather than bfd_get_symcount_upper_bound.
Don't coredump on files with zero symbols in them (a BFD bug showed this one).
* environ.c: Pass GNUTARGET into the parent (gdb) as well as the child.
a file, once a new symtab has been read for it.
* symtab.h (GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): New
defines for the blocks of a blockvector that contain global and
file-static symbols and the first of the smaller scope contours.
* symtab.c (lookup_symbol, find_pc_symtab, find_pc_line,
decode_line_1, make_symbol_completion_list): Use the above.
* coffread.c (end_symtab, patch_opaque_types): Ditto.