* configure configure.in: Only make sol-thread.o for native.
Also, switch to dlopened libthread_db.so.1.
* sol-thread.c: Switch to using dlopen to get the thread_db
library.
* (procfs_pid_to_str): New routine to print out thread id's in an
intelligible manner.
* sol-thread.c (sol_thread_fetch_registers): Re-order manner in
which supply_register is called to fix bug with writing writing
individual regs.
* config/sparc/tm-sun4sol2.h: Define default for
target_pid_to_str in case host lacks libthread_db.
* (sol_thread_resume): Prevent people from trying to step
inactive threads.
* (sol_thread_wait sol_thread_fetch_registers
sol_thread_store_registers): Remove unnecessary check for
sol_thread_active. These routines won't get called unless threads
are active.
Print out messages instead of codes for thread_db errors. Make
access macros for thread and lwp manipulation. Make cleanups to
fixup inferior_pid in case of errors.
infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c,
win32-nat.c, config/nm-lynx.h: Rename thread.h to gdbthread.h to
avoid conflict with Solaris /usr/include/thread.h.
returns a possibly modified pid.
* inftarg.c (ptrace_him): Now returns pid;
* m3-nat.c (m3_trace_him): Now returns pid;
* infcmd.c (run_command): Minor cleanup.
* infrun.c (wait_for_inferior): Add another check for one_stepped
near where we read the pc to avoid erroneously setting
random_signal for multi-threaded support.
* procfs.c: Add support for Solaris LWPs. Remove def of
LOSING_POLL. Many cleanups... Several workarounds for Solaris
lossage. System call entry and exit are now handled by
dynamically registered handlers.
* (syscallname): Don't barf when handed an unknown syscall
number.
* (info_proc_syscalls): Ditto.
* sol-thread.c: New file. Implements Solaris thread support.
* symfile.c (symbol_file_add): Add call to target_new_objfile to
notify target-dependent code about new symbol tables.
* (clear_symtab_users): Call target_new_objfile to notify it of
the removal of all symbol tables.
* target.c (push_target): Make sure that to_close is non-zero
before calling it.
* target.h (target_new_objfile): Provide default.
* config/alpha/nm-osf2.h: Define LOSING_POLL because this version
of OSF can't hack using poll with /proc.
* config/sparc/nm-sun4sol2.h (target_new_objfile): Define to be
sol-thread-new-objfile.
* config/sparc/sun4sol2.mh: Add sol-thread.o to NATDEFFILES, and
add libthread_db.so.1 to NAT_CLIBS.
* config/sparc/tm-sun4sol2.h: Define PIDGET, TIDGET, and
target_pid_to_str.