From Adam Mirowski <Adam.Mirowski@Sun.COM>
Fixed Insight on Solaris. It was not possible to debug a process
because of EINTR "errors".
* procfs.c: (procfs_wait): if proc_wait_for_stop() fails
with EINTR, retry the call.
* 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.
* procfs.c: Cleanup of procfs tracing. Move defines and
prototypes to proc-utils.h
* proc-utils.h: Define tracing macros. Declare trace functions.
* proc-api.c: Make procfs tracing a runtime option.
(prepare_to_trace): New function, abstracted out of several
places. Open a trace file if one is required.
(ioctl_with_trace, write_with_trace, open_with_trace,
close_with_trace, wait_with_trace, lseek_with_trace):
Report errno if an error occurs in a system call.
(write_with_trace): Make 2nd arg void *, to agree with write.
* procfs.c (many functions): change int cmd; to long cmd;
Solaris /proc API calls this parameter a long, and requires it
for 64-bit hosts (where sizeof(long) != sizeof(int)). UnixWare
calls it an int, but on existing UnixWare hosts, int and long
are the same size. So long it must be. If a future UnixWare
version has problems with this, we'll have to use autoconf.
* proc-api.c (write_with_trace): use long instead of int.
* procfs.c (comments): Eliminate "???" in comments, which GCC
wants to interpret as a trigraph. (fill_gregset, supply_gregset,
fill_fpregset, supply_fpregset): declare.
(procfs_wait): Sysargs is a long, change printf format to match.
(test-mapping, mapping_test, test_mapping_cmd) Remove (test only).
init only nonzero fields, leave to_require_attach and
to_require_detach empty, not needed for /proc systems yet.
(_initialize_procfs): Call init_procfs_ops.
* infrun.c (set/show scheduler-locking) New command. Set a
mode bit that will control how GDB attempts to control thread
scheduling for step, continue, etc. (resume): make use of
the schedule-locking mode.
* target.h (struct target_ops): new field to_has_thread_control.
* sol-thread.c: initialize target_ops to_has_thread_control.
* procfs.c: ditto.
* target.c: ditto.
* m3-nat.c: ditto.
* remote.c: ditto.
* hpux-thread.c: ditto.