* gregset.h: New file. Typedefs for gdb_gregset_t and
gdb_fpregset_t, prototypes for supply_gregset and friends.
* procfs.c: Include gregset.h. Delete local prototypes for
supply_gregset etc., and local typedef gdb_gregset_t etc.
* sol-thread.c: Include gregset.h, delete local prototypes,
add appropriate casts to gdb_gregset_t.
* uw-thread.c, lin-thread.c, core-sol2.c, core-regset.c,
sparc-tdep.c, ptx4-nat.c, ppc-linux-nat.c, mipsv4-nat.c,
m88k-nat.c, m68klinux-nat.c, m68k-tdep.c, irix5-nat.c,
irix4-nat.c, ia64-linux-nat.c, i386v4-nat.c, cxux-nat.c,
arm-linux-nat.c, alpha-nat.c: Include gregset.h.
* config/nm-linux.h: Define GDB_GREGSET_T, GDB_FPREGET_T.
* config/sparc/tm-sun4sol2.h: Ditto.
* gdbarch.sh: Add FP0_REGNUM to list of multi-arched register numbers.
* gdbarch.c, gdbarch.h: Regenerate.
* core-regset.c: Change FP0_REGNUM to a runtime test.
* procfs.c: Ditto.
* sun3-nat.c: Ditto.
* sparc-tdep.c: Ditto.
* i386mach-nat.c: Remove unnecessary ifdef for FP0_REGNUM.
* ptx4-nat.c: Ditto.
* sol-thread.c (sol_thread_create_inferior): only add the thread
to the thread list if it is not already in there.
(prototypes for thread_db func ptrs): pretty up formatting.
* command.c copying.c copying.awk core-aout.c core-regset.c
corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c
infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c
symmisc.c valarith.c: Add prototypes.
* defs.h: Add prototype for utils.c::do_run_cleanups.
* gdbtypes.c: Add prototypes.
(make_pointer_type): Add braces to remove nested if-else ambiguity.
(make_reference_type): Ditto.
* printcmd.c (printf_command): Initialize 'f' and 'string' at
function startup to suppress possibly-used-before-initialized warning.
* remote-utils.c: Add prototypes.
(sr_pollchar): Add braces to remove nested if-else ambiguity.
* ser-tcp.c: Add prototypes.
(wait_for): Add braces to remove nested if-else ambiguity.
(tcp_readchar): Ditto.
* ser-unix.c: Add prototypes.
(get_tty_state): Don't define errno here.
(get_tty_state): Don't define errno here.
(hardwire_readchar): Only define 't' if we are compiling in a Cygwin
environment.
* symtab.c: Add prototypes.
(find_methods): Add braces to remove nested if-else ambiguity.
(search_symbols): Set 'i' to an initial value to suppress a
possibly-used-before-initialized warning.
* valops.c: Add prototypes.
(value_cast): Set 'eltype2' to an initial value to suppress a
possibly-used-before-initialized warning.
(value_of_variable): Add braces to remove nested if-else ambiguity.
(value_of_this): Ditto.
* valprint.c: Add prototypes.
(print_floating): Add braces to remove nested if-else ambiguity.
Looks like a big change, but it is really just a lot of small stuff.
In the cases where GCC was flagging a possible use-before-initialized
warning on variables, it turned out that these were being used properly
but GCC couldn't see that.
Also check for gregset_t and fpregset_t types.
* configure: Regenerate.
* core-regset.c (sys/procfs.h): Only include if HAVE_SYS_PROCFS_H
is defined.
(fetch_core_registers): Turn into stub unless both HAVE_GREGSET_T
and HAVE_FPREGSET_T are defined. These changes allow systems
like linux that are migrating to /proc support to use a single
configuration for both new and old versions.
* config/i386/linux.mt: Note that this is now for both a.out and
ELF systems.
* config/i386/linux.mh (NATDEPFILES): Add solib.o, core-regset.o,
i386v4-nat.o
* config/i386/tm-linux.h (tm-sysv4.h): Include.
* config/i386/xm-linux.h (solib.h): Include
(SVR4_SHARED_LIBS): Define.
* i386v4-nat.c: Only compile if HAVE_SYS_PROCFS_H is defined.
(supply_gregset, fill_gregset): Compile if HAVE_GREGSET_T defined.
(supply_fpregset, fill_fpregset): Compile if HAVE_FPREGSET_T defined.