* hppabsd-tdep.c (hppabsd_supply_gregset): Move to ...
(hppabsd_gregset): Move to ...
(hppabsd_regset_from_core_section): Rename
hppaobsd_regset_from_core_section and move to ...
(hppabsd_find_global_pointer): Update comment.
(hppabsd_init_abi): Make global. Do not register
hppabsd_regset_from_core_section.
(hppabsd_core_osabi_sniffer): Rename hppaobsd_core_osabi_sniffer and
move to ...
(_initialize_hppabsd_tdep): Move to ...
* hppaobsd-tdep.c: ... here. New file.
* hppnbsd-tdep.c: New file.
* hppnbsd-nat.c: New file.
* Makefile.in (ALL_TARGET_OBS): Add hppanbsd-tdep.o and hppaobsd-tdep.o.
(ALLDEPFILES): Add hppabsd-nat.c and hppabsd-tdep.c.
(hppabsd-nat.o, hppabsd-tdep.o): New dependencies.
(hppabsd-tdep.o, hppaobsd-tdep.o): Update dependencies.
* configure.host (hppa*-*-netbsd*): New entry.
* configure.tgt (hppa*-*-netbsd*): New entry.
(hppa*-*-openbsd*): Update.
* NEWS (New native configuration): Mention NetBSD/hppa.
(New targets): Mention NetBSD/hppa.
(COMMON_OBS): Remove hpacc-abi.o.
(ALLDEPFILES): Remove hpread.c and $(HPREAD_SOURCE).
(hpacc-abi.o, hpread.o): Delete rules.
* somread.c: Delete extern declarations from hpread.c.
(som_symfile_read): Do not call do_pxdb or hpread_build_psymtabs.
(som_symfile_finish): Do not call hpread_symfile_finish.
(som_symfile_init): Do not call hpread_symfile_init.
* config/pa/hppa64.mt (TDEPFILES): Remove hpread.o.
* config/pa/hppahpux.mt (TDEPFILES): Likewise.
* hpacc-abi.c, hpread.c: Deleted.
* gdbint.texinfo (SOM): Correct location of the SOM reader.
* config/alpha/alpha-linux.mt (DEPRECATED_TM_FILE): Set to tm-alpha.h.
* config/alpha/tm-alphalinux.h: Delete file.
* config/arm/linux.mt (DEPRECATED_TM_FILE): Set to tm-arm.h
* config/arm/tm-linux.h: Delete file.
* config/i386/tm-linux.h: Do not include "config/tm-linux.h".
* config/ia64/tm-linux.h: Do not include "config/tm-linux.h".
* config/m32r/linux.mt (DEPRECATED_TM_FILE): Remove.
* config/mips/tm-linux.h: Do not include "config/tm-linux.h".
* config/pa/linux.mt (DEPRECATED_TM_FILE): Set to tm-hppa.h.
* config/pa/tm-linux.h: Delete file.
* config/powerpc/tm-linux.h: Do not include "config/tm-linux.h".
* config/s390/linux.mt (DEPRECATED_TM_FILE): Remove.
* config/sh/linux.mt (DEPRECATED_TM_FILE): Set to tm-sh.h.
* config/sh/tm-linux.h: Delete file.
* alpha-linux-tdep.c: Include "symtab.h".
(alpha_linux_init_abi): Call set_gdbarch_skip_trampoline_code.
* i386-linux-tdep.c: Include "symtab.h".
(i386_linux_init_abi): Call set_gdbarch_skip_trampoline_code.
* ia64-linux-tdep.c: Include "symtab.h".
(ia64_linux_init_abi): Call set_gdbarch_skip_trampoline_code.
* m32r-linux-tdep.c: Include "symtab.h".
(m32r_linux_init_abi): Call set_gdbarch_skip_trampoline_code.
* mips-linux-tdep.c: Include "symtab.h".
(mips_linux_init_abi): Call set_gdbarch_skip_trampoline_code.
* sh-linux-tdep.c: Include "symtab.h".
(sh_linux_init_abi): Call set_gdbarch_skip_trampoline_code.
* s390-tdep.c (s390_gdbarch_init): Call
set_gdbarch_skip_trampoline_code.
* s390-nat.c: Do not include "tm.h".
* Makefile.in (alpha-linux-tdep.o): Add dependency on $(symtab_h).
(i386-linux-tdep.o): Likewise.
(ia64-linux-tdep.o): Likewise.
(m32r-linux-tdep.o): Likewise.
(mips-linux-tdep.o): Likewise.
(sh-linux-tdep.o): Likewise.
(s390-nat.o): Remove dependency on $(tm_h).
* hppa-hpux-tdep.c (initialize_hp_cxx_exception_support): Use
TDEP->is_elf to determine if we are working with a SOM binary.
(null_symtab_and_line): Remove unused variable.
* config/pa/hppa64.mt: Use tm-hppa.h.
* config/pa/tm-hppa64.h: Remove file.
Checkpoint/Restart for Linux.
* linux-nat.c: Add support for debugging multiple forks.
Add #include for linux-fork.h (interface spec).
(super_mourn_inferior): New function pointer.
(child_mourn_inferior): New function / target method.
(linux_target): Claim to_mourn_inferior method pointer.
(child_follow_fork): Call interface to linux-fork, conditionally
add new fork processes to list of debugged processes.
(kill_inferior): Use interface to linux-fork to kill
multiple processes.
* linux-fork.h: New file.
* linux-fork.c: New file. Support for debugging multiple forks
of the same program. Support for checkpoint and restart commands.
* infrun.c (nullify_last_target_wait_ptid): New function.
* Makefile.in: Add linux-fork.
* config/*/linux.mh: Add linux-fork.
* NEWS: Mention new functionality.
(alpha-linux-nat.o, sparc-linux-nat.o): New rules.
(amd64-linux-nat.o, arm-linux-nat.o, hppa-linux-nat.o)
(i386-linux-nat.o, ia64-linux-nat.o, linux-nat.o, m32r-linux-nat.o)
(m68klinux-nat.o, mips-linux-nat.o, ppc-linux-nat.o, s390-nat.o)
(sparc64-linux-nat.o): Update dependencies.
* alpha-linux-nat.c, sparc-linux-nat.c: New files.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(amd64_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(amd64_linux_child_post_start_inferior): Renamed from
child_post_startup_inferior and made static. Call
super_post_startup_inferior.
(super_post_startup_inferior): New.
(_initialize_amd64_linux_nat): Set it. Call linux_target and
add_target.
* arm-linux-nat.c (arm_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(arm_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_arm_linux_nat): Add a prototype. Use linux_target and
add_target.
* hppa-linux-nat.c (hppa_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(hppa_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_hppa_linux_nat): New function.
* i386-linux-nat.c (i386_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(i386_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(i386_linux_resume): Renamed from child_resume and made static.
(i386_linux_child_post_start_inferior): Renamed from
child_post_startup_inferior and made static. Call
super_post_startup_inferior.
(super_post_startup_inferior): New.
(_initialize_i386_linux_nat): New function.
* i386-nat.c: Remove LINUX_CHILD_POST_STARTUP_INFERIOR #ifndef.
* ia64-linux-nat.c (ia64_linux_xfer_unwind_table): Remove.
(super_xfer_partial): New.
(ia64_linux_xfer_partial): New function. Use it.
(_initialize_ia64_linux_nat): New function.
* ia64-tdep.c (getunwind_table): Revert 2005-06-08 change; use
target_read_partial and document the problem.
* inf-ptrace.c (inf_ptrace_fetch_register): Use
CANNOT_FETCH_REGISTER. Fix some comments.
(inf_ptrace_store_register): Use CANNOT_STORE_REGISTER. Fix some
comments.
* linux-nat.c: Include "inf-ptrace.h" and "auxv.h".
(linux_ops, super_xfer_partial): New variables.
(linux_child_post_startup_inferior): Make static.
(child_post_startup_inferior): Delete.
(linux_nat_attach, linux_nat_detach, resume_callback)
(linux_nat_resume, linux_nat_wait, linux_nat_create_inferior)
(linux_nat_mourn_inferior): Use linux_ops instead of
deprecated_child_ops.
(child_wait): Do not depend on CHILD_WAIT.
(linux_nat_xfer_memory): Remove, replace by ...
(linux_nat_xfer_partial): ... this. Use linux_ops->to_xfer_partial
instead of linux_proc_xfer_memory and child_xfer_memory.
(linux_nat_fetch_registers, linux_nat_store_registers)
(linux_nat_child_post_startup_inferior): New functions.
(init_linux_nat_ops): Use the new functions.
(linux_proc_xfer_memory): Remove, replace by ...
(linux_proc_xfer_partial): ... this. Make static.
(linux_xfer_partial, linux_register_u_offset, linux_target): New
functions.
(_initialize_linux_nat): Do not modify deprecated_child_ops.
* linux-nat.h (linux_proc_xfer_memory): Remove prototype.
(struct mem_attrib, struct target_ops): Remove forward declarations.
(linux_child_post_startup_inferior): Remove prototype.
(linux_target): Add prototype.
* linux-thread-db.c (thread_db_xfer_memory): Remove, replace by ...
(thread_db_xfer_partial): ... this.
(init_thread_db_ops): Set to_xfer_partial instead of
deprecated_xfer_memory.
* m32r-linux-nat.c (m32r_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(m32r_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_m32r_linux_nat): New function.
* m68klinux-nat.c (m68k_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(m68k_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(old_fetch_inferior_registers, old_store_inferior_registers): Made
static.
(_initialize_m68k_linux_nat): Use linux_target and add_target.
* mips-linux-nat.c (_initialize_mips_linux_nat): New function.
* ppc-linux-nat.c (ppc_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(ppc_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_ppc_linux_nat): New function.
* s390-nat.c (s390_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(s390_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_s390_nat): New function.
* sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
linux_target and add_target.
* config/nm-linux.h: Don't include "auxv.h".
(struct target_waitstatus, child_wait, CHILD_WAIT)
(CHILD_PID_TO_EXEC_FILE, CHILD_INSERT_FORK_CATCHPOINT)
(CHILD_INSERT_VFORK_CATCHPOINT, CHILD_INSERT_EXEC_CATCHPOINT)
(CHILD_POST_STARTUP_INFERIOR, CHILD_POST_ATTACH, CHILD_FOLLOW_FORK)
(DEPRECATED_KILL_INFERIOR, NATIVE_XFER_AUXV): Delete.
* config/alpha/alpha-linux.mh (NATDEPFILES): Replace infptrace.o
and inftarg.o with inf-ptrace.o and alpha-linux-nat.o.
* config/sparc/linux.mh (NATDEPFILES): Replace infptrace.o and
inftarg.o with sparc-linux-nat.o.
* config/sparc/linux64.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o.
* config/arm/linux.mh (NATDEPFILES): Replace infptrace.o and
inftarg.o with inf-ptrace.o.
* config/i386/linux.mh (NATDEPFILES): Likewise.
* config/i386/linux64.mh (NATDEPFILES): Likewise.
* config/ia64/linux.mh (NATDEPFILES): Likewise.
* config/m32r/linux.mh (NATDEPFILES): Likewise.
* config/m68k/linux.mh (NATDEPFILES): Likewise.
* config/mips/linux.mh (NATDEPFILES): Likewise.
* config/pa/linux.mh (NATDEPFILES): Likewise.
* config/powerpc/linux.mh (NATDEPFILES): Likewise.
* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
* config/s390/s390.mh (NATDEPFILES): Likewise.
* config/i386/nm-linux.h (DEPRECATED_CHILD_RESUME): Don't define.
(LINUX_CHILD_POST_STARTUP_INFERIOR): Don't define.
* config/i386/nm-linux64.h (LINUX_CHILD_POST_STARTUP_INFERIOR):
Don't define.
* config/ia64/nm-linux.h: Don't include "target.h".
(NATIVE_XFER_UNWIND_TABLE, ia64_linux_xfer_unwind_table): Remove.
* config/djgpp/fnchange.lst: Add alpha-linux-tdep.c,
alpha-linux-nat.c, sparc-linux-tdep.c, and sparc-linux-nat.c.
"inf-ptrace.h".
(hppabsd_fetch_registers): Renamed from fetch_inferior_registers;
made static.
(hppabsd_store_registers): Renamed from store_inferior_registers;
made static.
(_initialize_hppabsd_nat): New function and prototype.
* config/pa/obsd.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-ptrace.o.
(NAT_FILE): Remove.
* Makefile.in (hppabsd-nat.o): Update dependencies.
* Makefile.in (pa64solib_h, somsolib_h): Delete.
(solib_pa64_h, solib_som_h): New.
(HFILES_NO_SRCDIR, ALLDEPFILES): Replace somsolib.h with solib-som.h.
(hppa-hpux-tdep.o, hpread.o): Update dependencies.
(pa64solib.o, somsolib.o): Delete.
(solib-pa64.o, solib-som.o): New.
* hppa-hpux-tdep.c: Include new solib interfaces.
(hppa_hpux_som_init_abi): Attach to SOM solib interface.
(hppa_hpux_elf_init_abi): Attach to PA64 ELF solib interface.
* hppa-tdep.c (internalize_unwinds): If solib_get_text_base method
is available, use it to determine the base of unwind records.
* hppa-tdep.h (gdbarch_tdep): Add new solib methods.
* hpread.c: Replace somsolib.h with solib-som.h.
(hpread_process_one_debug_symbol): Use target vector to get thread
start address.
* config/pa/hppa64.mt (TDEPFILES): Use new solib interface.
* config/pa/hppahpux.mt (TDEPFILES): Likewise.
* config/pa/hpux.mh (NATDEPFILES): Delete references to target objects.
* config/pa/tm-hppah.h: Use new solib interface.
* inf-ttrace.h: New file.
* hppa-hpux-nat.c [HAVE_TTRACE]: Include <sys/ttrace>.
Include "inf-ttrace.h".
(ss_mpsfu_high): Define to ss_tlsp if necessary.
(hppa_hpux_fetch_register, hppa_hpux_store_register): Use
ptid_get_pid instead of PIDGET. Modify to handle both ttrace and
ptrace systems.
(_initialize_hppa_hpux_nat) [HAVE_TTRACE]: Call inf_ttrace_traget
instead of inf_ptrace_target.
* config/pa/hpux.mh (NATDEPFILES): Add inf-ttrace.o.
* Makefile.in (inf_ttrace_h): New variable.
(hppa-hpux-nat.o): Update dependency.
(inf-ttrace.o): New dependency.
(ALLDEPFILES): Add inf-ptrace.c and inf-ttrace.c.
hpux-thread.c to suppress children from running.
(hppa_hpux_child_can_run): New function.
(_initialize_hppa_hpux_nat): Use hppa_hpux_child_can_run.
* hpux-thread.c: Include string.h and hppa-tdep.h.
(FLAGS_REGNUM, SP_REGNUM, PC_REGNUM): Rename to HPPA_FLAGS_REGNUM,
HPPA_SP_REGNUM and HPPA_PCOQ_HEAD_REGNUM, respectively.
(hpux_thread_store_registers): Replace deprecated_registers with
calls to regcache_raw_read.
* config/pa/hpux11.mh, config/pa/hpux11w.mh: Delete HOST_IPC.
* pa64solib.c (pa64_solib_thread_start_addr): Rename from
so_lib_thread_start_addr.
* pa64solib.h (so_list): Forward declare.
(pa64_solib_thread_start_addr): Prototype.
* somsolib.c (SHL_LOAD, SHL_UNLOAD): Define if not already defined.
(no_shared_libraries): Remove.
(som_solib_thread_start_addr): Rename from so_lib_thread_start_addr.
* somsolib.h (som_solib_thread_start_addr): Likewise; prototype.
* hpread.c (hpread_process_one_debug_symbol): Use either the som or
the elf solib handler to find the start address.
* config/pa/hppahpux.mh (NATDEPFILES): Move target-specific support
files to the target makefile.
* config/pa/hpux1020.mh (NATDEPFILES): Likewise.
* config/pa/hpux11.mh (NATDEPFILES): Likewise.
* config/pa/hpux11w.mh (NATDEPFILES): Likewise.
* config/pa/hppa64.mt (TDEPFILES): Put target-specific support
files for symbol reading and shared library handling here.
* config/pa/hppahpux.mt (TDEPFILES): Likewise.
(PA_SOM_ONLY): Define so we can build a 32-bit SOM only target
without bringing in 64-bit support.
* config/pa/hpux11.mh (MH_CFLAGS): Likewise.
* config/pa/hpux11w.mh (MH_CFLAGS): Likewise.
* configure.in: Improve checks for curses library by checking for
mvwaddstr instead of initscr. Drop HP curses in favour of
standard curses on HP-UX.
* configure: Regenerated.
* config/vax/nm-obsd.h: Delete file.
* config/vax/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
* config/vax/nm-nbsd.h: Delete file.
* config/vax/nm-nbsdaout.h: Include config/nm-nbsd.h.
* config/vax/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/sh/nm-nbsd.h: Delete file.
* config/sh/nbsd.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/rs6000/nm-rs6000ly.h: Delete file.
* config/djgpp/fnchange.lst: Do not rename nm-rs6000ly.h.
* config/rs6000/rs6000lynx.mh (NAT_FILE): Set to config/nm-lynx.h.
* config/powerpc/nm-obsd.h: Delete file.
* config/powerpc/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
* config/powerpc/nm-nbsd.h: Delete file.
* config/powerpc/nbsd.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/pa/nm-obsd.h: Delete file.
* config/pa/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
* config/mips/nm-nbsd.h: Delete file.
* config/mips/nbsd.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/m88k/nm-obsd.h: Delete file.
* config/m88k/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
* config/m68k/nm-nbsd.h: Delete file.
* config/m68k/nm-nbsdaout.h: Include config/nm-nbsd.h.
* config/m68k/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/i386/nm-nbsd.h: Delete file.
* config/i386/nm-nbsdaout.h: Include config/nm-nbsd.h.
* config/i386/obsd64.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/i386/nbsd64.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/i386/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/i386/nm-i386lynx.h: Delete file.
* config/i386/i386lynx.mh (NAT_FILE): Set to config/nm-lynx.h.
* config/arm/nm-nbsd.h: Delete file.
* config/arm/nm-nbsdaout.h: Include config/nm-nbsd.h.
* config/arm/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
* config/vax/nbsd.mt (TM_FILE): Set to solib.h.
* config/vax/tm-nbsd.h: Delete file.
* config/sparc/vxworks.mt (TM_FILE): Set to config/tm-vxworks.h.
* config/sparc/tm-vxworks.h: Delete file.
* config/sparc/nbsd.mt (TM_FILE): Set to solib.h.
* config/sparc/tm-nbsd.h: Delete file.
* config/sparc/linux64.mt (TM_FILE): Set to solib.h.
* config/sparc/linux.mt (TM_FILE): Set to solib.h.
* config/sparc/tm-linux.h: Delete file.
* config/s390/s390.mt (TM_FILE): Set to config/tm-linux.h
* config/s390/tm-linux.h: Delete file.
* config/pa/obsd.mt (TM_FILE): Set to solib.h.
* config/pa/tm-bsd.h: Delete file.
* config/m68k/obsd.mt (TM_FILE): Set to solib.h.
* config/m68k/tm-obsd.h: Delete file.
* config/m68k/nbsd.mt (TM_FILE): Set to solib.h.
* config/m68k/tm-nbsd.h: Delete file.
* config/i386/vxworks.mt (TM_FILE): Set to config/tm-vxworks.h.
* config/i386/tm-vxworks.h: Delete file.
* config/i386/obsd64.mt (TM_FILE): Set to solib.h.
* config/i386/obsd.mt (TM_FILE): Set to solib.h.
* config/i386/nbsd64.mt (TM_FILE): Set to solib.h.
* config/i386/nbsd.mt (TM_FILE): Set to solib.h.
* config/i386/tm-nbsd.h: Delete file.
* config/i386/i386lynx.mt (TM_FILE): Set to config/tm-lynx.h.
* config/i386/tm-i386lynx.h: Delete file.
* config/cris/cris.mt (TM_FILE): Set to solib.h.
* config/cris/tm-cris.h: Delete file.