public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch] Remove HPUX
@ 2014-10-16 23:00 Jan Kratochvil
  2014-10-17  0:21 ` Michael Eager
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Jan Kratochvil @ 2014-10-16 23:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Joel Brobecker

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

Hi,

IIUC it is a pre-requisite for IPv6 support, some UNICes do not support
getaddrinfo required for IPv6.  But coincidentally such UNICes are no longer
really supported by GDB.  Therefore it was concluded we can remove all such
UNICes and then we can implement IPv6 easily with getaddrinfo.

In mail
	Re: getaddrinfo available on all GDB hosts? [Re: [PATCH v2] Add IPv6 support for remote TCP connections]
	Message-ID: <20140211034157.GG5485@adacore.com>
	https://sourceware.org/ml/gdb-patches/2014-02/msg00333.html
Joel said:
# [...] HP-UX [...] are probably de facto unmaintained, at this point.

So I chose HP-UX first for this patch.


# We should probably send an announcement if we ever implement a change
# we know might be breaking some platforms, though.

Not sure if anything should be really done for this part.

I did not test it anyhow, not sure how, it still builds on Linux.

I did not investigate too much which other parts of GDB could be removed
along, there may be some dead code now (but it always has been).

I am not sure if somread.c really can be removed or not, I have removed it.

The same patch is also available as a GIT branch at:
	https://sourceware.org/git/?p=archer.git;a=shortlog;h=refs/heads/jankratochvil/nohpux

24 files changed, 47 insertions(+), 7384 deletions(-)


Thanks,
Jan

[-- Attachment #2: nohpux.patch --]
[-- Type: text/plain, Size: 249943 bytes --]

2014-10-16  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Remove HPUX.
	* Makefile.in (ALL_64_TARGET_OBS): Remove ia64-hpux-tdep.o.
	(ALL_TARGET_OBS): Remove hppa-hpux-tdep.o, solib-som.o and solib-pa64.o.
	(HFILES_NO_SRCDIR): Remove solib-som.h, inf-ttrace.h, solib-pa64.h and
	ia64-hpux-tdep.h, solib-ia64-hpux.h.
	(ALLDEPFILES): Remove hppa-hpux-tdep.c, hppa-hpux-nat.c,
	ia64-hpux-nat.c, ia64-hpux-tdep.c, somread.c and solib-som.c.
	* config/djgpp/fnchange.lst: Remove hppa-hpux-nat.c and
	hppa-hpux-tdep.c.
	* config/ia64/hpux.mh: Remove file.
	* config/pa/hpux.mh: Remove file.
	* configure: Rebuilt.
	* configure.ac (dlgetmodinfo, somread.o): Remove.
	* configure.host (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
	(ia64-*-hpux*): Remove its float format exception.
	* configure.tgt (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
	* hppa-hpux-nat.c: Remove file.
	* hppa-hpux-tdep.c: Remove file.
	* hppa-tdep.c (struct hppa_unwind_info, struct hppa_objfile_private):
	Move them here from hppa-tdep.h
	(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Make it static.
	(hppa_frame_prev_register_helper): Remove HPPA_FLAGS_REGNUM exception.
	* hppa-tdep.h (struct hppa_unwind_info, struct hppa_objfile_private):
	Move them to hppa-tdep.c.
	(hppa_objfile_priv_data, hppa_init_objfile_priv_data): Remove
	declarations.
	* ia64-hpux-nat.c: Remove file.
	* ia64-hpux-tdep.c: Remove file.
	* ia64-hpux-tdep.h: Remove file.
	* inf-ttrace.c: Remove file.
	* inf-ttrace.h: Remove file.
	* solib-ia64-hpux.c: Remove file.
	* solib-ia64-hpux.h: Remove file.
	* solib-pa64.c: Remove file.
	* solib-pa64.h: Remove file.
	* solib-som.c: Remove file.
	* solib-som.h: Remove file.
	* somread.c: Remove file.

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a6cebd8..6e516e1 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -611,7 +611,7 @@ ALL_64_TARGET_OBS = \
 	amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
 	amd64-linux-tdep.o amd64nbsd-tdep.o \
 	amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
-	ia64-hpux-tdep.o ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o \
+	ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o \
 	mips64obsd-tdep.o \
 	sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
 	sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o
@@ -629,7 +629,7 @@ ALL_TARGET_OBS = \
 	frv-linux-tdep.o frv-tdep.o \
 	h8300-tdep.o \
 	hppabsd-tdep.o hppanbsd-tdep.o hppaobsd-tdep.o \
-	hppa-hpux-tdep.o hppa-linux-tdep.o hppa-tdep.o \
+	hppa-linux-tdep.o hppa-tdep.o \
 	i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o \
 	i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o \
 	i386-sol2-tdep.o i386-tdep.o i387-tdep.o \
@@ -674,7 +674,7 @@ ALL_TARGET_OBS = \
 	nbsd-tdep.o obsd-tdep.o \
 	sol2-tdep.o \
 	solib-frv.o solib-svr4.o \
-	solib-som.o solib-pa64.o solib-darwin.o solib-dsbt.o \
+	solib-darwin.o solib-dsbt.o \
 	dbug-rom.o dink32-rom.o ppcbug-rom.o m32r-rom.o dsrec.o monitor.o \
 	remote-m32r-sdi.o remote-mips.o \
 	xcoffread.o \
@@ -867,7 +867,7 @@ common/gdb_signals.h nat/gdb_thread_db.h common/gdb_vecs.h \
 common/x86-xstate.h nat/linux-ptrace.h nat/mips-linux-watch.h \
 proc-utils.h aarch64-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
 ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \
-exec.h m32r-tdep.h osabi.h gdbcore.h solib-som.h amd64bsd-nat.h \
+exec.h m32r-tdep.h osabi.h gdbcore.h amd64bsd-nat.h \
 i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
 ia64-tdep.h ada-lang.h ada-varobj.h varobj.h varobj-iter.h frv-tdep.h \
 nto-tdep.h serial.h \
@@ -884,7 +884,7 @@ ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
 f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
 objfiles.h common/vec.h disasm.h mips-tdep.h ser-base.h \
 gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
-inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h inf-ttrace.h \
+inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h \
 solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
 m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
 target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
@@ -901,7 +901,7 @@ complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \
 common/gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.h \
 interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h	\
 amd64-linux-tdep.h linespec.h i387-tdep.h mn10300-tdep.h \
-sparc64-tdep.h monitor.h ppcobsd-tdep.h srec.h solib-pa64.h \
+sparc64-tdep.h monitor.h ppcobsd-tdep.h srec.h \
 coff-pe-read.h parser-defs.h gdb_ptrace.h mips-linux-tdep.h \
 m68k-tdep.h spu-tdep.h jv-lang.h environ.h amd64-tdep.h \
 doublest.h regset.h hppa-tdep.h ppc-linux-tdep.h ppc64-tdep.h \
@@ -918,7 +918,7 @@ annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h	\
 remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
 sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
 gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h \
-psymtab.h psympriv.h progspace.h bfin-tdep.h ia64-hpux-tdep.h \
+psymtab.h psympriv.h progspace.h bfin-tdep.h \
 amd64-darwin-tdep.h charset-list.h \
 config/djgpp/langinfo.h config/djgpp/nl_types.h darwin-nat.h \
 dicos-tdep.h filesystem.h gcore.h gdb_wchar.h hppabsd-tdep.h \
@@ -926,7 +926,7 @@ i386-darwin-tdep.h x86-nat.h linux-record.h moxie-tdep.h nios2-tdep.h \
 osdata.h procfs.h python/py-event.h python/py-events.h python/py-stopevent.h \
 python/python-internal.h python/python.h ravenscar-thread.h record.h \
 record-full.h solib-aix.h \
-solib-darwin.h solib-ia64-hpux.h solib-spu.h windows-nat.h xcoffread.h \
+solib-darwin.h solib-spu.h windows-nat.h xcoffread.h \
 gnulib/import/extra/snippet/arg-nonnull.h gnulib/import/extra/snippet/c++defs.h \
 gnulib/import/extra/snippet/warn-on-use.h \
 gnulib/import/stddef.in.h gnulib/import/inttypes.in.h inline-frame.h skip.h \
@@ -1626,7 +1626,7 @@ ALLDEPFILES = \
 	fork-child.c \
 	glibc-tdep.c \
 	go32-nat.c h8300-tdep.c \
-	hppa-tdep.c hppa-hpux-tdep.c hppa-hpux-nat.c \
+	hppa-tdep.c \
 	hppa-linux-tdep.c hppa-linux-nat.c \
 	hppabsd-nat.c hppabsd-tdep.c \
 	hppaobsd-tdep.c \
@@ -1641,9 +1641,8 @@ ALLDEPFILES = \
 	i386-linux-tdep.c x86-nat.c \
 	i386-sol2-nat.c i386-sol2-tdep.c \
 	i386gnu-nat.c i386gnu-tdep.c \
-	ia64-hpux-nat.c ia64-hpux-tdep.c \
 	ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c ia64-vms-tdep.c \
-	inf-ptrace.c inf-ttrace.c \
+	inf-ptrace.c \
 	irix5-nat.c \
 	ia64-libunwind-tdep.c \
 	linux-fork.c \
@@ -1667,7 +1666,6 @@ ALLDEPFILES = \
 	nios2-tdep.c nios2-linux-tdep.c \
 	nbsd-nat.c nbsd-tdep.c obsd-nat.c obsd-tdep.c \
 	solib-osf.c \
-	somread.c solib-som.c \
 	posix-hdep.c \
 	ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c ppc64-tdep.c \
 	ppcfbsd-nat.c ppcfbsd-tdep.c \
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index cbf11c6..e8fa0cc 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -512,8 +512,6 @@
 @V@/gdb/amd64-linux-nat.c @V@/gdb/amd64-lnat.c
 @V@/gdb/hppa-linux-tdep.c @V@/gdb/palnxtdep.c
 @V@/gdb/hppa-linux-nat.c @V@/gdb/palnxnat.c
-@V@/gdb/hppa-hpux-nat.c @V@/gdb/pahpuxnat.c
-@V@/gdb/hppa-hpux-tdep.c @V@/gdb/pahpuxtdep.c
 @V@/gdb/hppanbsd-nat.c @V@/gdb/panbsd-nat.c
 @V@/gdb/hppanbsd-tdep.c @V@/gdb/panbsd-tdep.c
 @V@/gdb/amd64-windows-nat.c @V@/gdb/amd64-wnat.c
diff --git a/gdb/config/ia64/hpux.mh b/gdb/config/ia64/hpux.mh
deleted file mode 100644
index 7bbfab4..0000000
--- a/gdb/config/ia64/hpux.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-# Host: ia64 running HP-UX
-NATDEPFILES= fork-child.o inf-ttrace.o ia64-hpux-nat.o \
-        solib-ia64-hpux.o
diff --git a/gdb/config/pa/hpux.mh b/gdb/config/pa/hpux.mh
deleted file mode 100644
index 3151120..0000000
--- a/gdb/config/pa/hpux.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-# Host: PA-RISC HP-UX
-NATDEPFILES= fork-child.o inf-ptrace.o inf-ttrace.o \
-	hppa-hpux-nat.o
diff --git a/gdb/configure b/gdb/configure
index 889103c..c515ca2 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -6754,64 +6754,6 @@ fi
   fi
 
 
-# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
-$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
-if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlgetmodinfo ();
-int
-main ()
-{
-return dlgetmodinfo ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dl xpdl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_dlgetmodinfo=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
-
-else
-  ac_cv_search_dlgetmodinfo=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
-$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
-ac_res=$ac_cv_search_dlgetmodinfo
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
 
 
 
@@ -13381,54 +13323,6 @@ if test $gdb_cv_var_macho = yes; then
   CONFIG_OBS="$CONFIG_OBS machoread.o"
 fi
 
-# Add SOM support to GDB, but only if BFD includes it.
-
-  OLD_CFLAGS=$CFLAGS
-  OLD_LDFLAGS=$LDFLAGS
-  OLD_LIBS=$LIBS
-  # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
-  # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
-  # always want our bfd.
-  CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
-  LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
-  intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-  LIBS="-lbfd -liberty $intl $LIBS"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
-$as_echo_n "checking for SOM support in BFD... " >&6; }
-if test "${gdb_cv_var_som+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-  #include "bfd.h"
-  #include "som.h"
-
-int
-main ()
-{
-return bfd_som_attach_aux_hdr (NULL, 0, NULL);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gdb_cv_var_som=yes
-else
-  gdb_cv_var_som=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
-$as_echo "$gdb_cv_var_som" >&6; }
-  CFLAGS=$OLD_CFLAGS
-  LDFLAGS=$OLD_LDFLAGS
-  LIBS=$OLD_LIBS
-if test $gdb_cv_var_som = yes; then
-  CONFIG_OBS="$CONFIG_OBS somread.o"
-fi
-
 # Add any host-specific objects to GDB.
 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
 
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 2b4f5b0..49dd68a 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -518,9 +518,6 @@ AC_SEARCH_LIBS(socketpair, socket)
 # Link in zlib if we can.  This allows us to read compressed debug sections.
 AM_ZLIB
 
-# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
-AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl])
-
 AM_ICONV
 
 # GDB may fork/exec the iconv program to get the list of supported character
@@ -2106,13 +2103,6 @@ if test $gdb_cv_var_macho = yes; then
   CONFIG_OBS="$CONFIG_OBS machoread.o"
 fi
 
-# Add SOM support to GDB, but only if BFD includes it.
-GDB_AC_CHECK_BFD([for SOM support in BFD], gdb_cv_var_som,
-                 [bfd_som_attach_aux_hdr (NULL, 0, NULL)], som.h)
-if test $gdb_cv_var_som = yes; then
-  CONFIG_OBS="$CONFIG_OBS somread.o"
-fi
-
 # Add any host-specific objects to GDB.
 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
 
diff --git a/gdb/configure.host b/gdb/configure.host
index 5f77166..0d1a8d2 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -43,6 +43,8 @@ case $host in
  sparc-*-netbsd* | \
  rs6000-*-lynxos* | \
  vax-*-netbsd* | \
+ hppa*-*-hpux* | \
+ ia64-*-hpux* | \
  null)
     echo "*** Configuration $host is obsolete." >&2
     echo "*** Support has been REMOVED." >&2
@@ -93,8 +95,6 @@ arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu)
 			gdb_host=nbsdelf ;;
 arm*-*-openbsd*)	gdb_host=nbsdelf ;;
 
-hppa*-*-hpux*)
-			gdb_host=hpux ;;
 hppa*-*-linux*)		gdb_host=linux ;;
 hppa*-*-netbsd*)	gdb_host=nbsd ;;
 hppa*-*-openbsd*)	gdb_host=obsd ;;
@@ -117,7 +117,6 @@ i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
 i[34567]86-*-solaris*)	gdb_host=i386sol2 ;;
 i[34567]86-*-cygwin*)	gdb_host=cygwin ;;
 
-ia64-*-hpux*)		gdb_host=hpux ;;
 ia64-*-linux*)		gdb_host=linux ;;
 
 m68*-*-linux*)		gdb_host=linux ;;
@@ -213,11 +212,6 @@ m68*-*-*)
 	gdb_host_double_format="&floatformat_ieee_double_big"
 	gdb_host_long_double_format="&floatformat_m68881_ext"
 	;;
-ia64-*-hpux*)
-	gdb_host_float_format="&floatformat_ieee_single_big"
-	gdb_host_double_format="&floatformat_ieee_double_big"
-	gdb_host_long_double_format="&floatformat_ia64_quad_big"
-	;;
 *)
 	gdb_host_float_format=0
 	gdb_host_double_format=0
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index d362cd9..8ff5300 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -23,6 +23,8 @@ case $targ in
  mips*-*-pe | \
  rs6000-*-lynxos* | \
  sh*-*-pe | \
+ hppa*-*-hpux* | \
+ ia64-*-hpux* | \
  null)
     echo "*** Configuration $targ is obsolete." >&2
     echo "*** Support has been REMOVED." >&2
@@ -152,10 +154,6 @@ h8300-*-*)
 	gdb_sim=../sim/h8300/libsim.a
 	;;
 
-hppa*-*-hpux*)
-	# Target: HP PA-RISC running hpux
-	gdb_target_obs="hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o"
-	;;
 hppa*-*-linux*)
 	# Target: HP PA-RISC running Linux
 	gdb_target_obs="hppa-tdep.o hppa-linux-tdep.o glibc-tdep.o \
@@ -250,10 +248,6 @@ i[34567]86-*-*)
 	gdb_target_obs="i386-tdep.o i387-tdep.o"
 	;;
 
-ia64-*-hpux*)
-	# Target: Intel IA-64 running HP-UX
-	gdb_target_obs="ia64-tdep.o ia64-hpux-tdep.o"
-	;;
 ia64-*-linux*)
 	# Target: Intel IA-64 running GNU/Linux
 	gdb_target_obs="ia64-tdep.o ia64-linux-tdep.o linux-tdep.o \
diff --git a/gdb/hppa-hpux-nat.c b/gdb/hppa-hpux-nat.c
deleted file mode 100644
index 65a2b85..0000000
--- a/gdb/hppa-hpux-nat.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/* Native-dependent code for PA-RISC HP-UX.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "target.h"
-
-#include <sys/ptrace.h>
-#include <sys/utsname.h>
-#include <machine/save_state.h>
-
-#ifdef HAVE_TTRACE
-#include <sys/ttrace.h>
-#endif
-
-#include "hppa-tdep.h"
-#include "solib-som.h"
-#include "inf-ptrace.h"
-#include "inf-ttrace.h"
-
-/* Return the offset of register REGNUM within `struct save_state'.
-   The offset returns depends on the flags in the "flags" register and
-   the register size (32-bit or 64-bit).  These are taken from
-   REGCACHE.  */
-
-static LONGEST
-hppa_hpux_save_state_offset (struct regcache *regcache, int regnum)
-{
-  LONGEST offset;
-
-  if (regnum == HPPA_FLAGS_REGNUM)
-    return ssoff (ss_flags);
-
-  if (HPPA_R0_REGNUM < regnum && regnum < HPPA_FP0_REGNUM)
-    {
-      struct gdbarch *arch = get_regcache_arch (regcache);
-      size_t size = register_size (arch, HPPA_R1_REGNUM);
-      ULONGEST flags;
-
-      gdb_assert (size == 4 || size == 8);
-
-      regcache_cooked_read_unsigned (regcache, HPPA_FLAGS_REGNUM, &flags);
-      if (flags & SS_WIDEREGS)
-	offset = ssoff (ss_wide) + (8 - size) + (regnum - HPPA_R0_REGNUM) * 8;
-      else
-	offset = ssoff (ss_narrow) + (regnum - HPPA_R1_REGNUM) * 4;
-    }
-  else
-    {
-      struct gdbarch *arch = get_regcache_arch (regcache);
-      size_t size = register_size (arch, HPPA_FP0_REGNUM);
-
-      gdb_assert (size == 4 || size == 8);
-      gdb_assert (regnum >= HPPA_FP0_REGNUM);
-      offset = ssoff(ss_fpblock) + (regnum - HPPA_FP0_REGNUM) * size;
-    }
-
-  gdb_assert (offset < sizeof (save_state_t));
-  return offset;
-}
-
-/* Just in case a future version of PA-RISC HP-UX won't have ptrace(2)
-   at all.  */
-#ifndef PTRACE_TYPE_RET
-#define PTRACE_TYPE_RET void
-#endif
-
-static void
-hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR addr;
-  size_t size;
-  PTRACE_TYPE_RET *buf;
-  pid_t pid;
-  int i;
-
-  pid = ptid_get_pid (inferior_ptid);
-
-  /* This isn't really an address, but ptrace thinks of it as one.  */
-  addr = hppa_hpux_save_state_offset (regcache, regnum);
-  size = register_size (gdbarch, regnum);
-
-  gdb_assert (size == 4 || size == 8);
-  buf = alloca (size);
-
-#ifdef HAVE_TTRACE
-  {
-    lwpid_t lwp = ptid_get_lwp (inferior_ptid);
-
-    if (ttrace (TT_LWP_RUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
-      error (_("Couldn't read register %s (#%d): %s"),
-	     gdbarch_register_name (gdbarch, regnum),
-	     regnum, safe_strerror (errno));
-  }
-#else
-  {
-    int i;
-
-    /* Read the register contents from the inferior a chuck at the time.  */
-    for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
-      {
-	errno = 0;
-	buf[i] = ptrace (PT_RUREGS, pid, (PTRACE_TYPE_ARG3) addr, 0, 0);
-	if (errno != 0)
-	  error (_("Couldn't read register %s (#%d): %s"),
-		 gdbarch_register_name (gdbarch, regnum),
-		 regnum, safe_strerror (errno));
-
-	addr += sizeof (PTRACE_TYPE_RET);
-      }
-  }
-#endif
-
-  /* Take care with the "flags" register.  It's stored as an `int' in
-     `struct save_state', even for 64-bit code.  */
-  if (regnum == HPPA_FLAGS_REGNUM && size == 8)
-    {
-      ULONGEST flags;
-      flags = extract_unsigned_integer ((gdb_byte *)buf, 4, byte_order);
-      store_unsigned_integer ((gdb_byte *)buf, 8, byte_order, flags);
-    }
-
-  regcache_raw_supply (regcache, regnum, buf);
-}
-
-static void
-hppa_hpux_fetch_inferior_registers (struct target_ops *ops,
-				    struct regcache *regcache, int regnum)
-{
-  if (regnum == -1)
-    for (regnum = 0;
-	 regnum < gdbarch_num_regs (get_regcache_arch (regcache));
-	 regnum++)
-      hppa_hpux_fetch_register (regcache, regnum);
-  else
-    hppa_hpux_fetch_register (regcache, regnum);
-}
-
-/* Store register REGNUM into the inferior.  */
-
-static void
-hppa_hpux_store_register (struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR addr;
-  size_t size;
-  PTRACE_TYPE_RET *buf;
-  pid_t pid;
-
-  pid = ptid_get_pid (inferior_ptid);
-
-  /* This isn't really an address, but ptrace thinks of it as one.  */
-  addr = hppa_hpux_save_state_offset (regcache, regnum);
-  size = register_size (gdbarch, regnum);
-
-  gdb_assert (size == 4 || size == 8);
-  buf = alloca (size);
-
-  regcache_raw_collect (regcache, regnum, buf);
-
-  /* Take care with the "flags" register.  It's stored as an `int' in
-     `struct save_state', even for 64-bit code.  */
-  if (regnum == HPPA_FLAGS_REGNUM && size == 8)
-    {
-      ULONGEST flags;
-      flags = extract_unsigned_integer ((gdb_byte *)buf, 8, byte_order);
-      store_unsigned_integer ((gdb_byte *)buf, 4, byte_order, flags);
-      size = 4;
-    }
-
-#ifdef HAVE_TTRACE
-  {
-    lwpid_t lwp = ptid_get_lwp (inferior_ptid);
-
-    if (ttrace (TT_LWP_WUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
-      error (_("Couldn't write register %s (#%d): %s"),
-	     gdbarch_register_name (gdbarch, regnum),
-	     regnum, safe_strerror (errno));
-  }
-#else
-  {
-    int i;
-
-    /* Write the register contents into the inferior a chunk at the time.  */
-    for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
-      {
-	errno = 0;
-	ptrace (PT_WUREGS, pid, (PTRACE_TYPE_ARG3) addr, buf[i], 0);
-	if (errno != 0)
-	  error (_("Couldn't write register %s (#%d): %s"),
-		 gdbarch_register_name (gdbarch, regnum),
-		 regnum, safe_strerror (errno));
-
-	addr += sizeof (PTRACE_TYPE_RET);
-      }
-  }
-#endif
-}
-
-/* Store register REGNUM back into the inferior.  If REGNUM is -1, do
-   this for all registers (including the floating point registers).  */
-
-static void
-hppa_hpux_store_inferior_registers (struct target_ops *ops,
-				    struct regcache *regcache, int regnum)
-{
-  if (regnum == -1)
-    for (regnum = 0;
-	 regnum < gdbarch_num_regs (get_regcache_arch (regcache));
-	 regnum++)
-      hppa_hpux_store_register (regcache, regnum);
-  else
-    hppa_hpux_store_register (regcache, regnum);
-}
-
-/* Set hpux_major_release variable to the value retrieved from a call to
-   uname function.  */
-
-static void
-set_hpux_major_release (void)
-{
-  struct utsname x;
-  char *p;
-
-  uname (&x);
-  p = strchr (x.release, '.');
-  if (p)
-    hpux_major_release = atoi (p + 1);
-}
-
-\f
-
-/* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_hppa_hpux_nat (void);
-
-void
-_initialize_hppa_hpux_nat (void)
-{
-  struct target_ops *t;
-
-  set_hpux_major_release ();
-
-#ifdef HAVE_TTRACE
-  t = inf_ttrace_target ();
-#else
-  t = inf_ptrace_target ();
-#endif
-
-  t->to_fetch_registers = hppa_hpux_fetch_inferior_registers;
-  t->to_store_registers = hppa_hpux_store_inferior_registers;
-
-  add_target (t);
-}
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
deleted file mode 100644
index 6ec2af9..0000000
--- a/gdb/hppa-hpux-tdep.c
+++ /dev/null
@@ -1,1570 +0,0 @@
-/* Target-dependent code for HP-UX on PA-RISC.
-
-   Copyright (C) 2002-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "arch-utils.h"
-#include "gdbcore.h"
-#include "osabi.h"
-#include "frame.h"
-#include "frame-unwind.h"
-#include "trad-frame.h"
-#include "symtab.h"
-#include "objfiles.h"
-#include "inferior.h"
-#include "infcall.h"
-#include "observer.h"
-#include "hppa-tdep.h"
-#include "solib-som.h"
-#include "solib-pa64.h"
-#include "regset.h"
-#include "regcache.h"
-
-#define IS_32BIT_TARGET(_gdbarch) \
-	((gdbarch_tdep (_gdbarch))->bytes_per_address == 4)
-
-/* Bit in the `ss_flag' member of `struct save_state' that indicates
-   that the 64-bit register values are live.  From
-   <machine/save_state.h>.  */
-#define HPPA_HPUX_SS_WIDEREGS		0x40
-
-/* Offsets of various parts of `struct save_state'.  From
-   <machine/save_state.h>.  */
-#define HPPA_HPUX_SS_FLAGS_OFFSET	0
-#define HPPA_HPUX_SS_NARROW_OFFSET	4
-#define HPPA_HPUX_SS_FPBLOCK_OFFSET 	256
-#define HPPA_HPUX_SS_WIDE_OFFSET        640
-
-/* The size of `struct save_state.  */
-#define HPPA_HPUX_SAVE_STATE_SIZE	1152
-
-/* The size of `struct pa89_save_state', which corresponds to PA-RISC
-   1.1, the lowest common denominator that we support.  */
-#define HPPA_HPUX_PA89_SAVE_STATE_SIZE	512
-
-
-/* Forward declarations.  */
-extern void _initialize_hppa_hpux_tdep (void);
-extern initialize_file_ftype _initialize_hppa_hpux_tdep;
-
-/* Return one if PC is in the call path of a trampoline, else return zero.
-
-   Note we return one for *any* call trampoline (long-call, arg-reloc), not
-   just shared library trampolines (import, export).  */
-
-static int
-hppa32_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct bound_minimal_symbol minsym;
-  struct unwind_table_entry *u;
-
-  /* First see if PC is in one of the two C-library trampolines.  */
-  if (pc == hppa_symbol_address("$$dyncall") 
-      || pc == hppa_symbol_address("_sr4export"))
-    return 1;
-
-  minsym = lookup_minimal_symbol_by_pc (pc);
-  if (minsym.minsym
-      && strcmp (MSYMBOL_LINKAGE_NAME (minsym.minsym), ".stub") == 0)
-    return 1;
-
-  /* Get the unwind descriptor corresponding to PC, return zero
-     if no unwind was found.  */
-  u = find_unwind_entry (pc);
-  if (!u)
-    return 0;
-
-  /* If this isn't a linker stub, then return now.  */
-  if (u->stub_unwind.stub_type == 0)
-    return 0;
-
-  /* By definition a long-branch stub is a call stub.  */
-  if (u->stub_unwind.stub_type == LONG_BRANCH)
-    return 1;
-
-  /* The call and return path execute the same instructions within
-     an IMPORT stub!  So an IMPORT stub is both a call and return
-     trampoline.  */
-  if (u->stub_unwind.stub_type == IMPORT)
-    return 1;
-
-  /* Parameter relocation stubs always have a call path and may have a
-     return path.  */
-  if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
-      || u->stub_unwind.stub_type == EXPORT)
-    {
-      CORE_ADDR addr;
-
-      /* Search forward from the current PC until we hit a branch
-         or the end of the stub.  */
-      for (addr = pc; addr <= u->region_end; addr += 4)
-	{
-	  unsigned long insn;
-
-	  insn = read_memory_integer (addr, 4, byte_order);
-
-	  /* Does it look like a bl?  If so then it's the call path, if
-	     we find a bv or be first, then we're on the return path.  */
-	  if ((insn & 0xfc00e000) == 0xe8000000)
-	    return 1;
-	  else if ((insn & 0xfc00e001) == 0xe800c000
-		   || (insn & 0xfc000000) == 0xe0000000)
-	    return 0;
-	}
-
-      /* Should never happen.  */
-      warning (_("Unable to find branch in parameter relocation stub."));
-      return 0;
-    }
-
-  /* Unknown stub type.  For now, just return zero.  */
-  return 0;
-}
-
-static int
-hppa64_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-
-  /* PA64 has a completely different stub/trampoline scheme.  Is it
-     better?  Maybe.  It's certainly harder to determine with any
-     certainty that we are in a stub because we can not refer to the
-     unwinders to help.
-
-     The heuristic is simple.  Try to lookup the current PC value in th
-     minimal symbol table.  If that fails, then assume we are not in a
-     stub and return.
-
-     Then see if the PC value falls within the section bounds for the
-     section containing the minimal symbol we found in the first
-     step.  If it does, then assume we are not in a stub and return.
-
-     Finally peek at the instructions to see if they look like a stub.  */
-  struct bound_minimal_symbol minsym;
-  asection *sec;
-  CORE_ADDR addr;
-  int insn;
-
-  minsym = lookup_minimal_symbol_by_pc (pc);
-  if (! minsym.minsym)
-    return 0;
-
-  sec = MSYMBOL_OBJ_SECTION (minsym.objfile, minsym.minsym)->the_bfd_section;
-
-  if (bfd_get_section_vma (sec->owner, sec) <= pc
-      && pc < (bfd_get_section_vma (sec->owner, sec)
-		 + bfd_section_size (sec->owner, sec)))
-      return 0;
-
-  /* We might be in a stub.  Peek at the instructions.  Stubs are 3
-     instructions long.  */
-  insn = read_memory_integer (pc, 4, byte_order);
-
-  /* Find out where we think we are within the stub.  */
-  if ((insn & 0xffffc00e) == 0x53610000)
-    addr = pc;
-  else if ((insn & 0xffffffff) == 0xe820d000)
-    addr = pc - 4;
-  else if ((insn & 0xffffc00e) == 0x537b0000)
-    addr = pc - 8;
-  else
-    return 0;
-
-  /* Now verify each insn in the range looks like a stub instruction.  */
-  insn = read_memory_integer (addr, 4, byte_order);
-  if ((insn & 0xffffc00e) != 0x53610000)
-    return 0;
-	
-  /* Now verify each insn in the range looks like a stub instruction.  */
-  insn = read_memory_integer (addr + 4, 4, byte_order);
-  if ((insn & 0xffffffff) != 0xe820d000)
-    return 0;
-    
-  /* Now verify each insn in the range looks like a stub instruction.  */
-  insn = read_memory_integer (addr + 8, 4, byte_order);
-  if ((insn & 0xffffc00e) != 0x537b0000)
-    return 0;
-
-  /* Looks like a stub.  */
-  return 1;
-}
-
-/* Return one if PC is in the return path of a trampoline, else return zero.
-
-   Note we return one for *any* call trampoline (long-call, arg-reloc), not
-   just shared library trampolines (import, export).  */
-
-static int
-hppa_hpux_in_solib_return_trampoline (struct gdbarch *gdbarch,
-				      CORE_ADDR pc, const char *name)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct unwind_table_entry *u;
-
-  /* Get the unwind descriptor corresponding to PC, return zero
-     if no unwind was found.  */
-  u = find_unwind_entry (pc);
-  if (!u)
-    return 0;
-
-  /* If this isn't a linker stub or it's just a long branch stub, then
-     return zero.  */
-  if (u->stub_unwind.stub_type == 0 || u->stub_unwind.stub_type == LONG_BRANCH)
-    return 0;
-
-  /* The call and return path execute the same instructions within
-     an IMPORT stub!  So an IMPORT stub is both a call and return
-     trampoline.  */
-  if (u->stub_unwind.stub_type == IMPORT)
-    return 1;
-
-  /* Parameter relocation stubs always have a call path and may have a
-     return path.  */
-  if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
-      || u->stub_unwind.stub_type == EXPORT)
-    {
-      CORE_ADDR addr;
-
-      /* Search forward from the current PC until we hit a branch
-         or the end of the stub.  */
-      for (addr = pc; addr <= u->region_end; addr += 4)
-	{
-	  unsigned long insn;
-
-	  insn = read_memory_integer (addr, 4, byte_order);
-
-	  /* Does it look like a bl?  If so then it's the call path, if
-	     we find a bv or be first, then we're on the return path.  */
-	  if ((insn & 0xfc00e000) == 0xe8000000)
-	    return 0;
-	  else if ((insn & 0xfc00e001) == 0xe800c000
-		   || (insn & 0xfc000000) == 0xe0000000)
-	    return 1;
-	}
-
-      /* Should never happen.  */
-      warning (_("Unable to find branch in parameter relocation stub."));
-      return 0;
-    }
-
-  /* Unknown stub type.  For now, just return zero.  */
-  return 0;
-
-}
-
-/* Figure out if PC is in a trampoline, and if so find out where
-   the trampoline will jump to.  If not in a trampoline, return zero.
-
-   Simple code examination probably is not a good idea since the code
-   sequences in trampolines can also appear in user code.
-
-   We use unwinds and information from the minimal symbol table to
-   determine when we're in a trampoline.  This won't work for ELF
-   (yet) since it doesn't create stub unwind entries.  Whether or
-   not ELF will create stub unwinds or normal unwinds for linker
-   stubs is still being debated.
-
-   This should handle simple calls through dyncall or sr4export,
-   long calls, argument relocation stubs, and dyncall/sr4export
-   calling an argument relocation stub.  It even handles some stubs
-   used in dynamic executables.  */
-
-static CORE_ADDR
-hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
-{
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  int word_size = gdbarch_ptr_bit (gdbarch) / 8;
-  long orig_pc = pc;
-  long prev_inst, curr_inst, loc;
-  struct bound_minimal_symbol msym;
-  struct unwind_table_entry *u;
-
-  /* Addresses passed to dyncall may *NOT* be the actual address
-     of the function.  So we may have to do something special.  */
-  if (pc == hppa_symbol_address("$$dyncall"))
-    {
-      pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
-
-      /* If bit 30 (counting from the left) is on, then pc is the address of
-         the PLT entry for this function, not the address of the function
-         itself.  Bit 31 has meaning too, but only for MPE.  */
-      if (pc & 0x2)
-	pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, word_size,
-					      byte_order);
-    }
-  if (pc == hppa_symbol_address("$$dyncall_external"))
-    {
-      pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
-      pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, word_size, byte_order);
-    }
-  else if (pc == hppa_symbol_address("_sr4export"))
-    pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
-
-  /* Get the unwind descriptor corresponding to PC, return zero
-     if no unwind was found.  */
-  u = find_unwind_entry (pc);
-  if (!u)
-    return 0;
-
-  /* If this isn't a linker stub, then return now.  */
-  /* elz: attention here! (FIXME) because of a compiler/linker 
-     error, some stubs which should have a non zero stub_unwind.stub_type 
-     have unfortunately a value of zero.  So this function would return here
-     as if we were not in a trampoline.  To fix this, we go look at the partial
-     symbol information, which reports this guy as a stub.
-     (FIXME): Unfortunately, we are not that lucky: it turns out that the 
-     partial symbol information is also wrong sometimes.  This is because 
-     when it is entered (somread.c::som_symtab_read()) it can happen that
-     if the type of the symbol (from the som) is Entry, and the symbol is
-     in a shared library, then it can also be a trampoline.  This would be OK,
-     except that I believe the way they decide if we are ina shared library
-     does not work.  SOOOO..., even if we have a regular function w/o
-     trampolines its minimal symbol can be assigned type mst_solib_trampoline.
-     Also, if we find that the symbol is a real stub, then we fix the unwind
-     descriptor, and define the stub type to be EXPORT.
-     Hopefully this is correct most of the times.  */
-  if (u->stub_unwind.stub_type == 0)
-    {
-
-/* elz: NOTE (FIXME!) once the problem with the unwind information is fixed
-   we can delete all the code which appears between the lines.  */
-/*--------------------------------------------------------------------------*/
-      msym = lookup_minimal_symbol_by_pc (pc);
-
-      if (msym.minsym == NULL
-	  || MSYMBOL_TYPE (msym.minsym) != mst_solib_trampoline)
-	return orig_pc == pc ? 0 : pc & ~0x3;
-
-      else if (msym.minsym != NULL
-	       && MSYMBOL_TYPE (msym.minsym) == mst_solib_trampoline)
-	{
-	  struct objfile *objfile;
-	  struct minimal_symbol *msymbol;
-	  int function_found = 0;
-
-	  /* Go look if there is another minimal symbol with the same name as 
-	     this one, but with type mst_text.  This would happen if the msym
-	     is an actual trampoline, in which case there would be another
-	     symbol with the same name corresponding to the real function.  */
-
-	  ALL_MSYMBOLS (objfile, msymbol)
-	  {
-	    if (MSYMBOL_TYPE (msymbol) == mst_text
-		&& strcmp (MSYMBOL_LINKAGE_NAME (msymbol),
-			   MSYMBOL_LINKAGE_NAME (msym.minsym)) == 0)
-	      {
-		function_found = 1;
-		break;
-	      }
-	  }
-
-	  if (function_found)
-	    /* The type of msym is correct (mst_solib_trampoline), but
-	       the unwind info is wrong, so set it to the correct value.  */
-	    u->stub_unwind.stub_type = EXPORT;
-	  else
-	    /* The stub type info in the unwind is correct (this is not a
-	       trampoline), but the msym type information is wrong, it
-	       should be mst_text.  So we need to fix the msym, and also
-	       get out of this function.  */
-	    {
-	      MSYMBOL_TYPE (msym.minsym) = mst_text;
-	      return orig_pc == pc ? 0 : pc & ~0x3;
-	    }
-	}
-
-/*--------------------------------------------------------------------------*/
-    }
-
-  /* It's a stub.  Search for a branch and figure out where it goes.
-     Note we have to handle multi insn branch sequences like ldil;ble.
-     Most (all?) other branches can be determined by examining the contents
-     of certain registers and the stack.  */
-
-  loc = pc;
-  curr_inst = 0;
-  prev_inst = 0;
-  while (1)
-    {
-      /* Make sure we haven't walked outside the range of this stub.  */
-      if (u != find_unwind_entry (loc))
-	{
-	  warning (_("Unable to find branch in linker stub"));
-	  return orig_pc == pc ? 0 : pc & ~0x3;
-	}
-
-      prev_inst = curr_inst;
-      curr_inst = read_memory_integer (loc, 4, byte_order);
-
-      /* Does it look like a branch external using %r1?  Then it's the
-         branch from the stub to the actual function.  */
-      if ((curr_inst & 0xffe0e000) == 0xe0202000)
-	{
-	  /* Yup.  See if the previous instruction loaded
-	     a value into %r1.  If so compute and return the jump address.  */
-	  if ((prev_inst & 0xffe00000) == 0x20200000)
-	    return (hppa_extract_21 (prev_inst) 
-		    + hppa_extract_17 (curr_inst)) & ~0x3;
-	  else
-	    {
-	      warning (_("Unable to find ldil X,%%r1 "
-			 "before ble Y(%%sr4,%%r1)."));
-	      return orig_pc == pc ? 0 : pc & ~0x3;
-	    }
-	}
-
-      /* Does it look like a be 0(sr0,%r21)? OR 
-         Does it look like a be, n 0(sr0,%r21)? OR 
-         Does it look like a bve (r21)? (this is on PA2.0)
-         Does it look like a bve, n(r21)? (this is also on PA2.0)
-         That's the branch from an
-         import stub to an export stub.
-
-         It is impossible to determine the target of the branch via
-         simple examination of instructions and/or data (consider
-         that the address in the plabel may be the address of the
-         bind-on-reference routine in the dynamic loader).
-
-         So we have try an alternative approach.
-
-         Get the name of the symbol at our current location; it should
-         be a stub symbol with the same name as the symbol in the
-         shared library.
-
-         Then lookup a minimal symbol with the same name; we should
-         get the minimal symbol for the target routine in the shared
-         library as those take precedence of import/export stubs.  */
-      if ((curr_inst == 0xe2a00000) ||
-	  (curr_inst == 0xe2a00002) ||
-	  (curr_inst == 0xeaa0d000) ||
-	  (curr_inst == 0xeaa0d002))
-	{
-	  struct bound_minimal_symbol stubsym;
-	  struct bound_minimal_symbol libsym;
-
-	  stubsym = lookup_minimal_symbol_by_pc (loc);
-	  if (stubsym.minsym == NULL)
-	    {
-	      warning (_("Unable to find symbol for 0x%lx"), loc);
-	      return orig_pc == pc ? 0 : pc & ~0x3;
-	    }
-
-	  libsym = lookup_minimal_symbol (MSYMBOL_LINKAGE_NAME (stubsym.minsym),
-					  NULL, NULL);
-	  if (libsym.minsym == NULL)
-	    {
-	      warning (_("Unable to find library symbol for %s."),
-		       MSYMBOL_PRINT_NAME (stubsym.minsym));
-	      return orig_pc == pc ? 0 : pc & ~0x3;
-	    }
-
-	  return MSYMBOL_VALUE (libsym.minsym);
-	}
-
-      /* Does it look like bl X,%rp or bl X,%r0?  Another way to do a
-         branch from the stub to the actual function.  */
-      /*elz */
-      else if ((curr_inst & 0xffe0e000) == 0xe8400000
-	       || (curr_inst & 0xffe0e000) == 0xe8000000
-	       || (curr_inst & 0xffe0e000) == 0xe800A000)
-	return (loc + hppa_extract_17 (curr_inst) + 8) & ~0x3;
-
-      /* Does it look like bv (rp)?   Note this depends on the
-         current stack pointer being the same as the stack
-         pointer in the stub itself!  This is a branch on from the
-         stub back to the original caller.  */
-      /*else if ((curr_inst & 0xffe0e000) == 0xe840c000) */
-      else if ((curr_inst & 0xffe0f000) == 0xe840c000)
-	{
-	  /* Yup.  See if the previous instruction loaded
-	     rp from sp - 8.  */
-	  if (prev_inst == 0x4bc23ff1)
-	    {
-	      CORE_ADDR sp;
-	      sp = get_frame_register_unsigned (frame, HPPA_SP_REGNUM);
-	      return read_memory_integer (sp - 8, 4, byte_order) & ~0x3;
-	    }
-	  else
-	    {
-	      warning (_("Unable to find restore of %%rp before bv (%%rp)."));
-	      return orig_pc == pc ? 0 : pc & ~0x3;
-	    }
-	}
-
-      /* elz: added this case to capture the new instruction
-         at the end of the return part of an export stub used by
-         the PA2.0: BVE, n (rp) */
-      else if ((curr_inst & 0xffe0f000) == 0xe840d000)
-	{
-	  return (read_memory_integer
-		  (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
-		   word_size, byte_order)) & ~0x3;
-	}
-
-      /* What about be,n 0(sr0,%rp)?  It's just another way we return to
-         the original caller from the stub.  Used in dynamic executables.  */
-      else if (curr_inst == 0xe0400002)
-	{
-	  /* The value we jump to is sitting in sp - 24.  But that's
-	     loaded several instructions before the be instruction.
-	     I guess we could check for the previous instruction being
-	     mtsp %r1,%sr0 if we want to do sanity checking.  */
-	  return (read_memory_integer
-		  (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
-		   word_size, byte_order)) & ~0x3;
-	}
-
-      /* Haven't found the branch yet, but we're still in the stub.
-         Keep looking.  */
-      loc += 4;
-    }
-}
-
-static void
-hppa_skip_permanent_breakpoint (struct regcache *regcache)
-{
-  /* To step over a breakpoint instruction on the PA takes some
-     fiddling with the instruction address queue.
-
-     When we stop at a breakpoint, the IA queue front (the instruction
-     we're executing now) points at the breakpoint instruction, and
-     the IA queue back (the next instruction to execute) points to
-     whatever instruction we would execute after the breakpoint, if it
-     were an ordinary instruction.  This is the case even if the
-     breakpoint is in the delay slot of a branch instruction.
-
-     Clearly, to step past the breakpoint, we need to set the queue
-     front to the back.  But what do we put in the back?  What
-     instruction comes after that one?  Because of the branch delay
-     slot, the next insn is always at the back + 4.  */
-
-  ULONGEST pcoq_tail, pcsq_tail;
-  regcache_cooked_read_unsigned (regcache, HPPA_PCOQ_TAIL_REGNUM, &pcoq_tail);
-  regcache_cooked_read_unsigned (regcache, HPPA_PCSQ_TAIL_REGNUM, &pcsq_tail);
-
-  regcache_cooked_write_unsigned (regcache, HPPA_PCOQ_HEAD_REGNUM, pcoq_tail);
-  regcache_cooked_write_unsigned (regcache, HPPA_PCSQ_HEAD_REGNUM, pcsq_tail);
-
-  regcache_cooked_write_unsigned (regcache,
-				  HPPA_PCOQ_TAIL_REGNUM, pcoq_tail + 4);
-  /* We can leave the tail's space the same, since there's no jump.  */
-}
-
-
-/* Signal frames.  */
-struct hppa_hpux_sigtramp_unwind_cache
-{
-  CORE_ADDR base;
-  struct trad_frame_saved_reg *saved_regs;
-};
-
-static int hppa_hpux_tramp_reg[] = {
-  HPPA_SAR_REGNUM,
-  HPPA_PCOQ_HEAD_REGNUM,
-  HPPA_PCSQ_HEAD_REGNUM,
-  HPPA_PCOQ_TAIL_REGNUM,
-  HPPA_PCSQ_TAIL_REGNUM,
-  HPPA_EIEM_REGNUM,
-  HPPA_IIR_REGNUM,
-  HPPA_ISR_REGNUM,
-  HPPA_IOR_REGNUM,
-  HPPA_IPSW_REGNUM,
-  -1,
-  HPPA_SR4_REGNUM,
-  HPPA_SR4_REGNUM + 1,
-  HPPA_SR4_REGNUM + 2,
-  HPPA_SR4_REGNUM + 3,
-  HPPA_SR4_REGNUM + 4,
-  HPPA_SR4_REGNUM + 5,
-  HPPA_SR4_REGNUM + 6,
-  HPPA_SR4_REGNUM + 7,
-  HPPA_RCR_REGNUM,
-  HPPA_PID0_REGNUM,
-  HPPA_PID1_REGNUM,
-  HPPA_CCR_REGNUM,
-  HPPA_PID2_REGNUM,
-  HPPA_PID3_REGNUM,
-  HPPA_TR0_REGNUM,
-  HPPA_TR0_REGNUM + 1,
-  HPPA_TR0_REGNUM + 2,
-  HPPA_CR27_REGNUM
-};
-
-static struct hppa_hpux_sigtramp_unwind_cache *
-hppa_hpux_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
-				       void **this_cache)
-
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct hppa_hpux_sigtramp_unwind_cache *info;
-  unsigned int flag;
-  CORE_ADDR sp, scptr, off;
-  int i, incr, szoff;
-
-  if (*this_cache)
-    return *this_cache;
-
-  info = FRAME_OBSTACK_ZALLOC (struct hppa_hpux_sigtramp_unwind_cache);
-  *this_cache = info;
-  info->saved_regs = trad_frame_alloc_saved_regs (this_frame);
-
-  sp = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
-
-  if (IS_32BIT_TARGET (gdbarch))
-    scptr = sp - 1352;
-  else
-    scptr = sp - 1520;
-
-  off = scptr;
-
-  /* See /usr/include/machine/save_state.h for the structure of the
-     save_state_t structure.  */
-  
-  flag = read_memory_unsigned_integer (scptr + HPPA_HPUX_SS_FLAGS_OFFSET,
-				       4, byte_order);
-
-  if (!(flag & HPPA_HPUX_SS_WIDEREGS))
-    {
-      /* Narrow registers.  */
-      off = scptr + HPPA_HPUX_SS_NARROW_OFFSET;
-      incr = 4;
-      szoff = 0;
-    }
-  else
-    {
-      /* Wide registers.  */
-      off = scptr + HPPA_HPUX_SS_WIDE_OFFSET + 8;
-      incr = 8;
-      szoff = (tdep->bytes_per_address == 4 ? 4 : 0);
-    }
-
-  for (i = 1; i < 32; i++)
-    {
-      info->saved_regs[HPPA_R0_REGNUM + i].addr = off + szoff;
-      off += incr;
-    }
-
-  for (i = 0; i < ARRAY_SIZE (hppa_hpux_tramp_reg); i++)
-    {
-      if (hppa_hpux_tramp_reg[i] > 0)
-        info->saved_regs[hppa_hpux_tramp_reg[i]].addr = off + szoff;
-
-      off += incr;
-    }
-
-  /* TODO: fp regs */
-
-  info->base = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
-
-  return info;
-}
-
-static void
-hppa_hpux_sigtramp_frame_this_id (struct frame_info *this_frame,
-				   void **this_prologue_cache,
-				   struct frame_id *this_id)
-{
-  struct hppa_hpux_sigtramp_unwind_cache *info
-    = hppa_hpux_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
-
-  *this_id = frame_id_build (info->base, get_frame_pc (this_frame));
-}
-
-static struct value *
-hppa_hpux_sigtramp_frame_prev_register (struct frame_info *this_frame,
-					void **this_prologue_cache,
-					int regnum)
-{
-  struct hppa_hpux_sigtramp_unwind_cache *info
-    = hppa_hpux_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
-
-  return hppa_frame_prev_register_helper (this_frame,
-					  info->saved_regs, regnum);
-}
-
-static int
-hppa_hpux_sigtramp_unwind_sniffer (const struct frame_unwind *self,
-                                   struct frame_info *this_frame,
-                                   void **this_cache)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct unwind_table_entry *u;
-  CORE_ADDR pc = get_frame_pc (this_frame);
-
-  u = find_unwind_entry (pc);
-
-  /* If this is an export stub, try to get the unwind descriptor for
-     the actual function itself.  */
-  if (u && u->stub_unwind.stub_type == EXPORT)
-    {
-      gdb_byte buf[HPPA_INSN_SIZE];
-      unsigned long insn;
-
-      if (!safe_frame_unwind_memory (this_frame, u->region_start,
-				     buf, sizeof buf))
-	return 0;
-
-      insn = extract_unsigned_integer (buf, sizeof buf, byte_order);
-      if ((insn & 0xffe0e000) == 0xe8400000)
-	u = find_unwind_entry(u->region_start + hppa_extract_17 (insn) + 8);
-    }
-
-  if (u && u->HP_UX_interrupt_marker)
-    return 1;
-
-  return 0;
-}
-
-static const struct frame_unwind hppa_hpux_sigtramp_frame_unwind = {
-  SIGTRAMP_FRAME,
-  default_frame_unwind_stop_reason,
-  hppa_hpux_sigtramp_frame_this_id,
-  hppa_hpux_sigtramp_frame_prev_register,
-  NULL,
-  hppa_hpux_sigtramp_unwind_sniffer
-};
-
-static CORE_ADDR
-hppa32_hpux_find_global_pointer (struct gdbarch *gdbarch,
-				 struct value *function)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR faddr;
-  
-  faddr = value_as_address (function);
-
-  /* Is this a plabel? If so, dereference it to get the gp value.  */
-  if (faddr & 2)
-    {
-      int status;
-      gdb_byte buf[4];
-
-      faddr &= ~3;
-
-      status = target_read_memory (faddr + 4, buf, sizeof (buf));
-      if (status == 0)
-	return extract_unsigned_integer (buf, sizeof (buf), byte_order);
-    }
-
-  return gdbarch_tdep (gdbarch)->solib_get_got_by_pc (faddr);
-}
-
-static CORE_ADDR
-hppa64_hpux_find_global_pointer (struct gdbarch *gdbarch,
-				 struct value *function)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR faddr;
-  gdb_byte buf[32];
-
-  faddr = value_as_address (function);
-
-  if (pc_in_section (faddr, ".opd"))
-    {
-      target_read_memory (faddr, buf, sizeof (buf));
-      return extract_unsigned_integer (&buf[24], 8, byte_order);
-    }
-  else
-    {
-      return gdbarch_tdep (gdbarch)->solib_get_got_by_pc (faddr);
-    }
-}
-
-static unsigned int ldsid_pattern[] = {
-  0x000010a0, /* ldsid (rX),rY */
-  0x00001820, /* mtsp rY,sr0 */
-  0xe0000000  /* be,n (sr0,rX) */
-};
-
-static CORE_ADDR
-hppa_hpux_search_pattern (struct gdbarch *gdbarch,
-			  CORE_ADDR start, CORE_ADDR end,
-			  unsigned int *patterns, int count)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  int num_insns = (end - start + HPPA_INSN_SIZE) / HPPA_INSN_SIZE;
-  unsigned int *insns;
-  gdb_byte *buf;
-  int offset, i;
-
-  buf = alloca (num_insns * HPPA_INSN_SIZE);
-  insns = alloca (num_insns * sizeof (unsigned int));
-
-  read_memory (start, buf, num_insns * HPPA_INSN_SIZE);
-  for (i = 0; i < num_insns; i++, buf += HPPA_INSN_SIZE)
-    insns[i] = extract_unsigned_integer (buf, HPPA_INSN_SIZE, byte_order);
-
-  for (offset = 0; offset <= num_insns - count; offset++)
-    {
-      for (i = 0; i < count; i++)
-        {
-	  if ((insns[offset + i] & patterns[i]) != patterns[i])
-	    break;
-	}
-      if (i == count)
-        break;
-    }
-
-  if (offset <= num_insns - count)
-    return start + offset * HPPA_INSN_SIZE;
-  else
-    return 0;
-}
-
-static CORE_ADDR
-hppa32_hpux_search_dummy_call_sequence (struct gdbarch *gdbarch, CORE_ADDR pc,
-					int *argreg)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct objfile *obj;
-  struct obj_section *sec;
-  struct hppa_objfile_private *priv;
-  struct frame_info *frame;
-  struct unwind_table_entry *u;
-  CORE_ADDR addr, rp;
-  gdb_byte buf[4];
-  unsigned int insn;
-
-  sec = find_pc_section (pc);
-  obj = sec->objfile;
-  priv = objfile_data (obj, hppa_objfile_priv_data);
-
-  if (!priv)
-    priv = hppa_init_objfile_priv_data (obj);
-  if (!priv)
-    error (_("Internal error creating objfile private data."));
-
-  /* Use the cached value if we have one.  */
-  if (priv->dummy_call_sequence_addr != 0)
-    {
-      *argreg = priv->dummy_call_sequence_reg;
-      return priv->dummy_call_sequence_addr;
-    }
-
-  /* First try a heuristic; if we are in a shared library call, our return
-     pointer is likely to point at an export stub.  */
-  frame = get_current_frame ();
-  rp = frame_unwind_register_unsigned (frame, 2);
-  u = find_unwind_entry (rp);
-  if (u && u->stub_unwind.stub_type == EXPORT)
-    {
-      addr = hppa_hpux_search_pattern (gdbarch,
-				       u->region_start, u->region_end,
-				       ldsid_pattern, 
-				       ARRAY_SIZE (ldsid_pattern));
-      if (addr)
-	goto found_pattern;
-    }
-
-  /* Next thing to try is to look for an export stub.  */
-  if (priv->unwind_info)
-    {
-      int i;
-
-      for (i = 0; i < priv->unwind_info->last; i++)
-        {
-	  struct unwind_table_entry *u;
-	  u = &priv->unwind_info->table[i];
-	  if (u->stub_unwind.stub_type == EXPORT)
-	    {
-	      addr = hppa_hpux_search_pattern (gdbarch,
-					       u->region_start, u->region_end,
-					       ldsid_pattern, 
-					       ARRAY_SIZE (ldsid_pattern));
-	      if (addr)
-	        {
-		  goto found_pattern;
-		}
-	    }
-	}
-    }
-
-  /* Finally, if this is the main executable, try to locate a sequence 
-     from noshlibs */
-  addr = hppa_symbol_address ("noshlibs");
-  sec = find_pc_section (addr);
-
-  if (sec && sec->objfile == obj)
-    {
-      CORE_ADDR start, end;
-
-      find_pc_partial_function (addr, NULL, &start, &end);
-      if (start != 0 && end != 0)
-        {
-	  addr = hppa_hpux_search_pattern (gdbarch, start, end, ldsid_pattern,
-					   ARRAY_SIZE (ldsid_pattern));
-	  if (addr)
-	    goto found_pattern;
-        }
-    }
-
-  /* Can't find a suitable sequence.  */
-  return 0;
-
-found_pattern:
-  target_read_memory (addr, buf, sizeof (buf));
-  insn = extract_unsigned_integer (buf, sizeof (buf), byte_order);
-  priv->dummy_call_sequence_addr = addr;
-  priv->dummy_call_sequence_reg = (insn >> 21) & 0x1f;
-
-  *argreg = priv->dummy_call_sequence_reg;
-  return priv->dummy_call_sequence_addr;
-}
-
-static CORE_ADDR
-hppa64_hpux_search_dummy_call_sequence (struct gdbarch *gdbarch, CORE_ADDR pc,
-					int *argreg)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct objfile *obj;
-  struct obj_section *sec;
-  struct hppa_objfile_private *priv;
-  CORE_ADDR addr;
-  struct minimal_symbol *msym;
-
-  sec = find_pc_section (pc);
-  obj = sec->objfile;
-  priv = objfile_data (obj, hppa_objfile_priv_data);
-
-  if (!priv)
-    priv = hppa_init_objfile_priv_data (obj);
-  if (!priv)
-    error (_("Internal error creating objfile private data."));
-
-  /* Use the cached value if we have one.  */
-  if (priv->dummy_call_sequence_addr != 0)
-    {
-      *argreg = priv->dummy_call_sequence_reg;
-      return priv->dummy_call_sequence_addr;
-    }
-
-  /* FIXME: Without stub unwind information, locating a suitable sequence is
-     fairly difficult.  For now, we implement a very naive and inefficient
-     scheme; try to read in blocks of code, and look for a "bve,n (rp)" 
-     instruction.  These are likely to occur at the end of functions, so
-     we only look at the last two instructions of each function.  */
-  ALL_OBJFILE_MSYMBOLS (obj, msym)
-    {
-      CORE_ADDR begin, end;
-      const char *name;
-      gdb_byte buf[2 * HPPA_INSN_SIZE];
-      int offset;
-
-      find_pc_partial_function (MSYMBOL_VALUE_ADDRESS (obj, msym), &name,
-      				&begin, &end);
-
-      if (name == NULL || begin == 0 || end == 0)
-        continue;
-
-      if (target_read_memory (end - sizeof (buf), buf, sizeof (buf)) == 0)
-        {
-	  for (offset = 0; offset < sizeof (buf); offset++)
-	    {
-	      unsigned int insn;
-
-	      insn = extract_unsigned_integer (buf + offset,
-					       HPPA_INSN_SIZE, byte_order);
-	      if (insn == 0xe840d002) /* bve,n (rp) */
-	        {
-		  addr = (end - sizeof (buf)) + offset;
-		  goto found_pattern;
-		}
-	    }
-	}
-    }
-
-  /* Can't find a suitable sequence.  */
-  return 0;
-
-found_pattern:
-  priv->dummy_call_sequence_addr = addr;
-  /* Right now we only look for a "bve,l (rp)" sequence, so the register is 
-     always HPPA_RP_REGNUM.  */
-  priv->dummy_call_sequence_reg = HPPA_RP_REGNUM;
-
-  *argreg = priv->dummy_call_sequence_reg;
-  return priv->dummy_call_sequence_addr;
-}
-
-static CORE_ADDR
-hppa_hpux_find_import_stub_for_addr (CORE_ADDR funcaddr)
-{
-  struct objfile *objfile;
-  struct bound_minimal_symbol funsym;
-  struct bound_minimal_symbol stubsym;
-  CORE_ADDR stubaddr;
-
-  funsym = lookup_minimal_symbol_by_pc (funcaddr);
-  stubaddr = 0;
-
-  ALL_OBJFILES (objfile)
-    {
-      stubsym = lookup_minimal_symbol_solib_trampoline
-	(MSYMBOL_LINKAGE_NAME (funsym.minsym), objfile);
-
-      if (stubsym.minsym)
-	{
-	  struct unwind_table_entry *u;
-
-	  u = find_unwind_entry (MSYMBOL_VALUE (stubsym.minsym));
-	  if (u == NULL 
-	      || (u->stub_unwind.stub_type != IMPORT
-		  && u->stub_unwind.stub_type != IMPORT_SHLIB))
-	    continue;
-
-          stubaddr = MSYMBOL_VALUE (stubsym.minsym);
-
-	  /* If we found an IMPORT stub, then we can stop searching;
-	     if we found an IMPORT_SHLIB, we want to continue the search
-	     in the hopes that we will find an IMPORT stub.  */
-	  if (u->stub_unwind.stub_type == IMPORT)
-	    break;
-	}
-    }
-
-  return stubaddr;
-}
-
-static int
-hppa_hpux_sr_for_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
-{
-  int sr;
-  /* The space register to use is encoded in the top 2 bits of the address.  */
-  sr = addr >> (gdbarch_tdep (gdbarch)->bytes_per_address * 8 - 2);
-  return sr + 4;
-}
-
-static CORE_ADDR
-hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr)
-{
-  /* In order for us to restore the space register to its starting state, 
-     we need the dummy trampoline to return to an instruction address in 
-     the same space as where we started the call.  We used to place the 
-     breakpoint near the current pc, however, this breaks nested dummy calls 
-     as the nested call will hit the breakpoint address and terminate 
-     prematurely.  Instead, we try to look for an address in the same space to 
-     put the breakpoint.  
-     
-     This is similar in spirit to putting the breakpoint at the "entry point"
-     of an executable.  */
-
-  struct obj_section *sec;
-  struct unwind_table_entry *u;
-  struct minimal_symbol *msym;
-  CORE_ADDR func;
-
-  sec = find_pc_section (addr);
-  if (sec)
-    {
-      /* First try the lowest address in the section; we can use it as long
-         as it is "regular" code (i.e. not a stub).  */
-      u = find_unwind_entry (obj_section_addr (sec));
-      if (!u || u->stub_unwind.stub_type == 0)
-        return obj_section_addr (sec);
-
-      /* Otherwise, we need to find a symbol for a regular function.  We
-         do this by walking the list of msymbols in the objfile.  The symbol
-	 we find should not be the same as the function that was passed in.  */
-
-      /* FIXME: this is broken, because we can find a function that will be
-         called by the dummy call target function, which will still not 
-	 work.  */
-
-      find_pc_partial_function (addr, NULL, &func, NULL);
-      ALL_OBJFILE_MSYMBOLS (sec->objfile, msym)
-	{
-	  u = find_unwind_entry (MSYMBOL_VALUE_ADDRESS (sec->objfile, msym));
-	  if (func != MSYMBOL_VALUE_ADDRESS (sec->objfile, msym) 
-	      && (!u || u->stub_unwind.stub_type == 0))
-	    return MSYMBOL_VALUE_ADDRESS (sec->objfile, msym);
-	}
-    }
-
-  warning (_("Cannot find suitable address to place dummy breakpoint; nested "
-	     "calls may fail."));
-  return addr - 4;
-}
-
-static CORE_ADDR
-hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
-			   CORE_ADDR funcaddr,
-			   struct value **args, int nargs,
-			   struct type *value_type,
-			   CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
-			   struct regcache *regcache)
-{
-  CORE_ADDR pc, stubaddr;
-  int argreg = 0;
-
-  pc = regcache_read_pc (regcache);
-
-  /* Note: we don't want to pass a function descriptor here; push_dummy_call
-     fills in the PIC register for us.  */
-  funcaddr = gdbarch_convert_from_func_ptr_addr (gdbarch, funcaddr, NULL);
-
-  /* The simple case is where we call a function in the same space that we are
-     currently in; in that case we don't really need to do anything.  */
-  if (hppa_hpux_sr_for_addr (gdbarch, pc)
-      == hppa_hpux_sr_for_addr (gdbarch, funcaddr))
-    {
-      /* Intraspace call.  */
-      *bp_addr = hppa_hpux_find_dummy_bpaddr (pc);
-      *real_pc = funcaddr;
-      regcache_cooked_write_unsigned (regcache, HPPA_RP_REGNUM, *bp_addr);
-
-      return sp;
-    }
-
-  /* In order to make an interspace call, we need to go through a stub.
-     gcc supplies an appropriate stub called "__gcc_plt_call", however, if
-     an application is compiled with HP compilers then this stub is not
-     available.  We used to fallback to "__d_plt_call", however that stub
-     is not entirely useful for us because it doesn't do an interspace
-     return back to the caller.  Also, on hppa64-hpux, there is no 
-     __gcc_plt_call available.  In order to keep the code uniform, we
-     instead don't use either of these stubs, but instead write our own
-     onto the stack.
-
-     A problem arises since the stack is located in a different space than
-     code, so in order to branch to a stack stub, we will need to do an
-     interspace branch.  Previous versions of gdb did this by modifying code
-     at the current pc and doing single-stepping to set the pcsq.  Since this
-     is highly undesirable, we use a different scheme:
-
-     All we really need to do the branch to the stub is a short instruction
-     sequence like this:
-      
-     PA1.1:
-      		ldsid (rX),r1
-		mtsp r1,sr0
-		be,n (sr0,rX)
-
-     PA2.0:
-      		bve,n (sr0,rX)
-
-     Instead of writing these sequences ourselves, we can find it in
-     the instruction stream that belongs to the current space.  While this
-     seems difficult at first, we are actually guaranteed to find the sequences
-     in several places:
-
-     For 32-bit code:
-     - in export stubs for shared libraries
-     - in the "noshlibs" routine in the main module
-
-     For 64-bit code:
-     - at the end of each "regular" function
-
-     We cache the address of these sequences in the objfile's private data
-     since these operations can potentially be quite expensive.
-
-     So, what we do is:
-     - write a stack trampoline
-     - look for a suitable instruction sequence in the current space
-     - point the sequence at the trampoline
-     - set the return address of the trampoline to the current space 
-       (see hppa_hpux_find_dummy_call_bpaddr)
-     - set the continuing address of the "dummy code" as the sequence.  */
-
-  if (IS_32BIT_TARGET (gdbarch))
-    {
-#define INSN(I1, I2, I3, I4) 0x ## I1, 0x ## I2, 0x ## I3, 0x ## I4
-     static const gdb_byte hppa32_tramp[] = {
-	INSN(0f,df,12,91), /* stw r31,-8(,sp) */
-	INSN(02,c0,10,a1), /* ldsid (,r22),r1 */
-	INSN(00,01,18,20), /* mtsp r1,sr0 */
-	INSN(e6,c0,00,00), /* be,l 0(sr0,r22),%sr0,%r31 */
-	INSN(08,1f,02,42), /* copy r31,rp */
-	INSN(0f,d1,10,82), /* ldw -8(,sp),rp */
-	INSN(00,40,10,a1), /* ldsid (,rp),r1 */
-	INSN(00,01,18,20), /* mtsp r1,sr0 */
-	INSN(e0,40,00,00), /* be 0(sr0,rp) */
-	INSN(08,00,02,40)  /* nop */
-      };
-
-      /* for hppa32, we must call the function through a stub so that on
-         return it can return to the space of our trampoline.  */
-      stubaddr = hppa_hpux_find_import_stub_for_addr (funcaddr);
-      if (stubaddr == 0)
-        error (_("Cannot call external function not referenced by application "
-	       "(no import stub).\n"));
-      regcache_cooked_write_unsigned (regcache, 22, stubaddr);
-
-      write_memory (sp, hppa32_tramp, sizeof (hppa32_tramp));
-
-      *bp_addr = hppa_hpux_find_dummy_bpaddr (pc);
-      regcache_cooked_write_unsigned (regcache, 31, *bp_addr);
-
-      *real_pc = hppa32_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg);
-      if (*real_pc == 0)
-        error (_("Cannot make interspace call from here."));
-
-      regcache_cooked_write_unsigned (regcache, argreg, sp);
-
-      sp += sizeof (hppa32_tramp);
-    }
-  else
-    {
-      static const gdb_byte hppa64_tramp[] = {
-	INSN(ea,c0,f0,00), /* bve,l (r22),%r2 */
-	INSN(0f,df,12,d1), /* std r31,-8(,sp) */
-	INSN(0f,d1,10,c2), /* ldd -8(,sp),rp */
-	INSN(e8,40,d0,02), /* bve,n (rp) */
-	INSN(08,00,02,40)  /* nop */
-      };
-#undef INSN
-
-      /* for hppa64, we don't need to call through a stub; all functions
-         return via a bve.  */
-      regcache_cooked_write_unsigned (regcache, 22, funcaddr);
-      write_memory (sp, hppa64_tramp, sizeof (hppa64_tramp));
-
-      *bp_addr = pc - 4;
-      regcache_cooked_write_unsigned (regcache, 31, *bp_addr);
-
-      *real_pc = hppa64_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg);
-      if (*real_pc == 0)
-        error (_("Cannot make interspace call from here."));
-
-      regcache_cooked_write_unsigned (regcache, argreg, sp);
-
-      sp += sizeof (hppa64_tramp);
-    }
-
-  sp = gdbarch_frame_align (gdbarch, sp);
-
-  return sp;
-}
-
-\f
-
-static void
-hppa_hpux_supply_ss_narrow (struct regcache *regcache,
-			    int regnum, const gdb_byte *save_state)
-{
-  const gdb_byte *ss_narrow = save_state + HPPA_HPUX_SS_NARROW_OFFSET;
-  int i, offset = 0;
-
-  for (i = HPPA_R1_REGNUM; i < HPPA_FP0_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, ss_narrow + offset);
-
-      offset += 4;
-    }
-}
-
-static void
-hppa_hpux_supply_ss_fpblock (struct regcache *regcache,
-			     int regnum, const gdb_byte *save_state)
-{
-  const gdb_byte *ss_fpblock = save_state + HPPA_HPUX_SS_FPBLOCK_OFFSET;
-  int i, offset = 0;
-
-  /* FIXME: We view the floating-point state as 64 single-precision
-     registers for 32-bit code, and 32 double-precision register for
-     64-bit code.  This distinction is artificial and should be
-     eliminated.  If that ever happens, we should remove the if-clause
-     below.  */
-
-  if (register_size (get_regcache_arch (regcache), HPPA_FP0_REGNUM) == 4)
-    {
-      for (i = HPPA_FP0_REGNUM; i < HPPA_FP0_REGNUM + 64; i++)
-	{
-	  if (regnum == i || regnum == -1)
-	    regcache_raw_supply (regcache, i, ss_fpblock + offset);
-
-	  offset += 4;
-	}
-    }
-  else
-    {
-      for (i = HPPA_FP0_REGNUM; i < HPPA_FP0_REGNUM + 32; i++)
-	{
-	  if (regnum == i || regnum == -1)
-	    regcache_raw_supply (regcache, i, ss_fpblock + offset);
-
-	  offset += 8;
-	}
-    }
-}
-
-static void
-hppa_hpux_supply_ss_wide (struct regcache *regcache,
-			  int regnum, const gdb_byte *save_state)
-{
-  const gdb_byte *ss_wide = save_state + HPPA_HPUX_SS_WIDE_OFFSET;
-  int i, offset = 8;
-
-  if (register_size (get_regcache_arch (regcache), HPPA_R1_REGNUM) == 4)
-    offset += 4;
-
-  for (i = HPPA_R1_REGNUM; i < HPPA_FP0_REGNUM; i++)
-    {
-      if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, ss_wide + offset);
-
-      offset += 8;
-    }
-}
-
-static void
-hppa_hpux_supply_save_state (const struct regset *regset,
-			     struct regcache *regcache,
-			     int regnum, const void *regs, size_t len)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  const gdb_byte *proc_info = regs;
-  const gdb_byte *save_state = proc_info + 8;
-  ULONGEST flags;
-
-  flags = extract_unsigned_integer (save_state + HPPA_HPUX_SS_FLAGS_OFFSET,
-				    4, byte_order);
-  if (regnum == -1 || regnum == HPPA_FLAGS_REGNUM)
-    {
-      size_t size = register_size (gdbarch, HPPA_FLAGS_REGNUM);
-      gdb_byte buf[8];
-
-      store_unsigned_integer (buf, size, byte_order, flags);
-      regcache_raw_supply (regcache, HPPA_FLAGS_REGNUM, buf);
-    }
-
-  /* If the SS_WIDEREGS flag is set, we really do need the full
-     `struct save_state'.  */
-  if (flags & HPPA_HPUX_SS_WIDEREGS && len < HPPA_HPUX_SAVE_STATE_SIZE)
-    error (_("Register set contents too small"));
-
-  if (flags & HPPA_HPUX_SS_WIDEREGS)
-    hppa_hpux_supply_ss_wide (regcache, regnum, save_state);
-  else
-    hppa_hpux_supply_ss_narrow (regcache, regnum, save_state);
-
-  hppa_hpux_supply_ss_fpblock (regcache, regnum, save_state);
-}
-
-/* HP-UX register set.  */
-
-static const struct regset hppa_hpux_regset =
-{
-  NULL,
-  hppa_hpux_supply_save_state
-};
-
-static void
-hppa_hpux_iterate_over_regset_sections (struct gdbarch *gdbarch,
-					iterate_over_regset_sections_cb *cb,
-					void *cb_data,
-					const struct regcache *regcache)
-{
-  cb (".reg", HPPA_HPUX_PA89_SAVE_STATE_SIZE + 8, &hppa_hpux_regset,
-      NULL, cb_data);
-}
-\f
-
-/* Bit in the `ss_flag' member of `struct save_state' that indicates
-   the state was saved from a system call.  From
-   <machine/save_state.h>.  */
-#define HPPA_HPUX_SS_INSYSCALL	0x02
-
-static CORE_ADDR
-hppa_hpux_read_pc (struct regcache *regcache)
-{
-  ULONGEST flags;
-
-  /* If we're currently in a system call return the contents of %r31.  */
-  regcache_cooked_read_unsigned (regcache, HPPA_FLAGS_REGNUM, &flags);
-  if (flags & HPPA_HPUX_SS_INSYSCALL)
-    {
-      ULONGEST pc;
-      regcache_cooked_read_unsigned (regcache, HPPA_R31_REGNUM, &pc);
-      return pc & ~0x3;
-    }
-
-  return hppa_read_pc (regcache);
-}
-
-static void
-hppa_hpux_write_pc (struct regcache *regcache, CORE_ADDR pc)
-{
-  ULONGEST flags;
-
-  /* If we're currently in a system call also write PC into %r31.  */
-  regcache_cooked_read_unsigned (regcache, HPPA_FLAGS_REGNUM, &flags);
-  if (flags & HPPA_HPUX_SS_INSYSCALL)
-    regcache_cooked_write_unsigned (regcache, HPPA_R31_REGNUM, pc | 0x3);
-
-  hppa_write_pc (regcache, pc);
-}
-
-static CORE_ADDR
-hppa_hpux_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  ULONGEST flags;
-
-  /* If we're currently in a system call return the contents of %r31.  */
-  flags = frame_unwind_register_unsigned (next_frame, HPPA_FLAGS_REGNUM);
-  if (flags & HPPA_HPUX_SS_INSYSCALL)
-    return frame_unwind_register_unsigned (next_frame, HPPA_R31_REGNUM) & ~0x3;
-
-  return hppa_unwind_pc (gdbarch, next_frame);
-}
-\f
-
-/* Given the current value of the pc, check to see if it is inside a stub, and
-   if so, change the value of the pc to point to the caller of the stub.
-   THIS_FRAME is the current frame in the current list of frames.
-   BASE contains to stack frame base of the current frame.
-   SAVE_REGS is the register file stored in the frame cache.  */
-static void
-hppa_hpux_unwind_adjust_stub (struct frame_info *this_frame, CORE_ADDR base,
-			      struct trad_frame_saved_reg *saved_regs)
-{
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  int word_size = gdbarch_ptr_bit (gdbarch) / 8;
-  struct value *pcoq_head_val;
-  ULONGEST pcoq_head;
-  CORE_ADDR stubpc;
-  struct unwind_table_entry *u;
-
-  pcoq_head_val = trad_frame_get_prev_register (this_frame, saved_regs, 
-				                HPPA_PCOQ_HEAD_REGNUM);
-  pcoq_head =
-    extract_unsigned_integer (value_contents_all (pcoq_head_val),
-			      register_size (gdbarch, HPPA_PCOQ_HEAD_REGNUM),
-			      byte_order);
-
-  u = find_unwind_entry (pcoq_head);
-  if (u && u->stub_unwind.stub_type == EXPORT)
-    {
-      stubpc = read_memory_integer (base - 24, word_size, byte_order);
-      trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc);
-    }
-  else if (hppa_symbol_address ("__gcc_plt_call") 
-           == get_pc_function_start (pcoq_head))
-    {
-      stubpc = read_memory_integer (base - 8, word_size, byte_order);
-      trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc);
-    }
-}
-
-static void
-hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  if (IS_32BIT_TARGET (gdbarch))
-    tdep->in_solib_call_trampoline = hppa32_hpux_in_solib_call_trampoline;
-  else
-    tdep->in_solib_call_trampoline = hppa64_hpux_in_solib_call_trampoline;
-
-  tdep->unwind_adjust_stub = hppa_hpux_unwind_adjust_stub;
-
-  set_gdbarch_in_solib_return_trampoline
-    (gdbarch, hppa_hpux_in_solib_return_trampoline);
-  set_gdbarch_skip_trampoline_code (gdbarch, hppa_hpux_skip_trampoline_code);
-
-  set_gdbarch_push_dummy_code (gdbarch, hppa_hpux_push_dummy_code);
-  set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
-
-  set_gdbarch_read_pc (gdbarch, hppa_hpux_read_pc);
-  set_gdbarch_write_pc (gdbarch, hppa_hpux_write_pc);
-  set_gdbarch_unwind_pc (gdbarch, hppa_hpux_unwind_pc);
-  set_gdbarch_skip_permanent_breakpoint
-    (gdbarch, hppa_skip_permanent_breakpoint);
-
-  set_gdbarch_iterate_over_regset_sections
-    (gdbarch, hppa_hpux_iterate_over_regset_sections);
-
-  frame_unwind_append_unwinder (gdbarch, &hppa_hpux_sigtramp_frame_unwind);
-}
-
-static void
-hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->is_elf = 0;
-
-  tdep->find_global_pointer = hppa32_hpux_find_global_pointer;
-
-  hppa_hpux_init_abi (info, gdbarch);
-  som_solib_select (gdbarch);
-}
-
-static void
-hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->is_elf = 1;
-  tdep->find_global_pointer = hppa64_hpux_find_global_pointer;
-
-  hppa_hpux_init_abi (info, gdbarch);
-  pa64_solib_select (gdbarch);
-}
-
-static enum gdb_osabi
-hppa_hpux_core_osabi_sniffer (bfd *abfd)
-{
-  if (strcmp (bfd_get_target (abfd), "hpux-core") == 0)
-    return GDB_OSABI_HPUX_SOM;
-  else if (strcmp (bfd_get_target (abfd), "elf64-hppa") == 0)
-    {
-      asection *section;
-      
-      section = bfd_get_section_by_name (abfd, ".kernel");
-      if (section)
-        {
-	  bfd_size_type size;
-	  char *contents;
-
-	  size = bfd_section_size (abfd, section);
-	  contents = alloca (size);
- 	  if (bfd_get_section_contents (abfd, section, contents, 
-	  				(file_ptr) 0, size)
-	      && strcmp (contents, "HP-UX") == 0)
-	    return GDB_OSABI_HPUX_ELF;
-	}
-    }
-
-  return GDB_OSABI_UNKNOWN;
-}
-
-void
-_initialize_hppa_hpux_tdep (void)
-{
-  /* BFD doesn't set a flavour for HP-UX style core files.  It doesn't
-     set the architecture either.  */
-  gdbarch_register_osabi_sniffer (bfd_arch_unknown,
-				  bfd_target_unknown_flavour,
-				  hppa_hpux_core_osabi_sniffer);
-  gdbarch_register_osabi_sniffer (bfd_arch_hppa,
-                                  bfd_target_elf_flavour,
-				  hppa_hpux_core_osabi_sniffer);
-
-  gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_HPUX_SOM,
-                          hppa_hpux_som_init_abi);
-  gdbarch_register_osabi (bfd_arch_hppa, bfd_mach_hppa20w, GDB_OSABI_HPUX_ELF,
-                          hppa_hpux_elf_init_abi);
-}
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 627f31a..0217755 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -46,13 +46,44 @@ static int hppa_debug = 0;
 static const int hppa32_num_regs = 128;
 static const int hppa64_num_regs = 96;
 
+/* We use the objfile->obj_private pointer for two things:
+ * 1.  An unwind table;
+ *
+ * 2.  A pointer to any associated shared library object.
+ *
+ * #defines are used to help refer to these objects.
+ */
+
+/* Info about the unwind table associated with an object file.
+ * This is hung off of the "objfile->obj_private" pointer, and
+ * is allocated in the objfile's psymbol obstack.  This allows
+ * us to have unique unwind info for each executable and shared
+ * library that we are debugging.
+ */
+struct hppa_unwind_info
+  {
+    struct unwind_table_entry *table;	/* Pointer to unwind info */
+    struct unwind_table_entry *cache;	/* Pointer to last entry we found */
+    int last;				/* Index of last entry */
+  };
+
+struct hppa_objfile_private
+  {
+    struct hppa_unwind_info *unwind_info;	/* a pointer */
+    struct so_list *so_info;			/* a pointer  */
+    CORE_ADDR dp;
+
+    int dummy_call_sequence_reg;
+    CORE_ADDR dummy_call_sequence_addr;
+  };
+
 /* hppa-specific object data -- unwind and solib info.
    TODO/maybe: think about splitting this into two parts; the unwind data is 
    common to all hppa targets, but is only used in this file; we can register 
    that separately and make this static. The solib data is probably hpux-
    specific, so we can create a separate extern objfile_data that is registered
    by hppa-hpux-tdep.c and shared with pa64solib.c and somsolib.c.  */
-const struct objfile_data *hppa_objfile_priv_data = NULL;
+static const struct objfile_data *hppa_objfile_priv_data = NULL;
 
 /* Get at various relevent fields of an instruction word.  */
 #define MASK_5 0x1f
@@ -170,7 +201,7 @@ hppa_symbol_address(const char *sym)
     return (CORE_ADDR)-1;
 }
 
-struct hppa_objfile_private *
+static struct hppa_objfile_private *
 hppa_init_objfile_priv_data (struct objfile *objfile)
 {
   struct hppa_objfile_private *priv;
@@ -2709,14 +2740,6 @@ hppa_frame_prev_register_helper (struct frame_info *this_frame,
       return frame_unwind_got_constant (this_frame, regnum, pc + 4);
     }
 
-  /* Make sure the "flags" register is zero in all unwound frames.
-     The "flags" registers is a HP-UX specific wart, and only the code
-     in hppa-hpux-tdep.c depends on it.  However, it is easier to deal
-     with it here.  This shouldn't affect other systems since those
-     should provide zero for the "flags" register anyway.  */
-  if (regnum == HPPA_FLAGS_REGNUM)
-    return frame_unwind_got_constant (this_frame, regnum, 0);
-
   return trad_frame_get_prev_register (this_frame, saved_regs, regnum);
 }
 \f
diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h
index 0669ce3..048677b 100644
--- a/gdb/hppa-tdep.h
+++ b/gdb/hppa-tdep.h
@@ -188,39 +188,6 @@ enum unwind_stub_types
 
 struct unwind_table_entry *find_unwind_entry (CORE_ADDR);
 
-/* We use the objfile->obj_private pointer for two things:
- * 1.  An unwind table;
- *
- * 2.  A pointer to any associated shared library object.
- *
- * #defines are used to help refer to these objects.
- */
-
-/* Info about the unwind table associated with an object file.
- * This is hung off of the "objfile->obj_private" pointer, and
- * is allocated in the objfile's psymbol obstack.  This allows
- * us to have unique unwind info for each executable and shared
- * library that we are debugging.
- */
-struct hppa_unwind_info
-  {
-    struct unwind_table_entry *table;	/* Pointer to unwind info */
-    struct unwind_table_entry *cache;	/* Pointer to last entry we found */
-    int last;				/* Index of last entry */
-  };
-
-struct hppa_objfile_private
-  {
-    struct hppa_unwind_info *unwind_info;	/* a pointer */
-    struct so_list *so_info;			/* a pointer  */
-    CORE_ADDR dp;
-
-    int dummy_call_sequence_reg;
-    CORE_ADDR dummy_call_sequence_addr;
-  };
-
-extern const struct objfile_data *hppa_objfile_priv_data;
-
 int hppa_get_field (unsigned word, int from, int to);
 int hppa_extract_5_load (unsigned int);
 unsigned hppa_extract_5R_store (unsigned int);
@@ -244,8 +211,6 @@ extern struct bound_minimal_symbol
   hppa_lookup_stub_minimal_symbol (const char *name,
                                    enum unwind_stub_types stub_type);
 
-extern struct hppa_objfile_private *hppa_init_objfile_priv_data (struct objfile *objfile);
-
 extern int hppa_in_solib_call_trampoline (struct gdbarch *gdbarch,
 					  CORE_ADDR pc);
 extern CORE_ADDR hppa_skip_trampoline_code (struct frame_info *, CORE_ADDR pc);
diff --git a/gdb/ia64-hpux-nat.c b/gdb/ia64-hpux-nat.c
deleted file mode 100644
index 6a4e088..0000000
--- a/gdb/ia64-hpux-nat.c
+++ /dev/null
@@ -1,756 +0,0 @@
-/* Copyright (C) 2010-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "ia64-tdep.h"
-#include "inferior.h"
-#include "inf-ttrace.h"
-#include "regcache.h"
-#include "solib-ia64-hpux.h"
-
-#include <ia64/sys/uregs.h>
-#include <sys/ttrace.h>
-
-/* The offsets used with ttrace to read the value of the raw registers.  */
-
-static int u_offsets[] =
-{ /* Static General Registers.  */
-  -1,     __r1,   __r2,   __r3,   __r4,   __r5,   __r6,   __r7,
-  __r8,   __r9,   __r10,  __r11,  __r12,  __r13,  __r14,  __r15,
-  __r16,  __r17,  __r18,  __r19,  __r20,  __r21,  __r22,  __r23,
-  __r24,  __r25,  __r26,  __r27,  __r28,  __r29,  __r30,  __r31,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-
-  /* Static Floating-Point Registers.  */
-    -1,     -1,   __f2,   __f3,   __f4,   __f5,   __f6,   __f7,
-  __f8,   __f9,   __f10,  __f11,  __f12,  __f13,  __f14,  __f15,
-  __f16,  __f17,  __f18,  __f19,  __f20,  __f21,  __f22,  __f23,
-  __f24,  __f25,  __f26,  __f27,  __f28,  __f29,  __f30,  __f31,
-  __f32,  __f33,  __f34,  __f35,  __f36,  __f37,  __f38,  __f39,
-  __f40,  __f41,  __f42,  __f43,  __f44,  __f45,  __f46,  __f47,
-  __f48,  __f49,  __f50,  __f51,  __f52,  __f53,  __f54,  __f55,
-  __f56,  __f57,  __f58,  __f59,  __f60,  __f61,  __f62,  __f63,
-  __f64,  __f65,  __f66,  __f67,  __f68,  __f69,  __f70,  __f71,
-  __f72,  __f73,  __f74,  __f75,  __f76,  __f77,  __f78,  __f79,
-  __f80,  __f81,  __f82,  __f83,  __f84,  __f85,  __f86,  __f87,
-  __f88,  __f89,  __f90,  __f91,  __f92,  __f93,  __f94,  __f95,
-  __f96,  __f97,  __f98,  __f99,  __f100, __f101, __f102, __f103,
-  __f104, __f105, __f106, __f107, __f108, __f109, __f110, __f111,
-  __f112, __f113, __f114, __f115, __f116, __f117, __f118, __f119,
-  __f120, __f121, __f122, __f123, __f124, __f125, __f126, __f127,
-
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-  -1,     -1,     -1,     -1,     -1,     -1,     -1,     -1,
-
-  /* Branch Registers.  */
-  __b0,   __b1,   __b2,   __b3,   __b4,   __b5,   __b6,   __b7,
-
-  /* Virtual frame pointer and virtual return address pointer.  */
-  -1, -1,
-
-  /* Other registers.  */
-  __pr, __ip, __cr_ipsr, __cfm,
-
-  /* Kernel registers.  */
-  -1,   -1,   -1,   -1,
-  -1,   -1,   -1,   -1,
-
-  -1, -1, -1, -1, -1, -1, -1, -1,
-
-  /* Some application registers.  */
-  __ar_rsc, __ar_bsp, __ar_bspstore, __ar_rnat,
-
-  -1,
-  -1,  /* Not available: FCR, IA32 floating control register.  */
-  -1, -1,
-
-  -1,         /* Not available: EFLAG.  */
-  -1,         /* Not available: CSD.  */
-  -1,         /* Not available: SSD.  */
-  -1,         /* Not available: CFLG.  */
-  -1,         /* Not available: FSR.  */
-  -1,         /* Not available: FIR.  */
-  -1,         /* Not available: FDR.  */
-  -1,
-  __ar_ccv, -1, -1, -1, __ar_unat, -1, -1, -1,
-  __ar_fpsr, -1, -1, -1,
-  -1,         /* Not available: ITC.  */
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  __ar_pfs, __ar_lc, __ar_ec,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-  -1
-  /* All following registers, starting with nat0, are handled as
-     pseudo registers, and hence are handled separately.  */
-};
-
-/* Some register have a fixed value and can not be modified.
-   Store their value in static constant buffers that can be used
-   later to fill the register cache.  */
-static const char r0_value[8] = {0x00, 0x00, 0x00, 0x00,
-                                 0x00, 0x00, 0x00, 0x00};
-static const char f0_value[16] = {0x00, 0x00, 0x00, 0x00,
-                                  0x00, 0x00, 0x00, 0x00,
-                                  0x00, 0x00, 0x00, 0x00,
-                                  0x00, 0x00, 0x00, 0x00};
-static const char f1_value[16] = {0x00, 0x00, 0x00, 0x00,
-                                  0x00, 0x00, 0xff, 0xff,
-                                  0x80, 0x00, 0x00, 0x00,
-                                  0x00, 0x00, 0x00, 0x00};
-
-/* The "to_wait" routine from the "inf-ttrace" layer.  */
-
-static ptid_t (*super_to_wait) (struct target_ops *, ptid_t,
-				struct target_waitstatus *, int);
-
-/* The "to_wait" target_ops routine routine for ia64-hpux.  */
-
-static ptid_t
-ia64_hpux_wait (struct target_ops *ops, ptid_t ptid,
-		struct target_waitstatus *ourstatus, int options)
-{
-  ptid_t new_ptid;
-
-  new_ptid = super_to_wait (ops, ptid, ourstatus, options);
-
-  /* If this is a DLD event (hard-coded breakpoint instruction
-     that was activated by the solib-ia64-hpux module), we need to
-     process it, and then resume the execution as if the event did
-     not happen.  */
-  if (ourstatus->kind == TARGET_WAITKIND_STOPPED
-      && ourstatus->value.sig == GDB_SIGNAL_TRAP
-      && ia64_hpux_at_dld_breakpoint_p (new_ptid))
-    {
-      ia64_hpux_handle_dld_breakpoint (new_ptid);
-
-      target_resume (new_ptid, 0, GDB_SIGNAL_0);
-      ourstatus->kind = TARGET_WAITKIND_IGNORE;
-    }
-
-  return new_ptid;
-}
-
-/* Fetch the RNAT register and supply it to the REGCACHE.  */
-
-static void
-ia64_hpux_fetch_rnat_register (struct regcache *regcache)
-{
-  CORE_ADDR addr;
-  gdb_byte buf[8];
-  int status;
-
-  /* The value of RNAT is stored at bsp|0x1f8, and must be read using
-     TT_LWP_RDRSEBS.  */
-
-  regcache_raw_read_unsigned (regcache, IA64_BSP_REGNUM, &addr);
-  addr |= 0x1f8;
-
-  status = ttrace (TT_LWP_RDRSEBS, ptid_get_pid (inferior_ptid),
-		   ptid_get_lwp (inferior_ptid), addr, sizeof (buf),
-		   (uintptr_t) buf);
-  if (status < 0)
-    error (_("failed to read RNAT register at %s"),
-	   paddress (get_regcache_arch(regcache), addr));
-
-  regcache_raw_supply (regcache, IA64_RNAT_REGNUM, buf);
-}
-
-/* Read the value of the register saved at OFFSET in the save_state_t
-   structure, and store its value in BUF.  LEN is the size of the register
-   to be read.  */
-
-static int
-ia64_hpux_read_register_from_save_state_t (int offset, gdb_byte *buf, int len)
-{
-  int status;
-
- status = ttrace (TT_LWP_RUREGS, ptid_get_pid (inferior_ptid),
-		  ptid_get_lwp (inferior_ptid), offset, len, (uintptr_t) buf);
-
-  return status;
-}
-
-/* Fetch register REGNUM from the inferior.  */
-
-static void
-ia64_hpux_fetch_register (struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int offset, len, status;
-  gdb_byte *buf;
-
-  if (regnum == IA64_GR0_REGNUM)
-    {
-      /* r0 is always 0.  */
-      regcache_raw_supply (regcache, regnum, r0_value);
-      return;
-    }
-
-  if (regnum == IA64_FR0_REGNUM)
-    {
-      /* f0 is always 0.0.  */
-      regcache_raw_supply (regcache, regnum, f0_value);
-      return;
-    }
-
-  if (regnum == IA64_FR1_REGNUM)
-    {
-      /* f1 is always 1.0.  */
-      regcache_raw_supply (regcache, regnum, f1_value);
-      return;
-    }
-
-  if (regnum == IA64_RNAT_REGNUM)
-    {
-      ia64_hpux_fetch_rnat_register (regcache);
-      return;
-    }
-
-  /* Get the register location. If the register can not be fetched,
-     then return now.  */
-  offset = u_offsets[regnum];
-  if (offset == -1)
-    return;
-
-  len = register_size (gdbarch, regnum);
-  buf = alloca (len * sizeof (gdb_byte));
-  status = ia64_hpux_read_register_from_save_state_t (offset, buf, len);
-  if (status < 0)
-    warning (_("Failed to read register value for %s."),
-             gdbarch_register_name (gdbarch, regnum));
-
-  regcache_raw_supply (regcache, regnum, buf);
-}
-
-/* The "to_fetch_registers" target_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_fetch_registers (struct target_ops *ops,
-			   struct regcache *regcache, int regnum)
-{
-  if (regnum == -1)
-    for (regnum = 0;
-	 regnum < gdbarch_num_regs (get_regcache_arch (regcache));
-	 regnum++)
-      ia64_hpux_fetch_register (regcache, regnum);
-  else
-    ia64_hpux_fetch_register (regcache, regnum);
-}
-
-/* Save register REGNUM (stored in BUF) in the save_state_t structure.
-   LEN is the size of the register in bytes.
-
-   Return the value from the corresponding ttrace call (a negative value
-   means that the operation failed).  */
-
-static int
-ia64_hpux_write_register_to_saved_state_t (int offset, gdb_byte *buf, int len)
-{
-  return ttrace (TT_LWP_WUREGS, ptid_get_pid (inferior_ptid),
-		 ptid_get_lwp (inferior_ptid), offset, len, (uintptr_t) buf);
-}
-
-/* Store register REGNUM into the inferior.  */
-
-static void
-ia64_hpux_store_register (const struct regcache *regcache, int regnum)
-{
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  int offset = u_offsets[regnum];
-  gdb_byte *buf;
-  int len, status;
-
-  /* If the register can not be stored, then return now.  */
-  if (offset == -1)
-    return;
-
-  /* I don't know how to store that register for now.  So just ignore any
-     request to store it, to avoid an internal error.  */
-  if (regnum == IA64_PSR_REGNUM)
-    return;
-
-  len = register_size (gdbarch, regnum);
-  buf = alloca (len * sizeof (gdb_byte));
-  regcache_raw_collect (regcache, regnum, buf);
-
-  status = ia64_hpux_write_register_to_saved_state_t (offset, buf, len);
-
-  if (status < 0)
-    error (_("failed to write register value for %s."),
-           gdbarch_register_name (gdbarch, regnum));
-}
-
-/* The "to_store_registers" target_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_store_registers (struct target_ops *ops,
-			   struct regcache *regcache, int regnum)
-{
-  if (regnum == -1)
-    for (regnum = 0;
-	 regnum < gdbarch_num_regs (get_regcache_arch (regcache));
-	 regnum++)
-      ia64_hpux_store_register (regcache, regnum);
-  else
-    ia64_hpux_store_register (regcache, regnum);
-}
-
-/* The "xfer_partial" routine from the "inf-ttrace" target layer.
-   Ideally, we would like to use this routine for all transfer
-   requests, but this platforms has a lot of special cases that
-   need to be handled manually.  So we override this routine and
-   delegate back if we detect that we are not in a special case.  */
-
-static target_xfer_partial_ftype *super_xfer_partial;
-
-/* The "xfer_partial" routine for a memory region that is completely
-   outside of the backing-store region.  */
-
-static enum target_xfer_status
-ia64_hpux_xfer_memory_no_bs (struct target_ops *ops, const char *annex,
-			     gdb_byte *readbuf, const gdb_byte *writebuf,
-			     CORE_ADDR addr, LONGEST len,
-			     ULONGEST *xfered_len)
-{
-  /* Memory writes need to be aligned on 16byte boundaries, at least
-     when writing in the text section.  On the other hand, the size
-     of the buffer does not need to be a multiple of 16bytes.
-
-     No such restriction when performing memory reads.  */
-
-  if (writebuf && addr & 0x0f)
-    {
-      const CORE_ADDR aligned_addr = addr & ~0x0f;
-      const int aligned_len = len + (addr - aligned_addr);
-      gdb_byte *aligned_buf = alloca (aligned_len * sizeof (gdb_byte));
-      LONGEST status;
-
-      /* Read the portion of memory between ALIGNED_ADDR and ADDR, so
-         that we can write it back during our aligned memory write.  */
-      status = super_xfer_partial (ops, TARGET_OBJECT_MEMORY, annex,
-				   aligned_buf /* read */,
-				   NULL /* write */,
-				   aligned_addr, addr - aligned_addr);
-      if (status <= 0)
-	return TARGET_XFER_EOF;
-      memcpy (aligned_buf + (addr - aligned_addr), writebuf, len);
-
-      return super_xfer_partial (ops, TARGET_OBJECT_MEMORY, annex,
-				 NULL /* read */, aligned_buf /* write */,
-				 aligned_addr, aligned_len, xfered_len);
-    }
-  else
-    /* Memory read or properly aligned memory write.  */
-    return super_xfer_partial (ops, TARGET_OBJECT_MEMORY, annex, readbuf,
-			       writebuf, addr, len, xfered_len);
-}
-
-/* Read LEN bytes at ADDR from memory, and store it in BUF.  This memory
-   region is assumed to be inside the backing store.
-
-   Return zero if the operation failed.  */
-
-static int
-ia64_hpux_read_memory_bs (gdb_byte *buf, CORE_ADDR addr, int len)
-{
-  gdb_byte tmp_buf[8];
-  CORE_ADDR tmp_addr = addr & ~0x7;
-
-  while (tmp_addr < addr + len)
-    {
-      int status;
-      int skip_lo = 0;
-      int skip_hi = 0;
-
-      status = ttrace (TT_LWP_RDRSEBS, ptid_get_pid (inferior_ptid),
-		       ptid_get_lwp (inferior_ptid), tmp_addr,
-		       sizeof (tmp_buf), (uintptr_t) tmp_buf);
-      if (status < 0)
-        return 0;
-
-      if (tmp_addr < addr)
-        skip_lo = addr - tmp_addr;
-
-      if (tmp_addr + sizeof (tmp_buf) > addr + len)
-        skip_hi = (tmp_addr + sizeof (tmp_buf)) - (addr + len);
-
-      memcpy (buf + (tmp_addr + skip_lo - addr),
-              tmp_buf + skip_lo,
-              sizeof (tmp_buf) - skip_lo - skip_hi);
-
-      tmp_addr += sizeof (tmp_buf);
-    }
-
-  return 1;
-}
-
-/* Write LEN bytes from BUF in memory at ADDR.  This memory region is assumed
-   to be inside the backing store.
-
-   Return zero if the operation failed.  */
-
-static int
-ia64_hpux_write_memory_bs (const gdb_byte *buf, CORE_ADDR addr, int len)
-{
-  gdb_byte tmp_buf[8];
-  CORE_ADDR tmp_addr = addr & ~0x7;
-
-  while (tmp_addr < addr + len)
-    {
-      int status;
-      int lo = 0;
-      int hi = 7;
-
-      if (tmp_addr < addr || tmp_addr + sizeof (tmp_buf) > addr + len)
-	/* Part of the 8byte region pointed by tmp_addr needs to be preserved.
-	   So read it in before we copy the data that needs to be changed.  */
-	if (!ia64_hpux_read_memory_bs (tmp_buf, tmp_addr, sizeof (tmp_buf)))
-	  return 0;
-
-      if (tmp_addr < addr)
-        lo = addr - tmp_addr;
-
-      if (tmp_addr + sizeof (tmp_buf) > addr + len)
-        hi = addr - tmp_addr + len - 1;
-
-      memcpy (tmp_buf + lo, buf + tmp_addr - addr  + lo, hi - lo + 1);
-
-      status = ttrace (TT_LWP_WRRSEBS, ptid_get_pid (inferior_ptid),
-		       ptid_get_lwp (inferior_ptid), tmp_addr,
-		       sizeof (tmp_buf), (uintptr_t) tmp_buf);
-      if (status < 0)
-        return 0;
-
-      tmp_addr += sizeof (tmp_buf);
-    }
-
-  return 1;
-}
-
-/* The "xfer_partial" routine for a memory region that is completely
-   inside of the backing-store region.  */
-
-static LONGEST
-ia64_hpux_xfer_memory_bs (struct target_ops *ops, const char *annex,
-			  gdb_byte *readbuf, const gdb_byte *writebuf,
-			  CORE_ADDR addr, LONGEST len)
-{
-  int success;
-
-  if (readbuf)
-    success = ia64_hpux_read_memory_bs (readbuf, addr, len);
-  else
-    success = ia64_hpux_write_memory_bs (writebuf, addr, len);
-
-  if (success)
-    return len;
-  else
-    return 0;
-}
-
-/* Get a register value as a unsigned value directly from the system,
-   instead of going through the regcache.
-
-   This function is meant to be used when inferior_ptid is not
-   a thread/process known to GDB.  */
-
-static ULONGEST
-ia64_hpux_get_register_from_save_state_t (int regnum, int reg_size)
-{
-  gdb_byte *buf = alloca (reg_size);
-  int offset = u_offsets[regnum];
-  int status;
-
-  /* The register is assumed to be available for fetching.  */
-  gdb_assert (offset != -1);
-
-  status = ia64_hpux_read_register_from_save_state_t (offset, buf, reg_size);
-  if (status < 0)
-    {
-      /* This really should not happen.  If it does, emit a warning
-	 and pretend the register value is zero.  Not exactly the best
-	 error recovery mechanism, but better than nothing.  We will
-	 try to do better if we can demonstrate that this can happen
-	 under normal circumstances.  */
-      warning (_("Failed to read value of register number %d."), regnum);
-      return 0;
-    }
-
-  return extract_unsigned_integer (buf, reg_size, BFD_ENDIAN_BIG);
-}
-
-/* The "xfer_partial" target_ops routine for ia64-hpux, in the case
-   where the requested object is TARGET_OBJECT_MEMORY.  */
-
-static enum target_xfer_status
-ia64_hpux_xfer_memory (struct target_ops *ops, const char *annex,
-		       gdb_byte *readbuf, const gdb_byte *writebuf,
-		       CORE_ADDR addr, ULONGEST len, ULONGEST *xfered_len)
-{
-  CORE_ADDR bsp, bspstore;
-  CORE_ADDR start_addr, short_len;
-  int status = 0;
-
-  /* The back-store region cannot be read/written by the standard memory
-     read/write operations.  So we handle the memory region piecemeal:
-       (1) and (2) The regions before and after the backing-store region,
-           which can be treated as normal memory;
-       (3) The region inside the backing-store, which needs to be
-           read/written specially.  */
-
-  if (in_inferior_list (ptid_get_pid (inferior_ptid)))
-    {
-      struct regcache *regcache = get_current_regcache ();
-
-      regcache_raw_read_unsigned (regcache, IA64_BSP_REGNUM, &bsp);
-      regcache_raw_read_unsigned (regcache, IA64_BSPSTORE_REGNUM, &bspstore);
-    }
-  else
-    {
-      /* This is probably a child of our inferior created by a fork.
-	 Because this process has not been added to our inferior list
-	 (we are probably in the process of handling that child
-	 process), we do not have a regcache to read the registers
-	 from.  So get those values directly from the kernel.  */
-      bsp = ia64_hpux_get_register_from_save_state_t (IA64_BSP_REGNUM, 8);
-      bspstore =
-	ia64_hpux_get_register_from_save_state_t (IA64_BSPSTORE_REGNUM, 8);
-    }
-
-  /* 1. Memory region before BSPSTORE.  */
-
-  if (addr < bspstore)
-    {
-      short_len = len;
-      if (addr + len > bspstore)
-        short_len = bspstore - addr;
-
-      status = ia64_hpux_xfer_memory_no_bs (ops, annex, readbuf, writebuf,
-					    addr, short_len);
-      if (status <= 0)
-        return TARGET_XFER_EOF;
-    }
-
-  /* 2. Memory region after BSP.  */
-
-  if (addr + len > bsp)
-    {
-      start_addr = addr;
-      if (start_addr < bsp)
-        start_addr = bsp;
-      short_len = len + addr - start_addr;
-
-      status = ia64_hpux_xfer_memory_no_bs
-		(ops, annex,
-		 readbuf ? readbuf + (start_addr - addr) : NULL,
-		 writebuf ? writebuf + (start_addr - addr) : NULL,
-		 start_addr, short_len);
-      if (status <= 0)
-	return TARGET_XFER_EOF;
-    }
-
-  /* 3. Memory region between BSPSTORE and BSP.  */
-
-  if (bspstore != bsp
-      && ((addr < bspstore && addr + len > bspstore)
-	  || (addr + len <= bsp && addr + len > bsp)))
-    {
-      start_addr = addr;
-      if (addr < bspstore)
-        start_addr = bspstore;
-      short_len = len + addr - start_addr;
-
-      if (start_addr + short_len > bsp)
-        short_len = bsp - start_addr;
-
-      gdb_assert (short_len > 0);
-
-      status = ia64_hpux_xfer_memory_bs
-		 (ops, annex,
-		  readbuf ? readbuf + (start_addr - addr) : NULL,
-		  writebuf ? writebuf + (start_addr - addr) : NULL,
-		  start_addr, short_len);
-      if (status < 0)
-	return TARGET_XFER_EOF;
-    }
-
-  *xfered_len = len;
-  return TARGET_XFER_OK;
-}
-
-/* Handle the transfer of TARGET_OBJECT_HPUX_UREGS objects on ia64-hpux.
-   ANNEX is currently ignored.
-
-   The current implementation does not support write transfers (because
-   we do not currently do not need these transfers), and will raise
-   a failed assertion if WRITEBUF is not NULL.  */
-
-static enum target_xfer_status
-ia64_hpux_xfer_uregs (struct target_ops *ops, const char *annex,
-		      gdb_byte *readbuf, const gdb_byte *writebuf,
-		      ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
-{
-  int status;
-
-  gdb_assert (writebuf == NULL);
-
-  status = ia64_hpux_read_register_from_save_state_t (offset, readbuf, len);
-  if (status < 0)
-    return TARGET_XFER_E_IO;
-
-  *xfered_len = (ULONGEST) len;
-  return TARGET_XFER_OK;
-}
-
-/* Handle the transfer of TARGET_OBJECT_HPUX_SOLIB_GOT objects on ia64-hpux.
-
-   The current implementation does not support write transfers (because
-   we do not currently do not need these transfers), and will raise
-   a failed assertion if WRITEBUF is not NULL.  */
-
-static enum target_xfer_status
-ia64_hpux_xfer_solib_got (struct target_ops *ops, const char *annex,
-			  gdb_byte *readbuf, const gdb_byte *writebuf,
-			  ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
-{
-  CORE_ADDR fun_addr;
-  /* The linkage pointer.  We use a uint64_t to make sure that the size
-     of the object we are returning is always 64 bits long, as explained
-     in the description of the TARGET_OBJECT_HPUX_SOLIB_GOT object.
-     This is probably paranoia, but we do not use a CORE_ADDR because
-     it could conceivably be larger than uint64_t.  */
-  uint64_t got;
-
-  gdb_assert (writebuf == NULL);
-
-  if (offset > sizeof (got))
-    return TARGET_XFER_EOF;
-
-  fun_addr = string_to_core_addr (annex);
-  got = ia64_hpux_get_solib_linkage_addr (fun_addr);
-
-  if (len > sizeof (got) - offset)
-    len = sizeof (got) - offset;
-  memcpy (readbuf, &got + offset, len);
-
-  *xfered_len = (ULONGEST) len;
-  return TARGET_XFER_OK;
-}
-
-/* The "to_xfer_partial" target_ops routine for ia64-hpux.  */
-
-static enum target_xfer_status
-ia64_hpux_xfer_partial (struct target_ops *ops, enum target_object object,
-			const char *annex, gdb_byte *readbuf,
-			const gdb_byte *writebuf, ULONGEST offset, ULONGEST len,
-			ULONGEST *xfered_len)
-{
-  enum target_xfer_status val;
-
-  if (object == TARGET_OBJECT_MEMORY)
-    val = ia64_hpux_xfer_memory (ops, annex, readbuf, writebuf, offset, len,
-				 xfered_len);
-  else if (object == TARGET_OBJECT_HPUX_UREGS)
-    val = ia64_hpux_xfer_uregs (ops, annex, readbuf, writebuf, offset, len,
-				xfered_len);
-  else if (object == TARGET_OBJECT_HPUX_SOLIB_GOT)
-    val = ia64_hpux_xfer_solib_got (ops, annex, readbuf, writebuf, offset,
-				    len, xfered_len);
-  else
-    val = super_xfer_partial (ops, object, annex, readbuf, writebuf, offset,
-			      len, xfered_len);
-
-  return val;
-}
-
-/* The "to_can_use_hw_breakpoint" target_ops routine for ia64-hpux.  */
-
-static int
-ia64_hpux_can_use_hw_breakpoint (struct target_ops *self,
-				 int type, int cnt, int othertype)
-{
-  /* No hardware watchpoint/breakpoint support yet.  */
-  return 0;
-}
-
-/* The "to_mourn_inferior" routine from the "inf-ttrace" target_ops layer.  */
-
-static void (*super_mourn_inferior) (struct target_ops *);
-
-/* The "to_mourn_inferior" target_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_mourn_inferior (struct target_ops *ops)
-{
-  const int pid = ptid_get_pid (inferior_ptid);
-  int status;
-
-  super_mourn_inferior (ops);
-
-  /* On this platform, the process still exists even after we received
-     an exit event.  Detaching from the process isn't sufficient either,
-     as it only turns the process into a zombie.  So the only solution
-     we found is to kill it.  */
-  ttrace (TT_PROC_EXIT, pid, 0, 0, 0, 0);
-  wait (&status);
-}
-
-/* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_ia64_hpux_nat (void);
-
-void
-_initialize_ia64_hpux_nat (void)
-{
-  struct target_ops *t;
-
-  t = inf_ttrace_target ();
-  super_to_wait = t->to_wait;
-  super_xfer_partial = t->to_xfer_partial;
-  super_mourn_inferior = t->to_mourn_inferior;
-
-  t->to_wait = ia64_hpux_wait;
-  t->to_fetch_registers = ia64_hpux_fetch_registers;
-  t->to_store_registers = ia64_hpux_store_registers;
-  t->to_xfer_partial = ia64_hpux_xfer_partial;
-  t->to_can_use_hw_breakpoint = ia64_hpux_can_use_hw_breakpoint;
-  t->to_mourn_inferior = ia64_hpux_mourn_inferior;
-  t->to_attach_no_wait = 1;
-
-  add_target (t);
-}
diff --git a/gdb/ia64-hpux-tdep.c b/gdb/ia64-hpux-tdep.c
deleted file mode 100644
index da51518..0000000
--- a/gdb/ia64-hpux-tdep.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/* Target-dependent code for the IA-64 for GDB, the GNU debugger.
-
-   Copyright (C) 2010-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "ia64-tdep.h"
-#include "ia64-hpux-tdep.h"
-#include "osabi.h"
-#include "gdbtypes.h"
-#include "solib.h"
-#include "target.h"
-#include "frame.h"
-#include "regcache.h"
-#include "gdbcore.h"
-#include "inferior.h"
-
-/* A sequence of instructions pushed on the stack when we want to perform
-   an inferior function call.  The main purpose of this code is to save
-   the output region of the register frame belonging to the function
-   from which we are making the call.  Normally, all registers are saved
-   prior to the call, but this does not include stacked registers because
-   they are seen by GDB as pseudo registers.
-
-   With Linux kernels, these stacked registers can be saved by simply
-   creating a new register frame, or in other words by moving the BSP.
-   But the HP/UX kernel does not allow this.  So we rely on this code
-   instead, that makes functions calls whose only purpose is to create
-   new register frames.
-
-   The array below is the result obtained after assembling the code
-   shown below. It's an array of bytes in order to make it independent
-   of the host endianess, in case it ends up being used on more than
-   one target.
-
-   start:
-        // Save b0 before using it (into preserved reg: r4).
-        mov r4 = b0
-        ;;
-
-        br.call.dptk.few b0 = stub#
-        ;;
-
-        // Add a nop bundle where we can insert our dummy breakpoint.
-        nop.m 0
-        nop.i 0
-        nop.i 0
-        ;;
-
-   stub:
-        // Alloc a new register stack frame.  Here, we set the size
-        // of all regions to zero.  Eventually, GDB will manually
-        // change the instruction to set the size of the local region
-        // to match size of the output region of the function from
-        // which we are making the function call.  This is to protect
-        // the value of the output registers of the function from
-        // which we are making the call.
-        alloc r6 = ar.pfs, 0, 0, 0, 0
-
-        // Save b0 before using it again (into preserved reg: r5).
-        mov r5 = b0
-        ;;
-
-        //  Now that we have protected the entire output region of the
-        //  register stack frame, we can call our function that will
-        //  setup the arguments, and call our target function.
-        br.call.dptk.few b0 = call_dummy#
-        ;;
-
-        //  Restore b0, ar.pfs, and return
-        mov b0 = r5
-        mov.i ar.pfs = r6
-        ;;
-        br.ret.dptk.few b0
-        ;;
-
-   call_dummy:
-        //  Alloc a new frame, with 2 local registers, and 8 output registers
-        //  (8 output registers for the maximum of 8 slots passed by register).
-        alloc r32 = ar.pfs, 2, 0, 8, 0
-
-        //  Save b0 before using it to call our target function.
-        mov r33 = b0
-
-        // Load the argument values placed by GDB inside r14-r21 in their
-        // proper registers.
-        or r34 = r14, r0
-        or r35 = r15, r0
-        or r36 = r16, r0
-        or r37 = r17, r0
-        or r38 = r18, r0
-        or r39 = r19, r0
-        or r40 = r20, r0
-        or r41 = r21, r0
-        ;;
-
-        // actual call
-        br.call.dptk.few b0 = b1
-        ;;
-
-        mov.i ar.pfs=r32
-        mov b0=r33
-        ;;
-
-        br.ret.dptk.few b0
-        ;;
-
-*/
-
-static const gdb_byte ia64_hpux_dummy_code[] =
-{
-  0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00,
-  0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-  0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x52,
-  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-  0x02, 0x30, 0x00, 0x00, 0x80, 0x05, 0x50, 0x00,
-  0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-  0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x00, 0x30, 0x00, 0x00, 0x52,
-  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x28,
-  0x04, 0x80, 0x03, 0x00, 0x60, 0x00, 0xaa, 0x00,
-  0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x02,
-  0x00, 0x00, 0x29, 0x04, 0x80, 0x05, 0x10, 0x02,
-  0x00, 0x62, 0x00, 0x40, 0xe4, 0x00, 0x38, 0x80,
-  0x00, 0x18, 0x3d, 0x00, 0x0e, 0x20, 0x40, 0x82,
-  0x00, 0x1c, 0x40, 0xa0, 0x14, 0x01, 0x38, 0x80,
-  0x00, 0x30, 0x49, 0x00, 0x0e, 0x20, 0x70, 0x9a,
-  0x00, 0x1c, 0x40, 0x00, 0x45, 0x01, 0x38, 0x80,
-  0x0a, 0x48, 0x55, 0x00, 0x0e, 0x20, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-  0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x00, 0x10, 0x00, 0x80, 0x12,
-  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x01, 0x55, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x07,
-  0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-  0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x02
-};
-
-/* The offset to be used in order to get the __reason pseudo-register
-   when using one of the *UREGS ttrace requests (see system header file
-   /usr/include/ia64/sys/uregs.h for more details).
-
-   The documentation for this pseudo-register says that a nonzero value
-   indicates that the thread stopped due to a fault, trap, or interrupt.
-   A null value indicates a stop inside a syscall.  */
-#define IA64_HPUX_UREG_REASON 0x00070000
-
-/* Return nonzero if the value of the register identified by REGNUM
-   can be modified.  */
-
-static int
-ia64_hpux_can_store_ar_register (int regnum)
-{
-  switch (regnum)
-    {
-      case IA64_RSC_REGNUM:
-      case IA64_RNAT_REGNUM:
-      case IA64_CSD_REGNUM:
-      case IA64_SSD_REGNUM:
-      case IA64_CCV_REGNUM:
-      case IA64_UNAT_REGNUM:
-      case IA64_FPSR_REGNUM:
-      case IA64_PFS_REGNUM:
-      case IA64_LC_REGNUM:
-      case IA64_EC_REGNUM:
-         return 1;
-         break;
-
-      default:
-         return 0;
-         break;
-    }
-}
-
-/* The "cannot_store_register" target_ops method.  */
-
-static int
-ia64_hpux_cannot_store_register (struct gdbarch *gdbarch, int regnum)
-{
-  /* General registers.  */
-
-  if (regnum == IA64_GR0_REGNUM)
-    return 1;
-
-  /* FP register.  */
-
-  if (regnum == IA64_FR0_REGNUM || regnum == IA64_FR1_REGNUM)
-    return 1;
-
-  /* Application registers.  */
-  if (regnum >= IA64_AR0_REGNUM && regnum <= IA64_AR0_REGNUM + 127)
-    return (!ia64_hpux_can_store_ar_register (regnum));
-
-  /* We can store all other registers.  */
-  return 0;
-}
-
-/* Return nonzero if the inferior is stopped inside a system call.  */
-
-static int
-ia64_hpux_stopped_in_syscall (struct gdbarch *gdbarch)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct target_ops *ops = &current_target;
-  gdb_byte buf[8];
-  int len;
-
-  len = target_read (ops, TARGET_OBJECT_HPUX_UREGS, NULL,
-		     buf, IA64_HPUX_UREG_REASON, sizeof (buf));
-  if (len == -1)
-    /* The target wasn't able to tell us.  Assume we are not stopped
-       in a system call, which is the normal situation.  */
-    return 0;
-  gdb_assert (len == 8);
-
-  return (extract_unsigned_integer (buf, len, byte_order) == 0);
-}
-
-/* The "size_of_register_frame" gdbarch_tdep routine for ia64-hpux.  */
-
-static int
-ia64_hpux_size_of_register_frame (struct frame_info *this_frame,
-				  ULONGEST cfm)
-{
-  int sof;
-
-  if (frame_relative_level (this_frame) == 0
-      && ia64_hpux_stopped_in_syscall (get_frame_arch (this_frame)))
-    /* If the inferior stopped in a system call, the base address
-       of the register frame is at BSP - SOL instead of BSP - SOF.
-       This is an HP-UX exception.  */
-    sof = (cfm & 0x3f80) >> 7;
-  else
-    sof = (cfm & 0x7f);
-
-  return sof;
-}
-
-/* Implement the push_dummy_code gdbarch method.
-
-   This function assumes that the SP is already 16-byte-aligned.  */
-
-static CORE_ADDR
-ia64_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
-			   CORE_ADDR funaddr, struct value **args, int nargs,
-			   struct type *value_type, CORE_ADDR *real_pc,
-			   CORE_ADDR *bp_addr, struct regcache *regcache)
-{
-  ULONGEST cfm;
-  int sof, sol, sor, soo;
-  gdb_byte buf[16];
-
-  regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
-  sof = cfm & 0x7f;
-  sol = (cfm >> 7) & 0x7f;
-  sor = (cfm >> 14) & 0xf;
-  soo = sof - sol - sor;
-
-  /* Reserve some space on the stack to hold the dummy code.  */
-  sp = sp - sizeof (ia64_hpux_dummy_code);
-
-  /* Set the breakpoint address at the first instruction of the bundle
-     in the dummy code that has only nops.  This is where the dummy code
-     expects us to break.  */
-  *bp_addr = sp + 0x20;
-
-  /* Start the inferior function call from the dummy code.  The dummy
-     code will then call our function.  */
-  *real_pc = sp;
-
-  /* Transfer the dummy code to the inferior.  */
-  write_memory (sp, ia64_hpux_dummy_code, sizeof (ia64_hpux_dummy_code));
-
-  /* Update the size of the local portion of the register frame allocated
-     by ``stub'' to match the size of the output region of the current
-     register frame.  This allows us to save the stacked registers.
-
-     The "alloc" instruction is located at slot 0 of the bundle at +0x30.
-     Update the "sof" and "sol" portion of that instruction which are
-     respectively at bits 18-24 and 25-31 of the bundle.  */
-  memcpy (buf, ia64_hpux_dummy_code + 0x30, sizeof (buf));
-
-  buf[2] |= ((soo & 0x3f) << 2);
-  buf[3] |= (soo << 1);
-  if (soo > 63)
-    buf[3] |= 1;
-
-  write_memory (sp + 0x30, buf, sizeof (buf));
-
-  /* Return the new (already properly aligned) SP.  */
-  return sp;
-}
-
-/* The "allocate_new_rse_frame" ia64_infcall_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_allocate_new_rse_frame (struct regcache *regcache, ULONGEST bsp,
-				  int sof)
-{
-  /* We cannot change the value of the BSP register on HP-UX,
-     so we can't allocate a new RSE frame.  */
-}
-
-/* The "store_argument_in_slot" ia64_infcall_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_store_argument_in_slot (struct regcache *regcache, CORE_ADDR bsp,
-                                  int slotnum, gdb_byte *buf)
-{
-  /* The call sequence on this target expects us to place the arguments
-     inside r14 - r21.  */
-  regcache_cooked_write (regcache, IA64_GR0_REGNUM + 14 + slotnum, buf);
-}
-
-/* The "set_function_addr" ia64_infcall_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_set_function_addr (struct regcache *regcache, CORE_ADDR func_addr)
-{
-  /* The calling sequence calls the function whose address is placed
-     in register b1.  */
-  regcache_cooked_write_unsigned (regcache, IA64_BR1_REGNUM, func_addr);
-}
-
-/* The ia64_infcall_ops structure for ia64-hpux.  */
-
-static const struct ia64_infcall_ops ia64_hpux_infcall_ops =
-{
-  ia64_hpux_allocate_new_rse_frame,
-  ia64_hpux_store_argument_in_slot,
-  ia64_hpux_set_function_addr
-};
-
-/* The "dummy_id" gdbarch routine for ia64-hpux.  */
-
-static struct frame_id
-ia64_hpux_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR sp, pc, bp_addr, bsp;
-
-  sp = get_frame_register_unsigned (this_frame, IA64_GR12_REGNUM);
-
-  /* Just double-check that the frame PC is within a certain region
-     of the stack that would be plausible for our dummy code (the dummy
-     code was pushed at SP + 16).  If not, then return a null frame ID.
-     This is necessary in our case, because it is possible to produce
-     the same frame ID for a normal frame, if that frame corresponds
-     to the function called by our dummy code, and the function has not
-     modified the registers that we use to build the dummy frame ID.  */
-  pc = get_frame_pc (this_frame);
-  if (pc < sp + 16 || pc >= sp + 16 + sizeof (ia64_hpux_dummy_code))
-    return null_frame_id;
-
-  /* The call sequence is such that the address of the dummy breakpoint
-     we inserted is stored in r5.  */
-  bp_addr = get_frame_register_unsigned (this_frame, IA64_GR5_REGNUM);
-
-  bsp = get_frame_register_unsigned (this_frame, IA64_BSP_REGNUM);
-
-  return frame_id_build_special (sp, bp_addr, bsp);
-}
-
-/* Should be set to non-NULL if the ia64-hpux solib module is linked in.
-   This may not be the case because the shared library support code can
-   only be compiled on ia64-hpux.  */
-
-struct target_so_ops *ia64_hpux_so_ops = NULL;
-
-/* The "find_global_pointer_from_solib" gdbarch_tdep routine for
-   ia64-hpux.  */
-
-static CORE_ADDR
-ia64_hpux_find_global_pointer_from_solib (struct gdbarch *gdbarch,
-					  CORE_ADDR faddr)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct target_ops *ops = &current_target;
-  gdb_byte buf[8];
-  LONGEST len;
-
-  len = target_read (ops, TARGET_OBJECT_HPUX_SOLIB_GOT,
-		     paddress (gdbarch, faddr), buf, 0, sizeof (buf));
-
-  return extract_unsigned_integer (buf, len, byte_order);
-}
-
-static void
-ia64_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  tdep->size_of_register_frame = ia64_hpux_size_of_register_frame;
-
-  set_gdbarch_long_double_format (gdbarch, floatformats_ia64_quad);
-  set_gdbarch_cannot_store_register (gdbarch, ia64_hpux_cannot_store_register);
-
-  /* Inferior functions must be called from stack. */
-  set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
-  set_gdbarch_push_dummy_code (gdbarch, ia64_hpux_push_dummy_code);
-  tdep->infcall_ops = ia64_hpux_infcall_ops;
-  tdep->find_global_pointer_from_solib
-      = ia64_hpux_find_global_pointer_from_solib;
-  set_gdbarch_dummy_id (gdbarch, ia64_hpux_dummy_id);
-
-  if (ia64_hpux_so_ops)
-    set_solib_ops (gdbarch, ia64_hpux_so_ops);
-}
-
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_ia64_hpux_tdep;
-
-void
-_initialize_ia64_hpux_tdep (void)
-{
-  gdbarch_register_osabi (bfd_arch_ia64, 0, GDB_OSABI_HPUX_ELF,
-			  ia64_hpux_init_abi);
-}
diff --git a/gdb/ia64-hpux-tdep.h b/gdb/ia64-hpux-tdep.h
deleted file mode 100644
index a82215e..0000000
--- a/gdb/ia64-hpux-tdep.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 2010-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef IA64_HPUX_TDEP_H
-#define IA64_HPUX_TDEP_H
-
-struct target_so_ops;
-extern struct target_so_ops *ia64_hpux_so_ops;
-
-#endif
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
deleted file mode 100644
index dceea42..0000000
--- a/gdb/inf-ttrace.c
+++ /dev/null
@@ -1,1224 +0,0 @@
-/* Low-level child interface to ttrace.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-
-/* The ttrace(2) system call didn't exist before HP-UX 10.30.  Don't
-   try to compile this code unless we have it.  */
-#ifdef HAVE_TTRACE
-
-#include "command.h"
-#include "gdbcore.h"
-#include "gdbthread.h"
-#include "inferior.h"
-#include "terminal.h"
-#include "target.h"
-#include <sys/mman.h>
-#include <sys/ttrace.h>
-#include <signal.h>
-
-#include "inf-child.h"
-#include "inf-ttrace.h"
-#include "common/filestuff.h"
-
-\f
-
-/* HP-UX uses a threading model where each user-space thread
-   corresponds to a kernel thread.  These kernel threads are called
-   lwps.  The ttrace(2) interface gives us almost full control over
-   the threads, which makes it very easy to support them in GDB.  We
-   identify the threads by process ID and lwp ID.  The ttrace(2) also
-   provides us with a thread's user ID (in the `tts_user_tid' member
-   of `ttstate_t') but we don't use that (yet) as it isn't necessary
-   to uniquely label the thread.  */
-
-/* Number of active lwps.  */
-static int inf_ttrace_num_lwps;
-\f
-
-/* On HP-UX versions that have the ttrace(2) system call, we can
-   implement "hardware" watchpoints by fiddling with the protection of
-   pages in the address space that contain the variable being watched.
-   In order to implement this, we keep a dictionary of pages for which
-   we have changed the protection.  */
-
-struct inf_ttrace_page
-{
-  CORE_ADDR addr;		/* Page address.  */
-  int prot;			/* Protection.  */
-  int refcount;			/* Reference count.  */
-  struct inf_ttrace_page *next;
-  struct inf_ttrace_page *prev;
-};
-
-struct inf_ttrace_page_dict
-{
-  struct inf_ttrace_page buckets[128];
-  int pagesize;			/* Page size.  */
-  int count;			/* Number of pages in this dictionary.  */
-} inf_ttrace_page_dict;
-
-struct inf_ttrace_private_thread_info
-{
-  int dying;
-};
-
-/* Number of lwps that are currently in a system call.  */
-static int inf_ttrace_num_lwps_in_syscall;
-
-/* Flag to indicate whether we should re-enable page protections after
-   the next wait.  */
-static int inf_ttrace_reenable_page_protections;
-
-/* Enable system call events for process PID.  */
-
-static void
-inf_ttrace_enable_syscall_events (pid_t pid)
-{
-  ttevent_t tte;
-  ttstate_t tts;
-
-  gdb_assert (inf_ttrace_num_lwps_in_syscall == 0);
-
-  if (ttrace (TT_PROC_GET_EVENT_MASK, pid, 0,
-	      (uintptr_t)&tte, sizeof tte, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  tte.tte_events |= (TTEVT_SYSCALL_ENTRY | TTEVT_SYSCALL_RETURN);
-
-  if (ttrace (TT_PROC_SET_EVENT_MASK, pid, 0,
-	      (uintptr_t)&tte, sizeof tte, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  if (ttrace (TT_PROC_GET_FIRST_LWP_STATE, pid, 0,
-	      (uintptr_t)&tts, sizeof tts, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  if (tts.tts_flags & TTS_INSYSCALL)
-    inf_ttrace_num_lwps_in_syscall++;
-
-  /* FIXME: Handle multiple threads.  */
-}
-
-/* Disable system call events for process PID.  */
-
-static void
-inf_ttrace_disable_syscall_events (pid_t pid)
-{
-  ttevent_t tte;
-
-  gdb_assert (inf_ttrace_page_dict.count == 0);
-
-  if (ttrace (TT_PROC_GET_EVENT_MASK, pid, 0,
-	      (uintptr_t)&tte, sizeof tte, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  tte.tte_events &= ~(TTEVT_SYSCALL_ENTRY | TTEVT_SYSCALL_RETURN);
-
-  if (ttrace (TT_PROC_SET_EVENT_MASK, pid, 0,
-	      (uintptr_t)&tte, sizeof tte, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  inf_ttrace_num_lwps_in_syscall = 0;
-}
-
-/* Get information about the page at address ADDR for process PID from
-   the dictionary.  */
-
-static struct inf_ttrace_page *
-inf_ttrace_get_page (pid_t pid, CORE_ADDR addr)
-{
-  const int num_buckets = ARRAY_SIZE (inf_ttrace_page_dict.buckets);
-  const int pagesize = inf_ttrace_page_dict.pagesize;
-  int bucket;
-  struct inf_ttrace_page *page;
-
-  bucket = (addr / pagesize) % num_buckets;
-  page = &inf_ttrace_page_dict.buckets[bucket];
-  while (page)
-    {
-      if (page->addr == addr)
-	break;
-
-      page = page->next;
-    }
-
-  return page;
-}
-
-/* Add the page at address ADDR for process PID to the dictionary.  */
-
-static struct inf_ttrace_page *
-inf_ttrace_add_page (pid_t pid, CORE_ADDR addr)
-{
-  const int num_buckets = ARRAY_SIZE (inf_ttrace_page_dict.buckets);
-  const int pagesize = inf_ttrace_page_dict.pagesize;
-  int bucket;
-  struct inf_ttrace_page *page;
-  struct inf_ttrace_page *prev = NULL;
-
-  bucket = (addr / pagesize) % num_buckets;
-  page = &inf_ttrace_page_dict.buckets[bucket];
-  while (page)
-    {
-      if (page->addr == addr)
-	break;
-
-      prev = page;
-      page = page->next;
-    }
-  
-  if (!page)
-    {
-      int prot;
-
-      if (ttrace (TT_PROC_GET_MPROTECT, pid, 0,
-		  addr, 0, (uintptr_t)&prot) == -1)
-	perror_with_name (("ttrace"));
-      
-      page = XNEW (struct inf_ttrace_page);
-      page->addr = addr;
-      page->prot = prot;
-      page->refcount = 0;
-      page->next = NULL;
-
-      page->prev = prev;
-      prev->next = page;
-
-      inf_ttrace_page_dict.count++;
-      if (inf_ttrace_page_dict.count == 1)
-	inf_ttrace_enable_syscall_events (pid);
-
-      if (inf_ttrace_num_lwps_in_syscall == 0)
-	{
-	  if (ttrace (TT_PROC_SET_MPROTECT, pid, 0,
-		      addr, pagesize, prot & ~PROT_WRITE) == -1)
-	    perror_with_name (("ttrace"));
-	}
-    }
-
-  return page;
-}
-
-/* Insert the page at address ADDR of process PID to the dictionary.  */
-
-static void
-inf_ttrace_insert_page (pid_t pid, CORE_ADDR addr)
-{
-  struct inf_ttrace_page *page;
-
-  page = inf_ttrace_get_page (pid, addr);
-  if (!page)
-    page = inf_ttrace_add_page (pid, addr);
-
-  page->refcount++;
-}
-
-/* Remove the page at address ADDR of process PID from the dictionary.  */
-
-static void
-inf_ttrace_remove_page (pid_t pid, CORE_ADDR addr)
-{
-  const int pagesize = inf_ttrace_page_dict.pagesize;
-  struct inf_ttrace_page *page;
-
-  page = inf_ttrace_get_page (pid, addr);
-  page->refcount--;
-
-  gdb_assert (page->refcount >= 0);
-
-  if (page->refcount == 0)
-    {
-      if (inf_ttrace_num_lwps_in_syscall == 0)
-	{
-	  if (ttrace (TT_PROC_SET_MPROTECT, pid, 0,
-		      addr, pagesize, page->prot) == -1)
-	    perror_with_name (("ttrace"));
-	}
-
-      inf_ttrace_page_dict.count--;
-      if (inf_ttrace_page_dict.count == 0)
-	inf_ttrace_disable_syscall_events (pid);
-
-      page->prev->next = page->next;
-      if (page->next)
-	page->next->prev = page->prev;
-
-      xfree (page);
-    }
-}
-
-/* Mask the bits in PROT from the page protections that are currently
-   in the dictionary for process PID.  */
-
-static void
-inf_ttrace_mask_page_protections (pid_t pid, int prot)
-{
-  const int num_buckets = ARRAY_SIZE (inf_ttrace_page_dict.buckets);
-  const int pagesize = inf_ttrace_page_dict.pagesize;
-  int bucket;
-
-  for (bucket = 0; bucket < num_buckets; bucket++)
-    {
-      struct inf_ttrace_page *page;
-
-      page = inf_ttrace_page_dict.buckets[bucket].next;
-      while (page)
-	{
-	  if (ttrace (TT_PROC_SET_MPROTECT, pid, 0,
-		      page->addr, pagesize, page->prot & ~prot) == -1)
-	    perror_with_name (("ttrace"));
-
-	  page = page->next;
-	}
-    }
-}
-
-/* Write-protect the pages in the dictionary for process PID.  */
-
-static void
-inf_ttrace_enable_page_protections (pid_t pid)
-{
-  inf_ttrace_mask_page_protections (pid, PROT_WRITE);
-}
-
-/* Restore the protection of the pages in the dictionary for process
-   PID.  */
-
-static void
-inf_ttrace_disable_page_protections (pid_t pid)
-{
-  inf_ttrace_mask_page_protections (pid, 0);
-}
-
-/* Insert a "hardware" watchpoint for LEN bytes at address ADDR of
-   type TYPE.  */
-
-static int
-inf_ttrace_insert_watchpoint (struct target_ops *self,
-			      CORE_ADDR addr, int len, int type,
-			      struct expression *cond)
-{
-  const int pagesize = inf_ttrace_page_dict.pagesize;
-  pid_t pid = ptid_get_pid (inferior_ptid);
-  CORE_ADDR page_addr;
-  int num_pages;
-  int page;
-
-  gdb_assert (type == hw_write);
-
-  page_addr = (addr / pagesize) * pagesize;
-  num_pages = (len + pagesize - 1) / pagesize;
-
-  for (page = 0; page < num_pages; page++, page_addr += pagesize)
-    inf_ttrace_insert_page (pid, page_addr);
-
-  return 1;
-}
-
-/* Remove a "hardware" watchpoint for LEN bytes at address ADDR of
-   type TYPE.  */
-
-static int
-inf_ttrace_remove_watchpoint (struct target_ops *self,
-			      CORE_ADDR addr, int len, int type,
-			      struct expression *cond)
-{
-  const int pagesize = inf_ttrace_page_dict.pagesize;
-  pid_t pid = ptid_get_pid (inferior_ptid);
-  CORE_ADDR page_addr;
-  int num_pages;
-  int page;
-
-  gdb_assert (type == hw_write);
-
-  page_addr = (addr / pagesize) * pagesize;
-  num_pages = (len + pagesize - 1) / pagesize;
-
-  for (page = 0; page < num_pages; page++, page_addr += pagesize)
-    inf_ttrace_remove_page (pid, page_addr);
-
-  return 1;
-}
-
-static int
-inf_ttrace_can_use_hw_breakpoint (struct target_ops *self,
-				  int type, int len, int ot)
-{
-  return (type == bp_hardware_watchpoint);
-}
-
-static int
-inf_ttrace_region_ok_for_hw_watchpoint (struct target_ops *self,
-					CORE_ADDR addr, int len)
-{
-  return 1;
-}
-
-/* Return non-zero if the current inferior was (potentially) stopped
-   by hitting a "hardware" watchpoint.  */
-
-static int
-inf_ttrace_stopped_by_watchpoint (struct target_ops *ops)
-{
-  pid_t pid = ptid_get_pid (inferior_ptid);
-  lwpid_t lwpid = ptid_get_lwp (inferior_ptid);
-  ttstate_t tts;
-
-  if (inf_ttrace_page_dict.count > 0)
-    {
-      if (ttrace (TT_LWP_GET_STATE, pid, lwpid,
-		  (uintptr_t)&tts, sizeof tts, 0) == -1)
-	perror_with_name (("ttrace"));
-
-      if (tts.tts_event == TTEVT_SIGNAL
-	  && tts.tts_u.tts_signal.tts_signo == SIGBUS)
-	{
-	  const int pagesize = inf_ttrace_page_dict.pagesize;
-	  void *addr = tts.tts_u.tts_signal.tts_siginfo.si_addr;
-	  CORE_ADDR page_addr = ((uintptr_t)addr / pagesize) * pagesize;
-
-	  if (inf_ttrace_get_page (pid, page_addr))
-	    return 1;
-	}
-    }
-
-  return 0;
-}
-\f
-
-/* Target hook for follow_fork.  On entry and at return inferior_ptid
-   is the ptid of the followed inferior.  */
-
-static int
-inf_ttrace_follow_fork (struct target_ops *ops, int follow_child,
-			int detach_fork)
-{
-  struct thread_info *tp = inferior_thread ();
-
-  gdb_assert (tp->pending_follow.kind == TARGET_WAITKIND_FORKED
-	      || tp->pending_follow.kind == TARGET_WAITKIND_VFORKED);
-
-  if (follow_child)
-    {
-      struct thread_info *ti;
-
-      /* The child will start out single-threaded.  */
-      inf_ttrace_num_lwps = 1;
-      inf_ttrace_num_lwps_in_syscall = 0;
-
-      ti = inferior_thread ();
-      ti->private =
-	xmalloc (sizeof (struct inf_ttrace_private_thread_info));
-      memset (ti->private, 0,
-	      sizeof (struct inf_ttrace_private_thread_info));
-    }
-  else
-    {
-      pid_t child_pid;
-
-      /* Following parent.  Detach child now.  */
-      child_pid = ptid_get_pid (tp->pending_follow.value.related_pid);
-      if (ttrace (TT_PROC_DETACH, child_pid, 0, 0, 0, 0) == -1)
-	perror_with_name (("ttrace"));
-    }
-
-  return 0;
-}
-\f
-
-/* File descriptors for pipes used as semaphores during initial
-   startup of an inferior.  */
-static int inf_ttrace_pfd1[2];
-static int inf_ttrace_pfd2[2];
-
-static void
-do_cleanup_pfds (void *dummy)
-{
-  close (inf_ttrace_pfd1[0]);
-  close (inf_ttrace_pfd1[1]);
-  close (inf_ttrace_pfd2[0]);
-  close (inf_ttrace_pfd2[1]);
-
-  unmark_fd_no_cloexec (inf_ttrace_pfd1[0]);
-  unmark_fd_no_cloexec (inf_ttrace_pfd1[1]);
-  unmark_fd_no_cloexec (inf_ttrace_pfd2[0]);
-  unmark_fd_no_cloexec (inf_ttrace_pfd2[1]);
-}
-
-static void
-inf_ttrace_prepare (void)
-{
-  if (pipe (inf_ttrace_pfd1) == -1)
-    perror_with_name (("pipe"));
-
-  if (pipe (inf_ttrace_pfd2) == -1)
-    {
-      close (inf_ttrace_pfd1[0]);
-      close (inf_ttrace_pfd2[0]);
-      perror_with_name (("pipe"));
-    }
-
-  mark_fd_no_cloexec (inf_ttrace_pfd1[0]);
-  mark_fd_no_cloexec (inf_ttrace_pfd1[1]);
-  mark_fd_no_cloexec (inf_ttrace_pfd2[0]);
-  mark_fd_no_cloexec (inf_ttrace_pfd2[1]);
-}
-
-/* Prepare to be traced.  */
-
-static void
-inf_ttrace_me (void)
-{
-  struct cleanup *old_chain = make_cleanup (do_cleanup_pfds, 0);
-  char c;
-
-  /* "Trace me, Dr. Memory!"  */
-  if (ttrace (TT_PROC_SETTRC, 0, 0, 0, TT_VERSION, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  /* Tell our parent that we are ready to be traced.  */
-  if (write (inf_ttrace_pfd1[1], &c, sizeof c) != sizeof c)
-    perror_with_name (("write"));
-
-  /* Wait until our parent has set the initial event mask.  */
-  if (read (inf_ttrace_pfd2[0], &c, sizeof c) != sizeof c)
-    perror_with_name (("read"));
-
-  do_cleanups (old_chain);
-}
-
-/* Start tracing PID.  */
-
-static void
-inf_ttrace_him (struct target_ops *ops, int pid)
-{
-  struct cleanup *old_chain = make_cleanup (do_cleanup_pfds, 0);
-  ttevent_t tte;
-  char c;
-
-  /* Wait until our child is ready to be traced.  */
-  if (read (inf_ttrace_pfd1[0], &c, sizeof c) != sizeof c)
-    perror_with_name (("read"));
-
-  /* Set the initial event mask.  */
-  memset (&tte, 0, sizeof (tte));
-  tte.tte_events |= TTEVT_EXEC | TTEVT_EXIT | TTEVT_FORK | TTEVT_VFORK;
-  tte.tte_events |= TTEVT_LWP_CREATE | TTEVT_LWP_EXIT | TTEVT_LWP_TERMINATE;
-#ifdef TTEVT_BPT_SSTEP
-  tte.tte_events |= TTEVT_BPT_SSTEP;
-#endif
-  tte.tte_opts |= TTEO_PROC_INHERIT;
-  if (ttrace (TT_PROC_SET_EVENT_MASK, pid, 0,
-	      (uintptr_t)&tte, sizeof tte, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  /* Tell our child that we have set the initial event mask.  */
-  if (write (inf_ttrace_pfd2[1], &c, sizeof c) != sizeof c)
-    perror_with_name (("write"));
-
-  do_cleanups (old_chain);
-
-  if (!target_is_pushed (ops))
-    push_target (ops);
-
-  startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
-
-  /* On some targets, there must be some explicit actions taken after
-     the inferior has been started up.  */
-  target_post_startup_inferior (pid_to_ptid (pid));
-}
-
-static void
-inf_ttrace_create_inferior (struct target_ops *ops, char *exec_file, 
-			    char *allargs, char **env, int from_tty)
-{
-  int pid;
-
-  gdb_assert (inf_ttrace_num_lwps == 0);
-  gdb_assert (inf_ttrace_num_lwps_in_syscall == 0);
-  gdb_assert (inf_ttrace_page_dict.count == 0);
-  gdb_assert (inf_ttrace_reenable_page_protections == 0);
-
-  pid = fork_inferior (exec_file, allargs, env, inf_ttrace_me, NULL,
-		       inf_ttrace_prepare, NULL, NULL);
-
-  inf_ttrace_him (ops, pid);
-}
-
-static void
-inf_ttrace_mourn_inferior (struct target_ops *ops)
-{
-  const int num_buckets = ARRAY_SIZE (inf_ttrace_page_dict.buckets);
-  int bucket;
-
-  inf_ttrace_num_lwps = 0;
-  inf_ttrace_num_lwps_in_syscall = 0;
-
-  for (bucket = 0; bucket < num_buckets; bucket++)
-    {
-      struct inf_ttrace_page *page;
-      struct inf_ttrace_page *next;
-
-      page = inf_ttrace_page_dict.buckets[bucket].next;
-      while (page)
-	{
-	  next = page->next;
-	  xfree (page);
-	  page = next;
-	}
-    }
-  inf_ttrace_page_dict.count = 0;
-
-  inf_child_mourn_inferior (ops);
-}
-
-/* Assuming we just attached the debugger to a new inferior, create
-   a new thread_info structure for each thread, and add it to our
-   list of threads.  */
-
-static void
-inf_ttrace_create_threads_after_attach (int pid)
-{
-  int status;
-  ptid_t ptid;
-  ttstate_t tts;
-  struct thread_info *ti;
-
-  status = ttrace (TT_PROC_GET_FIRST_LWP_STATE, pid, 0,
-		   (uintptr_t) &tts, sizeof (ttstate_t), 0);
-  if (status < 0)
-    perror_with_name (_("TT_PROC_GET_FIRST_LWP_STATE ttrace call failed"));
-  gdb_assert (tts.tts_pid == pid);
-
-  /* Add the stopped thread.  */
-  ptid = ptid_build (pid, tts.tts_lwpid, 0);
-  ti = add_thread (ptid);
-  ti->private = xzalloc (sizeof (struct inf_ttrace_private_thread_info));
-  inf_ttrace_num_lwps++;
-
-  /* We use the "first stopped thread" as the currently active thread.  */
-  inferior_ptid = ptid;
-
-  /* Iterative over all the remaining threads.  */
-
-  for (;;)
-    {
-      ptid_t ptid;
-
-      status = ttrace (TT_PROC_GET_NEXT_LWP_STATE, pid, 0,
-		       (uintptr_t) &tts, sizeof (ttstate_t), 0);
-      if (status < 0)
-	perror_with_name (_("TT_PROC_GET_NEXT_LWP_STATE ttrace call failed"));
-      if (status == 0)
-        break;  /* End of list.  */
-
-      ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
-      ti = add_thread (ptid);
-      ti->private = xzalloc (sizeof (struct inf_ttrace_private_thread_info));
-      inf_ttrace_num_lwps++;
-    }
-}
-
-static void
-inf_ttrace_attach (struct target_ops *ops, const char *args, int from_tty)
-{
-  char *exec_file;
-  pid_t pid;
-  ttevent_t tte;
-  struct inferior *inf;
-
-  pid = parse_pid_to_attach (args);
-
-  if (pid == getpid ())		/* Trying to masturbate?  */
-    error (_("I refuse to debug myself!"));
-
-  if (from_tty)
-    {
-      exec_file = get_exec_file (0);
-
-      if (exec_file)
-	printf_unfiltered (_("Attaching to program: %s, %s\n"), exec_file,
-			   target_pid_to_str (pid_to_ptid (pid)));
-      else
-	printf_unfiltered (_("Attaching to %s\n"),
-			   target_pid_to_str (pid_to_ptid (pid)));
-
-      gdb_flush (gdb_stdout);
-    }
-
-  gdb_assert (inf_ttrace_num_lwps == 0);
-  gdb_assert (inf_ttrace_num_lwps_in_syscall == 0);
-
-  if (ttrace (TT_PROC_ATTACH, pid, 0, TT_KILL_ON_EXIT, TT_VERSION, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  inf = current_inferior ();
-  inferior_appeared (inf, pid);
-  inf->attach_flag = 1;
-
-  /* Set the initial event mask.  */
-  memset (&tte, 0, sizeof (tte));
-  tte.tte_events |= TTEVT_EXEC | TTEVT_EXIT | TTEVT_FORK | TTEVT_VFORK;
-  tte.tte_events |= TTEVT_LWP_CREATE | TTEVT_LWP_EXIT | TTEVT_LWP_TERMINATE;
-#ifdef TTEVT_BPT_SSTEP
-  tte.tte_events |= TTEVT_BPT_SSTEP;
-#endif
-  tte.tte_opts |= TTEO_PROC_INHERIT;
-  if (ttrace (TT_PROC_SET_EVENT_MASK, pid, 0,
-	      (uintptr_t)&tte, sizeof tte, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  if (!target_is_pushed (ops))
-    push_target (ops);
-
-  inf_ttrace_create_threads_after_attach (pid);
-}
-
-static void
-inf_ttrace_detach (struct target_ops *ops, const char *args, int from_tty)
-{
-  pid_t pid = ptid_get_pid (inferior_ptid);
-  int sig = 0;
-
-  if (from_tty)
-    {
-      char *exec_file = get_exec_file (0);
-      if (exec_file == 0)
-	exec_file = "";
-      printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
-			 target_pid_to_str (pid_to_ptid (pid)));
-      gdb_flush (gdb_stdout);
-    }
-  if (args)
-    sig = atoi (args);
-
-  /* ??? The HP-UX 11.0 ttrace(2) manual page doesn't mention that we
-     can pass a signal number here.  Does this really work?  */
-  if (ttrace (TT_PROC_DETACH, pid, 0, 0, sig, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  inf_ttrace_num_lwps = 0;
-  inf_ttrace_num_lwps_in_syscall = 0;
-
-  inferior_ptid = null_ptid;
-  detach_inferior (pid);
-
-  inf_child_maybe_unpush_target (ops);
-}
-
-static void
-inf_ttrace_kill (struct target_ops *ops)
-{
-  pid_t pid = ptid_get_pid (inferior_ptid);
-
-  if (pid == 0)
-    return;
-
-  if (ttrace (TT_PROC_EXIT, pid, 0, 0, 0, 0) == -1)
-    perror_with_name (("ttrace"));
-  /* ??? Is it necessary to call ttrace_wait() here?  */
-
-  target_mourn_inferior ();
-}
-
-/* Check is a dying thread is dead by now, and delete it from GDBs
-   thread list if so.  */
-static int
-inf_ttrace_delete_dead_threads_callback (struct thread_info *info, void *arg)
-{
-  lwpid_t lwpid;
-  struct inf_ttrace_private_thread_info *p;
-
-  if (is_exited (info->ptid))
-    return 0;
-
-  lwpid = ptid_get_lwp (info->ptid);
-  p = (struct inf_ttrace_private_thread_info *) info->private;
-
-  /* Check if an lwp that was dying is still there or not.  */
-  if (p->dying && (kill (lwpid, 0) == -1))
-    /* It's gone now.  */
-    delete_thread (info->ptid);
-
-  return 0;
-}
-
-/* Resume the lwp pointed to by INFO, with REQUEST, and pass it signal
-   SIG.  */
-
-static void
-inf_ttrace_resume_lwp (struct thread_info *info, ttreq_t request, int sig)
-{
-  pid_t pid = ptid_get_pid (info->ptid);
-  lwpid_t lwpid = ptid_get_lwp (info->ptid);
-
-  if (ttrace (request, pid, lwpid, TT_NOPC, sig, 0) == -1)
-    {
-      struct inf_ttrace_private_thread_info *p
-	= (struct inf_ttrace_private_thread_info *) info->private;
-      if (p->dying && errno == EPROTO)
-	/* This is expected, it means the dying lwp is really gone
-	   by now.  If ttrace had an event to inform the debugger
-	   the lwp is really gone, this wouldn't be needed.  */
-	delete_thread (info->ptid);
-      else
-	/* This was really unexpected.  */
-	perror_with_name (("ttrace"));
-    }
-}
-
-/* Callback for iterate_over_threads.  */
-
-static int
-inf_ttrace_resume_callback (struct thread_info *info, void *arg)
-{
-  if (!ptid_equal (info->ptid, inferior_ptid) && !is_exited (info->ptid))
-    inf_ttrace_resume_lwp (info, TT_LWP_CONTINUE, 0);
-
-  return 0;
-}
-
-static void
-inf_ttrace_resume (struct target_ops *ops,
-		   ptid_t ptid, int step, enum gdb_signal signal)
-{
-  int resume_all;
-  ttreq_t request = step ? TT_LWP_SINGLE : TT_LWP_CONTINUE;
-  int sig = gdb_signal_to_host (signal);
-  struct thread_info *info;
-
-  /* A specific PTID means `step only this process id'.  */
-  resume_all = (ptid_equal (ptid, minus_one_ptid));
-
-  /* If resuming all threads, it's the current thread that should be
-     handled specially.  */
-  if (resume_all)
-    ptid = inferior_ptid;
-
-  info = find_thread_ptid (ptid);
-  inf_ttrace_resume_lwp (info, request, sig);
-
-  if (resume_all)
-    /* Let all the other threads run too.  */
-    iterate_over_threads (inf_ttrace_resume_callback, NULL);
-}
-
-static ptid_t
-inf_ttrace_wait (struct target_ops *ops,
-		 ptid_t ptid, struct target_waitstatus *ourstatus, int options)
-{
-  pid_t pid = ptid_get_pid (ptid);
-  lwpid_t lwpid = ptid_get_lwp (ptid);
-  ttstate_t tts;
-  struct thread_info *ti;
-  ptid_t related_ptid;
-
-  /* Until proven otherwise.  */
-  ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
-
-  if (pid == -1)
-    pid = lwpid = 0;
-
-  gdb_assert (pid != 0 || lwpid == 0);
-
-  do
-    {
-      set_sigint_trap ();
-
-      if (ttrace_wait (pid, lwpid, TTRACE_WAITOK, &tts, sizeof tts) == -1)
-	perror_with_name (("ttrace_wait"));
-
-      clear_sigint_trap ();
-    }
-  while (tts.tts_event == TTEVT_NONE);
-
-  /* Now that we've waited, we can re-enable the page protections.  */
-  if (inf_ttrace_reenable_page_protections)
-    {
-      gdb_assert (inf_ttrace_num_lwps_in_syscall == 0);
-      inf_ttrace_enable_page_protections (tts.tts_pid);
-      inf_ttrace_reenable_page_protections = 0;
-    }
-
-  ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
-
-  if (inf_ttrace_num_lwps == 0)
-    {
-      struct thread_info *ti;
-
-      inf_ttrace_num_lwps = 1;
-
-      /* This is the earliest we hear about the lwp member of
-	 INFERIOR_PTID, after an attach or fork_inferior.  */
-      gdb_assert (ptid_get_lwp (inferior_ptid) == 0);
-
-      /* We haven't set the private member on the main thread yet.  Do
-	 it now.  */
-      ti = find_thread_ptid (inferior_ptid);
-      gdb_assert (ti != NULL && ti->private == NULL);
-      ti->private =
-	xmalloc (sizeof (struct inf_ttrace_private_thread_info));
-      memset (ti->private, 0,
-	      sizeof (struct inf_ttrace_private_thread_info));
-
-      /* Notify the core that this ptid changed.  This changes
-	 inferior_ptid as well.  */
-      thread_change_ptid (inferior_ptid, ptid);
-    }
-
-  switch (tts.tts_event)
-    {
-#ifdef TTEVT_BPT_SSTEP
-    case TTEVT_BPT_SSTEP:
-      /* Make it look like a breakpoint.  */
-      ourstatus->kind = TARGET_WAITKIND_STOPPED;
-      ourstatus->value.sig = GDB_SIGNAL_TRAP;
-      break;
-#endif
-
-    case TTEVT_EXEC:
-      ourstatus->kind = TARGET_WAITKIND_EXECD;
-      ourstatus->value.execd_pathname =
-	xmalloc (tts.tts_u.tts_exec.tts_pathlen + 1);
-      if (ttrace (TT_PROC_GET_PATHNAME, tts.tts_pid, 0,
-		  (uintptr_t)ourstatus->value.execd_pathname,
-		  tts.tts_u.tts_exec.tts_pathlen, 0) == -1)
-	perror_with_name (("ttrace"));
-      ourstatus->value.execd_pathname[tts.tts_u.tts_exec.tts_pathlen] = 0;
-
-      /* At this point, all inserted breakpoints are gone.  Doing this
-	 as soon as we detect an exec prevents the badness of deleting
-	 a breakpoint writing the current "shadow contents" to lift
-	 the bp.  That shadow is NOT valid after an exec.  */
-      mark_breakpoints_out ();
-      break;
-
-    case TTEVT_EXIT:
-      store_waitstatus (ourstatus, tts.tts_u.tts_exit.tts_exitcode);
-      inf_ttrace_num_lwps = 0;
-      break;
-
-    case TTEVT_FORK:
-      related_ptid = ptid_build (tts.tts_u.tts_fork.tts_fpid,
-				 tts.tts_u.tts_fork.tts_flwpid, 0);
-
-      ourstatus->kind = TARGET_WAITKIND_FORKED;
-      ourstatus->value.related_pid = related_ptid;
-
-      /* Make sure the other end of the fork is stopped too.  */
-      if (ttrace_wait (tts.tts_u.tts_fork.tts_fpid,
-		       tts.tts_u.tts_fork.tts_flwpid,
-		       TTRACE_WAITOK, &tts, sizeof tts) == -1)
-	perror_with_name (("ttrace_wait"));
-
-      gdb_assert (tts.tts_event == TTEVT_FORK);
-      if (tts.tts_u.tts_fork.tts_isparent)
-	{
-	  related_ptid = ptid_build (tts.tts_u.tts_fork.tts_fpid,
-				     tts.tts_u.tts_fork.tts_flwpid, 0);
-	  ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
-	  ourstatus->value.related_pid = related_ptid;
-	}
-      break;
-
-    case TTEVT_VFORK:
-      if (tts.tts_u.tts_fork.tts_isparent)
-	ourstatus->kind = TARGET_WAITKIND_VFORK_DONE;
-      else
-	{
-	  related_ptid = ptid_build (tts.tts_u.tts_fork.tts_fpid,
-				     tts.tts_u.tts_fork.tts_flwpid, 0);
-
-	  ourstatus->kind = TARGET_WAITKIND_VFORKED;
-	  ourstatus->value.related_pid = related_ptid;
-	}
-      break;
-
-    case TTEVT_LWP_CREATE:
-      lwpid = tts.tts_u.tts_thread.tts_target_lwpid;
-      ptid = ptid_build (tts.tts_pid, lwpid, 0);
-      ti = add_thread (ptid);
-      ti->private =
-	xmalloc (sizeof (struct inf_ttrace_private_thread_info));
-      memset (ti->private, 0,
-	      sizeof (struct inf_ttrace_private_thread_info));
-      inf_ttrace_num_lwps++;
-      ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
-      /* Let the lwp_create-caller thread continue.  */
-      ttrace (TT_LWP_CONTINUE, ptid_get_pid (ptid),
-              ptid_get_lwp (ptid), TT_NOPC, 0, 0);
-      /* Return without stopping the whole process.  */
-      ourstatus->kind = TARGET_WAITKIND_IGNORE;
-      return ptid;
-
-    case TTEVT_LWP_EXIT:
-      if (print_thread_events)
-	printf_unfiltered (_("[%s exited]\n"), target_pid_to_str (ptid));
-      ti = find_thread_ptid (ptid);
-      gdb_assert (ti != NULL);
-      ((struct inf_ttrace_private_thread_info *)ti->private)->dying = 1;
-      inf_ttrace_num_lwps--;
-      /* Let the thread really exit.  */
-      ttrace (TT_LWP_CONTINUE, ptid_get_pid (ptid),
-              ptid_get_lwp (ptid), TT_NOPC, 0, 0);
-      /* Return without stopping the whole process.  */
-      ourstatus->kind = TARGET_WAITKIND_IGNORE;
-      return ptid;
-
-    case TTEVT_LWP_TERMINATE:
-      lwpid = tts.tts_u.tts_thread.tts_target_lwpid;
-      ptid = ptid_build (tts.tts_pid, lwpid, 0);
-      if (print_thread_events)
-	printf_unfiltered(_("[%s has been terminated]\n"),
-			  target_pid_to_str (ptid));
-      ti = find_thread_ptid (ptid);
-      gdb_assert (ti != NULL);
-      ((struct inf_ttrace_private_thread_info *)ti->private)->dying = 1;
-      inf_ttrace_num_lwps--;
-
-      /* Resume the lwp_terminate-caller thread.  */
-      ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
-      ttrace (TT_LWP_CONTINUE, ptid_get_pid (ptid),
-              ptid_get_lwp (ptid), TT_NOPC, 0, 0);
-      /* Return without stopping the whole process.  */
-      ourstatus->kind = TARGET_WAITKIND_IGNORE;
-      return ptid;
-
-    case TTEVT_SIGNAL:
-      ourstatus->kind = TARGET_WAITKIND_STOPPED;
-      ourstatus->value.sig =
-	gdb_signal_from_host (tts.tts_u.tts_signal.tts_signo);
-      break;
-
-    case TTEVT_SYSCALL_ENTRY:
-      gdb_assert (inf_ttrace_reenable_page_protections == 0);
-      inf_ttrace_num_lwps_in_syscall++;
-      if (inf_ttrace_num_lwps_in_syscall == 1)
-	{
-	  /* A thread has just entered a system call.  Disable any
-             page protections as the kernel can't deal with them.  */
-	  inf_ttrace_disable_page_protections (tts.tts_pid);
-	}
-      ourstatus->kind = TARGET_WAITKIND_SYSCALL_ENTRY;
-      ourstatus->value.syscall_number = tts.tts_scno;
-      break;
-
-    case TTEVT_SYSCALL_RETURN:
-      if (inf_ttrace_num_lwps_in_syscall > 0)
-	{
-	  /* If the last thread has just left the system call, this
-	     would be a logical place to re-enable the page
-	     protections, but that doesn't work.  We can't re-enable
-	     them until we've done another wait.  */
-	  inf_ttrace_reenable_page_protections = 
-	    (inf_ttrace_num_lwps_in_syscall == 1);
-	  inf_ttrace_num_lwps_in_syscall--;
-	}
-      ourstatus->kind = TARGET_WAITKIND_SYSCALL_RETURN;
-      ourstatus->value.syscall_number = tts.tts_scno;
-      break;
-
-    default:
-      gdb_assert (!"Unexpected ttrace event");
-      break;
-    }
-
-  /* Make sure all threads within the process are stopped.  */
-  if (ttrace (TT_PROC_STOP, tts.tts_pid, 0, 0, 0, 0) == -1)
-    perror_with_name (("ttrace"));
-
-  /* Now that the whole process is stopped, check if any dying thread
-     is really dead by now.  If a dying thread is still alive, it will
-     be stopped too, and will still show up in `info threads', tagged
-     with "(Exiting)".  We could make `info threads' prune dead
-     threads instead via inf_ttrace_thread_alive, but doing this here
-     has the advantage that a frontend is notificed sooner of thread
-     exits.  Note that a dying lwp is still alive, it still has to be
-     resumed, like any other lwp.  */
-  iterate_over_threads (inf_ttrace_delete_dead_threads_callback, NULL);
-
-  return ptid;
-}
-
-/* Transfer LEN bytes from ADDR in the inferior's memory into READBUF,
-   and transfer LEN bytes from WRITEBUF into the inferior's memory at
-   ADDR.  Either READBUF or WRITEBUF may be null, in which case the
-   corresponding transfer doesn't happen.  Return the number of bytes
-   actually transferred (which may be zero if an error occurs).  */
-
-static LONGEST
-inf_ttrace_xfer_memory (CORE_ADDR addr, ULONGEST len,
-			void *readbuf, const void *writebuf)
-{
-  pid_t pid = ptid_get_pid (inferior_ptid);
-
-  /* HP-UX treats text space and data space differently.  GDB however,
-     doesn't really know the difference.  Therefore we try both.  Try
-     text space before data space though because when we're writing
-     into text space the instruction cache might need to be flushed.  */
-
-  if (readbuf
-      && ttrace (TT_PROC_RDTEXT, pid, 0, addr, len, (uintptr_t)readbuf) == -1
-      && ttrace (TT_PROC_RDDATA, pid, 0, addr, len, (uintptr_t)readbuf) == -1)
-    return 0;
-
-  if (writebuf
-      && ttrace (TT_PROC_WRTEXT, pid, 0, addr, len, (uintptr_t)writebuf) == -1
-      && ttrace (TT_PROC_WRDATA, pid, 0, addr, len, (uintptr_t)writebuf) == -1)
-    return 0;
-
-  return len;
-}
-
-static enum target_xfer_status
-inf_ttrace_xfer_partial (struct target_ops *ops, enum target_object object,
-			 const char *annex, gdb_byte *readbuf,
-			 const gdb_byte *writebuf,
-			 ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
-{
-  switch (object)
-    {
-    case TARGET_OBJECT_MEMORY:
-      {
-	LONGEST val = inf_ttrace_xfer_memory (offset, len, readbuf, writebuf);
-
-	if (val == 0)
-	  return TARGET_XFER_EOF;
-	else
-	  {
-	    *xfered_len = (ULONGEST) val;
-	    return TARGET_XFER_OK;
-	  }
-      }
-
-    case TARGET_OBJECT_UNWIND_TABLE:
-      return TARGET_XFER_E_IO;
-
-    case TARGET_OBJECT_AUXV:
-      return TARGET_XFER_E_IO;
-
-    case TARGET_OBJECT_WCOOKIE:
-      return TARGET_XFER_E_IO;
-
-    default:
-      return TARGET_XFER_E_IO;
-    }
-}
-
-/* Print status information about what we're accessing.  */
-
-static void
-inf_ttrace_files_info (struct target_ops *ignore)
-{
-  struct inferior *inf = current_inferior ();
-  printf_filtered (_("\tUsing the running image of %s %s.\n"),
-		   inf->attach_flag ? "attached" : "child",
-		   target_pid_to_str (inferior_ptid));
-}
-
-static int
-inf_ttrace_thread_alive (struct target_ops *ops, ptid_t ptid)
-{
-  return 1;
-}
-
-/* Return a string describing the state of the thread specified by
-   INFO.  */
-
-static char *
-inf_ttrace_extra_thread_info (struct target_ops *self,
-			      struct thread_info *info)
-{
-  struct inf_ttrace_private_thread_info* private =
-    (struct inf_ttrace_private_thread_info *) info->private;
-
-  if (private != NULL && private->dying)
-    return "Exiting";
-
-  return NULL;
-}
-
-static char *
-inf_ttrace_pid_to_str (struct target_ops *ops, ptid_t ptid)
-{
-  pid_t pid = ptid_get_pid (ptid);
-  lwpid_t lwpid = ptid_get_lwp (ptid);
-  static char buf[128];
-
-  if (lwpid == 0)
-    xsnprintf (buf, sizeof buf, "process %ld",
-	       (long) pid);
-  else
-    xsnprintf (buf, sizeof buf, "process %ld, lwp %ld",
-	       (long) pid, (long) lwpid);
-  return buf;
-}
-\f
-
-/* Implement the get_ada_task_ptid target_ops method.  */
-
-static ptid_t
-inf_ttrace_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
-{
-  return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
-}
-
-\f
-struct target_ops *
-inf_ttrace_target (void)
-{
-  struct target_ops *t = inf_child_target ();
-
-  t->to_attach = inf_ttrace_attach;
-  t->to_detach = inf_ttrace_detach;
-  t->to_resume = inf_ttrace_resume;
-  t->to_wait = inf_ttrace_wait;
-  t->to_files_info = inf_ttrace_files_info;
-  t->to_can_use_hw_breakpoint = inf_ttrace_can_use_hw_breakpoint;
-  t->to_insert_watchpoint = inf_ttrace_insert_watchpoint;
-  t->to_remove_watchpoint = inf_ttrace_remove_watchpoint;
-  t->to_stopped_by_watchpoint = inf_ttrace_stopped_by_watchpoint;
-  t->to_region_ok_for_hw_watchpoint =
-    inf_ttrace_region_ok_for_hw_watchpoint;
-  t->to_kill = inf_ttrace_kill;
-  t->to_create_inferior = inf_ttrace_create_inferior;
-  t->to_follow_fork = inf_ttrace_follow_fork;
-  t->to_mourn_inferior = inf_ttrace_mourn_inferior;
-  t->to_thread_alive = inf_ttrace_thread_alive;
-  t->to_extra_thread_info = inf_ttrace_extra_thread_info;
-  t->to_pid_to_str = inf_ttrace_pid_to_str;
-  t->to_xfer_partial = inf_ttrace_xfer_partial;
-  t->to_get_ada_task_ptid = inf_ttrace_get_ada_task_ptid;
-
-  return t;
-}
-#endif
-\f
-
-/* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_inf_ttrace (void);
-
-void
-_initialize_inf_ttrace (void)
-{
-#ifdef HAVE_TTRACE
-  inf_ttrace_page_dict.pagesize = getpagesize();
-#endif
-}
diff --git a/gdb/inf-ttrace.h b/gdb/inf-ttrace.h
deleted file mode 100644
index 5090298..0000000
--- a/gdb/inf-ttrace.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Low-level child interface to ttrace.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef INF_TTRACE_H
-#define INF_TTRACE_H
-
-/* Create a prototype ttrace target.  The client can override it with
-   local methods.  */
-
-extern struct target_ops *inf_ttrace_target (void);
-
-#endif
diff --git a/gdb/solib-ia64-hpux.c b/gdb/solib-ia64-hpux.c
deleted file mode 100644
index a718f14..0000000
--- a/gdb/solib-ia64-hpux.c
+++ /dev/null
@@ -1,701 +0,0 @@
-/* Copyright (C) 2010-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "ia64-tdep.h"
-#include "ia64-hpux-tdep.h"
-#include "solib-ia64-hpux.h"
-#include "solist.h"
-#include "solib.h"
-#include "target.h"
-#include "gdbtypes.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include "opcode/ia64.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "elf-bfd.h"
-
-/* Need to define the following macro in order to get the complete
-   load_module_desc struct definition in dlfcn.h  Otherwise, it doesn't
-   match the size of the struct the loader is providing us during load
-   events.  */
-#define _LOAD_MODULE_DESC_EXT
-
-#include <sys/ttrace.h>
-#include <dlfcn.h>
-#include <elf.h>
-#include <service_mgr.h>
-
-/* The following is to have access to the definition of type load_info_t.  */
-#include <crt0.h>
-
-/* The r32 pseudo-register number.
-
-   Like all stacked registers, r32 is treated as a pseudo-register,
-   because it is not always available for read/write via the ttrace
-   interface.  */
-/* This is a bit of a hack, as we duplicate something hidden inside
-   ia64-tdep.c, but oh well...  */
-#define IA64_R32_PSEUDO_REGNUM (IA64_NAT127_REGNUM + 2)
-
-/* Our struct so_list private data structure.  */
-
-struct lm_info
-{
-  /* The shared library module descriptor.  We extract this structure
-     from the loader at the time the shared library gets mapped.  */
-  struct load_module_desc module_desc;
-
-  /* The text segment address as defined in the shared library object
-     (this is not the address where this segment got loaded).  This
-     field is initially set to zero, and computed lazily.  */
-  CORE_ADDR text_start;
-
-  /* The data segment address as defined in the shared library object
-     (this is not the address where this segment got loaded).  This
-     field is initially set to zero, and computed lazily.  */
-  CORE_ADDR data_start;
-};
-
-/* The list of shared libraries currently mapped by the inferior.  */
-
-static struct so_list *so_list_head = NULL;
-
-/* Create a new so_list element.  The result should be deallocated
-   when no longer in use.  */
-
-static struct so_list *
-new_so_list (char *so_name, struct load_module_desc module_desc)
-{
-  struct so_list *new_so;
-
-  new_so = (struct so_list *) XCNEW (struct so_list);
-  new_so->lm_info = (struct lm_info *) XCNEW (struct lm_info);
-  new_so->lm_info->module_desc = module_desc;
-
-  strncpy (new_so->so_name, so_name, SO_NAME_MAX_PATH_SIZE - 1);
-  new_so->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
-  strcpy (new_so->so_original_name, new_so->so_name);
-
-  return new_so;
-}
-
-/* Return non-zero if the instruction at the current PC is a breakpoint
-   part of the dynamic loading process.
-
-   We identify such instructions by checking that the instruction at
-   the current pc is a break insn where no software breakpoint has been
-   inserted by us.  We also verify that the operands have specific
-   known values, to be extra certain.
-
-   PTID is the ptid of the thread that should be checked, but this
-   function also assumes that inferior_ptid is already equal to PTID.
-   Ideally, we would like to avoid the requirement on inferior_ptid,
-   but many routines still use the inferior_ptid global to access
-   the relevant thread's register and memory.  We still have the ptid
-   as parameter to be able to pass it to the routines that do take a ptid
-   - that way we avoid increasing explicit uses of the inferior_ptid
-   global.  */
-
-static int
-ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid)
-{
-  struct regcache *regcache = get_thread_regcache (ptid);
-  CORE_ADDR pc = regcache_read_pc (regcache);
-  struct address_space *aspace = get_regcache_aspace (regcache);
-  ia64_insn t0, t1, slot[3], template, insn;
-  int slotnum;
-  bfd_byte bundle[16];
-
-  /* If this is a regular breakpoint, then it can not be a dld one.  */
-  if (breakpoint_inserted_here_p (aspace, pc))
-    return 0;
-
-  slotnum = ((long) pc) & 0xf;
-  if (slotnum > 2)
-    internal_error (__FILE__, __LINE__,
-		    "invalid slot (%d) for address %s", slotnum,
-		    paddress (get_regcache_arch (regcache), pc));
-
-  pc -= (pc & 0xf);
-  read_memory (pc, bundle, sizeof (bundle));
-
-  /* bundles are always in little-endian byte order */
-  t0 = bfd_getl64 (bundle);
-  t1 = bfd_getl64 (bundle + 8);
-  template = (t0 >> 1) & 0xf;
-  slot[0] = (t0 >>  5) & 0x1ffffffffffLL;
-  slot[1] = ((t0 >> 46) & 0x3ffff) | ((t1 & 0x7fffff) << 18);
-  slot[2] = (t1 >> 23) & 0x1ffffffffffLL;
-
-  if (template == 2 && slotnum == 1)
-    {
-      /* skip L slot in MLI template: */
-      slotnum = 2;
-    }
-
-  insn = slot[slotnum];
-
-  return (insn == 0x1c0c9c0       /* break.i 0x070327 */
-          || insn == 0x3c0c9c0);  /* break.i 0x0f0327 */
-}
-
-/* Same as ia64_hpux_at_dld_breakpoint_1_p above, with the following
-   differences: It temporarily sets inferior_ptid to PTID, and also
-   contains any exception being raised.  */
-
-int
-ia64_hpux_at_dld_breakpoint_p (ptid_t ptid)
-{
-  volatile struct gdb_exception e;
-  ptid_t saved_ptid = inferior_ptid;
-  int result = 0;
-
-  inferior_ptid = ptid;
-  TRY_CATCH (e, RETURN_MASK_ALL)
-    {
-      result = ia64_hpux_at_dld_breakpoint_1_p (ptid);
-    }
-  inferior_ptid = saved_ptid;
-  if (e.reason < 0)
-    warning (_("error while checking for dld breakpoint: %s"), e.message);
-
-  return result;
-}
-
-/* Handler for library load event: Read the information provided by
-   the loader, and then use it to read the shared library symbols.  */
-
-static void
-ia64_hpux_handle_load_event (struct regcache *regcache)
-{
-  CORE_ADDR module_desc_addr;
-  ULONGEST module_desc_size;
-  CORE_ADDR so_path_addr;
-  char so_path[PATH_MAX];
-  struct load_module_desc module_desc;
-  struct so_list *new_so;
-
-  /* Extract the data provided by the loader as follow:
-       - r33: Address of load_module_desc structure
-       - r34: size of struct load_module_desc
-       - r35: Address of string holding shared library path
-   */
-  regcache_cooked_read_unsigned (regcache, IA64_R32_PSEUDO_REGNUM + 1,
-                                 &module_desc_addr);
-  regcache_cooked_read_unsigned (regcache, IA64_R32_PSEUDO_REGNUM + 2,
-                                 &module_desc_size);
-  regcache_cooked_read_unsigned (regcache, IA64_R32_PSEUDO_REGNUM + 3,
-                                 &so_path_addr);
-
-  if (module_desc_size != sizeof (struct load_module_desc))
-    warning (_("load_module_desc size (%ld) != size returned by kernel (%s)"),
-             sizeof (struct load_module_desc),
-	     pulongest (module_desc_size));
-
-  read_memory_string (so_path_addr, so_path, PATH_MAX);
-  read_memory (module_desc_addr, (gdb_byte *) &module_desc,
-	       sizeof (module_desc));
-
-  /* Create a new so_list element and insert it at the start of our
-     so_list_head (we insert at the start of the list only because
-     it is less work compared to inserting it elsewhere).  */
-  new_so = new_so_list (so_path, module_desc);
-  new_so->next = so_list_head;
-  so_list_head = new_so;
-}
-
-/* Update the value of the PC to point to the begining of the next
-   instruction bundle.  */
-
-static void
-ia64_hpux_move_pc_to_next_bundle (struct regcache *regcache)
-{
-  CORE_ADDR pc = regcache_read_pc (regcache);
-
-  pc -= pc & 0xf;
-  pc += 16;
-  ia64_write_pc (regcache, pc);
-}
-
-/* Handle loader events.
-
-   PTID is the ptid of the thread corresponding to the event being
-   handled.  Similarly to ia64_hpux_at_dld_breakpoint_1_p, this
-   function assumes that inferior_ptid is set to PTID.  */
-
-static void
-ia64_hpux_handle_dld_breakpoint_1 (ptid_t ptid)
-{
-  struct regcache *regcache = get_thread_regcache (ptid);
-  ULONGEST arg0;
-
-  /* The type of event is provided by the loaded via r32.  */
-  regcache_cooked_read_unsigned (regcache, IA64_R32_PSEUDO_REGNUM, &arg0);
-  switch (arg0)
-    {
-      case BREAK_DE_SVC_LOADED:
-	/* Currently, the only service loads are uld and dld,
-	   so we shouldn't need to do anything.  Just ignore.  */
-	break;
-      case BREAK_DE_LIB_LOADED:
-	ia64_hpux_handle_load_event (regcache);
-	solib_add (NULL, 0, &current_target, auto_solib_add);
-	break;
-      case BREAK_DE_LIB_UNLOADED:
-      case BREAK_DE_LOAD_COMPLETE:
-      case BREAK_DE_BOR:
-	/* Ignore for now.  */
-	break;
-    }
-
-  /* Now that we have handled the event, we can move the PC to
-     the next instruction bundle, past the break instruction.  */
-  ia64_hpux_move_pc_to_next_bundle (regcache);
-}
-
-/* Same as ia64_hpux_handle_dld_breakpoint_1 above, with the following
-   differences: This function temporarily sets inferior_ptid to PTID,
-   and also contains any exception.  */
-
-void
-ia64_hpux_handle_dld_breakpoint (ptid_t ptid)
-{
-  volatile struct gdb_exception e;
-  ptid_t saved_ptid = inferior_ptid;
-
-  inferior_ptid = ptid;
-  TRY_CATCH (e, RETURN_MASK_ALL)
-    {
-      ia64_hpux_handle_dld_breakpoint_1 (ptid);
-    }
-  inferior_ptid = saved_ptid;
-  if (e.reason < 0)
-    warning (_("error detected while handling dld breakpoint: %s"), e.message);
-}
-
-/* Find the address of the code and data segments in ABFD, and update
-   TEXT_START and DATA_START accordingly.  */
-
-static void
-ia64_hpux_find_start_vma (bfd *abfd, CORE_ADDR *text_start,
-                          CORE_ADDR *data_start)
-{
-  Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
-  Elf64_Phdr phdr;
-  int i;
-
-  *text_start = 0;
-  *data_start = 0;
-
-  if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) == -1)
-    error (_("invalid program header offset in %s"), abfd->filename);
-
-  for (i = 0; i < i_ehdrp->e_phnum; i++)
-    {
-      if (bfd_bread (&phdr, sizeof (phdr), abfd) != sizeof (phdr))
-        error (_("failed to read segment %d in %s"), i, abfd->filename);
-
-      if (phdr.p_flags & PF_X
-          && (*text_start == 0 || phdr.p_vaddr < *text_start))
-        *text_start = phdr.p_vaddr;
-
-      if (phdr.p_flags & PF_W
-          && (*data_start == 0 || phdr.p_vaddr < *data_start))
-        *data_start = phdr.p_vaddr;
-    }
-}
-
-/* The "relocate_section_addresses" target_so_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_relocate_section_addresses (struct so_list *so,
-				      struct target_section *sec)
-{
-  CORE_ADDR offset = 0;
-
-  /* If we haven't computed the text & data segment addresses, do so now.
-     We do this here, because we now have direct access to the associated
-     bfd, whereas we would have had to open our own if we wanted to do it
-     while processing the library-load event.  */
-  if (so->lm_info->text_start == 0 && so->lm_info->data_start == 0)
-    ia64_hpux_find_start_vma (sec->the_bfd_section->owner,
-			      &so->lm_info->text_start,
-			      &so->lm_info->data_start);
-
-  /* Determine the relocation offset based on which segment
-     the section belongs to.  */
-  if ((so->lm_info->text_start < so->lm_info->data_start
-       && sec->addr < so->lm_info->data_start)
-      || (so->lm_info->text_start > so->lm_info->data_start
-          && sec->addr >= so->lm_info->text_start))
-    offset = so->lm_info->module_desc.text_base - so->lm_info->text_start;
-  else if ((so->lm_info->text_start < so->lm_info->data_start
-            && sec->addr >= so->lm_info->data_start)
-           || (so->lm_info->text_start > so->lm_info->data_start
-	       && sec->addr < so->lm_info->text_start))
-    offset = so->lm_info->module_desc.data_base - so->lm_info->data_start;
-
-  /* And now apply the relocation.  */
-  sec->addr += offset;
-  sec->endaddr += offset;
-
-  /* Best effort to set addr_high/addr_low.  This is used only by
-     'info sharedlibrary'.  */
-  if (so->addr_low == 0 || sec->addr < so->addr_low)
-    so->addr_low = sec->addr;
-
-  if (so->addr_high == 0 || sec->endaddr > so->addr_high)
-    so->addr_high = sec->endaddr;
-}
-
-/* The "free_so" target_so_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_free_so (struct so_list *so)
-{
-  xfree (so->lm_info);
-}
-
-/* The "clear_solib" target_so_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_clear_solib (void)
-{
-  struct so_list *so;
-
-  while (so_list_head != NULL)
-    {
-      so = so_list_head;
-      so_list_head = so_list_head->next;
-
-      ia64_hpux_free_so (so);
-      xfree (so);
-    }
-}
-
-/* Assuming the inferior just stopped on an EXEC event, return
-   the address of the load_info_t structure.  */
-
-static CORE_ADDR
-ia64_hpux_get_load_info_addr (void)
-{
-  struct type *data_ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
-  CORE_ADDR addr;
-  int status;
-
-  /* The address of the load_info_t structure is stored in the 4th
-     argument passed to the initial thread of the process (in other
-     words, in argv[3]).  So get the address of these arguments,
-     and extract the 4th one.  */
-  status = ttrace (TT_PROC_GET_ARGS, ptid_get_pid (inferior_ptid),
-		   0, (uintptr_t) &addr, sizeof (CORE_ADDR), 0);
-  if (status == -1 && errno)
-    perror_with_name (_("Unable to get argument list"));
-  return (read_memory_typed_address (addr + 3 * 8, data_ptr_type));
-}
-
-/* A structure used to aggregate some information extracted from
-   the dynamic section of the main executable.  */
-
-struct dld_info
-{
-  ULONGEST dld_flags;
-  CORE_ADDR load_map;
-};
-
-/* Scan the ".dynamic" section referenced by ABFD and DYN_SECT,
-   and extract the information needed to fill in INFO.  */
-
-static void
-ia64_hpux_read_dynamic_info (struct gdbarch *gdbarch, bfd *abfd,
-			     asection *dyn_sect, struct dld_info *info)
-{
-  int sect_size;
-  char *buf;
-  char *buf_end;
-
-  /* Make sure that info always has initialized data, even if we fail
-     to read the syn_sect section.  */
-  memset (info, 0, sizeof (struct dld_info));
-
-  sect_size = bfd_section_size (abfd, dyn_sect);
-  buf = alloca (sect_size);
-  buf_end = buf + sect_size;
-
-  if (bfd_seek (abfd, dyn_sect->filepos, SEEK_SET) != 0
-      || bfd_bread (buf, sect_size, abfd) != sect_size)
-    error (_("failed to read contents of .dynamic section"));
-
-  for (; buf < buf_end; buf += sizeof (Elf64_Dyn))
-    {
-      Elf64_Dyn *dynp = (Elf64_Dyn *) buf;
-      Elf64_Sxword d_tag;
-
-      d_tag = bfd_h_get_64 (abfd, &dynp->d_tag);
-      switch (d_tag)
-        {
-          case DT_HP_DLD_FLAGS:
-            info->dld_flags = bfd_h_get_64 (abfd, &dynp->d_un);
-            break;
-
-          case DT_HP_LOAD_MAP:
-            {
-              CORE_ADDR load_map_addr = bfd_h_get_64 (abfd, &dynp->d_un.d_ptr);
-
-              if (target_read_memory (load_map_addr,
-				      (gdb_byte *) &info->load_map,
-                                      sizeof (info->load_map)) != 0)
-		error (_("failed to read load map at %s"),
-		       paddress (gdbarch, load_map_addr));
-            }
-            break;
-        }
-    }
-}
-
-/* Wrapper around target_read_memory used with libdl.  */
-
-static void *
-ia64_hpux_read_tgt_mem (void *buffer, uint64_t ptr, size_t bufsiz, int ident)
-{
-  if (target_read_memory (ptr, (gdb_byte *) buffer, bufsiz) != 0)
-    return 0;
-  else
-    return buffer;
-}
-
-/* Create a new so_list object for a shared library, and store that
-   new so_list object in our SO_LIST_HEAD list.
-
-   SO_INDEX is an index specifying the placement of the loaded shared
-   library in the dynamic loader's search list.  Normally, this index
-   is strictly positive, but an index of -1 refers to the loader itself.
-
-   Return nonzero if the so_list object could be created.  A null
-   return value with a positive SO_INDEX normally means that there are
-   no more entries in the dynamic loader's search list at SO_INDEX or
-   beyond.  */
-
-static int
-ia64_hpux_add_so_from_dld_info (struct dld_info info, int so_index)
-{
-  struct load_module_desc module_desc;
-  uint64_t so_handle;
-  char *so_path;
-  struct so_list *so;
-
-  so_handle = dlgetmodinfo (so_index, &module_desc, sizeof (module_desc),
-			    ia64_hpux_read_tgt_mem, 0, info.load_map);
-
-  if (so_handle == 0)
-    /* No such entry.  We probably reached the end of the list.  */
-    return 0;
-
-  so_path = dlgetname (&module_desc, sizeof (module_desc),
-                       ia64_hpux_read_tgt_mem, 0, info.load_map);
-  if (so_path == NULL)
-    {
-      /* Should never happen, but let's not crash if it does.  */
-      warning (_("unable to get shared library name, symbols not loaded"));
-      return 0;
-    }
-
-  /* Create a new so_list and insert it at the start of our list.
-     The order is not extremely important, but it's less work to do so
-     at the end of the list.  */
-  so = new_so_list (so_path, module_desc);
-  so->next = so_list_head;
-  so_list_head = so;
-
-  return 1;
-}
-
-/* Assuming we just attached to a process, update our list of shared
-   libraries (SO_LIST_HEAD) as well as GDB's list.  */
-
-static void
-ia64_hpux_solib_add_after_attach (void)
-{
-  bfd *abfd;
-  asection *dyn_sect;
-  struct dld_info info;
-  int i;
-
-  if (symfile_objfile == NULL)
-    return;
-
-  abfd = symfile_objfile->obfd;
-  dyn_sect = bfd_get_section_by_name (abfd, ".dynamic");
-
-  if (dyn_sect == NULL || bfd_section_size (abfd, dyn_sect) == 0)
-    return;
-
-  ia64_hpux_read_dynamic_info (get_objfile_arch (symfile_objfile), abfd,
-			       dyn_sect, &info);
-
-  if ((info.dld_flags & DT_HP_DEBUG_PRIVATE) == 0)
-    {
-      warning (_(
-"The shared libraries were not privately mapped; setting a breakpoint\n\
-in a shared library will not work until you rerun the program.\n\
-Use the following command to enable debugging of shared libraries.\n\
-chatr +dbg enable a.out"));
-    }
-
-  /* Read the symbols of the dynamic loader (dld.so).  */
-  ia64_hpux_add_so_from_dld_info (info, -1);
-
-  /* Read the symbols of all the other shared libraries.  */
-  for (i = 1; ; i++)
-    if (!ia64_hpux_add_so_from_dld_info (info, i))
-      break;  /* End of list.  */
-
-  /* Resync the library list at the core level.  */
-  solib_add (NULL, 1, &current_target, auto_solib_add);
-}
-
-/* The "create_inferior_hook" target_so_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_solib_create_inferior_hook (int from_tty)
-{
-  CORE_ADDR load_info_addr;
-  load_info_t load_info;
-
-  /* Initially, we were thinking about adding a check that the program
-     (accessible through symfile_objfile) was linked against some shared
-     libraries, by searching for a ".dynamic" section.  However, could
-     this break in the case of a statically linked program that later
-     uses dlopen?  Programs that are fully statically linked are very
-     rare, and we will worry about them when we encounter one that
-     causes trouble.  */
-
-  /* Set the LI_TRACE flag in the load_info_t structure.  This enables
-     notifications when shared libraries are being mapped.  */
-  load_info_addr = ia64_hpux_get_load_info_addr ();
-  read_memory (load_info_addr, (gdb_byte *) &load_info, sizeof (load_info));
-  load_info.li_flags |= LI_TRACE;
-  write_memory (load_info_addr, (gdb_byte *) &load_info, sizeof (load_info));
-
-  /* If we just attached to our process, some shard libraries have
-     already been mapped.  Find which ones they are...  */
-  if (current_inferior ()->attach_flag)
-    ia64_hpux_solib_add_after_attach ();
-}
-
-/* The "special_symbol_handling" target_so_ops routine for ia64-hpux.  */
-
-static void
-ia64_hpux_special_symbol_handling (void)
-{
-  /* Nothing to do.  */
-}
-
-/* The "current_sos" target_so_ops routine for ia64-hpux.  */
-
-static struct so_list *
-ia64_hpux_current_sos (void)
-{
-  /* Return a deep copy of our own list.  */
-  struct so_list *new_head = NULL, *prev_new_so = NULL;
-  struct so_list *our_so;
-
-  for (our_so = so_list_head; our_so != NULL; our_so = our_so->next)
-    {
-      struct so_list *new_so;
-
-      new_so = new_so_list (our_so->so_name, our_so->lm_info->module_desc);
-      if (prev_new_so != NULL)
-        prev_new_so->next = new_so;
-      prev_new_so = new_so;
-      if (new_head == NULL)
-        new_head = new_so;
-    }
-
-  return new_head;
-}
-
-/* The "open_symbol_file_object" target_so_ops routine for ia64-hpux.  */
-
-static int
-ia64_hpux_open_symbol_file_object (void *from_ttyp)
-{
-  return 0;
-}
-
-/* The "in_dynsym_resolve_code" target_so_ops routine for ia64-hpux.  */
-
-static int
-ia64_hpux_in_dynsym_resolve_code (CORE_ADDR pc)
-{
-  return 0;
-}
-
-/* If FADDR is the address of a function inside one of the shared
-   libraries, return the shared library linkage address.  */
-
-CORE_ADDR
-ia64_hpux_get_solib_linkage_addr (CORE_ADDR faddr)
-{
-  struct so_list *so = so_list_head;
-
-  while (so != NULL)
-    {
-      struct load_module_desc module_desc = so->lm_info->module_desc;
-
-      if (module_desc.text_base <= faddr
-          && (module_desc.text_base + module_desc.text_size) > faddr)
-        return module_desc.linkage_ptr;
-
-      so = so->next;
-    }
-
-  return 0;
-}
-
-/* Create a new target_so_ops structure suitable for ia64-hpux, and
-   return its address.  */
-
-static struct target_so_ops *
-ia64_hpux_target_so_ops (void)
-{
-  struct target_so_ops *ops = XCNEW (struct target_so_ops);
-
-  ops->relocate_section_addresses = ia64_hpux_relocate_section_addresses;
-  ops->free_so = ia64_hpux_free_so;
-  ops->clear_solib = ia64_hpux_clear_solib;
-  ops->solib_create_inferior_hook = ia64_hpux_solib_create_inferior_hook;
-  ops->special_symbol_handling = ia64_hpux_special_symbol_handling;
-  ops->current_sos = ia64_hpux_current_sos;
-  ops->open_symbol_file_object = ia64_hpux_open_symbol_file_object;
-  ops->in_dynsym_resolve_code = ia64_hpux_in_dynsym_resolve_code;
-  ops->bfd_open = solib_bfd_open;
-
-  return ops;
-}
-
-/* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_solib_ia64_hpux (void);
-
-void
-_initialize_solib_ia64_hpux (void)
-{
-  ia64_hpux_so_ops = ia64_hpux_target_so_ops ();
-}
diff --git a/gdb/solib-ia64-hpux.h b/gdb/solib-ia64-hpux.h
deleted file mode 100644
index 544d924..0000000
--- a/gdb/solib-ia64-hpux.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 2010-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef SOLIB_IA64_HPUX_H
-#define SOLIB_IA64_HPUX_H
-
-int ia64_hpux_at_dld_breakpoint_p (ptid_t ptid);
-void ia64_hpux_handle_dld_breakpoint (ptid_t ptid);
-CORE_ADDR ia64_hpux_get_solib_linkage_addr (CORE_ADDR faddr);
-
-#endif
diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c
deleted file mode 100644
index 099e1e7..0000000
--- a/gdb/solib-pa64.c
+++ /dev/null
@@ -1,654 +0,0 @@
-/* Handle PA64 shared libraries for GDB, the GNU Debugger.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* HP in their infinite stupidity choose not to use standard ELF dynamic
-   linker interfaces.  They also choose not to make their ELF dymamic
-   linker interfaces compatible with the SOM dynamic linker.  The
-   net result is we can not use either of the existing somsolib.c or
-   solib.c.  What a crock.
-
-   Even more disgusting.  This file depends on functions provided only
-   in certain PA64 libraries.  Thus this file is supposed to only be
-   used native.  When will HP ever learn that they need to provide the
-   same functionality in all their libraries!  */
-
-#include "defs.h"
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "gdb_bfd.h"
-
-#include "hppa-tdep.h"
-#include "solist.h"
-#include "solib.h"
-#include "solib-pa64.h"
-
-#undef SOLIB_PA64_DBG
-
-/* We can build this file only when running natively on 64-bit HP/UX.
-   We check for that by checking for the elf_hp.h header file.  */
-#if defined(HAVE_ELF_HP_H) && defined(__LP64__)
-
-/* FIXME: kettenis/20041213: These includes should be eliminated.  */
-#include <dlfcn.h>
-#include <elf.h>
-#include <elf_hp.h>
-
-struct lm_info {
-  struct load_module_desc desc;
-  CORE_ADDR desc_addr;
-};
-
-/* When adding fields, be sure to clear them in _initialize_pa64_solib.  */
-typedef struct
-  {
-    CORE_ADDR dld_flags_addr;
-    LONGEST dld_flags;
-    struct bfd_section *dyninfo_sect;
-    int have_read_dld_descriptor;
-    int is_valid;
-    CORE_ADDR load_map;
-    CORE_ADDR load_map_addr;
-    struct load_module_desc dld_desc;
-  }
-dld_cache_t;
-
-static dld_cache_t dld_cache;
-
-static int read_dynamic_info (asection *dyninfo_sect,
-			      dld_cache_t *dld_cache_p);
-
-static void
-pa64_relocate_section_addresses (struct so_list *so,
-				 struct target_section *sec)
-{
-  asection *asec = sec->the_bfd_section;
-  CORE_ADDR load_offset;
-
-  /* Relocate all the sections based on where they got loaded.  */
-
-  load_offset = bfd_section_vma (so->abfd, asec) - asec->filepos;
-
-  if (asec->flags & SEC_CODE)
-    {
-      sec->addr += so->lm_info->desc.text_base - load_offset;
-      sec->endaddr += so->lm_info->desc.text_base - load_offset;
-    }
-  else if (asec->flags & SEC_DATA)
-    {
-      sec->addr += so->lm_info->desc.data_base - load_offset;
-      sec->endaddr += so->lm_info->desc.data_base - load_offset;
-    }
-}
-
-static void
-pa64_free_so (struct so_list *so)
-{
-  xfree (so->lm_info);
-}
-
-static void
-pa64_clear_solib (void)
-{
-}
-
-/* Wrapper for target_read_memory for dlgetmodinfo.  */
-
-static void *
-pa64_target_read_memory (void *buffer, CORE_ADDR ptr, size_t bufsiz, int ident)
-{
-  if (target_read_memory (ptr, buffer, bufsiz) != 0)
-    return 0;
-  return buffer;
-}
-
-/* Read the dynamic linker's internal shared library descriptor.
-
-   This must happen after dld starts running, so we can't do it in
-   read_dynamic_info.  Record the fact that we have loaded the
-   descriptor.  If the library is archive bound or the load map
-   hasn't been setup, then return zero; else return nonzero.  */
-
-static int
-read_dld_descriptor (void)
-{
-  char *dll_path;
-  asection *dyninfo_sect;
-
-  /* If necessary call read_dynamic_info to extract the contents of the
-     .dynamic section from the shared library.  */
-  if (!dld_cache.is_valid) 
-    {
-      if (symfile_objfile == NULL)
-	error (_("No object file symbols."));
-
-      dyninfo_sect = bfd_get_section_by_name (symfile_objfile->obfd, 
-					      ".dynamic");
-      if (!dyninfo_sect) 
-	{
-	  return 0;
-	}
-
-      if (!read_dynamic_info (dyninfo_sect, &dld_cache))
-	error (_("Unable to read in .dynamic section information."));
-    }
-
-  /* Read the load map pointer.  */
-  if (target_read_memory (dld_cache.load_map_addr,
-			  (char *) &dld_cache.load_map,
-			  sizeof (dld_cache.load_map))
-      != 0)
-    {
-      error (_("Error while reading in load map pointer."));
-    }
-
-  if (!dld_cache.load_map)
-    return 0;
-
-  /* Read in the dld load module descriptor.  */
-  if (dlgetmodinfo (-1, 
-		    &dld_cache.dld_desc,
-		    sizeof (dld_cache.dld_desc), 
-		    pa64_target_read_memory, 
-		    0, 
-		    dld_cache.load_map)
-      == 0)
-    {
-      error (_("Error trying to get information about dynamic linker."));
-    }
-
-  /* Indicate that we have loaded the dld descriptor.  */
-  dld_cache.have_read_dld_descriptor = 1;
-
-  return 1;
-}
-
-
-/* Read the .dynamic section and extract the information of interest,
-   which is stored in dld_cache.  The routine elf_locate_base in solib.c 
-   was used as a model for this.  */
-
-static int
-read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p)
-{
-  char *buf;
-  char *bufend;
-  CORE_ADDR dyninfo_addr;
-  int dyninfo_sect_size;
-  CORE_ADDR entry_addr;
-
-  /* Read in .dynamic section, silently ignore errors.  */
-  dyninfo_addr = bfd_section_vma (symfile_objfile->obfd, dyninfo_sect);
-  dyninfo_sect_size = bfd_section_size (exec_bfd, dyninfo_sect);
-  buf = alloca (dyninfo_sect_size);
-  if (target_read_memory (dyninfo_addr, buf, dyninfo_sect_size))
-    return 0;
-
-  /* Scan the .dynamic section and record the items of interest. 
-     In particular, DT_HP_DLD_FLAGS.  */
-  for (bufend = buf + dyninfo_sect_size, entry_addr = dyninfo_addr;
-       buf < bufend;
-       buf += sizeof (Elf64_Dyn), entry_addr += sizeof (Elf64_Dyn))
-    {
-      Elf64_Dyn *x_dynp = (Elf64_Dyn*)buf;
-      Elf64_Sxword dyn_tag;
-      CORE_ADDR	dyn_ptr;
-
-      dyn_tag = bfd_h_get_64 (symfile_objfile->obfd, 
-			      (bfd_byte*) &x_dynp->d_tag);
-
-      /* We can't use a switch here because dyn_tag is 64 bits and HP's
-	 lame comiler does not handle 64bit items in switch statements.  */
-      if (dyn_tag == DT_NULL)
-	break;
-      else if (dyn_tag == DT_HP_DLD_FLAGS)
-	{
-	  /* Set dld_flags_addr and dld_flags in *dld_cache_p.  */
-	  dld_cache_p->dld_flags_addr = entry_addr + offsetof(Elf64_Dyn, d_un);
-	  if (target_read_memory (dld_cache_p->dld_flags_addr,
-	  			  (char*) &dld_cache_p->dld_flags, 
-				  sizeof (dld_cache_p->dld_flags))
-	      != 0)
-	    {
-	      error (_("Error while reading in "
-		       ".dynamic section of the program."));
-	    }
-	}
-      else if (dyn_tag == DT_HP_LOAD_MAP)
-	{
-	  /* Dld will place the address of the load map at load_map_addr
-	     after it starts running.  */
-	  if (target_read_memory (entry_addr + offsetof(Elf64_Dyn, 
-							d_un.d_ptr),
-				  (char*) &dld_cache_p->load_map_addr,
-				  sizeof (dld_cache_p->load_map_addr))
-	      != 0)
-	    {
-	      error (_("Error while reading in "
-		       ".dynamic section of the program."));
-	    }
-	}
-      else 
-	{
-	  /* Tag is not of interest.  */
-	}
-    }
-
-  /* Record other information and set is_valid to 1.  */
-  dld_cache_p->dyninfo_sect = dyninfo_sect;
-
-  /* Verify that we read in required info.  These fields are re-set to zero
-     in pa64_solib_restart.  */
-
-  if (dld_cache_p->dld_flags_addr != 0 && dld_cache_p->load_map_addr != 0) 
-    dld_cache_p->is_valid = 1;
-  else 
-    return 0;
-
-  return 1;
-}
-
-/* Helper function for gdb_bfd_lookup_symbol_from_symtab.  */
-
-static int
-cmp_name (asymbol *sym, void *data)
-{
-  return (strcmp (sym->name, (const char *) data) == 0);
-}
-
-/* This hook gets called just before the first instruction in the
-   inferior process is executed.
-
-   This is our opportunity to set magic flags in the inferior so
-   that GDB can be notified when a shared library is mapped in and
-   to tell the dynamic linker that a private copy of the library is
-   needed (so GDB can set breakpoints in the library).
-
-   We need to set DT_HP_DEBUG_CALLBACK to indicate that we want the
-   dynamic linker to call the breakpoint routine for significant events.
-   We used to set DT_HP_DEBUG_PRIVATE to indicate that shared libraries
-   should be mapped private.  However, this flag can be set using
-   "chatr +dbg enable".  Not setting DT_HP_DEBUG_PRIVATE allows debugging
-   with shared libraries mapped shareable.  */
-
-static void
-pa64_solib_create_inferior_hook (int from_tty)
-{
-  struct minimal_symbol *msymbol;
-  unsigned int dld_flags, status;
-  asection *shlib_info, *interp_sect;
-  struct objfile *objfile;
-  CORE_ADDR anaddr;
-
-  if (symfile_objfile == NULL)
-    return;
-
-  /* First see if the objfile was dynamically linked.  */
-  shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, ".dynamic");
-  if (!shlib_info)
-    return;
-
-  /* It's got a .dynamic section, make sure it's not empty.  */
-  if (bfd_section_size (symfile_objfile->obfd, shlib_info) == 0)
-    return;
-
-  /* Read in the .dynamic section.  */
-  if (! read_dynamic_info (shlib_info, &dld_cache))
-    error (_("Unable to read the .dynamic section."));
-
-  /* If the libraries were not mapped private, warn the user.  */
-  if ((dld_cache.dld_flags & DT_HP_DEBUG_PRIVATE) == 0)
-    warning
-      (_("\
-Private mapping of shared library text was not specified\n\
-by the executable; setting a breakpoint in a shared library which\n\
-is not privately mapped will not work.  See the HP-UX 11i v3 chatr\n\
-manpage for methods to privately map shared library text."));
-
-  /* Turn on the flags we care about.  */
-  dld_cache.dld_flags |= DT_HP_DEBUG_CALLBACK;
-  status = target_write_memory (dld_cache.dld_flags_addr,
-				(char *) &dld_cache.dld_flags,
-				sizeof (dld_cache.dld_flags));
-  if (status != 0)
-    error (_("Unable to modify dynamic linker flags."));
-
-  /* Now we have to create a shared library breakpoint in the dynamic
-     linker.  This can be somewhat tricky since the symbol is inside
-     the dynamic linker (for which we do not have symbols or a base
-     load address!   Luckily I wrote this code for solib.c years ago.  */
-  interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
-  if (interp_sect)
-    {
-      unsigned int interp_sect_size;
-      char *buf;
-      CORE_ADDR load_addr;
-      bfd *tmp_bfd;
-      CORE_ADDR sym_addr = 0;
-
-      /* Read the contents of the .interp section into a local buffer;
-	 the contents specify the dynamic linker this program uses.  */
-      interp_sect_size = bfd_section_size (exec_bfd, interp_sect);
-      buf = alloca (interp_sect_size);
-      bfd_get_section_contents (exec_bfd, interp_sect,
-				buf, 0, interp_sect_size);
-
-      /* Now we need to figure out where the dynamic linker was
-	 loaded so that we can load its symbols and place a breakpoint
-	 in the dynamic linker itself.
-
-	 This address is stored on the stack.  However, I've been unable
-	 to find any magic formula to find it for Solaris (appears to
-	 be trivial on GNU/Linux).  Therefore, we have to try an alternate
-	 mechanism to find the dynamic linker's base address.  */
-      tmp_bfd = gdb_bfd_open (buf, gnutarget, -1);
-      if (tmp_bfd == NULL)
-	return;
-
-      /* Make sure the dynamic linker's really a useful object.  */
-      if (!bfd_check_format (tmp_bfd, bfd_object))
-	{
-	  warning (_("Unable to grok dynamic linker %s as an object file"),
-		   buf);
-	  gdb_bfd_unref (tmp_bfd);
-	  return;
-	}
-
-      /* We find the dynamic linker's base address by examining the
-	 current pc (which point at the entry point for the dynamic
-	 linker) and subtracting the offset of the entry point.
-
-	 Also note the breakpoint is the second instruction in the
-	 routine.  */
-      load_addr = regcache_read_pc (get_current_regcache ())
-		  - tmp_bfd->start_address;
-      sym_addr = gdb_bfd_lookup_symbol_from_symtab (tmp_bfd, cmp_name,
-						    "__dld_break");
-      sym_addr = load_addr + sym_addr + 4;
-      
-      /* Create the shared library breakpoint.  */
-      {
-	struct breakpoint *b
-	  = create_solib_event_breakpoint (target_gdbarch (), sym_addr);
-
-	/* The breakpoint is actually hard-coded into the dynamic linker,
-	   so we don't need to actually insert a breakpoint instruction
-	   there.  In fact, the dynamic linker's code is immutable, even to
-	   ttrace, so we shouldn't even try to do that.  For cases like
-	   this, we have "permanent" breakpoints.  */
-	make_breakpoint_permanent (b);
-      }
-
-      /* We're done with the temporary bfd.  */
-      gdb_bfd_unref (tmp_bfd);
-    }
-}
-
-static void
-pa64_special_symbol_handling (void)
-{
-}
-
-static struct so_list *
-pa64_current_sos (void)
-{
-  struct so_list *head = 0;
-  struct so_list **link_ptr = &head;
-  int dll_index;
-
-  /* Read in the load map pointer if we have not done so already.  */
-  if (! dld_cache.have_read_dld_descriptor)
-    if (! read_dld_descriptor ())
-      return NULL;
-
-  for (dll_index = -1; ; dll_index++)
-    {
-      struct load_module_desc dll_desc;
-      char *dll_path;
-      struct so_list *new;
-      struct cleanup *old_chain;
-
-      if (dll_index == 0)
-        continue;
-
-      /* Read in the load module descriptor.  */
-      if (dlgetmodinfo (dll_index, &dll_desc, sizeof (dll_desc),
-			pa64_target_read_memory, 0, dld_cache.load_map)
-	  == 0)
-	break;
-
-      /* Get the name of the shared library.  */
-      dll_path = (char *)dlgetname (&dll_desc, sizeof (dll_desc),
-			    pa64_target_read_memory,
-			    0, dld_cache.load_map);
-
-      new = (struct so_list *) xmalloc (sizeof (struct so_list));
-      memset (new, 0, sizeof (struct so_list));
-      new->lm_info = (struct lm_info *) xmalloc (sizeof (struct lm_info));
-      memset (new->lm_info, 0, sizeof (struct lm_info));
-
-      strncpy (new->so_name, dll_path, SO_NAME_MAX_PATH_SIZE - 1);
-      new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
-      strcpy (new->so_original_name, new->so_name);
-
-      memcpy (&new->lm_info->desc, &dll_desc, sizeof (dll_desc));
-
-#ifdef SOLIB_PA64_DBG
-      {
-        struct load_module_desc *d = &new->lm_info->desc;
-
-	printf ("\n+ library \"%s\" is described at index %d\n", new->so_name, 
-		dll_index);
-	printf ("    text_base = %s\n", hex_string (d->text_base));
-	printf ("    text_size = %s\n", hex_string (d->text_size));
-	printf ("    data_base = %s\n", hex_string (d->data_base));
-	printf ("    data_size = %s\n", hex_string (d->data_size));
-	printf ("    unwind_base = %s\n", hex_string (d->unwind_base));
-	printf ("    linkage_ptr = %s\n", hex_string (d->linkage_ptr));
-	printf ("    phdr_base = %s\n", hex_string (d->phdr_base));
-	printf ("    tls_size = %s\n", hex_string (d->tls_size));
-	printf ("    tls_start_addr = %s\n", hex_string (d->tls_start_addr));
-	printf ("    unwind_size = %s\n", hex_string (d->unwind_size));
-	printf ("    tls_index = %s\n", hex_string (d->tls_index));
-      }
-#endif
-
-      /* Link the new object onto the list.  */
-      new->next = NULL;
-      *link_ptr = new;
-      link_ptr = &new->next;
-    }
-
-  return head;
-}
-
-static int
-pa64_open_symbol_file_object (void *from_ttyp)
-{
-  int from_tty = *(int *)from_ttyp;
-  struct load_module_desc dll_desc;
-  char *dll_path;
-
-  if (symfile_objfile)
-    if (!query (_("Attempt to reload symbols from process? ")))
-      return 0;
-
-  /* Read in the load map pointer if we have not done so already.  */
-  if (! dld_cache.have_read_dld_descriptor)
-    if (! read_dld_descriptor ())
-      return 0;
-
-  /* Read in the load module descriptor.  */
-  if (dlgetmodinfo (0, &dll_desc, sizeof (dll_desc),
-		    pa64_target_read_memory, 0, dld_cache.load_map) == 0)
-    return 0;
-
-  /* Get the name of the shared library.  */
-  dll_path = (char *)dlgetname (&dll_desc, sizeof (dll_desc),
-				pa64_target_read_memory,
-				0, dld_cache.load_map);
-
-  /* Have a pathname: read the symbol file.  */
-  symbol_file_add_main (dll_path, from_tty);
-
-  return 1;
-}
-
-/* Return nonzero if PC is an address inside the dynamic linker.  */
-static int
-pa64_in_dynsym_resolve_code (CORE_ADDR pc)
-{
-  asection *shlib_info;
-
-  if (symfile_objfile == NULL)
-    return 0;
-
-  if (!dld_cache.have_read_dld_descriptor)
-    if (!read_dld_descriptor ())
-      return 0;
-
-  return (pc >= dld_cache.dld_desc.text_base
-	  && pc < dld_cache.dld_desc.text_base + dld_cache.dld_desc.text_size);
-}
-
-
-/* Return the GOT value for the shared library in which ADDR belongs.  If
-   ADDR isn't in any known shared library, return zero.  */
-
-static CORE_ADDR
-pa64_solib_get_got_by_pc (CORE_ADDR addr)
-{
-  struct so_list *so_list = master_so_list ();
-  CORE_ADDR got_value = 0;
-
-  while (so_list)
-    {
-      if (so_list->lm_info->desc.text_base <= addr
-	  && ((so_list->lm_info->desc.text_base
-	       + so_list->lm_info->desc.text_size)
-	      > addr))
-        {
-	  got_value = so_list->lm_info->desc.linkage_ptr;
- 	  break;
-	}
-      so_list = so_list->next;
-    }
-  return got_value;
-}
-
-/* Get some HPUX-specific data from a shared lib.  */
-static CORE_ADDR
-pa64_solib_thread_start_addr (struct so_list *so)
-{
-  return so->lm_info->desc.tls_start_addr;
-}
-
-
-/* Return the address of the handle of the shared library in which ADDR
-   belongs.  If ADDR isn't in any known shared library, return zero.  */
-
-static CORE_ADDR
-pa64_solib_get_solib_by_pc (CORE_ADDR addr)
-{
-  struct so_list *so_list = master_so_list ();
-  CORE_ADDR retval = 0;
-
-  while (so_list)
-    {
-      if (so_list->lm_info->desc.text_base <= addr
-	  && ((so_list->lm_info->desc.text_base
-	       + so_list->lm_info->desc.text_size)
-	      > addr))
-	{
-	  retval = so_list->lm_info->desc_addr;
-	  break;
-	}
-      so_list = so_list->next;
-    }
-  return retval;
-}
-
-/* pa64 libraries do not seem to set the section offsets in a standard (i.e.
-   SVr4) way; the text section offset stored in the file doesn't correspond
-   to the place where the library is actually loaded into memory.  Instead,
-   we rely on the dll descriptor to tell us where things were loaded.  */
-static CORE_ADDR
-pa64_solib_get_text_base (struct objfile *objfile)
-{
-  struct so_list *so;
-
-  for (so = master_so_list (); so; so = so->next)
-    if (so->objfile == objfile)
-      return so->lm_info->desc.text_base;
-  
-  return 0;
-}
-
-static struct target_so_ops pa64_so_ops;
-
-extern initialize_file_ftype _initialize_pa64_solib; /* -Wmissing-prototypes */
-
-void
-_initialize_pa64_solib (void)
-{
-  pa64_so_ops.relocate_section_addresses = pa64_relocate_section_addresses;
-  pa64_so_ops.free_so = pa64_free_so;
-  pa64_so_ops.clear_solib = pa64_clear_solib;
-  pa64_so_ops.solib_create_inferior_hook = pa64_solib_create_inferior_hook;
-  pa64_so_ops.special_symbol_handling = pa64_special_symbol_handling;
-  pa64_so_ops.current_sos = pa64_current_sos;
-  pa64_so_ops.open_symbol_file_object = pa64_open_symbol_file_object;
-  pa64_so_ops.in_dynsym_resolve_code = pa64_in_dynsym_resolve_code;
-  pa64_so_ops.bfd_open = solib_bfd_open;
-
-  memset (&dld_cache, 0, sizeof (dld_cache));
-}
-
-void pa64_solib_select (struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  set_solib_ops (gdbarch, &pa64_so_ops);
-  tdep->solib_thread_start_addr = pa64_solib_thread_start_addr;
-  tdep->solib_get_got_by_pc = pa64_solib_get_got_by_pc;
-  tdep->solib_get_solib_by_pc = pa64_solib_get_solib_by_pc;
-  tdep->solib_get_text_base = pa64_solib_get_text_base;
-}
-
-#else /* HAVE_ELF_HP_H */
-
-extern initialize_file_ftype _initialize_pa64_solib; /* -Wmissing-prototypes */
-
-void
-_initialize_pa64_solib (void)
-{
-}
-
-void pa64_solib_select (struct gdbarch *gdbarch)
-{
-  /* For a SOM-only target, there is no pa64 solib support.  This is needed
-     for hppa-hpux-tdep.c to build.  */
-  error (_("Cannot select pa64 solib support for this configuration."));
-}
-#endif
diff --git a/gdb/solib-pa64.h b/gdb/solib-pa64.h
deleted file mode 100644
index f085af5..0000000
--- a/gdb/solib-pa64.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Handle PA64 shared libraries for GDB, the GNU Debugger.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef SOLIB_PA64_H
-#define SOLIB_PA64_H
-
-void pa64_solib_select (struct gdbarch *gdbarch);
-
-#endif
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
deleted file mode 100644
index 83f2065..0000000
--- a/gdb/solib-som.c
+++ /dev/null
@@ -1,891 +0,0 @@
-/* Handle SOM shared libraries.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "inferior.h"
-
-#include "hppa-tdep.h"
-#include "solist.h"
-#include "solib.h"
-#include "solib-som.h"
-
-#undef SOLIB_SOM_DBG 
-
-/* These ought to be defined in some public interface, but aren't.  They
-   define the meaning of the various bits in the distinguished __dld_flags
-   variable that is declared in every debuggable a.out on HP-UX, and that
-   is shared between the debugger and the dynamic linker.  */
-
-#define DLD_FLAGS_MAPPRIVATE    0x1
-#define DLD_FLAGS_HOOKVALID     0x2
-#define DLD_FLAGS_LISTVALID     0x4
-#define DLD_FLAGS_BOR_ENABLE    0x8
-
-struct lm_info
-  {
-    /* Version of this structure (it is expected to change again in
-       hpux10).  */
-    unsigned char struct_version;
-
-    /* Binding mode for this library.  */
-    unsigned char bind_mode;
-
-    /* Version of this library.  */
-    short library_version;
-
-    /* Start of text address,
-       link-time text location (length of text area),
-       end of text address.  */
-    CORE_ADDR text_addr;
-    CORE_ADDR text_link_addr;
-    CORE_ADDR text_end;
-
-    /* Start of data, start of bss and end of data.  */
-    CORE_ADDR data_start;
-    CORE_ADDR bss_start;
-    CORE_ADDR data_end;
-
-    /* Value of linkage pointer (%r19).  */
-    CORE_ADDR got_value;
-
-    /* Address in target of offset from thread-local register of
-       start of this thread's data.  I.e., the first thread-local
-       variable in this shared library starts at *(tsd_start_addr)
-       from that area pointed to by cr27 (mpsfu_hi).
-      
-       We do the indirection as soon as we read it, so from then
-       on it's the offset itself.  */
-    CORE_ADDR tsd_start_addr;
-
-    /* Address of the link map entry in the loader.  */
-    CORE_ADDR lm_addr;
-  };
-
-/* These addresses should be filled in by som_solib_create_inferior_hook.
-   They are also used elsewhere in this module.  */
-
-typedef struct
-  {
-    CORE_ADDR address;
-    struct unwind_table_entry *unwind;
-  }
-addr_and_unwind_t;
-
-/* When adding fields, be sure to clear them in _initialize_som_solib.  */
-static struct
-  {
-    int is_valid;
-    addr_and_unwind_t hook;
-    addr_and_unwind_t hook_stub;
-    addr_and_unwind_t load;
-    addr_and_unwind_t load_stub;
-    addr_and_unwind_t unload;
-    addr_and_unwind_t unload2;
-    addr_and_unwind_t unload_stub;
-  }
-dld_cache;
-
-static void
-som_relocate_section_addresses (struct so_list *so,
-				struct target_section *sec)
-{
-  flagword aflag = bfd_get_section_flags(so->abfd, sec->the_bfd_section);
-
-  if (aflag & SEC_CODE)
-    {
-      sec->addr    += so->lm_info->text_addr - so->lm_info->text_link_addr; 
-      sec->endaddr += so->lm_info->text_addr - so->lm_info->text_link_addr;
-    }
-  else if (aflag & SEC_DATA)
-    {
-      sec->addr    += so->lm_info->data_start; 
-      sec->endaddr += so->lm_info->data_start;
-    }
-  else
-    {
-      /* Nothing.  */
-    }
-}
-
-
-/* Variable storing HP-UX major release number.
-
-   On non-native system, simply assume that the major release number
-   is 11.  On native systems, hppa-hpux-nat.c initialization code
-   sets this number to the real one on startup.
-   
-   We cannot compute this value here, because we need to make a native
-   call to "uname".  We are are not allowed to do that from here, as
-   this file is used for both native and cross debugging.  */
-
-#define DEFAULT_HPUX_MAJOR_RELEASE 11
-int hpux_major_release = DEFAULT_HPUX_MAJOR_RELEASE;
-
-static int
-get_hpux_major_release (void)
-{
-  return hpux_major_release;
-}
-
-/* DL header flag defines.  */
-#define SHLIB_TEXT_PRIVATE_ENABLE 0x4000
-
-/* The DL header is documented in <shl.h>.  We are only interested
-   in the flags field to determine whether the executable wants shared
-   libraries mapped private.  */
-struct {
-    short junk[37];
-    short flags;
-} dl_header;
-
-/* This hook gets called just before the first instruction in the
-   inferior process is executed.
-
-   This is our opportunity to set magic flags in the inferior so
-   that GDB can be notified when a shared library is mapped in and
-   to tell the dynamic linker that a private copy of the library is
-   needed (so GDB can set breakpoints in the library).
-
-   __dld_flags is the location of the magic flags; as of this implementation
-   there are 3 flags of interest:
-
-   bit 0 when set indicates that private copies of the libraries are needed
-   bit 1 when set indicates that the callback hook routine is valid
-   bit 2 when set indicates that the dynamic linker should maintain the
-   __dld_list structure when loading/unloading libraries.
-
-   Note that shared libraries are not mapped in at this time, so we have
-   run the inferior until the libraries are mapped in.  Typically this
-   means running until the "_start" is called.  */
-
-static void
-som_solib_create_inferior_hook (int from_tty)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  struct bound_minimal_symbol msymbol;
-  unsigned int dld_flags, status, have_endo;
-  asection *shlib_info;
-  gdb_byte buf[4];
-  CORE_ADDR anaddr;
-
-  if (symfile_objfile == NULL)
-    return;
-
-  /* First see if the objfile was dynamically linked.  */
-  shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
-  if (!shlib_info)
-    return;
-
-  /* It's got a $SHLIB_INFO$ section, make sure it's not empty.  */
-  if (bfd_section_size (symfile_objfile->obfd, shlib_info) == 0)
-    return;
-
-  /* Read the DL header.  */
-  bfd_get_section_contents (symfile_objfile->obfd, shlib_info,
-			    (char *) &dl_header, 0, sizeof (dl_header));
-
-  have_endo = 0;
-  /* Slam the pid of the process into __d_pid.
-
-     We used to warn when this failed, but that warning is only useful
-     on very old HP systems (hpux9 and older).  The warnings are an
-     annoyance to users of modern systems and foul up the testsuite as
-     well.  As a result, the warnings have been disabled.  */
-  msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
-  if (msymbol.minsym == NULL)
-    goto keep_going;
-
-  anaddr = BMSYMBOL_VALUE_ADDRESS (msymbol);
-  store_unsigned_integer (buf, 4, byte_order, ptid_get_pid (inferior_ptid));
-  status = target_write_memory (anaddr, buf, 4);
-  if (status != 0)
-    {
-      warning (_("\
-Unable to write __d_pid.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
-      goto keep_going;
-    }
-
-  /* Get the value of _DLD_HOOK (an export stub) and put it in __dld_hook;
-     This will force the dynamic linker to call __d_trap when significant
-     events occur.
-
-     Note that the above is the pre-HP-UX 9.0 behaviour.  At 9.0 and above,
-     the dld provides an export stub named "__d_trap" as well as the
-     function named "__d_trap" itself, but doesn't provide "_DLD_HOOK".
-     We'll look first for the old flavor and then the new.  */
-
-  msymbol = lookup_minimal_symbol ("_DLD_HOOK", NULL, symfile_objfile);
-  if (msymbol.minsym == NULL)
-    msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile);
-  if (msymbol.minsym == NULL)
-    {
-      warning (_("\
-Unable to find _DLD_HOOK symbol in object file.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
-      goto keep_going;
-    }
-  anaddr = BMSYMBOL_VALUE_ADDRESS (msymbol);
-  dld_cache.hook.address = anaddr;
-
-  /* Grrr, this might not be an export symbol!  We have to find the
-     export stub.  */
-  msymbol
-    = hppa_lookup_stub_minimal_symbol (MSYMBOL_LINKAGE_NAME (msymbol.minsym),
-				       EXPORT);
-  if (msymbol.minsym != NULL)
-    {
-      anaddr = MSYMBOL_VALUE (msymbol.minsym);
-      dld_cache.hook_stub.address = anaddr;
-    }
-  store_unsigned_integer (buf, 4, byte_order, anaddr);
-
-  msymbol = lookup_minimal_symbol ("__dld_hook", NULL, symfile_objfile);
-  if (msymbol.minsym == NULL)
-    {
-      warning (_("\
-Unable to find __dld_hook symbol in object file.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
-      goto keep_going;
-    }
-  anaddr = BMSYMBOL_VALUE_ADDRESS (msymbol);
-  status = target_write_memory (anaddr, buf, 4);
-
-  /* Now set a shlib_event breakpoint at __d_trap so we can track
-     significant shared library events.  */
-  msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile);
-  if (msymbol.minsym == NULL)
-    {
-      warning (_("\
-Unable to find __dld_d_trap symbol in object file.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
-      goto keep_going;
-    }
-  create_solib_event_breakpoint (target_gdbarch (),
-				 BMSYMBOL_VALUE_ADDRESS (msymbol));
-
-  /* We have all the support usually found in end.o, so we can track
-     shl_load and shl_unload calls.  */
-  have_endo = 1;
-
-keep_going:
-
-  /* Get the address of __dld_flags, if no such symbol exists, then we can
-     not debug the shared code.  */
-  msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
-  if (msymbol.minsym == NULL)
-    {
-      error (_("Unable to find __dld_flags symbol in object file."));
-    }
-
-  anaddr = BMSYMBOL_VALUE_ADDRESS (msymbol);
-
-  /* Read the current contents.  */
-  status = target_read_memory (anaddr, buf, 4);
-  if (status != 0)
-    error (_("Unable to read __dld_flags."));
-  dld_flags = extract_unsigned_integer (buf, 4, byte_order);
-
-  /* If the libraries were not mapped private on HP-UX 11 and later, warn
-     the user.  On HP-UX 10 and earlier, there is no easy way to specify
-     that shared libraries should be privately mapped.  So, we just force
-     private mapping.  */
-  if (get_hpux_major_release () >= 11
-      && (dl_header.flags & SHLIB_TEXT_PRIVATE_ENABLE) == 0
-      && (dld_flags & DLD_FLAGS_MAPPRIVATE) == 0)
-    warning
-      (_("\
-Private mapping of shared library text was not specified\n\
-by the executable; setting a breakpoint in a shared library which\n\
-is not privately mapped will not work.  See the HP-UX 11i v3 chatr\n\
-manpage for methods to privately map shared library text."));
-
-  /* Turn on the flags we care about.  */
-  if (get_hpux_major_release () < 11)
-    dld_flags |= DLD_FLAGS_MAPPRIVATE;
-  if (have_endo)
-    dld_flags |= DLD_FLAGS_HOOKVALID;
-  store_unsigned_integer (buf, 4, byte_order, dld_flags);
-  status = target_write_memory (anaddr, buf, 4);
-  if (status != 0)
-    error (_("Unable to write __dld_flags."));
-
-  /* Now find the address of _start and set a breakpoint there.
-     We still need this code for two reasons:
-
-     * Not all sites have /opt/langtools/lib/end.o, so it's not always
-     possible to track the dynamic linker's events.
-
-     * At this time no events are triggered for shared libraries
-     loaded at startup time (what a crock).  */
-
-  msymbol = lookup_minimal_symbol ("_start", NULL, symfile_objfile);
-  if (msymbol.minsym == NULL)
-    error (_("Unable to find _start symbol in object file."));
-
-  anaddr = BMSYMBOL_VALUE_ADDRESS (msymbol);
-
-  /* Make the breakpoint at "_start" a shared library event breakpoint.  */
-  create_solib_event_breakpoint (target_gdbarch (), anaddr);
-
-  clear_symtab_users (0);
-}
-
-static void
-som_special_symbol_handling (void)
-{
-}
-
-static void
-som_solib_desire_dynamic_linker_symbols (void)
-{
-  struct objfile *objfile;
-  struct unwind_table_entry *u;
-  struct bound_minimal_symbol dld_msymbol;
-
-  /* Do we already know the value of these symbols?  If so, then
-     we've no work to do.
-
-     (If you add clauses to this test, be sure to likewise update the
-     test within the loop.)  */
-
-  if (dld_cache.is_valid)
-    return;
-
-  ALL_OBJFILES (objfile)
-  {
-    dld_msymbol = lookup_minimal_symbol ("shl_load", NULL, objfile);
-    if (dld_msymbol.minsym != NULL)
-      {
-	dld_cache.load.address = MSYMBOL_VALUE (dld_msymbol.minsym);
-	dld_cache.load.unwind = find_unwind_entry (dld_cache.load.address);
-      }
-
-    dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_load",
-							  objfile);
-    if (dld_msymbol.minsym != NULL)
-      {
-	if (MSYMBOL_TYPE (dld_msymbol.minsym) == mst_solib_trampoline)
-	  {
-	    u = find_unwind_entry (MSYMBOL_VALUE (dld_msymbol.minsym));
-	    if ((u != NULL) && (u->stub_unwind.stub_type == EXPORT))
-	      {
-		dld_cache.load_stub.address
-		  = MSYMBOL_VALUE (dld_msymbol.minsym);
-		dld_cache.load_stub.unwind = u;
-	      }
-	  }
-      }
-
-    dld_msymbol = lookup_minimal_symbol ("shl_unload", NULL, objfile);
-    if (dld_msymbol.minsym != NULL)
-      {
-	dld_cache.unload.address = MSYMBOL_VALUE (dld_msymbol.minsym);
-	dld_cache.unload.unwind = find_unwind_entry (dld_cache.unload.address);
-
-	/* ??rehrauer: I'm not sure exactly what this is, but it appears
-	   that on some HPUX 10.x versions, there's two unwind regions to
-	   cover the body of "shl_unload", the second being 4 bytes past
-	   the end of the first.  This is a large hack to handle that
-	   case, but since I don't seem to have any legitimate way to
-	   look for this thing via the symbol table...  */
-
-	if (dld_cache.unload.unwind != NULL)
-	  {
-	    u = find_unwind_entry (dld_cache.unload.unwind->region_end + 4);
-	    if (u != NULL)
-	      {
-		dld_cache.unload2.address = u->region_start;
-		dld_cache.unload2.unwind = u;
-	      }
-	  }
-      }
-
-    dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_unload",
-							  objfile);
-    if (dld_msymbol.minsym != NULL)
-      {
-	if (MSYMBOL_TYPE (dld_msymbol.minsym) == mst_solib_trampoline)
-	  {
-	    u = find_unwind_entry (MSYMBOL_VALUE (dld_msymbol.minsym));
-	    if ((u != NULL) && (u->stub_unwind.stub_type == EXPORT))
-	      {
-		dld_cache.unload_stub.address
-		  = MSYMBOL_VALUE (dld_msymbol.minsym);
-		dld_cache.unload_stub.unwind = u;
-	      }
-	  }
-      }
-
-    /* Did we find everything we were looking for?  If so, stop.  */
-    if ((dld_cache.load.address != 0)
-	&& (dld_cache.load_stub.address != 0)
-	&& (dld_cache.unload.address != 0)
-	&& (dld_cache.unload_stub.address != 0))
-      {
-	dld_cache.is_valid = 1;
-	break;
-      }
-  }
-
-  dld_cache.hook.unwind = find_unwind_entry (dld_cache.hook.address);
-  dld_cache.hook_stub.unwind = find_unwind_entry (dld_cache.hook_stub.address);
-
-  /* We're prepared not to find some of these symbols, which is why
-     this function is a "desire" operation, and not a "require".  */
-}
-
-static int
-som_in_dynsym_resolve_code (CORE_ADDR pc)
-{
-  struct unwind_table_entry *u_pc;
-
-  /* Are we in the dld itself?
-
-     ??rehrauer: Large hack -- We'll assume that any address in a
-     shared text region is the dld's text.  This would obviously
-     fall down if the user attached to a process, whose shlibs
-     weren't mapped to a (writeable) private region.  However, in
-     that case the debugger probably isn't able to set the fundamental
-     breakpoint in the dld callback anyways, so this hack should be
-     safe.  */
-
-  if ((pc & (CORE_ADDR) 0xc0000000) == (CORE_ADDR) 0xc0000000)
-    return 1;
-
-  /* Cache the address of some symbols that are part of the dynamic
-     linker, if not already known.  */
-
-  som_solib_desire_dynamic_linker_symbols ();
-
-  /* Are we in the dld callback?  Or its export stub?  */
-  u_pc = find_unwind_entry (pc);
-  if (u_pc == NULL)
-    return 0;
-
-  if ((u_pc == dld_cache.hook.unwind) || (u_pc == dld_cache.hook_stub.unwind))
-    return 1;
-
-  /* Or the interface of the dld (i.e., "shl_load" or friends)?  */
-  if ((u_pc == dld_cache.load.unwind)
-      || (u_pc == dld_cache.unload.unwind)
-      || (u_pc == dld_cache.unload2.unwind)
-      || (u_pc == dld_cache.load_stub.unwind)
-      || (u_pc == dld_cache.unload_stub.unwind))
-    return 1;
-
-  /* Apparently this address isn't part of the dld's text.  */
-  return 0;
-}
-
-static void
-som_clear_solib (void)
-{
-}
-
-struct dld_list {
-  char name[4];
-  char info[4];
-  char text_addr[4];
-  char text_link_addr[4];
-  char text_end[4];
-  char data_start[4];
-  char bss_start[4];
-  char data_end[4];
-  char got_value[4];
-  char next[4];
-  char tsd_start_addr_ptr[4];
-};
-
-static CORE_ADDR
-link_map_start (void)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  struct bound_minimal_symbol sym;
-  CORE_ADDR addr;
-  gdb_byte buf[4];
-  unsigned int dld_flags;
-
-  sym = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
-  if (!sym.minsym)
-    error (_("Unable to find __dld_flags symbol in object file."));
-  addr = BMSYMBOL_VALUE_ADDRESS (sym);
-  read_memory (addr, buf, 4);
-  dld_flags = extract_unsigned_integer (buf, 4, byte_order);
-  if ((dld_flags & DLD_FLAGS_LISTVALID) == 0)
-    error (_("__dld_list is not valid according to __dld_flags."));
-
-  sym = lookup_minimal_symbol ("__dld_list", NULL, NULL);
-  if (!sym.minsym)
-    {
-      /* Older crt0.o files (hpux8) don't have __dld_list as a symbol,
-         but the data is still available if you know where to look.  */
-      sym = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
-      if (!sym.minsym)
-	{
-	  error (_("Unable to find dynamic library list."));
-	  return 0;
-	}
-      addr = BMSYMBOL_VALUE_ADDRESS (sym) - 8;
-    }
-  else
-    addr = BMSYMBOL_VALUE_ADDRESS (sym);
-
-  read_memory (addr, buf, 4);
-  addr = extract_unsigned_integer (buf, 4, byte_order);
-  if (addr == 0)
-    return 0;
-
-  read_memory (addr, buf, 4);
-  return extract_unsigned_integer (buf, 4, byte_order);
-}
-
-/* Does this so's name match the main binary?  */
-static int
-match_main (const char *name)
-{
-  return strcmp (name, objfile_name (symfile_objfile)) == 0;
-}
-
-static struct so_list *
-som_current_sos (void)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  CORE_ADDR lm;
-  struct so_list *head = 0;
-  struct so_list **link_ptr = &head;
-
-  for (lm = link_map_start (); lm; )
-    {
-      char *namebuf;
-      CORE_ADDR addr;
-      struct so_list *new;
-      struct cleanup *old_chain;
-      int errcode;
-      struct dld_list dbuf;
-      gdb_byte tsdbuf[4];
-
-      new = (struct so_list *) xmalloc (sizeof (struct so_list));
-      old_chain = make_cleanup (xfree, new);
-
-      memset (new, 0, sizeof (*new));
-      new->lm_info = xmalloc (sizeof (struct lm_info));
-      make_cleanup (xfree, new->lm_info);
-
-      read_memory (lm, (gdb_byte *)&dbuf, sizeof (struct dld_list));
-
-      addr = extract_unsigned_integer ((gdb_byte *)&dbuf.name,
-				       sizeof (dbuf.name), byte_order);
-      target_read_string (addr, &namebuf, SO_NAME_MAX_PATH_SIZE - 1, &errcode);
-      if (errcode != 0)
-	warning (_("Can't read pathname for load map: %s."),
-		 safe_strerror (errcode));
-      else
-	{
-	  strncpy (new->so_name, namebuf, SO_NAME_MAX_PATH_SIZE - 1);
-	  new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
-	  xfree (namebuf);
-	  strcpy (new->so_original_name, new->so_name);
-	}
-
-	if (new->so_name[0] && !match_main (new->so_name))
-	  {
-	    struct lm_info *lmi = new->lm_info;
-	    unsigned int tmp;
-
-	    lmi->lm_addr = lm;
-
-#define EXTRACT(_fld) \
-  extract_unsigned_integer ((gdb_byte *)&dbuf._fld, \
-			    sizeof (dbuf._fld), byte_order);
-
-	    lmi->text_addr = EXTRACT (text_addr);
-	    tmp = EXTRACT (info);
-	    lmi->library_version = (tmp >> 16) & 0xffff;
-	    lmi->bind_mode = (tmp >> 8) & 0xff;
-	    lmi->struct_version = tmp & 0xff;
-	    lmi->text_link_addr = EXTRACT (text_link_addr);
-	    lmi->text_end = EXTRACT (text_end);
-	    lmi->data_start = EXTRACT (data_start);
-	    lmi->bss_start = EXTRACT (bss_start);
-	    lmi->data_end = EXTRACT (data_end);
-	    lmi->got_value = EXTRACT (got_value);
-	    tmp = EXTRACT (tsd_start_addr_ptr);
-	    read_memory (tmp, tsdbuf, 4);
-	    lmi->tsd_start_addr
-	      = extract_unsigned_integer (tsdbuf, 4, byte_order);
-
-#ifdef SOLIB_SOM_DBG
-	    printf ("\n+ library \"%s\" is described at %s\n", new->so_name,
-	    	    paddress (target_gdbarch (), lm));
-	    printf ("  'version' is %d\n", new->lm_info->struct_version);
-	    printf ("  'bind_mode' is %d\n", new->lm_info->bind_mode);
-	    printf ("  'library_version' is %d\n", 
-	    	    new->lm_info->library_version);
-	    printf ("  'text_addr' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->text_addr));
-	    printf ("  'text_link_addr' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->text_link_addr));
-	    printf ("  'text_end' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->text_end));
-	    printf ("  'data_start' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->data_start));
-	    printf ("  'bss_start' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->bss_start));
-	    printf ("  'data_end' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->data_end));
-	    printf ("  'got_value' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->got_value));
-	    printf ("  'tsd_start_addr' is %s\n",
-	    	    paddress (target_gdbarch (), new->lm_info->tsd_start_addr));
-#endif
-
-	    new->addr_low = lmi->text_addr;
-	    new->addr_high = lmi->text_end;
-
-	    /* Link the new object onto the list.  */
-	    new->next = NULL;
-	    *link_ptr = new;
-	    link_ptr = &new->next;
-	  }
- 	else
-	  {
-	    free_so (new);
-	  }
-
-      lm = EXTRACT (next);
-      discard_cleanups (old_chain);
-#undef EXTRACT
-    }
-
-  /* TODO: The original somsolib code has logic to detect and eliminate 
-     duplicate entries.  Do we need that?  */
-
-  return head;
-}
-
-static int
-som_open_symbol_file_object (void *from_ttyp)
-{
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  CORE_ADDR lm, l_name;
-  char *filename;
-  int errcode;
-  int from_tty = *(int *)from_ttyp;
-  gdb_byte buf[4];
-  struct cleanup *cleanup;
-
-  if (symfile_objfile)
-    if (!query (_("Attempt to reload symbols from process? ")))
-      return 0;
-
-  /* First link map member should be the executable.  */
-  if ((lm = link_map_start ()) == 0)
-    return 0;	/* failed somehow...  */
-
-  /* Read address of name from target memory to GDB.  */
-  read_memory (lm + offsetof (struct dld_list, name), buf, 4);
-
-  /* Convert the address to host format.  Assume that the address is
-     unsigned.  */
-  l_name = extract_unsigned_integer (buf, 4, byte_order);
-
-  if (l_name == 0)
-    return 0;		/* No filename.  */
-
-  /* Now fetch the filename from target memory.  */
-  target_read_string (l_name, &filename, SO_NAME_MAX_PATH_SIZE - 1, &errcode);
-
-  if (errcode)
-    {
-      warning (_("failed to read exec filename from attached file: %s"),
-	       safe_strerror (errcode));
-      return 0;
-    }
-
-  cleanup = make_cleanup (xfree, filename);
-  /* Have a pathname: read the symbol file.  */
-  symbol_file_add_main (filename, from_tty);
-
-  do_cleanups (cleanup);
-  return 1;
-}
-
-static void
-som_free_so (struct so_list *so)
-{
-  xfree (so->lm_info);
-}
-
-static CORE_ADDR
-som_solib_thread_start_addr (struct so_list *so)
-{
-  return so->lm_info->tsd_start_addr;
-}
-
-/* Return the GOT value for the shared library in which ADDR belongs.  If
-   ADDR isn't in any known shared library, return zero.  */
-
-static CORE_ADDR
-som_solib_get_got_by_pc (CORE_ADDR addr)
-{
-  struct so_list *so_list = master_so_list ();
-  CORE_ADDR got_value = 0;
-
-  while (so_list)
-    {
-      if (so_list->lm_info->text_addr <= addr
-	  && so_list->lm_info->text_end > addr)
-	{
-	  got_value = so_list->lm_info->got_value;
-	  break;
-	}
-      so_list = so_list->next;
-    }
-  return got_value;
-}
-
-/* Return the address of the handle of the shared library in which
-   ADDR belongs.  If ADDR isn't in any known shared library, return
-   zero.  */
-/* This function is used in initialize_hp_cxx_exception_support in 
-   hppa-hpux-tdep.c.  */
-
-static CORE_ADDR
-som_solib_get_solib_by_pc (CORE_ADDR addr)
-{
-  struct so_list *so_list = master_so_list ();
-
-  while (so_list)
-    {
-      if (so_list->lm_info->text_addr <= addr
-	  && so_list->lm_info->text_end > addr)
-	{
-	  break;
-	}
-      so_list = so_list->next;
-    }
-  if (so_list)
-    return so_list->lm_info->lm_addr;
-  else
-    return 0;
-}
-
-
-static struct target_so_ops som_so_ops;
-
-extern initialize_file_ftype _initialize_som_solib; /* -Wmissing-prototypes */
-
-void
-_initialize_som_solib (void)
-{
-  som_so_ops.relocate_section_addresses = som_relocate_section_addresses;
-  som_so_ops.free_so = som_free_so;
-  som_so_ops.clear_solib = som_clear_solib;
-  som_so_ops.solib_create_inferior_hook = som_solib_create_inferior_hook;
-  som_so_ops.special_symbol_handling = som_special_symbol_handling;
-  som_so_ops.current_sos = som_current_sos;
-  som_so_ops.open_symbol_file_object = som_open_symbol_file_object;
-  som_so_ops.in_dynsym_resolve_code = som_in_dynsym_resolve_code;
-  som_so_ops.bfd_open = solib_bfd_open;
-}
-
-void
-som_solib_select (struct gdbarch *gdbarch)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
-  set_solib_ops (gdbarch, &som_so_ops);
-  tdep->solib_thread_start_addr = som_solib_thread_start_addr;
-  tdep->solib_get_got_by_pc = som_solib_get_got_by_pc;
-  tdep->solib_get_solib_by_pc = som_solib_get_solib_by_pc;
-}
-
-/* The rest of these functions are not part of the solib interface; they 
-   are used by somread.c or hppa-hpux-tdep.c.  */
-
-int
-som_solib_section_offsets (struct objfile *objfile,
-			   struct section_offsets *offsets)
-{
-  struct so_list *so_list = master_so_list ();
-
-  while (so_list)
-    {
-      /* Oh what a pain!  We need the offsets before so_list->objfile
-         is valid.  The BFDs will never match.  Make a best guess.  */
-      if (strstr (objfile_name (objfile), so_list->so_name))
-	{
-	  asection *private_section;
-	  struct obj_section *sect;
-
-	  /* The text offset is easy.  */
-	  offsets->offsets[SECT_OFF_TEXT (objfile)]
-	    = (so_list->lm_info->text_addr
-	       - so_list->lm_info->text_link_addr);
-
-	  /* We should look at presumed_dp in the SOM header, but
-	     that's not easily available.  This should be OK though.  */
-	  private_section = bfd_get_section_by_name (objfile->obfd,
-						     "$PRIVATE$");
-	  if (!private_section)
-	    {
-	      warning (_("Unable to find $PRIVATE$ in shared library!"));
-	      offsets->offsets[SECT_OFF_DATA (objfile)] = 0;
-	      offsets->offsets[SECT_OFF_BSS (objfile)] = 0;
-	      return 1;
-	    }
-	  if (objfile->sect_index_data != -1)
-	    {
-	      offsets->offsets[SECT_OFF_DATA (objfile)]
-		= (so_list->lm_info->data_start - private_section->vma);
-	      if (objfile->sect_index_bss != -1)
-		offsets->offsets[SECT_OFF_BSS (objfile)]
-		  = ANOFFSET (offsets, SECT_OFF_DATA (objfile));
-	    }
-
-	  ALL_OBJFILE_OSECTIONS (objfile, sect)
-	    {
-	      flagword flags = bfd_get_section_flags (objfile->obfd,
-						      sect->the_bfd_section);
-
-	      if ((flags & SEC_CODE) != 0)
-		offsets->offsets[sect->the_bfd_section->index]
-		  = offsets->offsets[SECT_OFF_TEXT (objfile)];
-	      else
-		offsets->offsets[sect->the_bfd_section->index]
-		  = offsets->offsets[SECT_OFF_DATA (objfile)];
-	    }
-
-	  return 1;
-	}
-      so_list = so_list->next;
-    }
-  return 0;
-}
diff --git a/gdb/solib-som.h b/gdb/solib-som.h
deleted file mode 100644
index aa10fe0..0000000
--- a/gdb/solib-som.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Handle SOM shared libraries for GDB, the GNU Debugger.
-
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef SOLIB_SOM_H
-#define SOLIB_SOM_H
-
-struct objfile;
-struct section_offsets;
-struct gdbarch;
-
-extern int hpux_major_release;
-
-void som_solib_select (struct gdbarch *gdbarch);
-
-int som_solib_section_offsets (struct objfile *objfile,
-			       struct section_offsets *offsets);
-
-#endif
-
diff --git a/gdb/somread.c b/gdb/somread.c
deleted file mode 100644
index fcd02bd..0000000
--- a/gdb/somread.c
+++ /dev/null
@@ -1,547 +0,0 @@
-/* Read HP PA/Risc object files for GDB.
-   Copyright (C) 1991-2014 Free Software Foundation, Inc.
-   Written by Fred Fish at Cygnus Support.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "bfd.h"
-#include "som/aout.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "stabsread.h"
-#include "gdb-stabs.h"
-#include "complaints.h"
-#include "demangle.h"
-#include "som.h"
-#include "libhppa.h"
-#include "psymtab.h"
-
-#include "solib-som.h"
-
-/* Read the symbol table of a SOM file.
-
-   Given an open bfd, a base address to relocate symbols to, and a
-   flag that specifies whether or not this bfd is for an executable
-   or not (may be shared library for example), add all the global
-   function and data symbols to the minimal symbol table.  */
-
-static void
-som_symtab_read (bfd *abfd, struct objfile *objfile,
-		 struct section_offsets *section_offsets)
-{
-  struct cleanup *cleanup;
-  struct gdbarch *gdbarch = get_objfile_arch (objfile);
-  unsigned int number_of_symbols;
-  int val, dynamic;
-  char *stringtab;
-  asection *shlib_info;
-  struct som_external_symbol_dictionary_record *buf, *bufp, *endbufp;
-  char *symname;
-  const int symsize = sizeof (struct som_external_symbol_dictionary_record);
-
-
-  number_of_symbols = bfd_get_symcount (abfd);
-
-  /* Allocate a buffer to read in the debug info.
-     We avoid using alloca because the memory size could be so large
-     that we could hit the stack size limit.  */
-  buf = xmalloc (symsize * number_of_symbols);
-  cleanup = make_cleanup (xfree, buf);
-  bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET);
-  val = bfd_bread (buf, symsize * number_of_symbols, abfd);
-  if (val != symsize * number_of_symbols)
-    error (_("Couldn't read symbol dictionary!"));
-
-  /* Allocate a buffer to read in the som stringtab section of
-     the debugging info.  Again, we avoid using alloca because
-     the data could be so large that we could potentially hit
-     the stack size limitat.  */
-  stringtab = xmalloc (obj_som_stringtab_size (abfd));
-  make_cleanup (xfree, stringtab);
-  bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET);
-  val = bfd_bread (stringtab, obj_som_stringtab_size (abfd), abfd);
-  if (val != obj_som_stringtab_size (abfd))
-    error (_("Can't read in HP string table."));
-
-  /* We need to determine if objfile is a dynamic executable (so we
-     can do the right thing for ST_ENTRY vs ST_CODE symbols).
-
-     There's nothing in the header which easily allows us to do
-     this.
-
-     This code used to rely upon the existence of a $SHLIB_INFO$
-     section to make this determination.  HP claims that it is
-     more accurate to check for a nonzero text offset, but they
-     have not provided any information about why that test is
-     more accurate.  */
-  dynamic = (ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile)) != 0);
-
-  endbufp = buf + number_of_symbols;
-  for (bufp = buf; bufp < endbufp; ++bufp)
-    {
-      enum minimal_symbol_type ms_type;
-      unsigned int flags = bfd_getb32 (bufp->flags);
-      unsigned int symbol_type
-	= (flags >> SOM_SYMBOL_TYPE_SH) & SOM_SYMBOL_TYPE_MASK;
-      unsigned int symbol_scope
-	= (flags >> SOM_SYMBOL_SCOPE_SH) & SOM_SYMBOL_SCOPE_MASK;
-      CORE_ADDR symbol_value = bfd_getb32 (bufp->symbol_value);
-      asection *section = NULL;
-
-      QUIT;
-
-      /* Compute the section.  */
-      switch (symbol_scope)
-	{
-	case SS_EXTERNAL:
-	  if (symbol_type != ST_STORAGE)
-	    section = bfd_und_section_ptr;
-	  else
-	    section = bfd_com_section_ptr;
-	  break;
-
-	case SS_UNSAT:
-	  if (symbol_type != ST_STORAGE)
-	    section = bfd_und_section_ptr;
-	  else
-	    section = bfd_com_section_ptr;
-	  break;
-
-	case SS_UNIVERSAL:
-	  section = bfd_section_from_som_symbol (abfd, bufp);
-	  break;
-
-	case SS_LOCAL:
-	  section = bfd_section_from_som_symbol (abfd, bufp);
-	  break;
-	}
-
-      switch (symbol_scope)
-	{
-	case SS_UNIVERSAL:
-	case SS_EXTERNAL:
-	  switch (symbol_type)
-	    {
-	    case ST_SYM_EXT:
-	    case ST_ARG_EXT:
-	      continue;
-
-	    case ST_CODE:
-	    case ST_PRI_PROG:
-	    case ST_SEC_PROG:
-	    case ST_MILLICODE:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_text;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-	      break;
-
-	    case ST_ENTRY:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      /* For a dynamic executable, ST_ENTRY symbols are
-	         the stubs, while the ST_CODE symbol is the real
-	         function.  */
-	      if (dynamic)
-		ms_type = mst_solib_trampoline;
-	      else
-		ms_type = mst_text;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-	      break;
-
-	    case ST_STUB:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_solib_trampoline;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-	      break;
-
-	    case ST_DATA:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_data;
-	      break;
-	    default:
-	      continue;
-	    }
-	  break;
-
-#if 0
-	  /* SS_GLOBAL and SS_LOCAL are two names for the same thing (!).  */
-	case SS_GLOBAL:
-#endif
-	case SS_LOCAL:
-	  switch (symbol_type)
-	    {
-	    case ST_SYM_EXT:
-	    case ST_ARG_EXT:
-	      continue;
-
-	    case ST_CODE:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_file_text;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-
-	    check_strange_names:
-	      /* Utah GCC 2.5, FSF GCC 2.6 and later generate correct local
-	         label prefixes for stabs, constant data, etc.  So we need
-	         only filter out L$ symbols which are left in due to
-	         limitations in how GAS generates SOM relocations.
-
-	         When linking in the HPUX C-library the HP linker has
-	         the nasty habit of placing section symbols from the literal
-	         subspaces in the middle of the program's text.  Filter
-	         those out as best we can.  Check for first and last character
-	         being '$'.
-
-	         And finally, the newer HP compilers emit crud like $PIC_foo$N
-	         in some circumstance (PIC code I guess).  It's also claimed
-	         that they emit D$ symbols too.  What stupidity.  */
-	      if ((symname[0] == 'L' && symname[1] == '$')
-	      || (symname[0] == '$' && symname[strlen (symname) - 1] == '$')
-		  || (symname[0] == 'D' && symname[1] == '$')
-		  || (strncmp (symname, "L0\001", 3) == 0)
-		  || (strncmp (symname, "$PIC", 4) == 0))
-		continue;
-	      break;
-
-	    case ST_PRI_PROG:
-	    case ST_SEC_PROG:
-	    case ST_MILLICODE:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_file_text;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-	      break;
-
-	    case ST_ENTRY:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      /* SS_LOCAL symbols in a shared library do not have
-		 export stubs, so we do not have to worry about
-		 using mst_file_text vs mst_solib_trampoline here like
-		 we do for SS_UNIVERSAL and SS_EXTERNAL symbols above.  */
-	      ms_type = mst_file_text;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-	      break;
-
-	    case ST_STUB:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_solib_trampoline;
-	      symbol_value = gdbarch_addr_bits_remove (gdbarch, symbol_value);
-	      break;
-
-
-	    case ST_DATA:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_file_data;
-	      goto check_strange_names;
-
-	    default:
-	      continue;
-	    }
-	  break;
-
-	  /* This can happen for common symbols when -E is passed to the
-	     final link.  No idea _why_ that would make the linker force
-	     common symbols to have an SS_UNSAT scope, but it does.
-
-	     This also happens for weak symbols, but their type is
-	     ST_DATA.  */
-	case SS_UNSAT:
-	  switch (symbol_type)
-	    {
-	    case ST_STORAGE:
-	    case ST_DATA:
-	      symname = bfd_getb32 (bufp->name) + stringtab;
-	      ms_type = mst_data;
-	      break;
-
-	    default:
-	      continue;
-	    }
-	  break;
-
-	default:
-	  continue;
-	}
-
-      if (bfd_getb32 (bufp->name) > obj_som_stringtab_size (abfd))
-	error (_("Invalid symbol data; bad HP string table offset: %s"),
-	       plongest (bfd_getb32 (bufp->name)));
-
-      if (bfd_is_const_section (section))
-	{
-	  struct obj_section *iter;
-
-	  ALL_OBJFILE_OSECTIONS (objfile, iter)
-	    {
-	      CORE_ADDR start;
-	      CORE_ADDR len;
-
-	      if (bfd_is_const_section (iter->the_bfd_section))
-		continue;
-
-	      start = bfd_get_section_vma (iter->objfile->obfd,
-					   iter->the_bfd_section);
-	      len = bfd_get_section_size (iter->the_bfd_section);
-	      if (start <= symbol_value && symbol_value < start + len)
-		{
-		  section = iter->the_bfd_section;
-		  break;
-		}
-	    }
-	}
-
-      prim_record_minimal_symbol_and_info (symname, symbol_value, ms_type,
-					   gdb_bfd_section_index (objfile->obfd,
-								  section),
-					   objfile);
-    }
-
-  do_cleanups (cleanup);
-}
-
-/* Scan and build partial symbols for a symbol file.
-   We have been initialized by a call to som_symfile_init, which 
-   currently does nothing.
-
-   SECTION_OFFSETS is a set of offsets to apply to relocate the symbols
-   in each section.  This is ignored, as it isn't needed for SOM.
-
-   This function only does the minimum work necessary for letting the
-   user "name" things symbolically; it does not read the entire symtab.
-   Instead, it reads the external and static symbols and puts them in partial
-   symbol tables.  When more extensive information is requested of a
-   file, the corresponding partial symbol table is mutated into a full
-   fledged symbol table by going back and reading the symbols
-   for real.
-
-   We look for sections with specific names, to tell us what debug
-   format to look for.
-
-   somstab_build_psymtabs() handles STABS symbols.
-
-   Note that SOM files have a "minimal" symbol table, which is vaguely
-   reminiscent of a COFF symbol table, but has only the minimal information
-   necessary for linking.  We process this also, and use the information to
-   build gdb's minimal symbol table.  This gives us some minimal debugging
-   capability even for files compiled without -g.  */
-
-static void
-som_symfile_read (struct objfile *objfile, int symfile_flags)
-{
-  bfd *abfd = objfile->obfd;
-  struct cleanup *back_to;
-
-  init_minimal_symbol_collection ();
-  back_to = make_cleanup_discard_minimal_symbols ();
-
-  /* Process the normal SOM symbol table first.
-     This reads in the DNTT and string table, but doesn't
-     actually scan the DNTT.  It does scan the linker symbol
-     table and thus build up a "minimal symbol table".  */
-
-  som_symtab_read (abfd, objfile, objfile->section_offsets);
-
-  /* Install any minimal symbols that have been collected as the current
-     minimal symbols for this objfile.
-     Further symbol-reading is done incrementally, file-by-file,
-     in a step known as "psymtab-to-symtab" expansion.  hp-symtab-read.c
-     contains the code to do the actual DNTT scanning and symtab building.  */
-  install_minimal_symbols (objfile);
-  do_cleanups (back_to);
-
-  /* Now read information from the stabs debug sections.
-     This is emitted by gcc.  */
-  stabsect_build_psymtabs (objfile,
-			   "$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
-}
-
-/* Initialize anything that needs initializing when a completely new symbol
-   file is specified (not just adding some symbols from another file, e.g. a
-   shared library).
-
-   We reinitialize buildsym, since we may be reading stabs from a SOM file.  */
-
-static void
-som_new_init (struct objfile *ignore)
-{
-  stabsread_new_init ();
-  buildsym_new_init ();
-}
-
-/* Perform any local cleanups required when we are done with a particular
-   objfile.  I.e, we are in the process of discarding all symbol information
-   for an objfile, freeing up all memory held for it, and unlinking the
-   objfile struct from the global list of known objfiles.  */
-
-static void
-som_symfile_finish (struct objfile *objfile)
-{
-}
-
-/* SOM specific initialization routine for reading symbols.  */
-
-static void
-som_symfile_init (struct objfile *objfile)
-{
-  /* SOM objects may be reordered, so set OBJF_REORDERED.  If we
-     find this causes a significant slowdown in gdb then we could
-     set it in the debug symbol readers only when necessary.  */
-  objfile->flags |= OBJF_REORDERED;
-}
-
-/* An object of this type is passed to find_section_offset.  */
-
-struct find_section_offset_arg
-{
-  /* The objfile.  */
-
-  struct objfile *objfile;
-
-  /* Flags to invert.  */
-
-  flagword invert;
-
-  /* Flags to look for.  */
-
-  flagword flags;
-
-  /* A text section with non-zero size, if any.  */
-
-  asection *best_section;
-
-  /* An empty text section, if any.  */
-
-  asection *empty_section;
-};
-
-/* A callback for bfd_map_over_sections that tries to find a section
-   with particular flags in an objfile.  */
-
-static void
-find_section_offset (bfd *abfd, asection *sect, void *arg)
-{
-  struct find_section_offset_arg *info = arg;
-  flagword aflag;
-
-  aflag = bfd_get_section_flags (abfd, sect);
-
-  aflag ^= info->invert;
-
-  if ((aflag & info->flags) == info->flags)
-    {
-      if (bfd_section_size (abfd, sect) > 0)
-	{
-	  if (info->best_section == NULL)
-	    info->best_section = sect;
-	}
-      else
-	{
-	  if (info->empty_section == NULL)
-	    info->empty_section = sect;
-	}
-    }
-}
-
-/* Set a section index from a BFD.  */
-
-static void
-set_section_index (struct objfile *objfile, flagword invert, flagword flags,
-		   int *index_ptr)
-{
-  struct find_section_offset_arg info;
-
-  info.objfile = objfile;
-  info.best_section = NULL;
-  info.empty_section = NULL;
-  info.invert = invert;
-  info.flags = flags;
-  bfd_map_over_sections (objfile->obfd, find_section_offset, &info);
-
-  if (info.best_section)
-    *index_ptr = info.best_section->index;
-  else if (info.empty_section)
-    *index_ptr = info.empty_section->index;
-}
-
-/* SOM specific parsing routine for section offsets.
-
-   Plain and simple for now.  */
-
-static void
-som_symfile_offsets (struct objfile *objfile,
-		     const struct section_addr_info *addrs)
-{
-  int i;
-  CORE_ADDR text_addr;
-  asection *sect;
-
-  objfile->num_sections = bfd_count_sections (objfile->obfd);
-  objfile->section_offsets = (struct section_offsets *)
-    obstack_alloc (&objfile->objfile_obstack, 
-		   SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
-
-  set_section_index (objfile, 0, SEC_ALLOC | SEC_CODE,
-		     &objfile->sect_index_text);
-  set_section_index (objfile, 0, SEC_ALLOC | SEC_DATA,
-		     &objfile->sect_index_data);
-  set_section_index (objfile, SEC_LOAD, SEC_ALLOC | SEC_LOAD,
-		     &objfile->sect_index_bss);
-  set_section_index (objfile, 0, SEC_ALLOC | SEC_READONLY,
-		     &objfile->sect_index_rodata);
-
-  /* First see if we're a shared library.  If so, get the section
-     offsets from the library, else get them from addrs.  */
-  if (!som_solib_section_offsets (objfile, objfile->section_offsets))
-    {
-      /* Note: Here is OK to compare with ".text" because this is the
-         name that gdb itself gives to that section, not the SOM
-         name.  */
-      for (i = 0; i < addrs->num_sections; i++)
-	if (strcmp (addrs->other[i].name, ".text") == 0)
-	  break;
-      text_addr = addrs->other[i].addr;
-
-      for (i = 0; i < objfile->num_sections; i++)
-	(objfile->section_offsets)->offsets[i] = text_addr;
-    }
-}
-\f
-
-
-/* Register that we are able to handle SOM object file formats.  */
-
-static const struct sym_fns som_sym_fns =
-{
-  som_new_init,			/* init anything gbl to entire symtab */
-  som_symfile_init,		/* read initial info, setup for sym_read() */
-  som_symfile_read,		/* read a symbol file into symtab */
-  NULL,				/* sym_read_psymbols */
-  som_symfile_finish,		/* finished with file, cleanup */
-  som_symfile_offsets,		/* Translate ext. to int. relocation */
-  default_symfile_segments,	/* Get segment information from a file.  */
-  NULL,
-  default_symfile_relocate,	/* Relocate a debug section.  */
-  NULL,				/* sym_get_probes */
-  &psym_functions
-};
-
-initialize_file_ftype _initialize_somread;
-
-void
-_initialize_somread (void)
-{
-  add_symtab_fns (bfd_target_som_flavour, &som_sym_fns);
-}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-10-16 23:00 [patch] Remove HPUX Jan Kratochvil
@ 2014-10-17  0:21 ` Michael Eager
  2014-10-17 13:26   ` Joel Brobecker
  2014-11-21  3:20 ` Yao Qi
  2014-12-01 14:21 ` [patch] Remove HPUX Simon Marchi
  2 siblings, 1 reply; 28+ messages in thread
From: Michael Eager @ 2014-10-17  0:21 UTC (permalink / raw)
  To: Jan Kratochvil, gdb-patches; +Cc: Joel Brobecker

On 10/16/14 15:00, Jan Kratochvil wrote:
> Hi,
>
> IIUC it is a pre-requisite for IPv6 support, some UNICes do not support
> getaddrinfo required for IPv6.  But coincidentally such UNICes are no longer
> really supported by GDB.  Therefore it was concluded we can remove all such
> UNICes and then we can implement IPv6 easily with getaddrinfo.
>
> In mail
> 	Re: getaddrinfo available on all GDB hosts? [Re: [PATCH v2] Add IPv6 support for remote TCP connections]
> 	Message-ID: <20140211034157.GG5485@adacore.com>
> 	https://sourceware.org/ml/gdb-patches/2014-02/msg00333.html
> Joel said:
> # [...] HP-UX [...] are probably de facto unmaintained, at this point.
>
> So I chose HP-UX first for this patch.

There is a LinkedIn HP-UX Users group with almost 4000 members.
I don't know whether it is active or moribund.  It might be nice
to see if anyone in the group cares before pulling the plug.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-10-17  0:21 ` Michael Eager
@ 2014-10-17 13:26   ` Joel Brobecker
  2014-10-17 17:18     ` Michael Eager
  0 siblings, 1 reply; 28+ messages in thread
From: Joel Brobecker @ 2014-10-17 13:26 UTC (permalink / raw)
  To: Michael Eager; +Cc: Jan Kratochvil, gdb-patches

> There is a LinkedIn HP-UX Users group with almost 4000 members.
> I don't know whether it is active or moribund.  It might be nice
> to see if anyone in the group cares before pulling the plug.

Would you mind sending them a link to this message, and ask if
any of them would like to step up for it? FWIW, I don't have
any idea of the status of the debugger. On PA, the last version
I used was 6.3; on ia64, it was 7.5.

Thank you,
-- 
Joel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-10-17 13:26   ` Joel Brobecker
@ 2014-10-17 17:18     ` Michael Eager
  2014-11-19 18:54       ` Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Michael Eager @ 2014-10-17 17:18 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Jan Kratochvil, gdb-patches

On 10/17/14 06:26, Joel Brobecker wrote:
>> There is a LinkedIn HP-UX Users group with almost 4000 members.
>> I don't know whether it is active or moribund.  It might be nice
>> to see if anyone in the group cares before pulling the plug.
>
> Would you mind sending them a link to this message, and ask if
> any of them would like to step up for it? FWIW, I don't have
> any idea of the status of the debugger. On PA, the last version
> I used was 6.3; on ia64, it was 7.5.

I posted messages about dropping GDB support in HP-UX in
several LinkedIn groups related to HP-UX.  Some messages are
awaiting approval.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-10-17 17:18     ` Michael Eager
@ 2014-11-19 18:54       ` Jan Kratochvil
  2014-11-19 19:39         ` Michael Eager
  2015-03-10  5:04         ` Sergio Durigan Junior
  0 siblings, 2 replies; 28+ messages in thread
From: Jan Kratochvil @ 2014-11-19 18:54 UTC (permalink / raw)
  To: Michael Eager; +Cc: Joel Brobecker, gdb-patches

On Fri, 17 Oct 2014 19:18:48 +0200, Michael Eager wrote:
> On 10/17/14 06:26, Joel Brobecker wrote:
> >>There is a LinkedIn HP-UX Users group with almost 4000 members.
> >>I don't know whether it is active or moribund.  It might be nice
> >>to see if anyone in the group cares before pulling the plug.
> >
> >Would you mind sending them a link to this message, and ask if
> >any of them would like to step up for it? FWIW, I don't have
> >any idea of the status of the debugger. On PA, the last version
> >I used was 6.3; on ia64, it was 7.5.
> 
> I posted messages about dropping GDB support in HP-UX in
> several LinkedIn groups related to HP-UX.  Some messages are
> awaiting approval.

Are the messages still awaiting approval?


Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-11-19 18:54       ` Jan Kratochvil
@ 2014-11-19 19:39         ` Michael Eager
  2014-11-21  9:32           ` Pedro Alves
  2015-03-10  5:04         ` Sergio Durigan Junior
  1 sibling, 1 reply; 28+ messages in thread
From: Michael Eager @ 2014-11-19 19:39 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Joel Brobecker, gdb-patches

On 11/19/14 10:54, Jan Kratochvil wrote:
> On Fri, 17 Oct 2014 19:18:48 +0200, Michael Eager wrote:
>> On 10/17/14 06:26, Joel Brobecker wrote:
>>>> There is a LinkedIn HP-UX Users group with almost 4000 members.
>>>> I don't know whether it is active or moribund.  It might be nice
>>>> to see if anyone in the group cares before pulling the plug.
>>>
>>> Would you mind sending them a link to this message, and ask if
>>> any of them would like to step up for it? FWIW, I don't have
>>> any idea of the status of the debugger. On PA, the last version
>>> I used was 6.3; on ia64, it was 7.5.
>>
>> I posted messages about dropping GDB support in HP-UX in
>> several LinkedIn groups related to HP-UX.  Some messages are
>> awaiting approval.
>
> Are the messages still awaiting approval?

Folks on LinkedIn were mostly concerned that changes in FSF
GDB support would affect their use of HP's WDB debugger.  I
assured them that this was not the case.

I was in touch with people in HP's debugger group about a week
ago.  They have a version of gdb based on gdb-6.5 and their
changes have not been pushed back to FSF.  They only use GDB
for GCC compilations, which they no longer support.  (They
only support their aC++ compiler and wdb debugger.)  They said
that they were aware of the proposal to drop HPUX support from
FSF GDB.

My contact at HP said that he had reached out to others
at HP to see if there was interest for keeping HPUX support
in FSF GDB alive, but hadn't received any positive responses.

As McCoy said "It's dead, Jim."

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-10-16 23:00 [patch] Remove HPUX Jan Kratochvil
  2014-10-17  0:21 ` Michael Eager
@ 2014-11-21  3:20 ` Yao Qi
  2015-03-13 19:17   ` [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX] Jan Kratochvil
  2014-12-01 14:21 ` [patch] Remove HPUX Simon Marchi
  2 siblings, 1 reply; 28+ messages in thread
From: Yao Qi @ 2014-11-21  3:20 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches, Joel Brobecker

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> I did not investigate too much which other parts of GDB could be removed
> along, there may be some dead code now (but it always has been).

Directory testsuite/gdb.hp should be removed, as well as some target
triplet checking on hpux in testsuite/lib/gdb.exp.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-11-19 19:39         ` Michael Eager
@ 2014-11-21  9:32           ` Pedro Alves
  2015-03-13 19:26             ` [commit] " Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Pedro Alves @ 2014-11-21  9:32 UTC (permalink / raw)
  To: Michael Eager, Jan Kratochvil; +Cc: Joel Brobecker, gdb-patches

On 11/19/2014 07:39 PM, Michael Eager wrote:

> Folks on LinkedIn were mostly concerned that changes in FSF
> GDB support would affect their use of HP's WDB debugger.  I
> assured them that this was not the case.

Thanks.  If no actual users care, then there's no reason
for us to care either.

+1 from me for dropping support as well then.

> 
> I was in touch with people in HP's debugger group about a week
> ago.  They have a version of gdb based on gdb-6.5 and their
> changes have not been pushed back to FSF.  They only use GDB
> for GCC compilations, which they no longer support.  (They
> only support their aC++ compiler and wdb debugger.)  They said
> that they were aware of the proposal to drop HPUX support from
> FSF GDB.

+2 even then.

> 
> My contact at HP said that he had reached out to others
> at HP to see if there was interest for keeping HPUX support
> in FSF GDB alive, but hadn't received any positive responses.
> 
> As McCoy said "It's dead, Jim."

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-10-16 23:00 [patch] Remove HPUX Jan Kratochvil
  2014-10-17  0:21 ` Michael Eager
  2014-11-21  3:20 ` Yao Qi
@ 2014-12-01 14:21 ` Simon Marchi
  2015-03-11 21:57   ` Jan Kratochvil
  2 siblings, 1 reply; 28+ messages in thread
From: Simon Marchi @ 2014-12-01 14:21 UTC (permalink / raw)
  To: gdb-patches; +Cc: jan.kratochvil

On 2014-10-16 06:00 PM, Jan Kratochvil wrote:
> Hi,
> 
> IIUC it is a pre-requisite for IPv6 support, some UNICes do not support
> getaddrinfo required for IPv6.  But coincidentally such UNICes are no longer
> really supported by GDB.  Therefore it was concluded we can remove all such
> UNICes and then we can implement IPv6 easily with getaddrinfo.
> 
> In mail
> 	Re: getaddrinfo available on all GDB hosts? [Re: [PATCH v2] Add IPv6 support for remote TCP connections]
> 	Message-ID: <20140211034157.GG5485@adacore.com>
> 	https://sourceware.org/ml/gdb-patches/2014-02/msg00333.html
> Joel said:
> # [...] HP-UX [...] are probably de facto unmaintained, at this point.
> 
> So I chose HP-UX first for this patch.
> 
> 
> # We should probably send an announcement if we ever implement a change
> # we know might be breaking some platforms, though.
> 
> Not sure if anything should be really done for this part.
> 
> I did not test it anyhow, not sure how, it still builds on Linux.
> 
> I did not investigate too much which other parts of GDB could be removed
> along, there may be some dead code now (but it always has been).

I stumbled upon one of them in elfread.c (elf_symtab_read), a comment mentions a special case for hpux.

> I am not sure if somread.c really can be removed or not, I have removed it.
> 
> The same patch is also available as a GIT branch at:
> 	https://sourceware.org/git/?p=archer.git;a=shortlog;h=refs/heads/jankratochvil/nohpux
> 
> 24 files changed, 47 insertions(+), 7384 deletions(-)
> 
> 
> Thanks,
> Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-11-19 18:54       ` Jan Kratochvil
  2014-11-19 19:39         ` Michael Eager
@ 2015-03-10  5:04         ` Sergio Durigan Junior
  2015-03-10 14:23           ` Michael Eager
  1 sibling, 1 reply; 28+ messages in thread
From: Sergio Durigan Junior @ 2015-03-10  5:04 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Michael Eager, Joel Brobecker, gdb-patches

On Wednesday, November 19 2014, Jan Kratochvil wrote:

>> I posted messages about dropping GDB support in HP-UX in
>> several LinkedIn groups related to HP-UX.  Some messages are
>> awaiting approval.
>
> Are the messages still awaiting approval?

Hello Jan,

Just a ping.  I think the final conclusion was that the patch could be
pushed after all.

Thanks,

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2015-03-10  5:04         ` Sergio Durigan Junior
@ 2015-03-10 14:23           ` Michael Eager
  0 siblings, 0 replies; 28+ messages in thread
From: Michael Eager @ 2015-03-10 14:23 UTC (permalink / raw)
  To: Sergio Durigan Junior, Jan Kratochvil; +Cc: Joel Brobecker, gdb-patches

On 03/09/15 22:04, Sergio Durigan Junior wrote:
> On Wednesday, November 19 2014, Jan Kratochvil wrote:
>
>>> I posted messages about dropping GDB support in HP-UX in
>>> several LinkedIn groups related to HP-UX.  Some messages are
>>> awaiting approval.
>>
>> Are the messages still awaiting approval?
>
> Hello Jan,
>
> Just a ping.  I think the final conclusion was that the patch could be
> pushed after all.

Agreed.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2014-12-01 14:21 ` [patch] Remove HPUX Simon Marchi
@ 2015-03-11 21:57   ` Jan Kratochvil
  2015-03-12 17:05     ` Pedro Alves
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-11 21:57 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On Mon, 01 Dec 2014 15:20:59 +0100, Simon Marchi wrote:
> On 2014-10-16 06:00 PM, Jan Kratochvil wrote:
> > I did not investigate too much which other parts of GDB could be removed
> > along, there may be some dead code now (but it always has been).
> 
> I stumbled upon one of them in elfread.c (elf_symtab_read), a comment
> mentions a special case for hpux.

The problem is that in these other platforms may have been quietly using the
feature and removing it may regress them.  In the patch being prepared
I follow what the comments say, although I do not find it completely safe.


Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2015-03-11 21:57   ` Jan Kratochvil
@ 2015-03-12 17:05     ` Pedro Alves
  2015-03-13 18:34       ` Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Pedro Alves @ 2015-03-12 17:05 UTC (permalink / raw)
  To: Jan Kratochvil, Simon Marchi; +Cc: gdb-patches

On 03/11/2015 09:57 PM, Jan Kratochvil wrote:
> On Mon, 01 Dec 2014 15:20:59 +0100, Simon Marchi wrote:
>> On 2014-10-16 06:00 PM, Jan Kratochvil wrote:
>>> I did not investigate too much which other parts of GDB could be removed
>>> along, there may be some dead code now (but it always has been).
>>
>> I stumbled upon one of them in elfread.c (elf_symtab_read), a comment
>> mentions a special case for hpux.
> 
> The problem is that in these other platforms may have been quietly using the
> feature and removing it may regress them.  In the patch being prepared
> I follow what the comments say, although I do not find it completely safe.

Yeah, best do such clean ups as separate patches, I think.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2015-03-12 17:05     ` Pedro Alves
@ 2015-03-13 18:34       ` Jan Kratochvil
  2015-03-13 19:40         ` Pedro Alves
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-13 18:34 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Simon Marchi, gdb-patches

On Thu, 12 Mar 2015 18:05:39 +0100, Pedro Alves wrote:
> On 03/11/2015 09:57 PM, Jan Kratochvil wrote:
> > On Mon, 01 Dec 2014 15:20:59 +0100, Simon Marchi wrote:
> >> On 2014-10-16 06:00 PM, Jan Kratochvil wrote:
> >>> I did not investigate too much which other parts of GDB could be removed
> >>> along, there may be some dead code now (but it always has been).
> >>
> >> I stumbled upon one of them in elfread.c (elf_symtab_read), a comment
> >> mentions a special case for hpux.
> > 
> > The problem is that in these other platforms may have been quietly using the
> > feature and removing it may regress them.  In the patch being prepared
> > I follow what the comments say, although I do not find it completely safe.
> 
> Yeah, best do such clean ups as separate patches, I think.

To make it clear what to do / not to do:

hpux OS support to be deleted, that is:
  hppa-hpux delete
  ia64-hpux delete (other ia64 support still should remain intact)
hppa-linux and hppa-openbsd support should remain intact (also hppa in general)
hp_cc_compiler+hp_aCC_compiler in testsuite - I do not know

Do you agree?


Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [testsuite patch] Remove gdb.hp  [Re: [patch] Remove HPUX]
  2014-11-21  3:20 ` Yao Qi
@ 2015-03-13 19:17   ` Jan Kratochvil
  2015-03-18 14:58     ` Remove --xdb? (Re: [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX]) Pedro Alves
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-13 19:17 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches, Joel Brobecker

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

On Fri, 21 Nov 2014 04:20:04 +0100, Yao Qi wrote:
> Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> > I did not investigate too much which other parts of GDB could be removed
> > along, there may be some dead code now (but it always has been).
> 
> Directory testsuite/gdb.hp should be removed,

Attached, OK for check-in?


> as well as some target triplet checking on hpux in testsuite/lib/gdb.exp.

To be done later, I have spent some time on it but it seems unclear to me what
should / should not be deleted, GDB seems to assume in many cases hppa==hpux
which is not always the case.


Jan

[-- Attachment #2: testhpdir.patch --]
[-- Type: text/plain, Size: 188924 bytes --]

gdb/
2015-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* config/djgpp/README: Remove gdb.hp.

gdb/testsuite/
2015-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* Makefile.in (ALL_SUBDIRS): Remove gdb.hp.
	* README: Remove HP-UX and gdb.hp.
	(configuration):
	* configure: Regenerate.
	* configure.ac (AC_OUTPUT): Remove gdb.hp/Makefile,
	gdb.hp/gdb.objdbg/Makefile, gdb.hp/gdb.base-hp/Makefile,
	gdb.hp/gdb.aCC/Makefile, gdb.hp/gdb.compat/Makefile,
	gdb.hp/gdb.defects/Makefile.
	* gdb.hp/Makefile.in: File deleted.
	* gdb.hp/gdb.aCC/Makefile.in: File deleted.
	* gdb.hp/gdb.aCC/optimize.c: File deleted.
	* gdb.hp/gdb.aCC/optimize.exp: File deleted.
	* gdb.hp/gdb.aCC/run.c: File deleted.
	* gdb.hp/gdb.aCC/watch-cmd.exp: File deleted.
	* gdb.hp/gdb.base-hp/Makefile.in: File deleted.
	* gdb.hp/gdb.base-hp/callfwmall.c: File deleted.
	* gdb.hp/gdb.base-hp/callfwmall.exp: File deleted.
	* gdb.hp/gdb.base-hp/dollar.c: File deleted.
	* gdb.hp/gdb.base-hp/dollar.exp: File deleted.
	* gdb.hp/gdb.base-hp/genso-thresh.c: File deleted.
	* gdb.hp/gdb.base-hp/hwwatchbus.c: File deleted.
	* gdb.hp/gdb.base-hp/hwwatchbus.exp: File deleted.
	* gdb.hp/gdb.base-hp/pxdb.c: File deleted.
	* gdb.hp/gdb.base-hp/pxdb.exp: File deleted.
	* gdb.hp/gdb.base-hp/reg-pa64.exp: File deleted.
	* gdb.hp/gdb.base-hp/reg-pa64.s: File deleted.
	* gdb.hp/gdb.base-hp/reg.exp: File deleted.
	* gdb.hp/gdb.base-hp/reg.s: File deleted.
	* gdb.hp/gdb.base-hp/sized-enum.c: File deleted.
	* gdb.hp/gdb.base-hp/sized-enum.exp: File deleted.
	* gdb.hp/gdb.base-hp/so-thresh.exp: File deleted.
	* gdb.hp/gdb.base-hp/so-thresh.mk: File deleted.
	* gdb.hp/gdb.base-hp/so-thresh.sh: File deleted.
	* gdb.hp/gdb.compat/Makefile.in: File deleted.
	* gdb.hp/gdb.compat/average.c: File deleted.
	* gdb.hp/gdb.compat/sum.c: File deleted.
	* gdb.hp/gdb.compat/xdb.c: File deleted.
	* gdb.hp/gdb.compat/xdb0.c: File deleted.
	* gdb.hp/gdb.compat/xdb0.h: File deleted.
	* gdb.hp/gdb.compat/xdb1.c: File deleted.
	* gdb.hp/gdb.compat/xdb1.exp: File deleted.
	* gdb.hp/gdb.compat/xdb2.exp: File deleted.
	* gdb.hp/gdb.compat/xdb3.exp: File deleted.
	* gdb.hp/gdb.defects/Makefile.in: File deleted.
	* gdb.hp/gdb.defects/bs14602.c: File deleted.
	* gdb.hp/gdb.defects/bs14602.exp: File deleted.
	* gdb.hp/gdb.defects/solib-d.c: File deleted.
	* gdb.hp/gdb.defects/solib-d.exp: File deleted.
	* gdb.hp/gdb.defects/solib-d1.c: File deleted.
	* gdb.hp/gdb.defects/solib-d2.c: File deleted.
	* gdb.hp/gdb.objdbg/Makefile.in: File deleted.
	* gdb.hp/gdb.objdbg/objdbg01.exp: File deleted.
	* gdb.hp/gdb.objdbg/objdbg01/x1.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg01/x2.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg01/x3.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg01/x3.h: File deleted.
	* gdb.hp/gdb.objdbg/objdbg02.exp: File deleted.
	* gdb.hp/gdb.objdbg/objdbg02/x1.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg02/x2.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg02/x3.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg03.exp: File deleted.
	* gdb.hp/gdb.objdbg/objdbg03/x1.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg03/x2.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg03/x3.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg04.exp: File deleted.
	* gdb.hp/gdb.objdbg/objdbg04/x.h: File deleted.
	* gdb.hp/gdb.objdbg/objdbg04/x1.cc: File deleted.
	* gdb.hp/gdb.objdbg/objdbg04/x2.cc: File deleted.
	* gdb.hp/gdb.objdbg/tools/symaddr: File deleted.
	* gdb.hp/gdb.objdbg/tools/symaddr.pa64: File deleted.
	* gdb.hp/gdb.objdbg/tools/test-objdbg.cc: File deleted.
	* gdb.hp/tools/odump: File deleted.

diff --git a/gdb/config/djgpp/README b/gdb/config/djgpp/README
index 94de337..2ae6535 100644
--- a/gdb/config/djgpp/README
+++ b/gdb/config/djgpp/README
@@ -181,8 +181,8 @@ the size of your environment), etc.
 
 Note that djcheck.sh only recurses into those of the subdirectories of
 the test suite which test features supported by the DJGPP port of GDB.
-For example, the tests in the gdb.gdbtk, gdb.threads, and gdb.hp
-directories are not run.
+For example, the tests in the gdb.gdbtk, and gdb.threads directories
+are not run.
 
 
 Enjoy,
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 53cb754..c064f06 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -33,7 +33,7 @@ EXEEXT = @EXEEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
 ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.btrace gdb.cell gdb.cp \
-	gdb.disasm gdb.dlang gdb.dwarf2 gdb.fortran gdb.gdb gdb.go gdb.hp \
+	gdb.disasm gdb.dlang gdb.dwarf2 gdb.fortran gdb.gdb gdb.go \
 	gdb.java gdb.linespec gdb.mi gdb.modula2 gdb.multi \
 	gdb.objc gdb.opencl gdb.opt gdb.pascal gdb.python gdb.server \
 	gdb.stabs gdb.reverse gdb.threads gdb.trace gdb.xml \
diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index fa17781..70f65cd 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -411,8 +411,7 @@ gdb.cp for C++ and gdb.java for Java.
 gdb.<platform>
 
 Non-portable tests.  The tests are specific to a specific
-configuration (host or target), such as HP-UX or eCos.  Example is
-gdb.hp, for HP-UX.
+configuration (host or target), such as eCos.
 
 gdb.arch
 
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index 859f348..0853e48 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -3514,7 +3514,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 ac_config_files="$ac_config_files lib/pdtrace"
 
 
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -4232,12 +4232,6 @@ do
     "gdb.go/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.go/Makefile" ;;
     "gdb.server/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.server/Makefile" ;;
     "gdb.java/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.java/Makefile" ;;
-    "gdb.hp/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.hp/Makefile" ;;
-    "gdb.hp/gdb.objdbg/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.hp/gdb.objdbg/Makefile" ;;
-    "gdb.hp/gdb.base-hp/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.hp/gdb.base-hp/Makefile" ;;
-    "gdb.hp/gdb.aCC/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.hp/gdb.aCC/Makefile" ;;
-    "gdb.hp/gdb.compat/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.hp/gdb.compat/Makefile" ;;
-    "gdb.hp/gdb.defects/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.hp/gdb.defects/Makefile" ;;
     "gdb.guile/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.guile/Makefile" ;;
     "gdb.linespec/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.linespec/Makefile" ;;
     "gdb.mi/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.mi/Makefile" ;;
diff --git a/gdb/testsuite/configure.ac b/gdb/testsuite/configure.ac
index 9de9fcc..f7e9eea 100644
--- a/gdb/testsuite/configure.ac
+++ b/gdb/testsuite/configure.ac
@@ -111,9 +111,7 @@ AC_OUTPUT([Makefile \
   gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile \
   gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile \
   gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile \
-  gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile \
-  gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
-  gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile \
+  gdb.guile/Makefile gdb.linespec/Makefile \
   gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
   gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
   gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
diff --git a/gdb/testsuite/gdb.hp/Makefile.in b/gdb/testsuite/gdb.hp/Makefile.in
deleted file mode 100644
index 442dc44..0000000
--- a/gdb/testsuite/gdb.hp/Makefile.in
+++ /dev/null
@@ -1,42 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-SUBDIRS = gdb.aCC gdb.base-hp gdb.compat gdb.defects gdb.objdbg
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ core *.o
-	-rm -f *.dwo *.dwp
-	if [ x"${SUBDIRS}" != x ] ; then \
-	    for dir in ${SUBDIRS}; \
-	    do \
-		    echo "$$dir:"; \
-		    if [ -d $$dir ]; then \
-			    (cd $$dir; $(MAKE) clean); \
-		    fi; \
-	    done ; \
-	else true; fi
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp gdb.log gdb.sum
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-	if [ x"${SUBDIRS}" != x ] ; then \
-	    for dir in ${SUBDIRS}; \
-	    do \
-		    echo "$$dir:"; \
-		    if [ -d $$dir ]; then \
-			    (cd $$dir; $(MAKE) distclean); \
-		    fi; \
-	    done ; \
-	else true; fi
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in b/gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in
deleted file mode 100644
index ff90963..0000000
--- a/gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in
+++ /dev/null
@@ -1,25 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = exception namespace optimize run
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/optimize.c b/gdb/testsuite/gdb.hp/gdb.aCC/optimize.c
deleted file mode 100644
index 2a8daa8..0000000
--- a/gdb/testsuite/gdb.hp/gdb.aCC/optimize.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Source for debugging optimimzed code test.
-
-    cc -g -O -o optimize optimize.c
-*/
-int callee();
-int test_opt;
-
-int main()
-{
-   int a,b,c,d,e,f,g,h;
-
-   a = 10;;
-
-   /* Value propagate
-    */
-   b = 2 * a + 1;
-   c = 3 * b + 2;
-
-   /* Re-use expressions
-    */
-   d = (2 * a + 1) * (3 * b + 2);
-   e = (2 * a + 1) * (3 * b + 2);
-
-   /* Create dead stores--do lines still exist?
-    */
-   d = (2 * a + 1) * (3 * b + 2);
-   e = (2 * a + 1) * (3 * b + 2);
-   d = (2 * a + 1) * (3 * b + 2);
-   e = (2 * a + 1) * (3 * b + 2);
-
-   /* Alpha and psi motion
-    */
-   if( test_opt ) {
-       f = e - d;
-       f = f--;
-   }
-   else {
-       f = e - d;
-       f = f + d * e;
-   }
-
-   /* Chi and Rho motion
-    */
-   h = 0;
-   do {
-       h++;
-       a = b * c + d * e;  /* Chi */
-       f = f + d * e;
-       g = f + d * e;      /* Rho */
-       callee( g+1 );
-       test_opt = (test_opt != 1);  /* Cycles */
-   } while( g && h < 10);
-
-   /* Opps for tail recursion, unrolling,
-    * folding, evaporating
-    */
-   for( a = 0; a < 100; a++ ) {
-       callee( callee ( callee( a )));
-       callee( callee ( callee( a )));
-       callee( callee ( callee( a )));
-   }
-
-   return callee( test_opt );
-}
-
-/* defined late to keep line numbers the same
-*/
-int callee( x )
-    int x;      /* not used! */
-{
-    test_opt++; /* side effect */
-
-    return test_opt;
-}
-
-/* end */
\ No newline at end of file
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp b/gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp
deleted file mode 100644
index 60f34f7..0000000
--- a/gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# optimize.exp -- Expect script for testing apps compiled with -O
-
-# There is no DOC support for gdb yet, return 0 for now.
-return 0
-
-global timeout
-
-# use this to debug:
-#
-#log_user 1
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile optimize
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info] {
-    return -1
-}
-
- 
-if { $gcc_compiled } then { continue }
-
-
-# Vanilla -O, which is the same as +O2
-#
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug optimize=+O2}] != "" } {
-     untested optimize.exp
-     return -1
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-send_gdb "file $binfile\n"
-gdb_expect {
-    -re ".*no debugging symbols found.*$gdb_prompt $" {
-        fail "Didn't find debug symbols; CHFts23488" 
-    }
-    -re ".*No header section (PXDB data).*$gdb_prompt $" {
-        fail "pointless warning"
-    }
-    -re ".*done.*$gdb_prompt $" {
-        pass "load debug symbols"
-    }
-    timeout { fail "timeout on file" }
-}
-
-# Two lines at the same place after opt.
-#
-gdb_test "b 28"   ".*"
-gdb_test "b 26"   ".*also set at.*" "same line"
-
-gdb_test "b 47"   ".*"
-gdb_test "b 48"   ".*also set at.*" "same line"
-
-gdb_test "tb main" ".*"
-
-set old_timeout $timeout
-set timeout [expr "$timeout + 200"]
-send_gdb "r\n"
-gdb_expect {
-    -re ".*No header section (PXDB data).*$gdb_prompt $" {
-        fail "pointless warning"
-    }
-    -re ".*main.*2\[12].*$gdb_prompt $" {
-        # All the lines before line 21 or 22 are 
-        # evaporated by the compiler.
-        # 
-        pass "hit main"
-    }
-    -re ".*$gdb_prompt $" {
-        fail "didn't hit main"
-    }
-    timeout { fail "timeout on run" }
-}
-set timeout $old_timeout
-
-gdb_test "c" ".*Breakpoint 1.*33.*"
-gdb_test "c" ".*51.*"
-gdb_test "cle" ".*Deleted breakpoints.*" "set 2, so del 2"
-
-gdb_test "b callee" ".*"
-gdb_test "c" ".*callee.*" "hit called rtn"
-
-gdb_exit
-
-# +O4, don't use -g
-#
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {optimize=+O4}] != "" } {
-     untested optimize.exp
-     return -1
-}
-
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-send_gdb "file $binfile\n"
-gdb_expect {
-    -re ".*no debugging symbols found.*$gdb_prompt $" {
-        pass "Didn't find debug symbols, as expected"
-    }
-    -re ".*No header section (PXDB data).*$gdb_prompt $" {
-        fail "pointless warning"
-    }
-    -re ".*done.*$gdb_prompt $" {
-        fail "Somehow found debug symbols--make this a pass?"
-    }
-    timeout { fail "timeout on file" }
-}
-
-gdb_test "b main"   ".*"
-gdb_test "b callee" ".*"
-gdb_test "r"        ".*Breakpoint 1.*main.*"
-gdb_test "si 3"     ".*main.*" "steps"
-gdb_test "x/4i \$pc" ".*main.*main+4.*main+8.*"
-gdb_test "c"        ".*callee.*" "hit bp"
-gdb_test "disas"    ".*callee.*callee+4.*callee+12.*"
-gdb_test "si"       ".*callee.*"
-gdb_test "fin"      ".*Run till exit.*main.*" "finish"
-gdb_test "x/i \$pc" ".*main+.*" "back in main"
-gdb_exit
-
-#remote_exec build "rm -f ${binfile}"
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/run.c b/gdb/testsuite/gdb.hp/gdb.aCC/run.c
deleted file mode 100644
index 60cc08e..0000000
--- a/gdb/testsuite/gdb.hp/gdb.aCC/run.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *	This simple classical example of recursion is useful for
- *	testing stack backtraces and such.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main (int argc, char *argv[], char **envp)
-/*int argc;
-char *argv[], **envp;*/
-{
-    int factorial (int);
-#ifdef FAKEARGV
-    printf ("%d\n", factorial (1));
-#else    
-    if (argc != 2) {
-	printf ("usage:  factorial <number>\n");
-	return 1;
-    } else {
-	printf ("%d\n", factorial (atoi (argv[1])));
-    }
-#endif
-    return 0;
-}
-
-int factorial (int value)
-/*int value;*/
-{
-    int  local_var;
-
-    if (value > 1) {
-	value *= factorial (value - 1);
-    }
-    local_var = value;
-    return (value);
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp b/gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp
deleted file mode 100644
index bdef945..0000000
--- a/gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-#
-# test special commands
-#
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile "run"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     untested watch-cmd.exp
-     return -1
-
-}
-
-if [get_compiler_info] {
-    return -1
-}
-if { $gcc_compiled } then { continue }
-
-
-gdb_exit
-gdb_start
-delete_breakpoints
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-
-proc watchpoint_command_test {} {
-    global gdb_prompt
-
-    if [target_info exists noargs] { 
-        verbose "Skipping watchpoint_command_test because of noargs."
-        return
-    }
-
-    if { ![runto factorial] } then { gdb_suppress_tests }
-    # Don't depend upon argument passing, since most simulators don't currently
-    # support it.  Bash value variable to be what we want.
-    gdb_test "p value=6" "" "set value to 6 in watchpoint_command_test"
-    delete_breakpoints
-
-    # Verify that we can create a watchpoint, and give it a commands
-    # list that continues the inferior.  We set the watchpoint on a
-    # local variable, too, so that it self-deletes when the watched
-    # data goes out of scope.
-    #
-    # What should happen is: Each time the watchpoint triggers, it
-    # continues the inferior.  Eventually, the watchpoint will self-
-    # delete, when the watched variable is out of scope.  But by that
-    # time, the inferior should have exited.  GDB shouldn't crash or
-    # anything untoward as a result of this.
-    #
-    send_gdb "watch local_var\n"
-    gdb_expect {
-      -re ".*\[Ww\]atchpoint (\[0-9\]*): local_var.*$gdb_prompt $"\
-              { pass "watch local_var"
-                set wp_id $expect_out(1,string)
-                send_gdb "commands $wp_id\n"
-                gdb_expect {
-                  -re "Type commands for when breakpoint $wp_id is hit, one per line.*>"\
-                          { pass "begin commands on watch"}
-                  -re "$gdb_prompt $"\
-                          {fail "begin commands on watch"}
-                  timeout {fail "(timeout) begin commands on watch"}
-                }
-              }
-    -re "$gdb_prompt $"\
-              {fail "watch local_var"}
-      timeout {fail "(timeout) watch local_var"}
-    }
-#    set wp_id $expect_out(1,string)
-#    send_gdb "commands $wp_id\n"
-#    gdb_expect {
-#      -re "Type commands for when breakpoint $wp_id is hit, one per line.*>"\
-#              {pass "begin commands on watch"}
-#      -re "$gdb_prompt $"\
-#              {fail "begin commands on watch"}
-#      timeout {fail "(timeout) begin commands on watch"}
-#    }
-    send_gdb "print value\n"
-    gdb_expect {
-      -re ">"\
-              {pass "add print command to watch"}
-      -re "$gdb_prompt $"\
-              {fail "add print command to watch"}
-      timeout {fail "(timeout) add print command to watch"}
-    }
-    send_gdb "continue\n"
-    gdb_expect {
-      -re ">"\
-              {pass "add continue command to watch"}
-      -re "$gdb_prompt $"\
-              {fail "add continue command to watch"}
-      timeout {fail "(timeout) add continue command to watch"}
-    }
-    send_gdb "end\n"
-    gdb_expect {
-      -re "$gdb_prompt $"\
-              {pass "begin commands on watch"}
-      timeout {fail "(timeout) begin commands on watch"}
-    }
-    send_gdb "continue\n"
-    gdb_expect {
-      -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*in main.*$gdb_prompt $"\
-              {pass "continue with watch"}
-      -re "$gdb_prompt $"\
-              {fail "continue with watch"}
-      timeout {fail "(timeout) continue with watch"}
-    }
-    send_gdb "continue\n"
-    gdb_expect {
-      -re "Continuing.*$gdb_prompt $"\
-              {pass "continue until exit"}
-      -re "$gdb_prompt $"\
-              {fail "continue until exit"}
-      timeout {fail "(timeout) continue until exit"}
-    }
-}
-
-watchpoint_command_test
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in b/gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in
deleted file mode 100644
index 633266a..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = dollar hwwatchbus.bak pxdb reg reg-pa64 \
-	so-thresh genso-thresh sized-enum
-
-MISCELLANEOUS = so-thresh.c so-thresh.lopt so-thresh.make.out \
-	lib*-so-thresh.*
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.c b/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.c
deleted file mode 100644
index f22a248..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/* Support program for testing gdb's ability to call functions
-   in an inferior which doesn't itself call malloc, pass appropriate
-   arguments to those functions, and get the returned result. */
-
-#ifdef NO_PROTOTYPES
-#define PARAMS(paramlist) ()
-#else
-#define PARAMS(paramlist) paramlist
-#endif
-
-# include <string.h>
-
-char char_val1 = 'a';
-char char_val2 = 'b';
-
-short short_val1 = 10;
-short short_val2 = -23;
-
-int int_val1 = 87;
-int int_val2 = -26;
-
-long long_val1 = 789;
-long long_val2 = -321;
-
-float float_val1 = 3.14159;
-float float_val2 = -2.3765;
-
-double double_val1 = 45.654;
-double double_val2 = -67.66;
-
-#define DELTA (0.001)
-
-char *string_val1 = (char *)"string 1";
-char *string_val2 = (char *)"string 2";
-
-char char_array_val1[] = "carray 1";
-char char_array_val2[] = "carray 2";
-
-struct struct1 {
-  char c;
-  short s;
-  int i;
-  long l;
-  float f;
-  double d;
-  char a[4];
-} struct_val1 = { 'x', 87, 76, 51, 2.1234, 9.876, "foo" };
-
-/* Some functions that can be passed as arguments to other test
-   functions, or called directly. */
-#ifdef PROTOTYPES
-int add (int a, int b)
-#else
-int add (a, b) int a, b;
-#endif
-{
-  return (a + b);
-}
-
-#ifdef PROTOTYPES
-int doubleit (int a)
-#else
-int doubleit (a)
-int a;
-#endif
-{
-  return (a + a);
-}
-
-int (*func_val1) PARAMS((int,int)) = add;
-int (*func_val2) PARAMS((int)) = doubleit;
-
-/* An enumeration and functions that test for specific values. */
-
-enum enumtype { enumval1, enumval2, enumval3 };
-enum enumtype enum_val1 = enumval1;
-enum enumtype enum_val2 = enumval2;
-enum enumtype enum_val3 = enumval3;
-
-#ifdef PROTOTYPES
-int t_enum_value1 (enum enumtype enum_arg)
-#else
-t_enum_value1 (enum_arg)
-enum enumtype enum_arg;
-#endif
-{
-  return (enum_arg == enum_val1);
-}
-
-#ifdef PROTOTYPES
-int t_enum_value2 (enum enumtype enum_arg)
-#else
-t_enum_value2 (enum_arg)
-enum enumtype enum_arg;
-#endif
-{
-  return (enum_arg == enum_val2);
-}
-
-#ifdef PROTOTYPES
-int t_enum_value3 (enum enumtype enum_arg)
-#else
-t_enum_value3 (enum_arg)
-enum enumtype enum_arg;
-#endif
-{
-  return (enum_arg == enum_val3);
-}
-
-/* A function that takes a vector of integers (along with an explicit
-   count) and returns their sum. */
-
-#ifdef PROTOTYPES
-int sum_args (int argc, int argv[])
-#else
-int sum_args (argc, argv)
-int argc;
-int argv[];
-#endif
-{
-  int sumval = 0;
-  int idx;
-
-  for (idx = 0; idx < argc; idx++)
-    {
-      sumval += argv[idx];
-    }
-  return (sumval);
-}
-
-/* Test that we can call functions that take structs and return
-   members from that struct */
-
-#ifdef PROTOTYPES
-char   t_structs_c (struct struct1 tstruct) { return (tstruct.c); }
-short  t_structs_s (struct struct1 tstruct) { return (tstruct.s); }
-int    t_structs_i (struct struct1 tstruct) { return (tstruct.i); }
-long   t_structs_l (struct struct1 tstruct) { return (tstruct.l); }
-float  t_structs_f (struct struct1 tstruct) { return (tstruct.f); }
-double t_structs_d (struct struct1 tstruct) { return (tstruct.d); }
-char  *t_structs_a (struct struct1 tstruct)
-{
-  static char buf[8];
-  strcpy (buf, tstruct.a);
-  return buf;
-}
-#else
-char   t_structs_c (tstruct) struct struct1 tstruct; { return (tstruct.c); }
-short  t_structs_s (tstruct) struct struct1 tstruct; { return (tstruct.s); }
-int    t_structs_i (tstruct) struct struct1 tstruct; { return (tstruct.i); }
-long   t_structs_l (tstruct) struct struct1 tstruct; { return (tstruct.l); }
-float  t_structs_f (tstruct) struct struct1 tstruct; { return (tstruct.f); }
-double t_structs_d (tstruct) struct struct1 tstruct; { return (tstruct.d); }
-char  *t_structs_a (tstruct) struct struct1 tstruct;
-{
-  static char buf[8];
-  strcpy (buf, tstruct.a);
-  return buf;
-}
-#endif
-
-/* Test that calling functions works if there are a lot of arguments.  */
-#ifdef PROTOTYPES
-int sum10 (int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9)
-#else
-int
-sum10 (i0, i1, i2, i3, i4, i5, i6, i7, i8, i9)
-     int i0, i1, i2, i3, i4, i5, i6, i7, i8, i9;
-#endif
-{
-  return i0 + i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9;
-}
-
-/* Gotta have a main to be able to generate a linked, runnable
-   executable, and also provide a useful place to set a breakpoint. */
-
-#ifdef PROTOTYPES
-int main()
-#else
-main ()
-#endif
-{
-  t_structs_c(struct_val1);
-  return 0;
-  
-}
-
-/* Functions that expect specific values to be passed and return 
-   either 0 or 1, depending upon whether the values were
-   passed incorrectly or correctly, respectively. */
-
-#ifdef PROTOTYPES
-int t_char_values (char char_arg1, char char_arg2)
-#else
-int t_char_values (char_arg1, char_arg2)
-char char_arg1, char_arg2;
-#endif
-{
-  return ((char_arg1 == char_val1) && (char_arg2 == char_val2));
-}
-
-int
-#ifdef PROTOTYPES
-t_small_values (char arg1, short arg2, int arg3, char arg4, short arg5,
-		char arg6, short arg7, int arg8, short arg9, short arg10)
-#else
-t_small_values (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10)
-     char arg1;
-     short arg2;
-     int arg3;
-     char arg4;
-     short arg5;
-     char arg6;
-     short arg7;
-     int arg8;
-     short arg9;
-     short arg10;
-#endif
-{
-  return arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10;
-}
-
-#ifdef PROTOTYPES
-int t_short_values (short short_arg1, short short_arg2)
-#else
-int t_short_values (short_arg1, short_arg2)
-short short_arg1, short_arg2;
-#endif
-{
-  return ((short_arg1 == short_val1) && (short_arg2 == short_val2));
-}
-
-#ifdef PROTOTYPES
-int t_int_values (int int_arg1, int int_arg2)
-#else
-int t_int_values (int_arg1, int_arg2)
-int int_arg1, int_arg2;
-#endif
-{
-  return ((int_arg1 == int_val1) && (int_arg2 == int_val2));
-}
-
-#ifdef PROTOTYPES
-int t_long_values (long long_arg1, long long_arg2)
-#else
-int t_long_values (long_arg1, long_arg2)
-long long_arg1, long_arg2;
-#endif
-{
-  return ((long_arg1 == long_val1) && (long_arg2 == long_val2));
-}
-
-/* NOTE: THIS FUNCTION MUST NOT BE PROTOTYPED!!!!!
-   There must be one version of "t_float_values" (this one)
-   that is not prototyped, and one (if supported) that is (following).
-   That way GDB can be tested against both cases.  */
-   
-int t_float_values (float_arg1, float_arg2)
-float float_arg1, float_arg2;
-{
-  return ((float_arg1 - float_val1) < DELTA
-	  && (float_arg1 - float_val1) > -DELTA
-	  && (float_arg2 - float_val2) < DELTA
-	  && (float_arg2 - float_val2) > -DELTA);
-}
-
-int
-#ifdef NO_PROTOTYPES
-/* In this case we are just duplicating t_float_values, but that is the
-   easiest way to deal with either ANSI or non-ANSI.  */
-t_float_values2 (float_arg1, float_arg2)
-     float float_arg1, float_arg2;
-#else
-t_float_values2 (float float_arg1, float float_arg2)
-#endif
-{
-  return ((float_arg1 - float_val1) < DELTA
-	  && (float_arg1 - float_val1) > -DELTA
-	  && (float_arg2 - float_val2) < DELTA
-	  && (float_arg2 - float_val2) > -DELTA);
-}
-
-#ifdef PROTOTYPES
-int t_double_values (double double_arg1, double double_arg2)
-#else
-int t_double_values (double_arg1, double_arg2)
-double double_arg1, double_arg2;
-#endif
-{
-  return ((double_arg1 - double_val1) < DELTA
-	  && (double_arg1 - double_val1) > -DELTA
-	  && (double_arg2 - double_val2) < DELTA
-	  && (double_arg2 - double_val2) > -DELTA);
-}
-
-#ifdef PROTOTYPES
-int t_string_values (char *string_arg1, char *string_arg2)
-#else
-int t_string_values (string_arg1, string_arg2)
-char *string_arg1, *string_arg2;
-#endif
-{
-  return (!strcmp (string_arg1, string_val1) &&
-	  !strcmp (string_arg2, string_val2));
-}
-
-#ifdef PROTOTYPES
-int t_char_array_values (char char_array_arg1[], char char_array_arg2[])
-#else
-int t_char_array_values (char_array_arg1, char_array_arg2)
-char char_array_arg1[], char_array_arg2[];
-#endif
-{
-  return (!strcmp (char_array_arg1, char_array_val1) &&
-	  !strcmp (char_array_arg2, char_array_val2));
-}
-
-
-/* This used to simply compare the function pointer arguments with
-   known values for func_val1 and func_val2.  Doing so is valid ANSI
-   code, but on some machines (RS6000, HPPA, others?) it may fail when
-   called directly by GDB.
-
-   In a nutshell, it's not possible for GDB to determine when the address
-   of a function or the address of the function's stub/trampoline should
-   be passed.
-
-   So, to avoid GDB lossage in the common case, we perform calls through the
-   various function pointers and compare the return values.  For the HPPA
-   at least, this allows the common case to work.
-
-   If one wants to try something more complicated, pass the address of
-   a function accepting a "double" as one of its first 4 arguments.  Call
-   that function indirectly through the function pointer.  This would fail
-   on the HPPA.  */
-
-#ifdef PROTOTYPES
-int t_func_values (int (*func_arg1)(int, int), int (*func_arg2)(int))
-#else
-int t_func_values (func_arg1, func_arg2)
-int (*func_arg1) PARAMS ((int, int));
-int (*func_arg2) PARAMS ((int));
-#endif
-{
-  return ((*func_arg1) (5,5)  == (*func_val1) (5,5)
-          && (*func_arg2) (6) == (*func_val2) (6));
-}
-
-#ifdef PROTOTYPES
-int t_call_add (int (*func_arg1)(int, int), int a, int b)
-#else
-int t_call_add (func_arg1, a, b)
-int (*func_arg1) PARAMS ((int, int));
-int a, b;
-#endif
-{
-  return ((*func_arg1)(a, b));
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp
deleted file mode 100644
index 9846bb4..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp
+++ /dev/null
@@ -1,334 +0,0 @@
-# Copyright 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-# These tests are the same as those in callfuncs.exp, except that the
-# test program here does not call malloc.
-#
-# "What in the world does malloc have to do with calling functions in
-# the inferior?"  Well, nothing.  GDB's ability to invoke a function
-# in the inferior program works just fine in programs that have no
-# malloc function available.  It doesn't rely on the inferior's
-# malloc, directly or indirectly.  It just uses the inferior's stack
-# space.
-#
-# "Then what's the point of this test file?"  Well, it just so happens
-# that this file, in addition to testing inferior function calls, also
-# tests GDB's ability to evaluate string literals (like "string 1" and
-# "string 2" in the tests below).  Evaluating *those* sorts of
-# expressions does require malloc.
-#
-# (As an extension to C, GDB also has a syntax for literal arrays of
-# anything, not just characters.  For example, the expression
-# {2,3,4,5} (which appears in the tests below) evaluates to an array
-# of four ints.  So rather than talking just about string literals,
-# we'll use the broader term "array literals".)
-#
-# Now, in this file, we only evaluate array literals when we're about
-# to pass them to a function, but don't be confused --- this is a red
-# herring.  You can evaluate "abcdef" even if you're not about to pass
-# that to a function, and doing so requires malloc even if you're just
-# going to store a pointer to it in a variable, like this:
-#
-#    (gdb) ptype s
-#    type = char *
-#    (gdb) set variable s = "abcdef"
-#
-# According to C's rules for evaluating expressions, arrays are
-# converted into pointers to their first element.  This means that, in
-# order to evaluate an expression like "abcdef", GDB needs to actually
-# find some memory in the inferior we can plop the characters into;
-# then we use that memory's address as the address of our array
-# literal.  GDB finds this memory by calling the inferior's malloc
-# function, if it has one.  So, evaluating an array literal depends on
-# performing an inferior function call, but not vice versa.  (GDB
-# can't just allocate the space on the stack; the pointer may remain
-# live long after the current frame has been popped.)
-#
-# "But, if evaluating array literals requires malloc, what's the point
-# of testing that GDB can do so in a program that doesn't have malloc?
-# It can't work!"  On most systems, that's right, but HP-UX has some
-# sort of dynamic linking magic that ensures that *every* program has
-# malloc.  So on HP-UX, GDB can evaluate array literals even in
-# inferior programs that don't use malloc.  That's why this test is in
-# gdb.hp.
-# 
-# This file has, for some reason, led to well more than its fair share
-# of misunderstandings about the relationship between array literal
-# expressions and inferior function calls.  Folks talk as if you can
-# only evaluate array literals when you're about to pass them to a
-# function.  I think they're assuming that, since GDB is constructing
-# a new frame on the inferior's stack (correct), it's going to use
-# that space for the array literals (incorrect).  Remember that those
-# array literals may need to be live long after the inferior function
-# call returns; GDB can't tell.
-#
-# What makes the confusion worse is that there *is* a relationship
-# between array literals and inferior function calls --- GDB uses
-# inferior function calls to evaluate array literals.  But many people
-# jump to other, incorrect conclusions about this.
-
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile "callfwmall"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested callfwmall.exp
-     return -1
-}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info] {
-    return -1
-}
-
-if {$hp_aCC_compiler} {
-    set prototypes 1
-} else {
-    set prototypes 0
-}
-
-
-# Some targets can't call functions, so don't even bother with this
-# test.
-if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
-    continue
-}
-
-# Set the current language to C.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_c {} {
-    global gdb_prompt
-
-    send_gdb "set language c\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language c (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"c\".*$gdb_prompt $" {
-	    pass "set language to \"c\""
-	    return 1
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"c\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# FIXME:  Before calling this proc, we should probably verify that
-# we can call inferior functions and get a valid integral value
-# returned.
-# Note that it is OK to check for 0 or 1 as the returned values, because C
-# specifies that the numeric value of a relational or logical expression
-# (computed in the inferior) is 1 for true and 0 for false.
-
-proc do_function_calls {} {
-    global prototypes
-    global gcc_compiled
-    global gdb_prompt
-
-    # We need to up this because this can be really slow on some boards.
-    set timeout 60
-
-    gdb_test "p t_char_values(0,0)" " = 0"
-    gdb_test "p t_char_values('a','b')" " = 1"
-    gdb_test "p t_char_values(char_val1,char_val2)" " = 1"
-    gdb_test "p t_char_values('a',char_val2)" " = 1"
-    gdb_test "p t_char_values(char_val1,'b')" " = 1"
-
-    gdb_test "p t_short_values(0,0)" " = 0"
-    gdb_test "p t_short_values(10,-23)" " = 1"
-    gdb_test "p t_short_values(short_val1,short_val2)" " = 1"
-    gdb_test "p t_short_values(10,short_val2)" " = 1"
-    gdb_test "p t_short_values(short_val1,-23)" " = 1"
-
-    gdb_test "p t_int_values(0,0)" " = 0"
-    gdb_test "p t_int_values(87,-26)" " = 1"
-    gdb_test "p t_int_values(int_val1,int_val2)" " = 1"
-    gdb_test "p t_int_values(87,int_val2)" " = 1"
-    gdb_test "p t_int_values(int_val1,-26)" " = 1"
-
-    gdb_test "p t_long_values(0,0)" " = 0"
-    gdb_test "p t_long_values(789,-321)" " = 1"
-    gdb_test "p t_long_values(long_val1,long_val2)" " = 1"
-    gdb_test "p t_long_values(789,long_val2)" " = 1"
-    gdb_test "p t_long_values(long_val1,-321)" " = 1"
-
-    if ![target_info exists gdb,skip_float_tests] {
-	gdb_test "p t_float_values(0.0,0.0)" " = 0"
-
-	# These next four tests fail on the mn10300.
-	# The first value is passed in regs, the other in memory.
-	# Gcc emits different stabs for the two parameters; the first is
-	# claimed to be a float, the second a double.
-	# dbxout.c in gcc claims this is the desired behavior.
-	setup_xfail "mn10300-*-*"
-	gdb_test "p t_float_values(3.14159,-2.3765)" " = 1"
-	setup_xfail "mn10300-*-*"
-	gdb_test "p t_float_values(float_val1,float_val2)" " = 1"
-	setup_xfail "mn10300-*-*"
-	gdb_test "p t_float_values(3.14159,float_val2)" " = 1"
-	setup_xfail "mn10300-*-*"
-	gdb_test "p t_float_values(float_val1,-2.3765)" " = 1"
-
-	# Test passing of arguments which might not be widened.
-	gdb_test "p t_float_values2(0.0,0.0)" " = 0"
-
-	# Although PR 5318 mentions SunOS specifically, this seems
-	# to be a generic problem on quite a few platforms.
-	if $prototypes then {
-	    setup_xfail "sparc-*-*" "mips*-*-*" 5318
-	    if {!$gcc_compiled} then {
-		setup_xfail "i*86-*-sysv4*" 5318
-	    }
-	}
-	gdb_test "p t_float_values2(3.14159,float_val2)" " = 1"
-	gdb_test "p t_small_values(1,2,3,4,5,6,7,8,9,10)" " = 55"
-
-	gdb_test "p t_double_values(0.0,0.0)" " = 0"
-	gdb_test "p t_double_values(45.654,-67.66)" " = 1"
-	gdb_test "p t_double_values(double_val1,double_val2)" " = 1"
-	gdb_test "p t_double_values(45.654,double_val2)" " = 1"
-	gdb_test "p t_double_values(double_val1,-67.66)" " = 1"
-   
-    }
-
-    gdb_test "p t_string_values(string_val2,string_val1)" " = 0"
-    gdb_test "p t_string_values(string_val1,string_val2)" " = 1"
-    gdb_test "p t_string_values(\"string 1\",\"string 2\")" " = 1"
-    gdb_test "p t_string_values(\"string 1\",string_val2)" " = 1"
-    gdb_test "p t_string_values(string_val1,\"string 2\")" " = 1"
-
-    gdb_test "p t_char_array_values(char_array_val2,char_array_val1)" " = 0"
-    gdb_test "p t_char_array_values(char_array_val1,char_array_val2)" " = 1"
-    gdb_test "p t_char_array_values(\"carray 1\",\"carray 2\")" " = 1"
-    gdb_test "p t_char_array_values(\"carray 1\",char_array_val2)" " = 1"
-    gdb_test "p t_char_array_values(char_array_val1,\"carray 2\")" " = 1"
-
-    gdb_test "p doubleit(4)" " = 8"
-    gdb_test "p add(4,5)" " = 9"
-    gdb_test "p t_func_values(func_val2,func_val1)" " = 0"
-    gdb_test "p t_func_values(func_val1,func_val2)" " = 1"
-
-    # On the rs6000, we need to pass the address of the trampoline routine,
-    # not the address of add itself.  I don't know how to go from add to
-    # the address of the trampoline.  Similar problems exist on the HPPA,
-    # and in fact can present an unsolvable problem as the stubs may not
-    # even exist in the user's program.  We've slightly recoded t_func_values
-    # to avoid such problems in the common case.  This may or may not help
-    # the RS6000.
-    setup_xfail "rs6000*-*-*"
-
-    if {![istarget hppa*-*-hpux*]} then {
-	gdb_test "p t_func_values(add,func_val2)" " = 1"
-    }
-
-    setup_xfail "rs6000*-*-*"
-
-    if {![istarget hppa*-*-hpux*]} then {
-	gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
-    }
-
-    gdb_test "p t_call_add(func_val1,3,4)" " = 7"
-
-    setup_xfail "rs6000*-*-*"
-
-    if {![istarget hppa*-*-hpux*]} then {
-	gdb_test "p t_call_add(add,3,4)" " = 7"
-    }
-    
-    gdb_test "p t_enum_value1(enumval1)" " = 1"
-    gdb_test "p t_enum_value1(enum_val1)" " = 1"
-    gdb_test "p t_enum_value1(enum_val2)" " = 0"
-
-    gdb_test "p t_enum_value2(enumval2)" " = 1"
-    gdb_test "p t_enum_value2(enum_val2)" " = 1"
-    gdb_test "p t_enum_value2(enum_val1)" " = 0"
-
-    gdb_test "p sum_args(1,{2})" " = 2"
-    gdb_test "p sum_args(2,{2,3})" " = 5"
-    gdb_test "p sum_args(3,{2,3,4})" " = 9"
-    gdb_test "p sum_args(4,{2,3,4,5})" " = 14"
-    gdb_test "p sum10 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)" " = 55"
-
-    gdb_test "p t_structs_c(struct_val1)" "= 120 'x'" \
-	"call inferior func with struct - returns char"
-    gdb_test "p t_structs_s(struct_val1)" "= 87" \
-	"call inferior func with struct -  returns short"
-    gdb_test "p t_structs_i(struct_val1)" "= 76" \
-	"call inferior func with struct - returns int"
-    gdb_test "p t_structs_l(struct_val1)" "= 51" \
-	"call inferior func with struct - returns long"
-    gdb_test "p t_structs_f(struct_val1)" "= 2.12.*" \
-	"call inferior func with struct - returns float"
-    gdb_test "p t_structs_d(struct_val1)" "= 9.87.*" \
-	"call inferior func with struct - returns double"
-    gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?\"foo\"" \
-	"call inferior func with struct - returns char *"
-
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" ""
-gdb_test "set width 0" ""
-
-if { $hp_aCC_compiler } {
-    # Do not set language explicitly to 'C'.  This will cause aCC
-    # tests to fail because promotion rules are different.  Just let
-    # the language be set to the default.
-
-    if { ![runto_main] } {
-	gdb_suppress_tests
-    }
-
-    gdb_test "set overload-resolution 0" ".*"
-} else {
-    if { ![set_lang_c] } {
-	gdb_suppress_tests
-    } else {
-	if { ![runto_main] } {
-	    gdb_suppress_tests
-	}
-    }
-}
-
-gdb_test "next" ".*"
-do_function_calls
-
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c b/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c
deleted file mode 100644
index 8fd9893..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifdef PROTOTYPES
-int main (int argc, char **argv)
-#else
-main (argc, argv, envp)
-     int argc;
-     char **argv;
-#endif
-{
-    return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp
deleted file mode 100644
index 98b9664..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp
+++ /dev/null
@@ -1,146 +0,0 @@
-#   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# GDB tests for names beginning with '$'
-
-# This is aimed at HP-UX systems where a lot of system
-# routines and names begin with '$' or '$$'.  GDB 4.16 was
-# unable to deal with these names as they clashed with
-# convenience variables.  Wildebeest should accept such
-# names in preference to convenience variables.
-
-# This file was written by Satish Pai <pai@apollo.hp.com>
-# 1997-09-24
-
-#
-# test running programs
-#
-
-if { [skip_hp_tests] } { continue }
-
-set testfile "dollar"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested dollar.exp
-     return -1
-}
-
-#source ${binfile}.ci
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-
-if ![runto_main] then {
-    perror "couldn't run to breakpoint"
-    continue
-}
-
-# Test for millicode routines
-# hppa64 does not support dyncall
-if ![istarget "hppa64*-*-*"] {
-send_gdb "print \$\$dyncall\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <>.*$gdb_prompt $" { pass "print \$\$dyncall" }
-   -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <.*dyncall>.*$gdb_prompt $" { pass "print \$\$dyncall" }
-   -re "\\$\[0-9\]* = void"            { fail "print \$\$dyncall -- interpreted as convenience var" }
-   -re "$gdb_prompt $"                     { fail "print \$\$dyncall" }
-   timeout                             { fail "(timeout) print \$\$dyncall" }
-}
-send_gdb "print \$\$dyncall_external\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <>.*$gdb_prompt $" { pass "print \$\$dyncall_external" }
-	-re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <.*dyncall_external>.*$gdb_prompt $" { pass "print \$\$dyncall_external" }
-   -re "\\$\[0-9\]* = void"            { fail "print \$\$dyncall_external -- interpreted as convenience var" }
-   -re "$gdb_prompt $"                     { fail "print \$\$dyncall_external" }
-   timeout                             { fail "(timeout) print \$\$dyncall_external" }
-}
-
-# Set a breakpoint on a millicode routine
-send_gdb "break \$\$dyncall\n"   
-gdb_expect {   
-   -re "Breakpoint \[0-9\]* at $hex.*$gdb_prompt $" { pass "break \$\$dyncall" }
-   -re "Function.*not defined.*$gdb_prompt $" {fail "break \$\$dyncall -- no \$\$dyncall?" }
-   -re "Convenience variables used in line specs must have integer values\\..*$gdb_prompt $" {
-             fail "break \$\$dyncall -- treated as convenince variable"
-       }          
-   -re "$gdb_prompt $"                     { fail "print break \$\$dyncall" }
-   timeout                             { fail "(timeout) print break \$\$dyncall" }
-}
-
-# Disassemble $$dyncall
-send_gdb "disassemble \$\$dyncall\n"   
-gdb_expect {   
-   -re "Dump of assembler code for function.*$gdb_prompt $" { pass "disas \$\$dyncall" }
-   -re "$gdb_prompt $"                     { fail "disas \$\$dyncall" }
-   timeout                             { fail "(timeout) disas \$\$dyncall" }
-}
-
-# Try to set $$dyncall like a convenience var.
-send_gdb "set \$\$dyncall = 77\n"   
-gdb_expect {   
-   -re "Invalid cast.*$gdb_prompt $" { pass "set \$\$dyncall = 77" }
-   -re "$gdb_prompt $"                     { fail "set \$\$dyncall = 77" }
-   timeout                             { fail "(timeout) set \$\$dyncall = 77" }
-}
-}
-
-# Try out some other $ name, not millicode
-if [istarget "hppa64*-*-*"] {
-    #hppa64 uses __argv instead of $ARGV.
-    send_gdb "print \__argv\n"   
-    gdb_expect {   
-        -re "\\$\[0-9\]* = \[0-9\]*.*$gdb_prompt $" { pass "print \__argv" }
-        -re "\\$\[0-9\]* = void.*$gdb_prompt $" {
-	    fail "print \__argv (interpreted as convenience var)"
-	}
-        -re "$gdb_prompt $" { fail "print \__argv" }
-        timeout { fail "(timeout) print \__argv" }
-    }
-
-    send_gdb "ptype \__argv\n"   
-    gdb_expect {   
-        -re "type = <data variable, no debug info>.*$gdb_prompt $" {
-	    pass "ptype \__argv"
-	}
-        -re "type = void.*$gdb_prompt $" {
-	    fail "ptype \__argv (interpreted as convenience var)"
-	}
-        -re "$gdb_prompt $" { fail "ptype \__argv" }
-        timeout { fail "(timeout) ptype \__argv" }
-    }
-} else {
-send_gdb "print \$ARGV\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = \[0-9\]*.*$gdb_prompt $" { pass "print \$ARGV" }
-   -re "\\$\[0-9\]* = void.*$gdb_prompt $" { fail "print \$ARGV (interpreted as convenience var)" }
-   -re "$gdb_prompt $"                     { fail "print \$ARGV" }
-   timeout                             { fail "(timeout) print \$ARGV" }
-}
-send_gdb "ptype \$ARGV\n"   
-gdb_expect {   
-   -re "type = <data variable, no debug info>.*$gdb_prompt $" { pass "ptype \$ARGV" }
-   -re "type = void.*$gdb_prompt $" { fail "ptype \$ARGV (interpreted as convenience var)" }
-   -re "$gdb_prompt $"                     { fail "ptype \$ARGV" }
-   timeout                             { fail "(timeout) ptype \$ARGV" }
-}
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c b/gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c
deleted file mode 100644
index 50756bb..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Program to generate the so-thresh testcase,
- * including associated linked-against shared libraries.
- * Build as:
- *
- *        cc -g -o genso-thresh genso-thresh.c
- *
- * Invoke as:
- *
- *        genso-thresh
- *
- * It will put all the code in the current directory (".").
- *
- * A makefile can also be generated if the -makemake option is used.
- * To use the makefile:
- *
- *        make -f so-thresh.mk all
- *
- * The name of the application is
- *
- *        so-thresh
- *
- * (Revised from a program by John Bishop.  --rehrauer)
- */
-
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-
-int main (argc, argv)
-int    argc;
-char **argv;
-{
-#define NUMBER_OF_INT_VARS 1500
-#define NUMBER_OF_LIBS 3
-    int     lib_num = NUMBER_OF_LIBS;
-    int     i;
-    int     i2;
-    FILE   *main_file;
-    FILE   *lib_file;
-    FILE   *make_file;
-    FILE   *link_file;
-
-    char  testcase_name [1000];
-    char  linkfile_name [1000];
-    char  makefile_name [1000];
-    char  mainfile_name [1000];
-
-    char    file_name[100];
-    /*
-     *        0123456789       <-- length of field
-     *  "./fil0000000002.c";   <-- typical filename
-     *   12345678901234567890  <-- length of string
-     *           10        20
-     *                     ^where null goes
-     */
-    char    file_name_core[100];
-
-    /* Verify input.
-    */
-    if ((argc < 1) || (argc > 2) || (argv == NULL) ||
-        ((argc == 2) && (strcmp (argv[1], "-makemake") != 0)))
-      {
-        printf ("** Syntax: %s [-makemake]\n", argv[0]);
-        return;
-      }
-
-    if (strncmp (argv[0], "gen", 3) != 0)
-      {
-        printf ("** This tool expected to be named \"gen<something>\"\n");
-        return;
-      }
-    strcpy (testcase_name, argv[0]+3);
-
-    strcpy (linkfile_name, testcase_name);
-    strcat (linkfile_name, ".lopt");
-    link_file = fopen (linkfile_name, "w");
-    fprintf (link_file, "# Linker options for %s test\n", testcase_name);
-    
-    /* Generate the makefile, if requested.
-       */
-    if (argc == 2)
-      {
-        strcpy (makefile_name, testcase_name);
-        strcat (makefile_name, ".mk.new");
-        make_file = fopen (makefile_name, "w");
-        printf ("  Note: New makefile (%s) generated.\n", makefile_name);
-        printf ("  May want to update existing makefile, if any.\n");
-        fprintf (make_file, "# Generated automatically by %s\n", argv[0]);
-        fprintf (make_file, "# Make file for %s test\n", testcase_name);
-        fprintf (make_file, "\n");
-        fprintf (make_file, "CFLAGS = +DA1.1 -g\n");
-        fprintf (make_file, "\n");
-        fprintf (make_file, "# This is how to build this generator.\n");
-        fprintf (make_file, "%s.o: %s.c\n", argv[0], argv[0]);
-        fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s.o -c %s.c\n", argv[0], argv[0]);
-        fprintf (make_file, "%s: %s.o\n", argv[0], argv[0]);
-        fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s %s.o\n", argv[0], argv[0]);
-        fprintf (make_file, "\n");
-        fprintf (make_file, "# This is how to run this generator.\n");
-        fprintf (make_file, "# This target should be made before the 'all' target,\n");
-        fprintf (make_file, "# to ensure that the shlib sources are all available.\n");
-        fprintf (make_file, "require_shlibs: %s\n", argv[0]);
-        for (i=0; i < lib_num; i++)
-          {
-            fprintf (make_file, "\tif ! [ -a lib%2.2d_%s.c ] ; then \\\n", i, testcase_name);
-            fprintf (make_file, "\t  %s ; \\\n", argv[0]);
-            fprintf (make_file, "\tfi\n");
-          }
-        fprintf (make_file, "\n");
-        fprintf (make_file, "# This is how to build all the shlibs.\n");
-        fprintf (make_file, "# Be sure to first make the require_shlibs target!\n");
-        for (i=0; i < lib_num; i++)
-          {
-            fprintf (make_file, "lib%2.2d_%s.o: lib%2.2d_%s.c\n", i, testcase_name, i, testcase_name);
-            fprintf (make_file, "\t$(CC) $(CFLAGS) +Z -o lib%2.2d_%s.o -c lib%2.2d_%s.c\n", i, testcase_name, i, testcase_name);
-            fprintf (make_file, "lib%2.2d-%s.sl: lib%2.2d-%s.o\n", i, testcase_name, i, testcase_name);
-            fprintf (make_file, "\t$(LD) $(LDFLAGS) -b -o lib%2.2d-%s.sl lib%2.2d-%s.o\n", i, testcase_name, i, testcase_name);
-          }
-        fprintf (make_file, "\n");
-fprintf (make_file, "# For convenience, here's names for all pieces of all shlibs.\n");
-        fprintf (make_file, "SHLIB_SOURCES = \\\n");
-        for (i=0; i < lib_num-1; i++)
-          fprintf (make_file, "\tlib%2.2d-%s.c \\\n", i, testcase_name);
-        fprintf (make_file, "\tlib%2.2d-%s.c\n", lib_num-1, testcase_name);
-        fprintf (make_file, "SHLIB_OBJECTS = $(SHLIB_SOURCES:.c=.o)\n");
-        fprintf (make_file, "SHLIBS = $(SHLIB_SOURCES:.c=.sl)\n");
-        fprintf (make_file, "SHLIB_NAMES = $(SHLIB_SOURCES:.c=)\n");
-        fprintf (make_file, "EXECUTABLES = $(SHLIBS) %s %s\n", argv[0], testcase_name);
-        fprintf (make_file, "OBJECT_FILES = $(SHLIB_OBJECTS) %s.o %s.o\n", argv[0], testcase_name);
-        fprintf (make_file, "\n");
-        fprintf (make_file, "shlib_objects: $(SHLIB_OBJECTS)\n");
-        fprintf (make_file, "shlibs: $(SHLIBS)\n");
-        fprintf (make_file, "\n");
-        fprintf (make_file, "# This is how to build the debuggable testcase that uses the shlibs.\n");
-        fprintf (make_file, "%s.o: %s.c\n", testcase_name, testcase_name);
-        fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s.o -c %s.c\n", testcase_name, testcase_name);
-        fprintf (make_file, "%s: shlibs %s.o\n", testcase_name, testcase_name);
-        fprintf (make_file, "\t$(LD) $(LDFLAGS) -o %s -lc -L. ", testcase_name);
-        fprintf (make_file, "-c %s /opt/langtools/lib/end.o /lib/crt0.o %s.o\n", linkfile_name, testcase_name);
-        fprintf (make_file, "\n");
-        fprintf (make_file, "# Yeah, but you should first make the require_shlibs target!\n");
-        fprintf (make_file, "all: %s %s\n", testcase_name, argv[0]);
-        fprintf (make_file, "\n");
-        fprintf (make_file, "# To remove everything built via this makefile...\n");
-        fprintf (make_file, "clean:\n");
-        /* Do this carefully, to avoid hitting silly HP-UX ARG_MAX limits... */
-        fprintf (make_file, "\trm -f lib0*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib1*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib2*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib3*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib4*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib5*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib6*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib7*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib8*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f lib9*-%s.*\n", testcase_name);
-        fprintf (make_file, "\trm -f %s %s %s %s.c\n", argv[0], testcase_name, linkfile_name, testcase_name);
-        fprintf (make_file, "\n");
-        fclose (make_file);
-      }
-
-    /* Generate the code for the libraries.
-       */
-    for (i=0; i < lib_num; i++) {
-
-        /* Generate the names for the library.
-         */
-        sprintf (file_name, "lib%2.2d-%s.c", i, testcase_name);
-        sprintf (file_name_core, "lib%2.2d-%s", i, testcase_name);
-
-        /* Generate the source code.
-         */
-        lib_file = fopen (file_name, "w");
-        fprintf (lib_file, "/* Shared library file number %d */\n", i);
-        fprintf (lib_file, "#include <stdio.h>\n\n");
-        fprintf (lib_file, "/* The following variables largely exist to bloat this library's debug info. */\n");
-        fprintf (lib_file, "static char c_static_buf_%d [100];\n", i);
-        for (i2=0; i2<NUMBER_OF_INT_VARS; i2++)
-          fprintf (lib_file, "int i_%d_%d;\n", i, i2);
-        fprintf (lib_file, "\nint r_%d ()\n", i);
-        fprintf (lib_file, "{\n");
-        for (i2=0; i2<NUMBER_OF_INT_VARS; i2++)
-          fprintf (lib_file, "    i_%d_%d = %d*%d;\n", i, i2, i2, i2);
-        fprintf (lib_file, "    return 1;\n");
-        fprintf (lib_file, "}\n\n");
-        fprintf (lib_file, "/* end of generated file */\n");
-        fclose (lib_file);
-
-        /* Add a linker options line
-           */
-        fprintf (link_file, "-l%2.2d-%s\n", i, testcase_name);
-    }
-
-    /* Generate the "main" file.
-     */
-    strcpy (mainfile_name, testcase_name);
-    strcat (mainfile_name, ".c");
-    main_file = fopen (mainfile_name, "w");
-    fprintf (main_file, "/* Generated test progam with %d shared libraries. */\n\n",
-             lib_num);
-    fprintf (main_file, "#include <stdio.h>\n\n");
-
-    for (i = 0; i < lib_num; i++) {
-      fprintf (main_file, "extern int r_%d();\n", i);
-    }
-
-    fprintf (main_file, "\n");
-    fprintf (main_file, "int main()\n");
-    fprintf (main_file, "{\n");
-    fprintf (main_file, "    int accum;\n");
-    fprintf (main_file, "    int lib_num = %d;\n", lib_num);
-  
-    for (i = 0; i < lib_num; i++) {
-      fprintf (main_file, "    accum += r_%d();\n", i);
-    }
-
-    fprintf (main_file, "    printf( \"Final value: %%d, should be %%d\\n\", accum, lib_num );\n\n");
-    fprintf (main_file, "    return 0;\n");
-    fprintf (main_file, "}\n\n");
-    fprintf (main_file, "/* end of generated file */\n");
-    fclose (main_file);
-
-    /* Finish up the link file and the build file
-     */
-    fclose (link_file);
-}
-
-/* End of file */
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c b/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c
deleted file mode 100644
index 833d027..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This program raises a SIGBUS signal on HP-UX when the
-   pointer "bogus_p" is dereferenced.
-   */
-int *  bogus_p = (int *)3;
-
-int main()
-{
-  *bogus_p = 0xdeadbeef;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp
deleted file mode 100644
index 4654ec4..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp
+++ /dev/null
@@ -1,74 +0,0 @@
-#   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-if { [skip_hp_tests] } then { continue }
-
-if { ![istarget "hppa*-*-hpux11.*"] } {
-    verbose "HPUX h/w watch test ignored for non-hppa or pre-HP/UX-10.30 targets."
-    return 0
-}
-
-set testfile "hwwatchbus"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-# build the first test case
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested hwwatchbus.exp
-     return -1
-}
-
-if [get_compiler_info] {
-    return -1
-}
-
-# Start with a fresh gdb
-
-gdb_exit
-remote_exec build "rm -f ${binfile}.bak"
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-# We ought to be able to set a hardware watchpoint, step, and
-# get a SIGBUS or SIGSEGV signal reported.
-#
-if ![runto_main] then {
-  fail "can't run to main"
-  return 0
-}
-
-send_gdb "watch bogus_p\n"
-gdb_expect {
-  -re "Hardware watchpoint \[0-9\]*: bogus_p.*$gdb_prompt $"\
-          {pass "set h/w watchpoint"}
-  -re "$gdb_prompt $"\
-          {fail "set h/w watchpoint"}
-  timeout {fail "(timeout) set h/w watchpoint"}
-}
-
-send_gdb "step\n"
-gdb_expect {
-  -re "Program received signal (SIGBUS|SIGSEGV), (Bus error|Segmentation fault).* in main .*${srcfile}:8.*$gdb_prompt $"\
-          {pass "see real signal when h/w watchpoint set"}
-  -re "$gdb_prompt $"\
-          {fail "see real signal when h/w watchpoint set"}
-  timeout {fail "(timeout) see real signal when h/w watchpoint set"}
-}
-
-remote_exec build "mv ${binfile} ${binfile}.bak"
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c b/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c
deleted file mode 100644
index 31046b5..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <stdio.h>
-
-#ifdef PROTOTYPES
-int callee (int x)
-#else
-int callee( x )
-int x;
-#endif
-{
-    int y = x * x;
-    return (y - 2);
-}
-
-int main()
-{
-    int i;
-    for (i = 1; i < 10; i++)
-        {
-            printf( "%d ", callee( i ));
-            
-        }
-    printf( " Goodbye!\n" );
-    return 0;
-}
-/* This routine exists only for aCC.  The way we compile this test is
-   that we use aCC for the actual compile into the object file but then
-   use ld directly for the link.  When we do this, we get an undefined
-   symbol _main().  Therefore, for aCC, we have this routine in here and
-   ld is happy.  */
-
-#ifdef __cplusplus
-extern "C" {
-void _main()
-{
-}
-}
-#endif
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp
deleted file mode 100644
index dca9070..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-# This file is part of the gdb testsuite
-
-
-# pxdb.exp   Test that gdb calls pxdb on an application
-#            built without it.
-#
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile pxdb
-set srcfile ${testfile}.c
-set objfile ${objdir}/${subdir}/${testfile}.o
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info "c++"] {
-    return -1
-}
-
-if { $gcc_compiled } then { continue }
-
-# To build a non-pxdb-ed file, use
-#
-#     <compile to .o file>
-#     export LD_PXDB /dev/null
-#     ld -o hello_no_pxdb hello.o /opt/langtools/lib/end.o /usr/ccs/lib/crt0.o -lc
-#
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
-    untested pxdb.exp
-    return -1
-}
-
-#
-# use this to debug:
-#log_user 1
-
-
-# Following should get the error message:
-#
-#      ld: (Warning) Can't exec pxdb using path: /dev/null
-#
-#execute_anywhere "ksh -c \"export LD_PXDB=/dev/null\""
-
-if [istarget "hppa64-*-*"] {
-set cmdline  "ksh -c \"LD_PXDB=/dev/null ld -o ${binfile} ${objfile} /opt/langtools/lib/pa20_64/crt0.o /opt/langtools/lib/pa20_64/end.o -lc\""
-} else {
-set cmdline  "ksh -c \"LD_PXDB=/dev/null ld -o ${binfile} ${objfile} /usr/ccs/lib/crt0.o /opt/langtools/lib/end.o -lc\""
-}
-
-remote_exec build "rm ${binfile}"
-remote_exec build $cmdline
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-# We expect to see this:
-#
-#  "warning: File not processed by pxdb--about to process now.
-#  "
-#  ".
-#  "Procedures: 7
-#  "Files: 2
-#  "Reading symbols from ~/c_code.dir/hello_no_pxdb...done.
-#  "(gdb)
-#
-send_gdb "file ${binfile}\n"
-gdb_expect {
-
-    -re ".*warning: File not processed by pxdb.*Procedures: \[0-9\]+.*$gdb_prompt $"\
-                            { pass "PXDB call"        }
-
-    -re "$gdb_prompt $" {
-      if [istarget hppa*-*-hpux*] {
-        pass "Didn't call pxdb"
-      } else { 
-        fail "Didn't call pxdb"
-      }
-    }
-
-    -re ".*$gdb_prompt $"       { fail "Some other message" }
-
-    timeout                 { fail "call pxdb (timeout)" }
-}
-
-# Make sure the new data makes sense
-#
-if { ![runto callee] } then { return }
-
-send_gdb "print x\n"
-gdb_expect {
-   -re ".*= 1.*$gdb_prompt $"    { pass "Good data after pxdb call" }
-   -re ".*$gdb_prompt $"         { fail "No data after pxdb call" }
-   timeout { fail "(timeout)" }
-}
-
-gdb_exit
-return 0
-
-
-
-
-
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp
deleted file mode 100644
index 600a880..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp
+++ /dev/null
@@ -1,182 +0,0 @@
-# Tests of wide register displays for GDB on HPPA 2.0 machines
-#   Copyright 1994-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# use this to debug:
-#log_user 1
-
-if { [skip_hp_tests] } { continue }
-
-if ![istarget "hppa*-*-*"] {
-    verbose "Wide register test ignored for non-hppa targets."
-    return 0
-}
-
-if ![istarget "hppa64-hp-hpux*"] {
-    verbose "reg-pa64.exp is only for PA2.0W (aka PA64)."
-    return 0
-}
-
-set testfile "reg-pa64"
-set srcfile ${testfile}.s
-set binfile ${objdir}/${subdir}/${testfile}
-
-# To build a pa 2.0 executable
-#
-#     as +DA2.0W -o reg-pa64 reg-pa64.s
-# or 
-#     cc +DA2.0W -g -o reg-pa64 reg-pa64.s
-#
-# Don't reject if there are warnings, as we expect this warning:
-#
-#    (Warning) At least one PA 2.0 object file (pa2.0_test2.o) was detected.
-#    The linked output may not run on a PA 1.x system.
-#
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested reg-pa64.exp
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# test machine--there's no 2.0n architecture, so we have
-# to try to run the app.
-#
-gdb_test "break main" "Breakpoint.*" "initial set-up"
-
-send_gdb "run\n"
-gdb_expect {
-    -re ".*Executable file incompatible with hardware.*$gdb_prompt $" {
-        # Not hppa2.0 machine
-        #
-        return 0
-    }
-    -re "Cannot exec.*$gdb_prompt $" {
-        # Not hppa2.0 machine
-        #
-        return 0
-    }
-    -re ".*Starting program:.*$gdb_prompt $" {
-        pass "Ready to start test"
-    }
-    timeout {
-        fail "initial set-up, part 2 (timeout)"
-        return 0
-    }
-}
-
-# Let the program set known values.  This secretly deletes
-# the breakpoint at main and re-runs to mainend.
-#
-runto mainend
-
-# Look for known values
-#
-gdb_test "info reg r1"  "r1 1"
-gdb_test "info reg r4"  "r4 2"
-gdb_test "info reg r5"  "r5 4"
-gdb_test "info reg r6"  "r6 8"
-gdb_test "info reg r7"  "r7 10"
-gdb_test "info reg r8"  "r8 20"
-gdb_test "info reg r9"  "r9 40"
-gdb_test "info reg r10" "r10 80"
-gdb_test "info reg r11" "r11 100"
-gdb_test "info reg r12" "r12 200"
-gdb_test "info reg r13" "r13 400"
-gdb_test "info reg r14" "r14 800"
-gdb_test "info reg r15" "r15 1000"
-gdb_test "info reg r16" "r16 2000"
-
-# Two odd variants that GDB supports are:
-#   "1" means "r1", and
-#   "$1" means "r1"
-#
-gdb_test "info reg 1 4" "r1 1.*r4 2"
-gdb_test "info reg \$1" "r1 1"
-
-# Verify that GDB responds gracefully to a register ID number that
-# is out of range.
-#
-gdb_test "info reg 999" "999: invalid register"
-
-# Make sure the floating point status and error registers
-# don't show up as floating point numbers!
-#
-gdb_test "info reg fpsr" ".*fpsr 0.*" "fpsr"
-gdb_test "info reg fpe1" ".*fpe1 .*" "fpe1"
-gdb_test "info reg fpe2" ".*fpe2 .*" "fpe2"
-gdb_test "info reg fpe3" ".*fpe3 .*" "fpe3"
-#DTS CLLbs16708
-#info reg should recognize fpe4..fpe7.
-setup_xfail hppa64-hp-hpux* CLLbs16708
-gdb_test "info reg fpe4" ".*fpe4 .*" "fpe4"
-setup_xfail hppa64-hp-hpux* CLLbs16708
-gdb_test "info reg fpe5" ".*fpe5 .*" "fpe5"
-setup_xfail hppa64-hp-hpux* CLLbs16708
-gdb_test "info reg fpe6" ".*fpe6 .*" "fpe6"
-setup_xfail hppa64-hp-hpux* CLLbs16708
-gdb_test "info reg fpe7" ".*fpe7 .*" "fpe7"
-
-gdb_test "info reg fr4"  ".*fr4.*(double precision).* 1.*"
-gdb_test "info reg fr5"  ".*fr5.*(double precision).* 2.*"
-gdb_test "info reg fr6"  ".*fr6.*(double precision).* 2.*"
-gdb_test "info reg fr7"  ".*fr7.*(double precision).* 4.*"
-gdb_test "info reg fr8"  ".*fr8.*(double precision).* 8.*"
-gdb_test "info reg fr9"  ".*fr9.*(double precision).* 32.*"
-gdb_test "info reg fr10" ".*fr10.*(double precision).* 256.*"
-
-gdb_test "info reg r19" "r19 deadbeefbadcadee"
-
-# Need to add test of use of $<register-name>
-#
-# Q: How do you say a literal "$" in expect?
-# A: You say "\$".   A literal "\" is "\\".
-#
-# Please note that this test will fail as long as we are running
-# in 32-bit mode: it will produce "$1 = 0xbadcadee".  To fix it
-# would require building a real 64-bit gdb (expression evaluation, 
-# in particular).
-#
-send_gdb "p/x \$r19\n"
-gdb_expect {
-    -re ".*= 0xdeadbeefbadcadee.*$gdb_prompt $" {
-        pass "64-bit works"
-    }
-    -re ".*= 0xbadcadee.*$gdb_prompt $" {
-        pass "32-bit extract when using PRINT; expected but not good"
-    }
-    -re ".*$gdb_prompt $" {
-        fail "didn't print any part of right value"
-    }
-    timeout {
-        fail "timeout on print"
-    }
-}
-
-# Need to add tests of setting wide regs too.  E.g.
-#
-# set $r4 = 0x1234567890123456
-# p/x $r4
-#
-
-# done
-#
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s b/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s
deleted file mode 100644
index 4c284d7..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s
+++ /dev/null
@@ -1,104 +0,0 @@
-;  assemble as "as -o reg-pa64 reg-pa64.s"
-; or
-;  cc -g -o +DA2.0W
-;
-; PA-RISC 2.0 register contents test.
-;
-        .level 2.0W
-
-        .code
-        .export main,ENTRY
-        .export mainend,CODE
-        .export lab1,CODE
-        .space $TEXT$
-        .subspa $CODE$
-one
-        .align 8
-        .stringz        "?\xF0\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00"
-
-main
-        .proc
-        .callinfo NO_CALLS,FRAME=0
-        .entry
-
-        ;; Test we have right register numbers
-        ;;
-        ADD             %r0,%r0,%r1             ;    0 
-        LDI             1,%r1                   ;    1
-        ;;
-        ;; Don't put anything into r2 or r3--they are special registers.
-        ;;
-        ADD             %r1,%r1,%r4             ;    2
-        ADD             %r4,%r4,%r5             ;    4
-        ADD             %r5,%r5,%r6             ;    8
-        ADD             %r6,%r6,%r7             ;   16
-        ADD             %r7,%r7,%r8             ;   32
-        ADD             %r8,%r8,%r9             ;   64
-        ADD             %r9,%r9,%r10            ;  128
-        ADD             %r10,%r10,%r11          ;  256
-        ADD             %r11,%r11,%r12          ;  512
-        ADD             %r12,%r12,%r13          ; 1024
-        ADD             %r13,%r13,%r14          ; 2048
-        ADD             %r14,%r14,%r15          ; 4096
-        ADD             %r15,%r15,%r16          ; 9192
-
-        ;; Test high bits, to be sure we show them.
-        ;;
-        LDI             0xde,%r19               ; "de"
-        DEPD,Z          %r19,55,56,%r19         ; "de00"
-        LDI             0xad,%r18               ; "ad"
-        ADD             %r18,%r19,%r19          ; "dead"
-        DEPD,Z          %r19,55,56,%r19         ; "dead00"
-        LDI             0xbe,%r18               ; "be"
-        ADD             %r18,%r19,%r19          ; "deadbe"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbe00"
-        LDI             0xef,%r18               ; "ef"
-        ADD             %r18,%r19,%r19          ; "deadbeef"
-        ;
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeef00"
-        LDI             0xba,%r18               ; "ba"
-        ADD             %r18,%r19,%r19          ; "deadbeefba"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeefba00"
-        LDI             0xdc,%r18               ; "dc"
-        ADD             %r18,%r19,%r19          ; "deadbeefbadc"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeefbadc00"
-        LDI             0xad,%r18               ; "ad"
-        ADD             %r18,%r19,%r19          ; "deadbeefbadcad"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeefbadcad00"
-        LDI             0xee,%r18               ; "ee"
-        ADD             %r18,%r19,%r19          ; "deadbeefbadcadee"
-        
-lab1    ;; Test floating point registers
-        ;;
-        ;; LDIL            LR'one,%r22             ;
-        ;; FLDD            RR'one(%r22),%fr4       ;   1.0
-        ;; FLDD            RR'one+8(%r22),%fr5     ;   2.0
-        ;; FLDD            RR'one+8(%r22),%fr6     ;   2.0
-	B,L		here,%r2
-	NOP
-here	DEPDI		0x0,63,2,%r2
-	LDO		one-here(%r2),%r2
-	FLDD		0(%r2),%fr4
-	FLDD		8(%r2),%fr5
-	FLDD		8(%r2),%fr6
-
-        FMPY,DBL        %fr5,%fr6,%fr7          ;   4.0
-        FMPY,DBL        %fr6,%fr7,%fr8          ;   8.0
-        FMPY,DBL        %fr7,%fr8,%fr9          ;  32.0
-        FMPY,DBL        %fr8,%fr9,%fr10         ; 256.0
-        
-        ;; The NOP prevents anything from end.o or crt0.o from
-        ;; being appended immediately after "mainend".  If that
-        ;; happens, then we may have other labels that have the
-        ;; same address as "mainend", and thus the debugger
-        ;; may symbolize this PC to something other than "mainend".
-mainend                
-        NOP
-        .exit
-        .procend
-
-        .space $TEXT$
-        .subspa $CODE$
-        .subspa $LIT$        ;; <don't use> ,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
-        .end
-
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
deleted file mode 100644
index fee046a..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
+++ /dev/null
@@ -1,230 +0,0 @@
-# This test script is part of GDB, the GNU debugger.
-
-# Copyright 1998-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# Tests of wide register displays for GDB on HPPA 2.0 machines
-
-# use this to debug:
-#log_user 1
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile "reg"
-
-if [istarget "hppa64-hp-hpux*"] {
-    verbose "reg.exp is not for PA2.0W."
-    return 0
-}
-set srcfile ${testfile}.s
-set binfile ${objdir}/${subdir}/${testfile}
-
-# To build a pa 2.0 executable
-#
-#     as -o reg reg.s
-# or 
-#     cc -g -o reg reg.s
-#
-# The +DA2.0N flag doesn't seem to be needed.
-#
-# Don't reject if there are warnings, as we expect this warning:
-#
-#    (Warning) At least one PA 2.0 object file (pa2.0_test2.o) was detected.
-#    The linked output may not run on a PA 1.x system.
-#
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested reg.exp
-     return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# test machine--there's no 2.0n architecture, so we have
-# to try to run the app.
-#
-send_gdb "break main\n"
-    gdb_expect {
-        -re "Breakpoint.*$gdb_prompt $" {
-            pass "initial set-up"
-        }
-        -re ".*$gdb_prompt $" {
-            fail "initial set-up"
-        }
-        timeout {
-            fail "initial set-up (timeout)"
-        }
-    }
-
-send_gdb "run\n"
-    gdb_expect {
-        -re ".*Executable file incompatible with hardware.*$gdb_prompt $" {
-            # Not hppa2.0 machine
-            #
-            return 0
-        }
-        -re "Cannot exec.*$gdb_prompt $" {
-            # Not hppa2.0 machine
-            #
-            return 0
-        }
-        -re ".*Starting program:.*$gdb_prompt $" {
-            pass "Ready to start test"
-        }
-        timeout {
-            fail "initial set-up, part 2 (timeout)"
-            return 0
-        }
-    }
-
-# Let the program set known values.  This secretly deletes
-# the breakpoint at main and re-runs to mainend.
-#
-runto mainend
-
-# Look for known values
-#
-# The output format changed between gdb 6.1.1 and gdb HEAD 2004-06-01.
-#
-#   gdb 6.1.1:
-#   (gdb) info reg r1
-#   r1 1
-#
-#   gdb HEAD 2004-06-01:
-#   (gdb) info reg r1
-#   r1             0x1     1
-#
-# For now, I accept both formats.  In the future, you can remove
-# the old gdb 6.1.1 format.
-#
-# -- chastain 2004-06-26
-
-set ws "\[\r\n\t \]+"
-
-proc hp_integer_reg {regname vhex vdec} {
-  global ws
-  set value_611 "$regname${ws}$vhex"
-  set value_new "$regname${ws}0x$vhex${ws}$vdec"
-  gdb_test "info reg $regname" "$value_611|$value_new"
-}
-
-hp_integer_reg "r1"      "1"     "1"
-hp_integer_reg "r4"      "2"     "2"
-hp_integer_reg "r5"      "4"     "4"
-hp_integer_reg "r6"      "8"     "8"
-hp_integer_reg "r7"     "10"    "16"
-hp_integer_reg "r8"     "20"    "32"
-hp_integer_reg "r9"     "40"    "64"
-hp_integer_reg "r10"    "80"   "128"
-hp_integer_reg "r11"   "100"   "256"
-hp_integer_reg "r12"   "200"   "512"
-hp_integer_reg "r13"   "400"  "1024"
-hp_integer_reg "r14"   "800"  "2048"
-hp_integer_reg "r15"  "1000"  "4096"
-hp_integer_reg "r16"  "2000"  "8192"
-
-# Two odd variants that GDB supports are:
-#   "1" means "r1", and
-#   "$1" means "r1"
-
-hp_integer_reg "1" "1" "1"
-hp_integer_reg "4" "2" "2"
-
-set name "info reg \$1"
-gdb_test_multiple "info reg \$1" "$name" {
-    -re "r1${ws}1\r\n$gdb_prompt $" {
-	pass "$name"
-    }
-    -re "r1${ws}0x1${ws}1\r\n$gdb_prompt $" {
-	pass "$name"
-    }
-}
-
-# Verify that GDB responds gracefully to a register ID number that
-# is out of range.
-
-gdb_test "info reg 999" "Invalid register.*999.*"
-
-# Make sure the floating point status and error registers
-# don't show up as floating point numbers!
-
-hp_integer_reg "fpsr" "0" "0"
-hp_integer_reg "fpe1" "0" "0"
-hp_integer_reg "fpe2" "0" "0"
-hp_integer_reg "fpe3" "0" "0"
-hp_integer_reg "fpe4" "0" "0"
-hp_integer_reg "fpe5" "0" "0"
-hp_integer_reg "fpe6" "0" "0"
-hp_integer_reg "fpe7" "0" "0"
-
-# Floating point registers.
-# TODO: these are old format only.
-
-gdb_test "info reg fr4"  ".*fr4.*(double precision).* 1"
-gdb_test "info reg fr5"  ".*fr5.*(double precision).* 2"
-gdb_test "info reg fr6"  ".*fr6.*(double precision).* 2"
-gdb_test "info reg fr7"  ".*fr7.*(double precision).* 4"
-gdb_test "info reg fr8"  ".*fr8.*(double precision).* 8"
-gdb_test "info reg fr9"  ".*fr9.*(double precision).* 32"
-gdb_test "info reg fr10" ".*fr10.*(double precision).* 256"
-
-# An integer register with a 64-bit value.
-
-set name "info reg r19"
-gdb_test_multiple "info reg r19" "$name" {
-    -re "r19${ws}deadbeefbadcadee\r\n$gdb_prompt $" {
-	# old gdb 6.1.1 format, good result
-	pass "$name"
-    }
-    -re "r19${ws}badcadee\r\n$gdb_prompt $" {
-	# old gdb 6.1.1 format, bad result
-	fail "$name (32-bit truncation)"
-    }
-    -re "r19${ws}0xdeadbeefbadcadee${ws}16045690984232431086\r\n$gdb_prompt $" {
-	# new gdb HEAD 2004-06-01 format, good result
-	pass "$name"
-    }
-    -re "r19${ws}0xbadcadee${ws}3135024622\r\n$gdb_prompt $" {
-	# new gdb HEAD 2004-06-01 format, 32 bit truncation
-	fail "$name (32-bit truncation)"
-    }
-}
-
-set name "print /x \$r19"
-gdb_test_multiple "print /x \$r19" "$name" {
-    -re "= 0xdeadbeefbadcadee\r\n$gdb_prompt $" {
-	pass "$name"
-    }
-    -re "= 0xbadcadee\r\n$gdb_prompt $" {
-	# this was a PASS in the last version so keep it PASS for now
-	# -- chastain 2004-06-26
-	pass "$name (32-bit truncation)"
-    }
-}
-
-# Need to add tests of setting wide regs too.  E.g.
-#
-# set $r4 = 0x1234567890123456
-# p/x $r4
-#
-
-# done
-#
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.s b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.s
deleted file mode 100644
index 8cc15f8..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.s
+++ /dev/null
@@ -1,96 +0,0 @@
-;  assemble as "as -o reg reg.s"
-; or
-;  cc -g -o +DA2.0N
-;
-; PA-RISC 2.0 register contents test.
-;
-        .level 2.0
-
-        .code
-        .export main,ENTRY
-        .export mainend,CODE
-        .export lab1,CODE
-        .space $TEXT$
-        .subspa $CODE$
-
-main
-        .proc
-        .callinfo NO_CALLS,FRAME=0
-        .entry
-
-        ;; Test we have right register numbers
-        ;;
-        ADD             %r0,%r0,%r1             ;    0 
-        LDI             1,%r1                   ;    1
-        ;;
-        ;; Don't put anything into r2 or r3--they are special registers.
-        ;;
-        ADD             %r1,%r1,%r4             ;    2
-        ADD             %r4,%r4,%r5             ;    4
-        ADD             %r5,%r5,%r6             ;    8
-        ADD             %r6,%r6,%r7             ;   16
-        ADD             %r7,%r7,%r8             ;   32
-        ADD             %r8,%r8,%r9             ;   64
-        ADD             %r9,%r9,%r10            ;  128
-        ADD             %r10,%r10,%r11          ;  256
-        ADD             %r11,%r11,%r12          ;  512
-        ADD             %r12,%r12,%r13          ; 1024
-        ADD             %r13,%r13,%r14          ; 2048
-        ADD             %r14,%r14,%r15          ; 4096
-        ADD             %r15,%r15,%r16          ; 9192
-
-        ;; Test high bits, to be sure we show them.
-        ;;
-        LDI             0xde,%r19               ; "de"
-        DEPD,Z          %r19,55,56,%r19         ; "de00"
-        LDI             0xad,%r18               ; "ad"
-        ADD             %r18,%r19,%r19          ; "dead"
-        DEPD,Z          %r19,55,56,%r19         ; "dead00"
-        LDI             0xbe,%r18               ; "be"
-        ADD             %r18,%r19,%r19          ; "deadbe"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbe00"
-        LDI             0xef,%r18               ; "ef"
-        ADD             %r18,%r19,%r19          ; "deadbeef"
-        ;
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeef00"
-        LDI             0xba,%r18               ; "ba"
-        ADD             %r18,%r19,%r19          ; "deadbeefba"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeefba00"
-        LDI             0xdc,%r18               ; "dc"
-        ADD             %r18,%r19,%r19          ; "deadbeefbadc"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeefbadc00"
-        LDI             0xad,%r18               ; "ad"
-        ADD             %r18,%r19,%r19          ; "deadbeefbadcad"
-        DEPD,Z          %r19,55,56,%r19         ; "deadbeefbadcad00"
-        LDI             0xee,%r18               ; "ee"
-        ADD             %r18,%r19,%r19          ; "deadbeefbadcadee"
-        
-lab1    ;; Test floating point registers
-        ;;
-        LDIL            LR'one,%r22             ;
-        FLDD            RR'one(%r22),%fr4       ;   1.0
-        FLDD            RR'one+8(%r22),%fr5     ;   2.0
-        FLDD            RR'one+8(%r22),%fr6     ;   2.0
-        FMPY,DBL        %fr5,%fr6,%fr7          ;   4.0
-        FMPY,DBL        %fr6,%fr7,%fr8          ;   8.0
-        FMPY,DBL        %fr7,%fr8,%fr9          ;  32.0
-        FMPY,DBL        %fr8,%fr9,%fr10         ; 256.0
-        
-        ;; The NOP prevents anything from end.o or crt0.o from
-        ;; being appended immediately after "mainend".  If that
-        ;; happens, then we may have other labels that have the
-        ;; same address as "mainend", and thus the debugger
-        ;; may symbolize this PC to something other than "mainend".
-mainend                
-        NOP
-        .exit
-        .procend
-
-        .space $TEXT$
-        .subspa $CODE$
-        .subspa $LIT$        ;; <don't use> ,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
-one
-        .align 8
-        .stringz        "?\xF0\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00"
-        .end
-
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c b/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c
deleted file mode 100644
index a6d5788..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-enum Normal {
-  red,
-  blue,
-  green
-};
-
-short enum Small {
-  pink,
-  cyan,
-  grey
-};
-
-char enum Tiny {
-  orange,
-  yellow,
-  brown
-};
-
-
-main()
-{
-  enum Normal normal[3];
-  short enum Small small[3];
-  char enum Tiny tiny[3];
-  int i;
-
-  for (i=0; i < 3; i++)
-    {
-      normal[i] = (enum Normal) i;
-      small[i] = (short enum Small) i;
-      tiny[i] = (char enum Tiny) i;
-    }
-  normal[0] = 0; /* place to hang a breakpoint */ 
-}
-
-    
-  
-
-  
-
-
-  
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp
deleted file mode 100644
index 061ac64..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# GDB tests for sized enumerations
-
-# This is aimed at HP-UX systems.  The HP C compiler
-# allows specifying "char" or "short" for an enum, to
-# indicate that it is 1 or 2 bytes long.
-
-# This file was written by Satish Pai <pai@apollo.hp.com>
-# 1997-09-24
-
-#
-# test running programs
-#
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile "sized-enum"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info] {
-    return -1
-}
-
-if { $gcc_compiled } then { continue }
-if {$hp_aCC_compiler} {continue}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested sized-enum.exp
-     return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-
-if ![runto_main] then {
-    perror "couldn't run to breakpoint"
-    continue
-}
-
-# set a breakpoint and go there
-send_gdb "break 34\n"   
-gdb_expect {   
-   -re "Breakpoint.*line 34.*$gdb_prompt $" { pass "set break 34" }
-   -re "$gdb_prompt $"                     { fail "set break 34" }
-   timeout                             { fail "(timeout) set break 34" }
-}
-send_gdb "continue\n"   
-gdb_expect {   
-   -re "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, main....at.*sized-enum\\.c:34\r\n34.*\r\n$gdb_prompt $" { pass "continue" }
-   -re "$gdb_prompt $"                     { fail "continue" }
-   timeout                             { fail "(timeout) continue" }
-}
-
-# print stuff
-send_gdb "print normal\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = \\{red, blue, green\\}.*$gdb_prompt $" { pass "print normal" }
-   -re "$gdb_prompt $"                     { fail "print normal" }
-   timeout                             { fail "(timeout) print normal" }
-}
-send_gdb "print small\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = \\{pink, cyan, grey\\}.*$gdb_prompt $" { pass "print small" }
-   -re "$gdb_prompt $"                     { fail "print small" }
-   timeout                             { fail "(timeout) print small" }
-}
-send_gdb "print tiny\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = \\{orange, yellow, brown\\}.*$gdb_prompt $" { pass "print tiny" }
-   -re "$gdb_prompt $"                     { fail "print tiny" }
-   timeout                             { fail "(timeout) print tiny" }
-}
-
-# print type sizes
-send_gdb "print sizeof (Normal)\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = 4.*$gdb_prompt $" { pass "print sizeof (Normal)" }
-   -re "$gdb_prompt $"                     { fail "print sizeof (Normal)" }
-   timeout                             { fail "(timeout) print sizeof (Normal)" }
-}
-send_gdb "print sizeof (Small)\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = 2.*$gdb_prompt $" { pass "print sizeof (Small)" }
-   -re "$gdb_prompt $"                     { fail "print sizeof (Small)" }
-   timeout                             { fail "(timeout) print sizeof (Small)" }
-}
-send_gdb "print sizeof (Tiny)\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print sizeof (Tiny)" }
-   -re "$gdb_prompt $"                     { fail "print sizeof (Tiny)" }
-   timeout                             { fail "(timeout) print sizeof (Tiny)" }
-}
-
-# print types
-send_gdb "ptype normal\n"   
-gdb_expect {   
-   -re "type = enum Normal \\{red, blue, green\\} \\\[3\\\].*$gdb_prompt $" { pass "ptype normal" }
-   -re "$gdb_prompt $"                     { fail "ptype normal" }
-   timeout                             { fail "(timeout) ptype normal" }
-}
-send_gdb "ptype small\n"   
-gdb_expect {   
-   -re "type = short enum Small \\{pink, cyan, grey\\} \\\[3\\\].*$gdb_prompt $" { pass "ptype small" }
-   -re "$gdb_prompt $"                     { fail "ptype small" }
-   timeout                             { fail "(timeout) ptype small" }
-}
-send_gdb "ptype tiny\n"   
-gdb_expect {   
-   -re "type = char enum Tiny \\{orange, yellow, brown\\} \\\[3\\\].*$gdb_prompt $" { pass "ptype tiny" }
-   -re "$gdb_prompt $"                     { fail "ptype tiny" }
-   timeout                             { fail "(timeout) ptype tiny" }
-}
-
-# convert to int
-send_gdb "print (int) blue\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) blue" }
-   -re "$gdb_prompt $"                     { fail "print (int) blue" }
-   timeout                             { fail "(timeout) print (int) blue" }
-}
-send_gdb "print (int) cyan\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) cyan" }
-   -re "$gdb_prompt $"                     { fail "print (int) cyan" }
-   timeout                             { fail "(timeout) print (int) cyan" }
-}
-send_gdb "print (int) yellow\n"   
-gdb_expect {   
-   -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) yellow" }
-   -re "$gdb_prompt $"                     { fail "print (int) yellow" }
-   timeout                             { fail "(timeout) print (int) yellow" }
-}
-
-
-
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
deleted file mode 100644
index 117c7d8..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
+++ /dev/null
@@ -1,331 +0,0 @@
-#   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile "so-thresh"
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info] {
-    return -1
-}
-
-# This testcase is relatively large, and therefore can take awhile to
-# load.  We'd best set the timeout to something suitable, or we may
-# seem to fail...
-#
-set timeout 60
-
-# Build procedure for this testcase:
-#    ${srcdir}/${subdir}/so-thresh.sh ${subdir}
-#        which calls,
-#        make -f ${srcdir}/${subdir}/so-thresh.mk <targets> <macros>
-#            which builds,
-#                genso-thresh (from genso-thresh.c)
-#                    which generates,
-#                        lib00-so-thresh.c
-#                        lib01-so-thresh.c
-#                        lib02-so-thresh.c
-#                        so-thresh.lopt (link options file)
-#                lib0*-so-thresh.sl (from .c files above)
-#                so-thresh (from so-thresh.c)
-#                    using lib0*-so-thresh.sl and so-thresh.lopt
-#
-# Since so-thresh.mk requires SRCDIR and OBJDIR macro definitions,
-# and SRCDIR / OBJDIR could be in relative path format, we use
-# so-thresh.sh script to pin down SRCDIR / OBJDIR (using $PWD/ prefix
-# when detected relative path values for srcdir / objdir), before the
-# 'cd $subdir' call (when this can be done in TCL here, we can call
-# make directly instead).
-#
-# remote_exec build "sh -c \\\"cd ${objdir}/${subdir}\\; make -v -f ${srcdir}/${subdir}/${testfile}.mk clean require_shlibs all SRCDIR=${srcdir}/${subdir} OBJDIR=${objdir}/${subdir}\\\""
-
-remote_exec build "${srcdir}/${subdir}/${testfile}.sh $subdir"
-
-# Only HP-UX (and any other platforms using SOM shared libraries, I
-# guess) interprets the auto-solib-limit variable as a threshhold,
-# rather than a boolean that strictly enables or disables automatic
-# loading of shlib symbol tables.
-#
-# On HP-UX, it is the size threshhold (in megabytes) at which to
-# stop auto loading of symbol tables.
-#
-if ![istarget "hppa*-hp-hpux*"] then {
-   setup_xfail "*-*-*"
-}
-
-# Start with a fresh gdb
-#
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# This is a test of gdb's ability on HP-UX to stop automatically
-# loading symbols of shared libraries, when the total size of the
-# debugger's symbol table reaches a specified threshhold.
-#
-
-# On HP-UX, the help text for auto-solib-limit mentions that it
-# serves as a threshhold.
-#
-send_gdb "help set auto-solib-limit\n"
-gdb_expect {
-  -re "Set threshold .in Mb. for autoloading shared library symbols.*
-When shared library autoloading is enabled, new libraries will be loaded.*
-only until the total size of shared library symbols exceeds this.*
-threshold in megabytes.  Is ignored when using .sharedlibrary.*$gdb_prompt $"\
-          {pass "help set auto-solib-limit"}
-  -re "$gdb_prompt $"\
-          {fail "help set auto-solib-limit"}
-  timeout {fail "(timeout) help set auto-solib-limit"}
-}
-
-# On HP-UX, the threshhold is by default set to 50, which means
-# 50 megabytes.
-#
-send_gdb "show auto-solib-limit\n"
-gdb_expect {
-  -re "Threshold .in Mb. for autoloading shared library symbols is $decimal.*$gdb_prompt $"\
-          {pass "show auto-solib-limit "}
-  -re "$gdb_prompt $"\
-          {fail "show auto-solib-limit "}
-  timeout {fail "(timeout) show auto-solib-limit "}
-}
-
-send_gdb "set auto-solib-limit 1\n"
-gdb_expect {
-   -re ".*$gdb_prompt $"
-            {pass "set auto-solib-limit to 1"}
-   -re ".*$gdb_prompt $"
-            {fail "set auto-solib-limit to 1"}
-   timeout {fail "(timeout) set auto-solib-limit to 1"}
-}
-
-
-# We have manually verified that our testcase exceeds 1 Mbytes
-# of heap space in GDB to hold the symbols for the main program
-# and all associated linked-against libraries.  Thus, when we
-# run to the program's main, and therefore notice all the linked-
-# against shlibs, we expect to hit the threshhold.
-#
-# (Note that we're not using the expect [runto main] function here,
-# 'cause we want to match on output from the run command.
-#
-send_gdb "break main\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
-          {pass "1 set break at main"}
-  -re "$gdb_prompt $"\
-          {fail "1 set break at main"}
-  timeout {fail "(timeout) 1 set break at main"}
-}
-
-send_gdb "run\n"
-gdb_expect {
-  -re ".*warning. Symbols for some libraries have not been loaded, because.*
-doing so would exceed the size threshold specified by auto-solib-limit.*
-To manually load symbols, use the 'sharedlibrary' command.*
-To raise the threshold, set auto-solib-limit to a larger value and rerun.*
-the program.*$gdb_prompt $"\
-          {pass "run to main hit auto-solib-limit threshold"}
-  -re "$gdb_prompt $"\
-          {fail "run to main hit auto-solib-limit threshold"}
-  timeout {fail "(timeout) run to main hit auto-solib-limit threshold"}
-}
-
-# Verify that "info share" mentions something about libraries whose
-# symbols weren't loaded.
-#
-# We'll assume that at least the last two shlib's symbols weren't
-# loaded.  As a side-effect of matching this pattern, the text start
-# address of the last one is captured in expect_out(1,string).
-# (we'll need it for the 'add-symbol-file' command in a nonce...)
-#
-send_gdb "info sharedlibrary\n"
-gdb_expect {
-  -re ".*lib01_$testfile.sl .*symbols not loaded.*0x\[0-9\]*  (0x\[0-9a-fA-F\]*).*$gdb_prompt $"\
-          { send_gdb "add-symbol-file lib02_$testfile.sl $expect_out(1,string)\n"
-            gdb_expect {
-              -re "add symbol table.*y or n.*$"\
-                      {send_gdb "y\n"
-                       gdb_expect {
-                         -re "$gdb_prompt $" {pass "add-symbol-file and info sharedlib"}
-                         timeout {fail "(timeout) add-symbol-file and info sharedlib"}
-                       }}
-              -re "$gdb_prompt $"\
-                      {fail "add-symbol-file and info sharedlib"}
-              timeout {fail "(timeout) add-symbol-file and info sharedlib"}
-            }
-          }
-  -re "$gdb_prompt $" {
-	setup_xfail hppa*-*-* CHFts24108
-	fail "info sharedlibrary shows shlibs with unloaded symbols"
-    }
-  timeout {fail "(timeout) info sharedlibrary shows shlibs with unloaded symbols"}
-}
-
-# Verify that we can manually load the symbol table of a library
-# whose symbols weren't loaded.  (We'll pick the last one.)
-#
-
-# I moved this test inside the one above, because the expect_out array is not ok if the
-# previous test has failed, and expect would error out (elz)
-#
-#send_gdb "add-symbol-file lib02_$testfile.sl $expect_out(1,string)\n"
-#gdb_expect {
-#  -re "add symbol table.*y or n.*$"\
-#          {send_gdb "y\n"
-#           gdb_expect {
-#             -re "$gdb_prompt $" {pass "add-symbol-file"}
-#             timeout {fail "(timeout) add-symbol-file"}
-#           }}
-#  -re "$gdb_prompt $"\
-#          {fail "add-symbol-file"}
-#  timeout {fail "(timeout) add-symbol-file"}
-#}
-
-# Verify that we can manually load the symbols for all libraries
-# which weren't already loaded.
-#
-# Warning!  On a machine with little free swap space, this may
-# fail!
-#
-send_gdb "sharedlibrary\n"
-gdb_expect {
-  -re "Reading symbols from.*done.*$gdb_prompt $"\
-          {pass "sharedlibrary"}
-  -re "$gdb_prompt $" {
-	setup_xfail hppa*-*-* CHFts24108
-	fail "sharedlibrary"
-    }
-  timeout {fail "(timeout) sharedlibrary"}
-}
-
-# Rerun the program, this time verifying that we can set the
-# threshhold high enough to avoid hitting it.
-#
-# It appears that gdb isn't freeing memory when rerunning, as one
-# would expect.  To avoid potentially hitting a virtual memory
-# ceiling, start with a fresh gdb.
-#
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-send_gdb "break main\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
-          {pass "2 set break at main"}
-  -re "$gdb_prompt $"\
-          {fail "2 set break at main"}
-  timeout {fail "(timeout) 2 set break at main"}
-}
-
-send_gdb "set auto-solib-limit 9999\n"
-gdb_expect {
-  -re "$gdb_prompt $"\
-          {pass "set auto-solib-limit threshold to practical infinity"}
-  timeout {fail "(timeout) set auto-solib-limit threshold to practical infinity"}
-}
-send_gdb "run\n"
-gdb_expect {
-  -re ".*warning. Symbols for some libraries have not been loaded, because.*
-doing so would exceed the size threshold specified by auto-solib-limit.*
-To manually load symbols, use the 'sharedlibrary' command.*
-To raise the threshold, set auto-solib-limit to a larger value and rerun.*
-the program.*$gdb_prompt $"\
-          {fail "rerun threshold at practical infinity (still hit threshold)"}
-  -re "$gdb_prompt $"\
-          {pass "rerun with threshold at practical infinity"}
-  timeout {fail "(timeout) rerun with threshold at practical infinity"}
-}
-
-# Rerun the program, this time altogether disabling the auto loading
-# feature.  There should be no information at all about shared
-# libraries now.
-#
-# ??rehrauer: Personally, I'd call that a bug, since it doesn't give
-# you the ability to manually load single shlibs (you need the text
-# start address that 'info share' normall gives you).  On the other
-# hand, one can easily choose to load them all...
-#
-# It appears that gdb isn't freeing memory when rerunning, as one
-# would expect.  To avoid potentially hitting a virtual memory
-# ceiling, start with a fresh gdb.
-#
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-send_gdb "break main\n"
-gdb_expect {
-  -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
-          {pass "3 set break at main"}
-  -re "$gdb_prompt $"\
-          {fail "3 set break at main"}
-  timeout {fail "(timeout) 3 set break at main"}
-}
-
-send_gdb "set auto-solib-limit 0\n"
-gdb_expect {
-  -re "$gdb_prompt $"\
-          {pass "set auto-solib-limit threshold to 0"}
-  timeout {fail "(timeout) set auto-solib-limit threshold to 0"}
-}
-send_gdb "run\n"
-gdb_expect {
-  -re ".*warning. Symbols for some libraries have not been loaded, because.*
-doing so would exceed the size threshold specified by auto-solib-limit.*
-To manually load symbols, use the 'sharedlibrary' command.*
-To raise the threshold, set auto-solib-limit to a larger value and rerun.*
-the program.*$gdb_prompt $"\
-          {fail "rerun threshold at 0 (still hit threshold)"}
-  -re "$gdb_prompt $"\
-          {pass "rerun with threshold at 0"}
-  timeout {fail "(timeout) rerun with threshold at 0"}
-}
-
-# Verify that we can still manually load symbols for all libraries.
-# (We'll assume that if the last shlib's symbols are loaded, that
-# all of them were.)
-#
-# Note that we set the GDB "height" variable to prevent GDB from
-# prompting 
-#
-# Warning!  On a machine with little free swap space, this may
-# fail!
-#
-send_gdb "set height 9999\n"
-gdb_expect {
-  -re "$gdb_prompt $"\
-          {pass "set screen page height to practical infinity"}
-  timeout {fail "(timeout) set screen page height to practical infinity"}
-}
-send_gdb "sharedlibrary\n"
-gdb_expect {
-  -re ".*Reading symbols from .*/lib02-so-thresh\\.sl\\.\\.\\.done\\..*$gdb_prompt $"\
-          {pass "manually load all symbols"}
-  -re "$gdb_prompt $" {
-	setup_xfail hppa*-*-* CHFts24108
-	fail "manually load all symbols (CHFts24108)"
-    }
-  timeout {fail "(timeout) manually load all symbols"}
-}
-
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
deleted file mode 100644
index f71e921..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-# Make file for so-thresh test
-
-OBJDIR=.
-SRCDIR=.
-CFLAGS = +DA1.1 -g
-CC=cc
-
-# This is how to build this generator.
-genso-thresh.o: ${SRCDIR}/genso-thresh.c
-	$(CC) $(CFLAGS) -o genso-thresh.o -c ${SRCDIR}/genso-thresh.c
-genso-thresh: genso-thresh.o
-	$(CC) $(CFLAGS) -o genso-thresh genso-thresh.o
-
-# This is how to run this generator.
-# This target should be made before the 'all' target,
-# to ensure that the shlib sources are all available.
-require_shlibs: genso-thresh
-	if ! [ -a lib00-so-thresh.c ] ; then \
-	  genso-thresh ; \
-	fi
-	if ! [ -a lib01-so-thresh.c ] ; then \
-	  genso-thresh ; \
-	fi
-	if ! [ -a lib02-so-thresh.c ] ; then \
-	  genso-thresh ; \
-	fi
-
-# This is how to build all the shlibs.
-# Be sure to first make the require_shlibs target!
-lib00-so-thresh.o: lib00-so-thresh.c
-	$(CC) $(CFLAGS) +Z -o lib00-so-thresh.o -c lib00-so-thresh.c
-lib00-so-thresh.sl: lib00-so-thresh.o
-	$(LD) $(LDFLAGS) -b -o lib00-so-thresh.sl lib00-so-thresh.o
-lib01-so-thresh.o: lib01-so-thresh.c
-	$(CC) $(CFLAGS) +Z -o lib01-so-thresh.o -c lib01-so-thresh.c
-lib01-so-thresh.sl: lib01-so-thresh.o
-	$(LD) $(LDFLAGS) -b -o lib01-so-thresh.sl lib01-so-thresh.o
-lib02-so-thresh.o: lib02-so-thresh.c
-	$(CC) $(CFLAGS) +Z -o lib02-so-thresh.o -c lib02-so-thresh.c
-lib02-so-thresh.sl: lib02-so-thresh.o
-	$(LD) $(LDFLAGS) -b -o lib02-so-thresh.sl lib02-so-thresh.o
-
-
-
-
-# For convenience, here's names for all pieces of all shlibs.
-SHLIB_SOURCES = \
-	lib00-so-thresh.c \
-	lib01-so-thresh.c \
-	lib02-so-thresh.c 
-
-SHLIB_OBJECTS = $(SHLIB_SOURCES:.c=.o)
-SHLIBS = $(SHLIB_SOURCES:.c=.sl)
-SHLIB_NAMES = $(SHLIB_SOURCES:.c=)
-EXECUTABLES = $(SHLIBS) genso-thresh so-thresh
-OBJECT_FILES = $(SHLIB_OBJECTS) genso-thresh.o so-thresh.o
-
-shlib_objects: $(SHLIB_OBJECTS)
-shlibs: $(SHLIBS)
-
-# This is how to build the debuggable testcase that uses the shlibs.
-so-thresh.o: so-thresh.c
-	$(CC) $(CFLAGS) -o so-thresh.o -c so-thresh.c
-so-thresh: shlibs so-thresh.o
-	$(LD) $(LDFLAGS) -o so-thresh -lc -L${OBJDIR} -c so-thresh.lopt /opt/langtools/lib/end.o /lib/crt0.o so-thresh.o
-
-# Yeah, but you should first make the require_shlibs target!
-all: so-thresh genso-thresh
-
-# To remove everything built via this makefile...
-clean:
-	rm -f lib0*-so-thresh.*
-	rm -f *.o genso-thresh so-thresh.lopt so-thresh.c
-	rm -f so-thresh
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh
deleted file mode 100755
index 078e05a..0000000
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-# so-thresh.sh
-#
-# This script is a "wrapper" to use the so-thresh.mk
-# Makefile.  See the comments in so-thresh.exp
-# regarding why this script exists.
-
-#set -o xtrace
-#set -o verbose
-
-if [ "$srcdir" = "${srcdir#/}" ]
-then
-    srcdir="$PWD/$srcdir"
-fi
-
-if [ "$objdir" = "${objdir#/}" ]
-then
-    objdir="$PWD/$objdir"
-fi
-
-subdir="$1"
-
-HERE=$PWD
-cd $subdir
-
-MAKEFLAGS=
-make -f ${srcdir}/${subdir}/so-thresh.mk clean require_shlibs all SRCDIR=${srcdir}/${subdir} OBJDIR=${objdir}/${subdir} > ${objdir}/${subdir}/so-thresh.make.out 2>&1
-STATUS=$?
-
-cd $HERE
-echo "return STATUS is $STATUS"
-
-exit $STATUS
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/Makefile.in b/gdb/testsuite/gdb.hp/gdb.compat/Makefile.in
deleted file mode 100644
index 10fc8fc..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/Makefile.in
+++ /dev/null
@@ -1,25 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = xdb xdb-test
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/average.c b/gdb/testsuite/gdb.hp/gdb.compat/average.c
deleted file mode 100644
index 25ba2ee..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/average.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This is a sample program for the HP WDB debugger. */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef PROTOTYPES
-extern int sum(int *, int, int);
-#else
-extern int sum();
-#endif
-
-#define num   10
-
-static int my_list[num] = {3,4,2,0,2,1,8,3,6,7};
-
-#ifdef __STDC__
-void print_average(int *list, int low, int high) 
-#else
-void print_average(list, low, high)
-int *list, low, high;
-#endif
-    {
-        int total = 0, num_elements = 0, average = 0;
-        total = sum(list, low, high);
-        num_elements = high - low;  /* note this is an off-by-one bug */
-
-        average = total / num_elements;
-        printf("%10.d\n", average);
-    }
-
-#ifdef __STDC__
-int main(void)
-#else
-main ()
-#endif
-{
-    char c;
-    int first = 0, last = 0;
-    last = num-1;
-
-    /* Try two test cases. */
-    print_average (my_list, first, last);
-    print_average (my_list, first, last - 3);
-
-    exit(0);
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/sum.c b/gdb/testsuite/gdb.hp/gdb.compat/sum.c
deleted file mode 100644
index d295f7e..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/sum.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* This is a sample program for the HP/DDE debugger. */
-#include <stdio.h>
-
-#ifdef __STDC__
-int sum(int *list, int low, int high)
-#else
-int sum(list, low, high)
-int *list, low, high;
-#endif
-    {
-        int i = 0, s = 0;
-        for (i = low; i <= high; i++)
-            s += list[i];
-        return(s);
-    }
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb.c b/gdb/testsuite/gdb.hp/gdb.compat/xdb.c
deleted file mode 100644
index e3e3fc2..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h>
-
-int callee( x )
-int x;
-{
-    int y = x * x;
-    return (y - 2);
-}
-
-main()
-{
-    int i;
-    for (i = 1; i < 10; i++)
-        {
-            printf( "%d ", callee( i ));
-            
-        }
-    printf( " Goodbye!\n" );
-    
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb0.c b/gdb/testsuite/gdb.hp/gdb.compat/xdb0.c
deleted file mode 100644
index 4cd29c3..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb0.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "xdb0.h"
-
-main ()
-{
-    int x;
-
-    x = 0;
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-    foo (x++);
-}
-
-static void
-unused ()
-{
-    /* Not used for anything */
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb0.h b/gdb/testsuite/gdb.hp/gdb.compat/xdb0.h
deleted file mode 100644
index c4d337c..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb0.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* An include file that actually causes code to be generated in the
-   including file.  This is known to cause problems on some systems. */
-
-static void
-foo (x)
-int x;
-{
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-    bar (x++);
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb1.c b/gdb/testsuite/gdb.hp/gdb.compat/xdb1.c
deleted file mode 100644
index 51632b9..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-void
-bar (x)
-int x;
-{
-    printf ("%d\n", x);
-
-    long_line ();
-}
-
-static void
-unused ()
-{
-    /* Not used for anything */
-}
-
-
-/* This routine has a very long line that will break searching in older
-   versions of GDB.  */
-
-long_line ()
-{
-  oof (67);
-
-  oof (6789);
-
-  oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*  5 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 10 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 15 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 20 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 25 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 30 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 35 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 40 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 45 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 50 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 55 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 60 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /* 65 */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (12); /*    */      oof (12);  oof (12);  oof (12);  oof (12);  oof (12);  oof (1234); /* 70 */
-}
-
-oof (n)
-     int n;
-{
-  return n + 1;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp b/gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp
deleted file mode 100644
index f0d5d98..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if { [skip_hp_tests] } then { continue }
-
-#
-# test running programs
-#
-
-set testfile "xdb"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested xdb1.exp
-     return -1
-}
-
-if [get_compiler_info] {
-    return -1
-}
-if { $gcc_compiled } then { continue }
-
-global GDBFLAGS
-set saved_gdbflags $GDBFLAGS
-
-set GDBFLAGS "$GDBFLAGS --xdb"
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "set pagination off" ""
-gdb_test "show pagination" "State of pagination is off."
-gdb_test "set pagination on" ""
-gdb_test "show pagination" "State of pagination is on."
-
-gdb_test "txbreak callee" "Breakpoint.*at.*"
-gdb_test "info break" "Num.*Type.*Disp.*Enb.*Address.*What\r\n.*breakpoint.*del.*y.*"
-
-gdb_test "xbreak callee" "Breakpoint.*at.*.*"
-gdb_test "info break" "Num.*Type.*Disp.*Enb.*Address.*What\r\n.*breakpoint.*keep.*y.*"
-
-gdb_exit
-set GDBFLAGS $saved_gdbflags
-return 0
-
-
-
-
-
-
-
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp b/gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp
deleted file mode 100644
index 6a8754e..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if { [skip_hp_tests] } then { continue }
-
-global message
-
-#
-# test running programs
-#
-
-set testfile "xdb"
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/xdb0.c" "${binfile}0.o" object {debug}] != "" } {
-    perror "Couldn't compile ${testfile}0.c to object"
-    return -1
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/xdb1.c" "${binfile}1.o" object {debug}] != "" } {
-    perror "Couldn't compile ${testfile}1.c to object"
-    return -1
-}
-
-if  { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
-    perror "Couldn't link ${testfile}."
-    return -1
-}
-
-if [get_compiler_info] {
-    return -1
-}
-
-if { $gcc_compiled } then { continue }
-
-global GDBFLAGS
-set saved_gdbflags $GDBFLAGS
-set GDBFLAGS "$GDBFLAGS --xdb"
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-gdb_test "break main" ""
-gdb_test "run" ""
-gdb_test "go +2" "Breakpoint.*at.*file.*xdb0\.c, line 12\.\r\nContinuing at.*\r\nmain \\(\\) at.*xdb0\.c:12\r\n12\[ \t\]+foo \\(x\\+\\+\\);"
-gdb_test "go -2" "Note: breakpoint.*also set at pc.*\.\r\nBreakpoint.*at.*file.*xdb0\.c, line 10\.\r\nContinuing at.*\.\r\n\r\nBreakpoint.*, main \\(\\) at.*xdb0\.c:10.*"
-gdb_test "go 16" "Breakpoint.*at.*file.*xdb0\.c, line 16\.\r\nContinuing at.*\.\r\nmain \\(\\) at.*xdb0\.c:16\r\n16\[ \t\]+foo \\(x\\+\\+\\);"
-
-send_gdb "go bar\n"
-  gdb_expect {
-      -re ".*Line 5 is not in .main..  Jump anyway.*y or n. $" {
-          send_gdb "y\n"
-          gdb_expect {
-            -re "$gdb_prompt $"\
-                    {pass "go bar"}
-            timeout {fail "(timeout) go bar"}
-          }
-      }
-      -re "Continuing at.*\.\r\nbar \\(x=0\\) at.*xdb1\.c:5" {}
-      timeout { perror "(timeout) go bar" ; return }
-  }
-
-# Verify that GDB responds gracefully to a "go" command without
-# an argument.
-#
-gdb_test "go" "Usage: go <location>"
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "break bar" ""
-gdb_test "run" ""
-gdb_test "backtrace full" ".*bar \\(x=0\\) at.*xdb1\.c:5\r\nNo locals\.\r\n.1.* in foo \\(x=1\\) at.*xdb0\.h:8\r\nNo locals\.\r\n.2.* in main \\(\\) at.*xdb0\.c:11\r\n.*x = 1"
-gdb_test "bt 1 full" ".*bar \\(x=0\\) at.*xdb1\.c:5\r\nNo locals\.\r\n\\(More stack frames follow\.\.\.\\)"
-gdb_test "bt full 2" ".*bar \\(x=0\\) at.*xdb1\.c:5\r\nNo locals\.\r\n.1.* in foo \\(x=1\\) at.*xdb0\.h:8\r\nNo locals\.\r\n\\(More stack frames follow\.\.\.\\)"
-
-set GDBFLAGS $saved_gdbflags
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp b/gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp
deleted file mode 100644
index 6a898b3..0000000
--- a/gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright (C) 1998-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-if { [skip_hp_tests] } then { continue }
-
-set testfile1 "average"
-set testfile2 "sum"
-set testfile "xdb-test"
-set binfile1 ${objdir}/${subdir}/${testfile1}
-set binfile2 ${objdir}/${subdir}/${testfile2}
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/average.c" "${binfile1}.o" object {debug}] != "" } {
-     untested xdb3.exp
-     return -1
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/sum.c" "${binfile2}.o" object {debug}] != "" } {
-     untested xdb3.exp
-     return -1
-}
-
-if  { [gdb_compile "${binfile1}.o ${binfile2}.o" ${binfile} executable {debug}] != "" } {
-     untested xdb3.exp
-     return -1
-}
-
-if [get_compiler_info] {
-    return -1
-}
-if { $gcc_compiled } then { continue }
-
-
-proc xdb_reinitialize_dir { subdir } {
-    global gdb_prompt
-
-   send_gdb "D\n"
-    gdb_expect {
-        -re "Reinitialize source path to empty.*y or n. " {
-            send_gdb "y\n"
-            gdb_expect {
-                -re "Source directories searched.*$gdb_prompt $" {
-                    send_gdb "D $subdir\n"
-                    gdb_expect {
-                        -re "Source directories searched.*$gdb_prompt $" {
-                            verbose "Dir set to $subdir"
-                        }
-                        -re ".*$gdb_prompt $" {
-                            perror "Dir \"$subdir\" failed."
-                        }
-                    }
-                }
-                -re ".*$gdb_prompt $" {
-                    perror "Dir \"$subdir\" failed."
-                }
-            }
-        }
-        -re ".*$gdb_prompt $" {
-            perror "Dir \"$subdir\" failed."
-        }
-    }
-}
-
-#
-#test_search
-#
-proc test_search { } {
-    gdb_test "set listsize 4" ""
-    gdb_test "list average.c:1" "1\[ \t\]+/. This is a sample .*"
-    gdb_test "/ print_average" "17\[ \t\]+void print_average\\(int \\*list.*"
-    gdb_test "/ print_average" "19\[ \t\]+void print_average\\(list, low, high\\)"
-    gdb_test "/ print_average" "42\[ \t\]+print_average \\(my_list, first, last\\);"
-    gdb_test "? print_average" "19\[ \t\]+void print_average\\(list, low, high\\)"
-    gdb_test "? sum" "9\[ \t]+extern int sum\\(\\);"
-}
-
-#
-#test_viewing_loc
-#
-proc test_viewing_loc { } {
-    gdb_test "L" "No stack."
-    gdb_test "break main" ""
-    gdb_test "R" ""
-    gdb_test "L" "#0\[ \t\]+main \\(\\) at.*average.c:38\r\n38\[ \t\]+int first = 0, last = 0;"
-}
-
-#
-#test_dir_list
-#
-proc test_dir_list { } {
-    gdb_test "ld" "Source directories searched: .*"
-}
-
-#
-#test_list_sources
-#
-proc test_list_sources { } {
-    if [istarget "hppa64-*-*"] {
-	gdb_test "lf" "Source files for which symbols have been read in:\r\n\r\n.*average\\.c.*Source files for which symbols will be read in on demand:\r\n\r\nglobals,.*\[se\]\[un\]\[md\]\\.c.*\[se\]\[un\]\[md\]\\.c"
-    } else {
-	gdb_test "lf" "Source files for which symbols have been read in:\r\n\r\n.*average\\.c.*\r\n\r\nSource files for which symbols will be read in on demand:\r\n\r\nglobals, end\\.c,.*sum\\.c"
-    }
-}
-#
-#test_vlist
-#
-proc test_vlist { } {
-    gdb_test "v main" "34\[ \t\]+main \\(\\)\r\n35\[ \t\]+#endif\r\n36\[ \t\]+.\r\n37\[ \t\]+char c;"
-}
-
-#
-#test_va
-#
-proc test_va { } {
-    if [istarget "hppa64-*-*"] {
-	gdb_test "va main" "Dump of assembler code for function main:\r\n.*0x.* <main>:\[ \t\]+std %rp,-0x10\\(%sp\\)\r\n0x.* <main\\+4>:\[ \t\]+std,ma %r3,0xd0\\(%sp\\)\r\n.*0x.* <main\\+8>:\[ \t\]+std %r4,-0xc8\\(%sp\\)\r\n.*0x.* <main\\+12>:\[ \t\]+copy %ret1,%r3\r\n.*"
-    } else {
-	gdb_test "va main" "Dump of assembler code for function main:\r\n.*0x.* <main>:\[ \t\]+stw %rp,-0x14\\(%sr0,%sp\\)\r\n0x.* <main\\+4>:\[ \t\]+ldo 0x\[48\]0\\(%sp\\),%sp\r\n.*0x.* <main\\+8>:\[ \t\]+stw %r0,-0x.*\\(%sr0,%sp\\)\r\n.*0x.* <main\\+12>:\[ \t\]+stw %r0,-0x.*\\(%sr0,%sp\\)\r\n.*"
-    }
-}
-
-#
-#test_list_globals
-#
-proc test_list_globals { } {
-    gdb_test "lg" "All defined variables:\r\n\r\nFile globals:.*"
-#    gdb_test "lg" "All defined variables:\r\n\r\nFile globals:\r\nchar __buffer.512.;\r\nint __d_eh_catch_catch;\r\nint __d_eh_catch_throw;.*"
-}
-
-#
-#test_list_registers
-#
-proc test_list_registers { } {
-    if [istarget "hppa64-*-*"] {
-	gdb_test "lr" "\[ \t\]+flags:.*r17:.*pcsqh:.*cr0:.*\r\n\[ \t\]+r1:.*r18:.*pcoqt:.*cr8:.*"
-    } else {
-	gdb_test "lr" "\[ \t\]+flags:.*r18:.*pcsqt:.*ccr:.*\r\n\[ \t\]+r1:.*r19:.*eiem:.*cr12:.*"
-    }
-    gdb_test "lr r1" "r1 .*"
-}
-
-#
-#test_backtrace
-#
-proc test_backtrace { } {
-    gdb_test "t" "#0  main \\(\\) at.*average.c:39"
-    gdb_test "T" "#0  main \\(\\) at.*average.c:39\r\n\[ \t\]+c = *.*\r\n\[ \t\]+first = 0\r\n\[ \t\]+last = 0"
-
-    gdb_test "break sum" ""
-    gdb_test "cont" ""
-    gdb_test "next"
-
-    gdb_test "t" "#0  sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n#1  0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n#2  0x.* in main \\(\\) at.*average\.c:42"
-    gdb_test "t 1" "#0  sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\\(More stack frames follow\.\.\.\\)"
-    gdb_test "T" "#0  sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\[ \t\]+i = 0\r\n\[ \t\]+s = 0\r\n#1  0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n\[ \t\]+total = 0\r\n\[ \t\]+num_elements = 0\r\n\[ \t\]+average = 0\r\n#2  0x.* in main \\(\\) at.*average\.c:42\r\n\[ \t\]+c = *.*\r\n\[ \t\]+first = 0\r\n\[ \t\]+last = 9"
-    gdb_test "T 1" "#0  sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\[ \t\]+i = 0\r\n\[ \t\]+s = 0\r\n\\(More stack frames follow\.\.\.\\)"
-
-    gdb_test "V" "#0  sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\\12\[ \t\]+for \\(i = low;.*\\)"
-    gdb_test "V 1" "#1  0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n24\[ \t\]+total = sum\\(list, low, high\\);"
-}
-
-#
-# test_go
-#
-proc test_go { }  {
-    gdb_test "break main" ""
-    gdb_test "R" ""
-
-    gdb_test "g +1" "Breakpoint.*at 0x.*: file.*average\.c, line 39\.\r\nContinuing at 0x.*\.\r\nmain \\(\\) at.*average\.c:39\r\n39\[ \t\]+last = num-1;"
-    gdb_test "g 42" "Breakpoint.*at 0x.*: file.*average\.c, line 42\.\r\nContinuing at 0x.*\.\r\nmain \\(\\) at.*average\.c:42\r\n42\[ \t\]+print_average \\(my_list, first, last\\);"
-
-}
-
-#
-#test_breakpoints
-#
-proc test_breakpoints { } {
-    global gdb_prompt
-
-    gdb_test "sb" ""
-    gdb_test "lb" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep n.*in main at.*average\.c:38.*"
-    gdb_test "ab" ""
-    gdb_test "lb" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep y.*in main at.*average\.c:38.*"
-    gdb_test "ba sum" "Breakpoint.*at.*: file.*sum\.c, line 11\."
-    gdb_test "cont" ""
-    gdb_test "bx" "Breakpoint.*at.*: file.*sum.c, line 15\."
-    #gdb_test "bx if (1)" "Breakpoint.*at.*: file.*sum.c, line 15\."
-    gdb_test "bx 1" "Breakpoint.*at.*: file.*average.c, line 29\."
-    gdb_test "bx 1 if (1)" "Breakpoint.*at.*: file.*average.c, line 29\."
-    gdb_test "bc 1 2" "Will ignore next 2 crossings of breakpoint 1\."
-    gdb_test "lb 1" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep y.*in main at.*average\.c:38\r\n.*breakpoint already hit 1 time\r\n.*ignore next 2 hits.*"
-
-    send_gdb "db\n"
-    gdb_expect {
-        -re "Delete all breakpoints.*y or n. $" {
-            send_gdb "y\n"
-            exp_continue
-        }
-        -re "y\r\n$gdb_prompt $" {}
-        -re ".*$gdb_prompt $" { # This happens if there were no breakpoints
-            }
-        timeout { perror "Delete all breakpoints (timeout)" ; return }
-    }
-    send_gdb "lb\n"
-    gdb_expect {
-        -re "No breakpoints or watchpoints..*$gdb_prompt $" {}
-        -re ".*$gdb_prompt $" { perror "breakpoints not deleted" ; return }
-        timeout { perror "info breakpoints (timeout)" ; return }
-    }
-gdb_test "xbreak" "Breakpoint.*at.*file.*sum.c, line 15."
-gdb_test "xbreak print_average" "Breakpoint.*at.*file.*average.c, line 29."
-gdb_test "xbreak if (1)" "Note: breakpoint.*also set at pc.*Breakpoint.*at.*file.*sum.c, line 15."
-gdb_test "xbreak print_average if (1)" "Note: breakpoint.*also set at pc.*Breakpoint.*at.*file.*average.c, line 29."
-
-    send_gdb "lb\n"
-    gdb_expect {
-        -re "Num Type           Disp Enb Address    What.*breakpoint     keep y.*sum.c:15.*breakpoint     keep y.*average.c:29.*breakpoint     keep y.*sum.c:15.*stop only if 1.*breakpoint     keep y.*average.c:29.*stop only if 1.*$gdb_prompt $" {pass "lb on xbreaks"}
-        -re ".*$gdb_prompt $" { fail "breakpoints not deleted"}
-        timeout { fail "info breakpoints (timeout)" }
-    }
-
-}
-
-#
-# test_signals 
-#
-proc test_signals { } {
-    gdb_test "handle SIGTERM nostop noprint" ""
-    gdb_test "z 15 s" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*Yes.*Yes.*Yes.*Terminated"
-    gdb_test "z 15 r" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*Yes.*Terminated"
-    gdb_test "z 15 i" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*No.*Terminated"
-    gdb_test "z 15 r" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*Yes.*No.*Terminated"
-    gdb_test "z 15 Q" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*No.*Terminated"
-    gdb_test "lz" "Signal.*Stop.*Print.*Pass to program.*Description\r\n\r\nSIGHUP.*Yes.*"
-}
-
-
-
-# Start with a fresh gdb.
-global GDBFLAGS
-set saved_gdbflags $GDBFLAGS
-
-set GDBFLAGS "$GDBFLAGS --xdb"
-
-gdb_exit
-gdb_start
-
-xdb_reinitialize_dir $srcdir/$subdir
-
-gdb_load ${binfile}
-send_gdb "set width 0\n"
-gdb_expect -re "$gdb_prompt $"
-test_search
-test_viewing_loc
-test_dir_list
-test_list_sources
-test_vlist
-test_va
-gdb_test "next"
-gdb_test "l" "No arguments.\r\nc = *.*\r\nfirst = 0\r\nlast = 0"
-#test_list_globals
-test_list_registers
-test_backtrace
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-xdb_reinitialize_dir $srcdir/$subdir
-
-gdb_load ${binfile}
-send_gdb "set width 0\n"
-gdb_expect -re "$gdb_prompt $"
-test_go
-
-
-gdb_exit
-gdb_start
-xdb_reinitialize_dir $srcdir/$subdir
-
-gdb_load ${binfile}
-send_gdb "set width 0\n"
-gdb_expect -re "$gdb_prompt $"
-gdb_test "break main" ""
-gdb_test "R" ""
-gdb_test "S" "39\[ \t\]+last = num-1;"
-test_breakpoints
-test_signals
-gdb_test "sm" ""
-gdb_test "info set" ".*pagination:  State of pagination is off.*"
-gdb_test "am" ""
-gdb_test "info set" ".*pagination:  State of pagination is on.*"
-gdb_exit
-
-set GDBFLAGS $saved_gdbflags
-
-return 0
-
-
-
-
-
-
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/Makefile.in b/gdb/testsuite/gdb.hp/gdb.defects/Makefile.in
deleted file mode 100644
index feb456e..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/Makefile.in
+++ /dev/null
@@ -1,25 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = bs14602 bs15503 solib-d solib-d1.sl solib-d2.sl
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs14602.c b/gdb/testsuite/gdb.hp/gdb.defects/bs14602.c
deleted file mode 100644
index 232b408..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/bs14602.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Test file for bs14602.exp */
-
-double      v_double = 0;
-long double v_long_double = 12345.67890;
-
-int main () {
-  v_double = 0;
-  v_long_double = 12345.67890;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp b/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp
deleted file mode 100644
index 0458922..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp
+++ /dev/null
@@ -1,111 +0,0 @@
-# This file was written by Sue Kimura. (sue_kimura@hp.com)
-#
-# Test for CLLbs14602 -- problem with recognizing long double on 10.20.
-#
-# Source file: bs14602.c
-
-if { [skip_hp_tests] } { continue }
-
-#
-# test running programs
-#
-
-
-set testfile bs14602
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
-    return -1
-}
-
-# set up appropriate compile option to recognize long double
-if {$hp_aCC_compiler || $hp_cc_compiler} {
-    set ansi_option "-Ae"
-} else {
-    set ansi_option ""
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable "debug {additional_flags=${ansi_option}}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
-
-# get to end of main so we can check out some stuff
-if ![runto main] {
-  perror "couldn't run to breakpoint main"
-  continue
-}
-
-gdb_test "txbreak" \
-    "Breakpoint $decimal at $hex: file .*bs14602.c, line 9." \
-    "set breakpoint at end of main"
-
-gdb_test "continue" \
-    "Continuing.\r\n$hex in main* \\(\\) at .*bs14602.c:9\r\n.*" \
-    "continue to end of main"
-
-# test some simple things about long double
-gdb_test "whatis v_long_double" \
-    "type = long double" \
-    "whatis v_long_double"
-
-gdb_test "ptype v_long_double" \
-    "type = long double" \
-    "ptype v_long_double"
-
-gdb_test "print sizeof \(long double\)" \
-    " = 16" \
-    "print sizeof long double"
-
-gdb_test "print sizeof \(v_long_double\)" \
-    " = 16" \
-    "print sizeof v_long_double"
-
-gdb_test "print v_long_double"  \
-    " = 12345.67890000000079453457146883011" \
-    "print v_long_double - 1" 
-
-gdb_test "set variable v_long_double = 98765.43210" \
-    "" \
-    "set variable v_long_double to constant value"
-
-gdb_test "print v_long_double" \
-    " = 98765.43210000000544823706150054932" \
-    "print v_long_double - 2" 
-
-gdb_test "set variable v_double = v_long_double" \
-    "" \
-    " set variable v_double with v_long_double"
-
-gdb_test "print v_double" \
-    " = 98765.432100000005" \
-    " print v_double"
-
-#reset v_long_double
-gdb_test "set variable v_long_double = 0" \
-    "" \
-    "reset v_long_double to 0"
-
-gdb_test "print v_long_double" \
-    " = 0" \
-    "print v_long_double - 3"
-
-gdb_test "set variable v_long_double = v_double" \
-    "" \
-    " set variable v_long_double with v_long_double"
-
-gdb_test "print v_long_double" \
-    " = 98765.43210000000544823706150054932" \
-    "print v_long_double - 4 "
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.c b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.c
deleted file mode 100644
index ec803fe..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.c
+++ /dev/null
@@ -1,6 +0,0 @@
-main()
-{
-	function_from_primary();
-	function_from_secondary();
-}
-
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
deleted file mode 100644
index f08b475..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
+++ /dev/null
@@ -1,271 +0,0 @@
-#   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-# This file was written by srikanth (with huge chunks borrowed from old ones) 
-#
-# Regression test for 
-#
-#     CLLbs14756
-#
-#         o catch load command does not stop for implicit loads.
-#
-#     CLLbs15382  
-#
-#         o sharedlibrary command ignores its argument and ends
-#           up loading every shared library there is ...
-#
-#     CLLbs15582  
-#
-#         o info line non-existent-function dumps core
-#         o clear non-existent function dumps core
-#         o xbreak non-existent-function dumps core
-#
-#     CLLbs15725
-#
-#         o gdb prints static and extern variables in shlibs incorrectly.
-#
-#     CLLbs16090
-#
-#         o deferred breakpoints should kick in for shlibs loaded explicitly
-#           with the sharedlibrary command.
-#         o GDB confuses export stubs with actual function.
-#
-#
-
-if { [skip_hp_tests] } { continue }
-
-
-# are we on a target board
-if ![isnative] {
-    return
-}
-
-# This test is presently only valid on HP-UX, since it requires
-# that we use HP-UX-specific compiler & linker options to build
-# the testcase.
-#
-setup_xfail "*-*-*"
-clear_xfail "hppa*-*-*hpux*"
-
-set prototypes 0
-set testfile "solib-d"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-set testfile1 ${objdir}/${subdir}/${testfile}1.o
-set testfile2 ${objdir}/${subdir}/${testfile}2.o
-set libfile1 ${objdir}/${subdir}/${testfile}1.sl
-set libfile2 ${objdir}/${subdir}/${testfile}2.sl
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
-    return -1
-}
-
-# set up appropriate compile option to recognize long double
-if {$hp_aCC_compiler || $hp_cc_compiler} {
-    set picflag "+z"
-    set ansiflag "-Ae"
-} else {
-    set picflag "-fpic"
-    set ansiflag ""
-}
-
-
-# Build the shared libraries this test case needs.
-#
-#cd ${subdir}
-
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object "{debug additional_flags=${picflag}}"] != "" } {
-    perror "Couldn't compile ${testfile}1.c"
-    return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object "{debug additional_flags=${picflag}}"] != ""} {
-    perror "Couldn't compile ${testfile}2.c"
-    return -1
-}
-
-remote_exec build "ld -b ${testfile1} -o ${libfile1}"
-remote_exec build "ld -b ${testfile2} -o ${libfile2}"
-
-# Build the test case
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable "{debug additional_flags=${ansiflag} -Wl,-aarchive}"] != "" } {
-    perror "Couldn't build ${binfile}"
-    return -1
-}
-
-# Start with a fresh gdb
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# Verify that we can set a generic catchpoint on shlib loads.  I.e., that
-# we can catch any shlib load, without specifying the name.
-#
-gdb_test "catch load" "Catchpoint \[0-9\]* .load <any library>.*" \
-    "set generic catch load"
-
-# Verify that implicit shlib loads are caught and reported.
-send_gdb "run\n"
-gdb_expect {
-    -re ".*solib-d1.*$gdb_prompt $" {
-        pass "Catch implicit load at startup"
-    }
-    -re "Inferior \[0-9\]+ exited.*$gdb_prompt $" {
-        fail "CLLbs14756 || CLLbs16090 came back ???"
-    }
-    timeout { fail "(timeout) implicit library load" }
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-if ![runto_main] { fail "breakpoint at main did not trigger ?" }
-
-# verify that we print globals from shlibs correctly.
-gdb_test "p global_from_primary" " = 5678" \
-    "print global from shlib (CLLbs15725)"
-
-gdb_test "p global_from_secondary" " = 9012" \
-    "print global from shlib (CLLbs15725)"
-
-# verify that we print static variables from shlibs correctly.
-if { ![runto function_from_primary] } { return }
-gdb_test "p file_static" " = 1234" "print file static variable (CLLbs15725)" 
-
-if { ![runto function_from_secondary] } { return }
-gdb_test "p local_static" " = 3456" "print local static variable (CLLbs15725)" 
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "set auto-solib-add 0" "" "turn off auto shlib debug loading"
-
-if ![runto_main] {
-    perror "C function calling tests suppressed"
-}
-
-# verify that "clear non-existent-symbol" does not crash
-gdb_test "clear junkfunc" "Location not found.*" \
-    "clear non-existent function does not dump core !"
-
-# verify that "info line non-existent-symbol" does not crash
-gdb_test "info line junkfunc" "Location not found.*" \
-    "info line junkfunc does not dump core !"
-
-# verify that "xbreak non-existent-symbol" does not crash
-gdb_test "xbreak junkfunc" "Function \"junkfunc\" not defined.*" \
-    "xbreak junkfunc does not dump core !"
-
-gdb_test "list function_from_primary" \
-    "No line number known for function_from_primary.*" \
-    "turning off auto shlib debug loading"
-
-send_gdb "sharedlibrary solib-d1\n" 
-gdb_expect {
-    -re "Reading symbols from.*solib-d1.*$gdb_prompt $" {
-	pass "loading primary library on demand (1)"
-    }
-    -re "--Adding symbols for shared library.*solib-d1.*$gdb_prompt $" {
-	pass "loading primary library on demand (2)"
-    }
-    -re "$gdb_prompt $" { fail "loading primary library on demand (3)" }
-    timeout { fail "(timeout) loading primary library on demand" }
-}
-
-# make sure that load above of primary also did not pull in secondary.
-send_gdb "list function_from_secondary\n" 
-gdb_expect {
-    -re "No symbol.*context.*$gdb_prompt $" {
-        pass "loaded only what we needed (1)"
-    }
-    -re "No line number known for function_from_secondary.*$gdb_prompt $" {
-        pass "loaded only what we needed (2)"
-    }
-    -re ".*9012.*$gdb_prompt $" { fail "Oops ! CLLbs15382 came back ?" }
-    timeout { fail "(timeout) printing global" }
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "set auto-solib-add 0" "" "turn off auto shlib debug loading"
-
-gdb_test "set stop-on-solib-event 1" "" "stop-on-solib-event"
-
-# verify that we set breakpoint on the function and not the export stub
-# used to be that we set bp on the export stub of _start and thus miss
-# shlib loads in some cases (where the stub exists)
-send_gdb "run\n"
-gdb_expect {
-    -re "Stopped due to shared library event.*$gdb_prompt $" {
-        pass "stop for shlib event"
-    }
-    -re "Inferior \[0-9\]+ exited.*$gdb_prompt $" {
-        fail "Bug CLLbs16090 came back ?"
-    }
-    timeout { fail "(timeout) stop for shlib event " }
-}
-
-gdb_test "b main" "Breakpoint 1 at.*" "set breakpoint on main"
-
-gdb_test "set stop-on-solib-event 0" "" "stop-on-solib-event (timeout)"
-
-# verify that we set breakpoint on the function and not the export stub
-gdb_test "cont" "Breakpoint 1.*main.*" "run to main"
-
-# On PA64 we read in the unwind info and linker symbol table which lets
-# us set the breakpoint and not defer it.
-send_gdb "b garbage\n"
-gdb_expect {
-    -re "Breakpoint.*deferred.*garbage.*library containing.*is loaded.*$gdb_prompt $" {
-        pass " set deferred breakpoint (1)"
-    }
-    -re "Breakpoint 2 at 0x.*$gdb_prompt $" {
-        pass " set deferred breakpoint (2)"
-    }
-    -re "$gdb_prompt $" { fail " set deferred breakpoint (3)" }
-    timeout { fail "(timeout) set deferred breakpoint" }
-}
-
-# make sure that the sharedlibrary command enables any deferred breakpoints
-# that it should.
-send_gdb "sharedlibrary lib\n"
-gdb_expect {
-    -re "Reading.*solib-d1.*$gdb_prompt $" {
-        pass "load up all shared libs (1)"
-    }
-    -re "Loading.*dld.sl.*--Adding symbols.*solib-d1.*$gdb_prompt $" {
-        pass "load up all shared libs (2)"
-    }
-    -re "$gdb_prompt $" { fail "load up all libraries" }
-    timeout { fail "(timeout) load all libraries " }
-}
-
-# do we stop at garbage ? If yes ok. 
-gdb_test "cont" "Breakpoint.*garbage.*" "deferred breakpoint enabled"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c b/gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c
deleted file mode 100644
index b6da64d..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c
+++ /dev/null
@@ -1,12 +0,0 @@
-static int file_static = 1234;
-int global_from_primary = 5678;
-
-int function_from_primary()
-{
-    garbage();	
-}
-
-force_generation_of_export_stub()
-{
-    _start();   /* force main module to have an export stub for _start() */
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c b/gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c
deleted file mode 100644
index 024616b..0000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c
+++ /dev/null
@@ -1,11 +0,0 @@
-int global_from_secondary = 9012;
-int function_from_secondary()
-{
-    static int local_static = 3456;
-    return 0;
-}
-
-garbage()
-{
-	return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in b/gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in
deleted file mode 100644
index 2440cf4..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in
+++ /dev/null
@@ -1,26 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = objdbg01/test0 objdbg01/test1 objdbg02/test \
-	objdbg03/test objdbg04/test0 objdbg04/test1
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ objdbg*/*.o objdbg*/*.ci
-	-rm -f *.dwo *.dwp
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
deleted file mode 100644
index 02ec5d3..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
+++ /dev/null
@@ -1,223 +0,0 @@
-# Test reading debug information from in object files.
-
-if { [skip_hp_tests] } { continue }
-
-if { ![istarget "hppa*-*-hpux*"] } {
-    verbose "HPUX test ignored for non-hppa targets."
-    return 0
-}
-
-set testfile "test"
-set srcsubdir ${srcdir}/${subdir}/objdbg01
-set toolssubdir ${srcdir}/${subdir}/tools
-set objdbgdir ${objdir}/${subdir}/objdbg01
-set binfile ${objdbgdir}/${testfile}
-set symaddrfile ${toolssubdir}/symaddr
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
-    return -1
-}
-
-if {!$hp_aCC_compiler && !$hp_cc_compiler} {
-  return 0
-}
-
-if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
-    untested objdbg01.exp
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x1.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x2.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x3.cc"
-    return -1
-}
-
-if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o ${objdbgdir}/x3.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile ${binfile}0"
-    return -1
-}
-
-if {[gdb_compile "${objdbgdir}/x3.o ${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile ${binfile}1"
-    return -1
-}
-
-# Test two executables. The first has x1.cc linked first, the second
-# has x3.cc linked first.  The difference is that in the first one,
-# the Info<PP> instantiation from x1.cc is taken, in the second, its
-# from x3.cc.
-
-for {set filenum 0} {$filenum < 2} {incr filenum 1} {
-
-    # Lets test some commons
-    # Need to restart each to make sure objects are not loaded
-    # Also cross check the address with what is actually in the
-    #   object file (call the executable ${symaddrfile} to retrieve the
-    #   information).
-
-    set exec_output [lindex [remote_exec build "${symaddrfile} ${binfile}${filenum} acomm"] 1]
-    regsub -all "\[\r\n\]" ${exec_output} "" exec_output
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "p &acomm" "..* = \\(int \[*\]\\) 0x${exec_output}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 20."
-    gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:20.*20.*acomm.*=.*1.*"
-    gdb_test "s 1" "21.*"
-    gdb_test "p acomm" ".* = 1.*"
-    gdb_test "p &acomm" "..* = \\(int \[*\]\\) 0x${exec_output}.*"
-
-    # Step through each line.
-    # Do this three times.
-    #   First round:  Test that things are okay after printing commons
-    #                 above.
-    #   Second round: Restart gdb and make sure we can walk through
-    #   Third round:  Do NOT restrart gdb to verify that the debug information
-    #                 was not messed up by loading additional object files from
-    #                 the first run through.
-    for {set i 0} {$i < 3} {incr i 1} {
-        if $i==1 then {
-            gdb_exit
-            gdb_start
-            gdb_reinitialize_dir ${srcsubdir}
-            gdb_load ${binfile}${filenum}
-        }
-        if $i!=2 then {
-            gdb_test "b main" \
-		"Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 20."
-        }
-        if $i!=0 then {
-            gdb_test "run" \
-		"Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:20.*"
-            gdb_test "s 1" "21.*"
-        }
-        gdb_test "s 1" "Info<PP>::p .*/x3.h:11.*"
-        gdb_test "s 1" "PP::print .*/x2.cc:8.*"
-        gdb_test "s 1" ".*9.*"
-        gdb_test "s 1" "Info<PP>::p .*/x3.h:12.*"
-        gdb_test "s 1" "main .*/x1.cc:22.*"
-        gdb_test "s 1" "foo .*/x3.cc:5.*"
-        gdb_test "s 1" "Info<PP>::p .*/x3.h:11.*"
-        gdb_test "s 1" "PP::print .*/x2.cc:8.*"
-        gdb_test "s 1" ".*9.*"
-        gdb_test "s 1" "Info<PP>::p .*/x3.h:12.*"
-        gdb_test "s 1" "foo .*/x3.cc:6.*"
-        gdb_test "s 1" "Info<QQ>::p .*/x3.h:11.*"
-        gdb_test "s 1" "QQ::print .*/x2.cc:13.*"
-        gdb_test "s 1" ".*14.*"
-        gdb_test "s 1" "Info<QQ>::p .*/x3.h:12.*"
-        gdb_test "s 1" "foo .*/x3.cc:7.*"
-        gdb_test "s 1" "main .*/x1.cc:24.*"
-        gdb_test "s 1" ".*25.*"
-        if [istarget "hppa64-*-*"] {
-            gdb_test "s 1" "0x\[0-9a-f\]+ in .*"
-	    gdb_continue_to_end
-        } else {
-            gdb_test "s 1" "0x\[0-9a-f\]+ in _start .*"
-            gdb_continue_to_end "" "s 1"
-        }
-    }
-
-    # Test various ptypes, and combinations of them
-    # Test things multiple times in each set to make sure that the debug
-    #   information did not get messed up.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*"
-    gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*"
-    gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*"
-    gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*"
-    gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
-    gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
-    gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
-    gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
-    gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype Info" "type = template <..*> (class |)Info {..*}.*"
-    gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
-    gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
-    gdb_test "ptype Info" "type = template <..*> (class |)Info {..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*"
-    gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*"
-    gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*"
-    gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*"
-    gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype class Info<QQ>" \
-	"type = (class |)Info<QQ> {..*void p( |)..*}.*"
-    gdb_test "ptype class Info<PP>" \
-	"type = (class |)Info<PP> {..*void p( |)..*}.*"
-    gdb_test "ptype class Info<QQ>" \
-	"type = (class |)Info<QQ> {..*void p( |)..*}.*"
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir ${srcsubdir}
-    gdb_load ${binfile}${filenum}
-    gdb_test "ptype class Info<PP>" \
-	"type = (class |)Info<PP> {..*void p( |)..*}.*"
-    gdb_test "ptype class Info<QQ>" \
-	"type = (class |)Info<QQ> {..*void p( |)..*}.*"
-    gdb_test "ptype class Info<PP>" \
-	"type = (class |)Info<PP> {..*void p( |)..*}.*"
-}
-
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc
deleted file mode 100644
index 0de3153..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include "x3.h"
-
-extern void foo();
-
-extern int acomm;
-
-int main3()
-{
-  return 1;
-}
-
-int main2()
-{
-  return 0;
-}
-
-int main()
-{
-  acomm = 1;
-  (new Info<PP>)->p(new PP);
-  foo();
-
-  return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc
deleted file mode 100644
index af588fb..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "x3.h"
-#include <stdio.h>
-
-int acomm;
-
-void PP::print()
-{
-  printf("In PP::print()\n");
-}
-
-void QQ::print()
-{
-  printf("In QQ::print()\n");
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc
deleted file mode 100644
index 88fe545..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "x3.h"
-
-void foo()
-{
-  (new Info<PP>)->p(new PP);
-  (new Info<QQ>)->p(new QQ);
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h
deleted file mode 100644
index d03a550..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h
+++ /dev/null
@@ -1,22 +0,0 @@
-
-template <class T>
-class Info {
-public:
-  void p(T *x);
-};
-
-template <class T>
-void Info<T>::p(T *x)
-{
-  x->print();
-}
-
-class PP {
-public:
-  void print();
-};
-
-class QQ {
-public:
-  void print();
-};
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
deleted file mode 100644
index 5677b7e..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
+++ /dev/null
@@ -1,86 +0,0 @@
-# Test reading debug information from in object files.
-
-if { [skip_hp_tests] } { continue }
-
-if { ![istarget "hppa*-*-hpux*"] } {
-    verbose "HPUX test ignored for non-hppa targets."
-    return 0
-}
-
-set testfile "test"
-set srcsubdir ${srcdir}/${subdir}/objdbg02
-set objdbgdir ${objdir}/${subdir}/objdbg02
-set binfile ${objdbgdir}/${testfile}
-set toolssubdir ${srcdir}/${subdir}/tools
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
-    return -1
-}
-
-if {!$hp_aCC_compiler && !$hp_cc_compiler} {
-  return 0
-}
-
-if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
-    untested objdbg02.exp
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x1.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x2.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x3.cc"
-    return -1
-}
-
-remote_exec build "rm -f ${objdbgdir}/test.a"
-set status [remote_exec build "ar cr ${objdbgdir}/test.a ${objdbgdir}/x2.o ${objdbgdir}/x3.o"]
-if { [lindex $status 0] != 0 } {
-    perror "Couldn't compile test.a"
-    return -1
-}
-remote_exec build "rm -f ${objdbgdir}/x2.o ${objdbgdir}/x3.o"
-
-if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/test.a" "$binfile" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile ${binfile}"
-    return -1
-}
-
-# Test loading debug information from an archive file
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir ${srcsubdir}
-gdb_load ${binfile}
-
-gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 12."
-gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:12.*"
-gdb_test "s 1" ".*13.*"
-gdb_test "s 1" "foo1 .*/x2.cc:15.*"
-gdb_test "s 1" ".*16.*"
-gdb_test "s 1" "foo2 .*/x2.cc:10.*"
-gdb_test "s 1" ".*11.*"
-gdb_test "s 1" "foo1 .*/x2.cc:17.*"
-gdb_test "s 1" "main .*/x1.cc:14.*"
-gdb_test "s 1" "foo3 .*/x3.cc:5.*"
-gdb_test "s 1" ".*6.*"
-gdb_test "s 1" "main .*/x1.cc:15.*"
-gdb_test "s 1" ".*16.*"
-if [istarget "hppa64-*-*"] {
-    gdb_test "s 1" "0x\[0-9a-f\]+ in .*START.*"
-    gdb_continue_to_end
-} else {
-    gdb_test "s 1" "0x\[0-9a-f\]+ in _start .*"
-    gdb_continue_to_end "" "s 1"
-}
-
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc
deleted file mode 100644
index 7ec0cf1..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <stdio.h>
-
-extern void foo1();
-extern void foo3();
-
-struct foo_type;
-
-int main()
-{
-  struct foo_type *x;
-
-  printf("In main.\n");
-  foo1();
-  foo3();
-  return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc
deleted file mode 100644
index 627f02d..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdio.h>
-
-struct foo_type {
-  int t1;
-  int t2;
-};
-
-static void foo2()
-{
-  printf("In foo2.\n");
-}
-
-void foo1()
-{
-  printf("In foo1.\n");
-  foo2();
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc
deleted file mode 100644
index d03ea51..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-void foo3()
-{
-  printf("In foo3.\n");
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
deleted file mode 100644
index 73defdc..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
+++ /dev/null
@@ -1,165 +0,0 @@
-# Test reading debug information from in object files.
-
-if { [skip_hp_tests] } { continue }
-
-if { ![istarget "hppa*-*-hpux*"] } {
-    verbose "HPUX test ignored for non-hppa targets."
-    return 0
-}
-
-set testfile "test"
-set srcsubdir ${srcdir}/${subdir}/objdbg03
-set objdbgdir ${objdir}/${subdir}/objdbg03
-set binfile ${objdbgdir}/${testfile}
-set toolssubdir ${srcdir}/${subdir}/tools
-if [istarget "hppa64-*-*"] {
-  set symaddrfile ${toolssubdir}/symaddr.pa64
-} else {
-  set symaddrfile ${toolssubdir}/symaddr
-}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
-    return -1
-}
-
-if {!$hp_aCC_compiler && !$hp_cc_compiler} {
-  return 0
-}
-
-if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
-    untested objdbg03.exp
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x1.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x2.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x3.cc"
-    return -1
-}
-
-if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o ${objdbgdir}/x3.o" "${binfile}" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile ${binfile}"
-    return -1
-}
-
-#
-# Test some normal commons
-#
-
-# Print the types
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir ${srcsubdir}
-gdb_load ${binfile}
-
-gdb_test "ptype common1" "type = int"
-gdb_test "ptype common2" "type = int"
-gdb_test "ptype common3" "type = int"
-gdb_test "ptype data1" "type = int"
-gdb_test "ptype data2" "type = int"
-gdb_test "ptype data3" "type = int"
-gdb_test "ptype common11" "type = int"
-gdb_test "ptype common10" "type = int"
-gdb_test "ptype data10" "type = int"
-gdb_test "ptype data11" "type = int"
-
-# Print the values
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir ${srcsubdir}
-gdb_load ${binfile}
-
-gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 11."
-gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:11.*"
-gdb_test "p data1" "..* = 1"
-gdb_test "p data2" "..* = 2"
-gdb_test "p data3" "..* = 3"
-gdb_test "p data10" "..* = 10"
-gdb_test "p data11" "..* = 11"
-gdb_test "n" ".*12.*"
-gdb_test "p common11" "..* = 11"
-
-gdb_test "s 1" "foo .*/x3.cc:15.*"
-gdb_test "s 4" ".*20.*"
-gdb_test "p data4" "..* = 4"
-gdb_test "p common4" "..* = 4"
-gdb_test "n" ".*21.*"
-
-gdb_test "n" "main .*/x1.cc:14.*"
-gdb_test "p common1" "..* = 1"
-gdb_test "p common2" "..* = 2"
-gdb_test "p common3" "..* = 3"
-
-# Verify that addresses match those in the executable
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir ${srcsubdir}
-gdb_load ${binfile}
-
-set exec_output_data1 [lindex [remote_exec build "${symaddrfile} ${binfile} data1"] 1]
-regsub -all "\[\r\n\]" ${exec_output_data1} "" exec_output_data1
-
-set exec_output_data2 [lindex [remote_exec build "${symaddrfile} ${binfile} data2"] 1]
-regsub -all "\[\r\n\]" ${exec_output_data2} "" exec_output_data2
-
-set exec_output_data3 [lindex [remote_exec build "${symaddrfile} ${binfile} data3"] 1]
-regsub -all "\[\r\n\]" ${exec_output_data3} "" exec_output_data3
-
-set exec_output_data10 [lindex [remote_exec build "${symaddrfile} ${binfile} data10"] 1]
-regsub -all "\[\r\n\]" ${exec_output_data10} "" exec_output_data10
-
-set exec_output_data11 [lindex [remote_exec build "${symaddrfile} ${binfile} data11"] 1]
-regsub -all "\[\r\n\]" ${exec_output_data11} "" exec_output_data11
-
-set exec_output_common1 [lindex [remote_exec build "${symaddrfile} ${binfile} common1"] 1]
-regsub -all "\[\r\n\]" ${exec_output_common1} "" exec_output_common1
-
-set exec_output_common2 [lindex [remote_exec build "${symaddrfile} ${binfile} common2"] 1]
-regsub -all "\[\r\n\]" ${exec_output_common2} "" exec_output_common2
-
-set exec_output_common3 [lindex [remote_exec build "${symaddrfile} ${binfile} common3"] 1]
-regsub -all "\[\r\n\]" ${exec_output_common3} "" exec_output_common3
-
-set exec_output_common10 [lindex [remote_exec build "${symaddrfile} ${binfile} common10"] 1]
-regsub -all "\[\r\n\]" ${exec_output_common10} "" exec_output_common10
-
-set exec_output_common11 [lindex [remote_exec build "${symaddrfile} ${binfile} common11"] 1]
-regsub -all "\[\r\n\]" ${exec_output_common11} "" exec_output_common11
-
-if [istarget "hppa64-*-*"] {
-    gdb_test "p &data1" "..* = \\(int \[*\]\\) ${exec_output_data1}"
-    gdb_test "p &data2" "..* = \\(int \[*\]\\) ${exec_output_data2}"
-    gdb_test "p &data3" "..* = \\(int \[*\]\\) ${exec_output_data3}"
-    gdb_test "p &data10" "..* = \\(int \[*\]\\) ${exec_output_data10}"
-    gdb_test "p &data11" "..* = \\(int \[*\]\\) ${exec_output_data11}"
-    gdb_test "p &common1" "..* = \\(int \[*\]\\) ${exec_output_common1}"
-    gdb_test "p &common2" "..* = \\(int \[*\]\\) ${exec_output_common2}"
-    gdb_test "p &common3" "..* = \\(int \[*\]\\) ${exec_output_common3}"
-    gdb_test "p &common10" "..* = \\(int \[*\]\\) ${exec_output_common10}"
-    gdb_test "p &common11" "..* = \\(int \[*\]\\) ${exec_output_common11}"
-} else {
-    gdb_test "p &data1" "..* = \\(int \[*\]\\) 0x${exec_output_data1}"
-    gdb_test "p &data2" "..* = \\(int \[*\]\\) 0x${exec_output_data2}"
-    gdb_test "p &data3" "..* = \\(int \[*\]\\) 0x${exec_output_data3}"
-    gdb_test "p &data10" "..* = \\(int \[*\]\\) 0x${exec_output_data10}"
-    gdb_test "p &data11" "..* = \\(int \[*\]\\) 0x${exec_output_data11}"
-    gdb_test "p &common1" "..* = \\(int \[*\]\\) 0x${exec_output_common1}"
-    gdb_test "p &common2" "..* = \\(int \[*\]\\) 0x${exec_output_common2}"
-    gdb_test "p &common3" "..* = \\(int \[*\]\\) 0x${exec_output_common3}"
-    gdb_test "p &common10" "..* = \\(int \[*\]\\) 0x${exec_output_common10}"
-    gdb_test "p &common11" "..* = \\(int \[*\]\\) 0x${exec_output_common11}"
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc
deleted file mode 100644
index 84231b0..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-
-extern int foo();
-extern int common3;
-extern int data3;
-extern int common11;
-extern int data11;
-
-int main()
-{
-  common11 = 11;
-  printf("In main: %d %d %d\n", data3, common3, foo(), common11, data11);
-
-  return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc
deleted file mode 100644
index 165cb85..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-int common10;
-int common11;
-
-int data10 = 10;
-int data11 = 11;
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc
deleted file mode 100644
index 80d38c7..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-
-int common1;
-int common2;
-int common3;
-static int common4;
-
-int data1 = 1;
-int data2 = 2;
-int data3 = 3;
-static int data4 = 4;
-
-int foo()
-{
-  common1 = 1;
-  common2 = 2;
-  common3 = 3;
-  common4 = 4;
-
-  return data1 + data2 + data3 + data4 + common1 + common2 + common3 + common4;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
deleted file mode 100644
index 0a98950..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
+++ /dev/null
@@ -1,66 +0,0 @@
-# Test reading debug information from in object files.
-
-if { [skip_hp_tests] } { continue }
-
-if { ![istarget "hppa*-*-hpux*"] } {
-    verbose "HPUX test ignored for non-hppa targets."
-    return 0
-}
-
-set testfile "test"
-set srcsubdir ${srcdir}/${subdir}/objdbg04
-set objdbgdir ${objdir}/${subdir}/objdbg04
-set binfile ${objdbgdir}/${testfile}
-set toolssubdir ${srcdir}/${subdir}/tools
-set symaddrfile ${toolssubdir}/symaddr
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
-    return -1
-}
-
-if {!$hp_aCC_compiler && !$hp_cc_compiler} {
-  return 0
-}
-
-if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
-    untested objdbg04.exp
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x1.cc"
-    return -1
-}
-
-if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x2.cc"
-    return -1
-}
-
-if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x1.cc"
-    return -1
-}
-
-if { [gdb_compile "${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
-    perror "Couldn't compile x1.cc"
-    return -1
-}
-
-# Test two executables. The first has x1.cc linked first, the second
-# has x2.cc linked first.  The difference is which COMDAT section was
-# picked.
-
-for {set filenum 0} {$filenum < 2} {incr filenum 1} {
-  gdb_exit
-  gdb_start
-  gdb_reinitialize_dir ${srcsubdir}
-  gdb_load ${binfile}${filenum}
-
-  gdb_test "ptype Adder" "type = template <class T> (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder<int>|)"
-  gdb_test "ptype Adder<int>" "type = (class |)Adder<int> {.*private:.*int val;.*public:.*void set( |)\\(int\\);.*int get( |)\\(void\\);.*int add( |)\\(int\\);.*}"
-  gdb_test "ptype Adder" "type = template <class T> (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder<int>|)"
-
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h
deleted file mode 100644
index 9df8ef9..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h
+++ /dev/null
@@ -1,30 +0,0 @@
-template <class T>
-class Adder {
-public:
-  void set(T);
-  T get();
-  T add(T);
-
-private:
-  T val;
-};
-
-template <class T>
-void Adder<T>::set(T new_val)
-{
-  val = new_val;
-}
-
-template <class T>
-T Adder<T>::get()
-{
-  return val;
-}
-
-template <class T>
-T Adder<T>::add(T new_val)
-{
-  val += new_val;
-  return val;
-}
-
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc
deleted file mode 100644
index 1f284b2..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-#include "x.h"
-
-template class Adder<int>;
-
-int main()
-{
-  Adder<int> add;
-
-  add.set(3);
-  add.add(3);
-  printf("In main: %d\n", add.get());
-
-  return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc
deleted file mode 100644
index 29eea75..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "x.h"
-
-template class Adder<int>;
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr
deleted file mode 100755
index d358e31..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# Get the address of a symbol in Hex.
-# $1 = object/executable file name
-# $2 = symbol name
-${srcdir}/gdb.hp/tools/odump -sym "$1" | grep "$2"$ | awk '{print $1}'
-
-exit 0
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64 b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64
deleted file mode 100755
index 4f3c8db..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# Get the address of a symbol in Hex.
-# $1 = object/executable file name
-# $2 = symbol name
-/usr/ccs/bin/elfdump -t +s .symtab "$1" | grep "$2"$ | awk '{print $6}'
-
-exit 0
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc
deleted file mode 100644
index f8b643a..0000000
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc
+++ /dev/null
@@ -1,4 +0,0 @@
-int main()
-{
-  return 0;
-}
diff --git a/gdb/testsuite/gdb.hp/tools/odump b/gdb/testsuite/gdb.hp/tools/odump
deleted file mode 100755
index c96abed..0000000
--- a/gdb/testsuite/gdb.hp/tools/odump
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/ksh
-
-# First source /app/appserver
-. /app/appserver
-
-# Exec the executable.
-exec $APPROOT/usr/contrib/bin/$(basename $0) "$@"

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [commit] [patch] Remove HPUX
  2014-11-21  9:32           ` Pedro Alves
@ 2015-03-13 19:26             ` Jan Kratochvil
  2015-03-13 19:43               ` Pedro Alves
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-13 19:26 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Michael Eager, Joel Brobecker, gdb-patches

On Fri, 21 Nov 2014 10:32:05 +0100, Pedro Alves wrote:
> On 11/19/2014 07:39 PM, Michael Eager wrote:
> 
> > Folks on LinkedIn were mostly concerned that changes in FSF
> > GDB support would affect their use of HP's WDB debugger.  I
> > assured them that this was not the case.
> 
> Thanks.  If no actual users care, then there's no reason
> for us to care either.
> 
> +1 from me for dropping support as well then.

Checked in:
	61a12cfa7b25746914493cc0d94e5053a8492aa5


Thanks,
Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Remove HPUX
  2015-03-13 18:34       ` Jan Kratochvil
@ 2015-03-13 19:40         ` Pedro Alves
  0 siblings, 0 replies; 28+ messages in thread
From: Pedro Alves @ 2015-03-13 19:40 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Simon Marchi, gdb-patches

On 03/13/2015 06:34 PM, Jan Kratochvil wrote:

> To make it clear what to do / not to do:
> 
> hpux OS support to be deleted, that is:
>   hppa-hpux delete
>   ia64-hpux delete (other ia64 support still should remain intact)
> hppa-linux and hppa-openbsd support should remain intact (also hppa in general)

Agreed.

> hp_cc_compiler+hp_aCC_compiler in testsuite - I do not know

Yeah, maybe something's salvageable here, but I haven't really
looked either.

> Do you agree?

I do.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [commit] [patch] Remove HPUX
  2015-03-13 19:26             ` [commit] " Jan Kratochvil
@ 2015-03-13 19:43               ` Pedro Alves
  2015-03-13 19:46                 ` Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Pedro Alves @ 2015-03-13 19:43 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Michael Eager, Joel Brobecker, gdb-patches

On 03/13/2015 07:26 PM, Jan Kratochvil wrote:
> On Fri, 21 Nov 2014 10:32:05 +0100, Pedro Alves wrote:
>> On 11/19/2014 07:39 PM, Michael Eager wrote:
>>
>>> Folks on LinkedIn were mostly concerned that changes in FSF
>>> GDB support would affect their use of HP's WDB debugger.  I
>>> assured them that this was not the case.
>>
>> Thanks.  If no actual users care, then there's no reason
>> for us to care either.
>>
>> +1 from me for dropping support as well then.
> 
> Checked in:
> 	61a12cfa7b25746914493cc0d94e5053a8492aa5

I think we should have a NEWS entry for this, like the ones
added for the OSF/1, IRIX, etc. removal in 7.9.  Could you take
care of that?

Thanks!

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [commit] [patch] Remove HPUX
  2015-03-13 19:43               ` Pedro Alves
@ 2015-03-13 19:46                 ` Jan Kratochvil
  2015-03-13 19:55                   ` Pedro Alves
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-13 19:46 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Michael Eager, Joel Brobecker, gdb-patches

On Fri, 13 Mar 2015 20:43:46 +0100, Pedro Alves wrote:
> I think we should have a NEWS entry for this, like the ones
> added for the OSF/1, IRIX, etc. removal in 7.9.  Could you take
> care of that?

Yes, it has been already posted as:
	[patch] NEWS: Remove HPUX
	https://sourceware.org/ml/gdb-patches/2015-03/msg00401.html


Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [commit] [patch] Remove HPUX
  2015-03-13 19:46                 ` Jan Kratochvil
@ 2015-03-13 19:55                   ` Pedro Alves
  2015-03-13 19:57                     ` Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Pedro Alves @ 2015-03-13 19:55 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Michael Eager, Joel Brobecker, gdb-patches

On 03/13/2015 07:46 PM, Jan Kratochvil wrote:
> On Fri, 13 Mar 2015 20:43:46 +0100, Pedro Alves wrote:
>> I think we should have a NEWS entry for this, like the ones
>> added for the OSF/1, IRIX, etc. removal in 7.9.  Could you take
>> care of that?
> 
> Yes, it has been already posted as:
> 	[patch] NEWS: Remove HPUX
> 	https://sourceware.org/ml/gdb-patches/2015-03/msg00401.html
> 
> 

Ah, thanks.  I suggest including the system names in
full, like:

HP/PA running HP-UX           hppa*-*-hpux*
Itanium running HP-UX         ia64-*-hpux*

It should be clearer to users this way.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [commit] [patch] Remove HPUX
  2015-03-13 19:55                   ` Pedro Alves
@ 2015-03-13 19:57                     ` Jan Kratochvil
  0 siblings, 0 replies; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-13 19:57 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Michael Eager, Joel Brobecker, gdb-patches

On Fri, 13 Mar 2015 20:55:14 +0100, Pedro Alves wrote:
> Ah, thanks.  I suggest including the system names in
> full, like:
> 
> HP/PA running HP-UX           hppa*-*-hpux*
> Itanium running HP-UX         ia64-*-hpux*
> 
> It should be clearer to users this way.

done:
	[patchv2] NEWS: Remove HPUX
	https://sourceware.org/ml/gdb-patches/2015-03/msg00409.html


Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Remove --xdb? (Re: [testsuite patch] Remove gdb.hp  [Re: [patch] Remove HPUX])
  2015-03-13 19:17   ` [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX] Jan Kratochvil
@ 2015-03-18 14:58     ` Pedro Alves
  2015-03-20 16:17       ` [commit] [testsuite patch] Remove gdb.hp Jan Kratochvil
  2015-03-20 17:48       ` [patch] Re: Remove --xdb? (Re: [testsuite patch] Remove gdb.hp) Jan Kratochvil
  0 siblings, 2 replies; 28+ messages in thread
From: Pedro Alves @ 2015-03-18 14:58 UTC (permalink / raw)
  To: Jan Kratochvil, Yao Qi; +Cc: gdb-patches, Joel Brobecker

On 03/13/2015 07:16 PM, Jan Kratochvil wrote:
> On Fri, 21 Nov 2014 04:20:04 +0100, Yao Qi wrote:
>> Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>>
>>> I did not investigate too much which other parts of GDB could be removed
>>> along, there may be some dead code now (but it always has been).
>>
>> Directory testsuite/gdb.hp should be removed,
> 
> Attached, OK for check-in?
> 

I read through all this, and the only things that looked like could
be salvageable and mildly interesting would be the "gdb --xdb"
tests (in gdb.compat/).  But, the only reference to xdb found
in the manual is commented out:

@c @item -xdb
@c @cindex @code{--xdb}
@c Run in XDB compatibility mode, allowing the use of certain XDB commands.
@c For information, see the file @file{xdb_trans.html}, which is usually
@c installed in the directory @code{/opt/langtools/wdb/doc} on HP-UX
@c systems.

The commands that enables aren't even documented in the manual.
Judging from that, I assume that only wdb users would ever really
be using the --xdb switch.

I think it's time to drop "support" for the --xdb switch too.  I
looked through the commands that that exposes, the only that looked
potentially interesting was "go", but then it's just an alias
for "tbreak+jump", which can easily be done with "define go...end".
I'd rather free up the "go" name for something potentially
more interesting (either run control, or maybe even unrelated,
e.g., for golang).

So the patch looks good to go to me.

>> as well as some target triplet checking on hpux in testsuite/lib/gdb.exp.
> 
> To be done later, I have spent some time on it but it seems unclear to me what
> should / should not be deleted, GDB seems to assume in many cases hppa==hpux
> which is not always the case.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [commit] [testsuite patch] Remove gdb.hp
  2015-03-18 14:58     ` Remove --xdb? (Re: [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX]) Pedro Alves
@ 2015-03-20 16:17       ` Jan Kratochvil
  2015-03-20 17:48       ` [patch] Re: Remove --xdb? (Re: [testsuite patch] Remove gdb.hp) Jan Kratochvil
  1 sibling, 0 replies; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-20 16:17 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Yao Qi, gdb-patches, Joel Brobecker

On Wed, 18 Mar 2015 15:58:08 +0100, Pedro Alves wrote:
> So the patch looks good to go to me.

Checked in:
	bc23328cc108d8805f1d234b86e5a6b76d4a80d5


Thanks,
Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [patch] Re: Remove --xdb? (Re: [testsuite patch] Remove gdb.hp)
  2015-03-18 14:58     ` Remove --xdb? (Re: [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX]) Pedro Alves
  2015-03-20 16:17       ` [commit] [testsuite patch] Remove gdb.hp Jan Kratochvil
@ 2015-03-20 17:48       ` Jan Kratochvil
  2015-04-10 19:27         ` Pedro Alves
  1 sibling, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-03-20 17:48 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Yao Qi, gdb-patches, Joel Brobecker

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

On Wed, 18 Mar 2015 15:58:08 +0100, Pedro Alves wrote:
> I think it's time to drop "support" for the --xdb switch too.

Attached, OK to check it in?

No regressions on {x86_64,x86_64-m32,i686}-fedora23pre-linux-gnu.


Jan

[-- Attachment #2: dbxcmd.patch --]
[-- Type: text/plain, Size: 32647 bytes --]

gdb/ChangeLog
2015-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* breakpoint.c (command_line_is_silent): Remove xdb_commands
	conditional.
	(_initialize_breakpoint): Remove xdb_commands for bc, ab, sb, db, ba
	and lb.
	* cli/cli-cmds.c (_initialize_cli_cmds): Remove xdb_commands for v and
	va.
	* cli/cli-decode.c (find_command_name_length): Remove xdb_commands
	conditional.
	* defs.h (xdb_commands): Remove declaration.
	* f-valprint.c (_initialize_f_valprint): Remove xdb_commands for lc.
	* guile/scm-cmd.c (command_classes): Remove xdb from comment.
	* infcmd.c (run_no_args_command, go_command): Remove.
	(_initialize_infcmd): Remove xdb_commands for S, go, g, R and lr.
	* infrun.c (xdb_handle_command): Remove.
	(_initialize_infrun): Remove xdb_commands for lz and z.
	* main.c (xdb_commands): Remove variable.
	(captured_main): Remove "xdb" from long_options.
	(print_gdb_help): Remove --xdb from help.
	* python/py-cmd.c (gdbpy_initialize_commands): Remove xdb from comment.
	* source.c (_initialize_source): Remove xdb_commands for D, ld, / and ?.
	* stack.c (backtrace_full_command, args_plus_locals_info)
	(current_frame_command): Remove.
	(_initialize_stack): Remove xdb_commands for t, T and l.
	* symtab.c (_initialize_symtab): Remove xdb_commands for lf and lg.
	* thread.c (_initialize_thread): Remove xdb_commands condition.
	* tui/tui-layout.c (tui_toggle_layout_command)
	(tui_toggle_split_layout_command, tui_handle_xdb_layout): Remove.
	(_initialize_tui_layout): Remove xdb_commands for td and ts.
	* tui/tui-regs.c (tui_scroll_regs_forward_command)
	(tui_scroll_regs_backward_command): Remove.
	(_initialize_tui_regs): Remove xdb_commands for fr, gr, sr, +r and -r.
	* tui/tui-win.c (tui_xdb_set_win_height_command): Remove.
	(_initialize_tui_win): Remove xdb_commands for U and w.
	* utils.c (pagination_on_command, pagination_off_command): Remove.
	(initialize_utils): Remove xdb_commands for am and sm.

gdb/doc/ChangeLog
2015-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.texinfo (Mode Options): Remove -xdb.

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0c000f2..27914eb 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4571,8 +4571,7 @@ cleanup_executing_breakpoints (void *ignore)
 static int
 command_line_is_silent (struct command_line *cmd)
 {
-  return cmd && (strcmp ("silent", cmd->line) == 0
-		 || (xdb_commands && strcmp ("Q", cmd->line) == 0));
+  return cmd && (strcmp ("silent", cmd->line) == 0);
 }
 
 /* Execute all the commands associated with all the breakpoints at
@@ -15799,8 +15798,6 @@ _initialize_breakpoint (void)
   add_com ("ignore", class_breakpoint, ignore_command, _("\
 Set ignore-count of breakpoint number N to COUNT.\n\
 Usage is `ignore N COUNT'."));
-  if (xdb_commands)
-    add_com_alias ("bc", "ignore", class_breakpoint, 1);
 
   add_com ("commands", class_breakpoint, commands_command, _("\
 Set commands to be executed when a breakpoint is hit.\n\
@@ -15849,13 +15846,6 @@ With no subcommand, breakpoints are enabled until you command otherwise.\n\
 This is used to cancel the effect of the \"disable\" command.\n\
 With a subcommand you can enable temporarily."),
 		  &enablelist, "enable ", 1, &cmdlist);
-  if (xdb_commands)
-    add_com ("ab", class_breakpoint, enable_command, _("\
-Enable some breakpoints.\n\
-Give breakpoint numbers (separated by spaces) as arguments.\n\
-With no subcommand, breakpoints are enabled until you command otherwise.\n\
-This is used to cancel the effect of the \"disable\" command.\n\
-With a subcommand you can enable temporarily."));
 
   add_com_alias ("en", "enable", class_breakpoint, 1);
 
@@ -15906,12 +15896,6 @@ A disabled breakpoint is not forgotten, but has no effect until re-enabled."),
 		  &disablelist, "disable ", 1, &cmdlist);
   add_com_alias ("dis", "disable", class_breakpoint, 1);
   add_com_alias ("disa", "disable", class_breakpoint, 1);
-  if (xdb_commands)
-    add_com ("sb", class_breakpoint, disable_command, _("\
-Disable some breakpoints.\n\
-Arguments are breakpoint numbers with spaces in between.\n\
-To disable all breakpoints, give no argument.\n\
-A disabled breakpoint is not forgotten, but has no effect until re-enabled."));
 
   add_cmd ("breakpoints", class_alias, disable_command, _("\
 Disable some breakpoints.\n\
@@ -15931,11 +15915,6 @@ The \"unset\" command is also an alias for \"delete\"."),
 		  &deletelist, "delete ", 1, &cmdlist);
   add_com_alias ("d", "delete", class_breakpoint, 1);
   add_com_alias ("del", "delete", class_breakpoint, 1);
-  if (xdb_commands)
-    add_com ("db", class_breakpoint, delete_command, _("\
-Delete some breakpoints.\n\
-Arguments are breakpoint numbers with spaces in between.\n\
-To delete all breakpoints, give no argument.\n"));
 
   add_cmd ("breakpoints", class_alias, delete_command, _("\
 Delete some breakpoints or auto-display expressions.\n\
@@ -15967,9 +15946,6 @@ BREAK_ARGS_HELP ("break")));
   add_com_alias ("bre", "break", class_run, 1);
   add_com_alias ("brea", "break", class_run, 1);
 
-  if (xdb_commands)
-   add_com_alias ("ba", "break", class_breakpoint, 1);
-
   if (dbx_commands)
     {
       add_abbrev_prefix_cmd ("stop", class_breakpoint, stop_command, _("\
@@ -16014,23 +15990,6 @@ breakpoint set."));
 
   add_info_alias ("b", "breakpoints", 1);
 
-  if (xdb_commands)
-    add_com ("lb", class_breakpoint, breakpoints_info, _("\
-Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
-The \"Type\" column indicates one of:\n\
-\tbreakpoint     - normal breakpoint\n\
-\twatchpoint     - watchpoint\n\
-The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
-the disposition of the breakpoint after it gets hit.  \"dis\" means that the\n\
-breakpoint will be disabled.  The \"Address\" and \"What\" columns indicate the\n\
-address and file/line number respectively.\n\
-\n\
-Convenience variable \"$_\" and default examine address for \"x\"\n\
-are set to the address of the last breakpoint listed unless the command\n\
-is prefixed with \"server \".\n\n\
-Convenience variable \"$bpnum\" contains the number of the last\n\
-breakpoint set."));
-
   add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints, _("\
 Status of all breakpoints, or breakpoint number NUMBER.\n\
 The \"Type\" column indicates one of:\n\
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index e46f036..2ec2dd3 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1846,10 +1846,7 @@ Lines can be specified in these ways:\n\
 With two args if one is empty it stands for ten lines away from \
 the other arg."));
 
-  if (!xdb_commands)
-    add_com_alias ("l", "list", class_files, 1);
-  else
-    add_com_alias ("v", "list", class_files, 1);
+  add_com_alias ("l", "list", class_files, 1);
 
   if (dbx_commands)
     add_com_alias ("file", "list", class_files, 1);
@@ -1868,8 +1865,6 @@ like in the \"break\" command.\n\
 So, for example, if you want to disassemble function bar in file foo.c\n\
 you must type \"disassemble 'foo.c'::bar\" and not \"disassemble foo.c:bar\"."));
   set_cmd_completer (c, location_completer);
-  if (xdb_commands)
-    add_com_alias ("va", "disassemble", class_xdb, 0);
 
   add_com_alias ("!", "shell", class_support, 0);
 
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 2ee2ae0..4d0d5a9 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -1248,11 +1248,6 @@ find_command_name_length (const char *text)
   /* Some characters are only used for TUI specific commands.
      However, they are always allowed for the sake of consistency.
 
-     The XDB compatibility characters are only allowed when using the
-     right mode because they clash with other GDB commands -
-     specifically '/' is used as a suffix for print, examine and
-     display.
-
      Note that this is larger than the character set allowed when
      creating user-defined commands.  */
 
@@ -1263,9 +1258,7 @@ find_command_name_length (const char *text)
 
   while (isalnum (*p) || *p == '-' || *p == '_'
 	 /* Characters used by TUI specific commands.  */
-	 || *p == '+' || *p == '<' || *p == '>' || *p == '$'
-	 /* Characters used for XDB compatibility.  */
-	 || (xdb_commands && (*p == '/' || *p == '?')))
+	 || *p == '+' || *p == '<' || *p == '>' || *p == '$')
     p++;
 
   return p - text;
diff --git a/gdb/defs.h b/gdb/defs.h
index 72512f6..eda6741 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -100,9 +100,6 @@ enum compile_i_scope_types
 #define max(a, b) ((a) > (b) ? (a) : (b))
 #endif
 
-/* * Enable xdb commands if set.  */
-extern int xdb_commands;
-
 /* * Enable dbx commands if set.  */
 extern int dbx_commands;
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 552da31..bacdc1e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1235,13 +1235,6 @@ source, assembly, registers and @value{GDBN} command outputs
 option if you run @value{GDBN} from Emacs (@pxref{Emacs, ,
 Using @value{GDBN} under @sc{gnu} Emacs}).
 
-@c @item -xdb
-@c @cindex @code{--xdb}
-@c Run in XDB compatibility mode, allowing the use of certain XDB commands.
-@c For information, see the file @file{xdb_trans.html}, which is usually
-@c installed in the directory @code{/opt/langtools/wdb/doc} on HP-UX
-@c systems.
-
 @item -interpreter @var{interp}
 @cindex @code{--interpreter}
 Use the interpreter @var{interp} for interface with the controlling
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index e841edf..8d74f03 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -516,7 +516,4 @@ _initialize_f_valprint (void)
 {
   add_info ("common", info_common_command,
 	    _("Print out the values contained in a Fortran COMMON block."));
-  if (xdb_commands)
-    add_com ("lc", class_info, info_common_command,
-	     _("Print out the values contained in a Fortran COMMON block."));
 }
diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c
index 202721b..a693df2 100644
--- a/gdb/guile/scm-cmd.c
+++ b/gdb/guile/scm-cmd.c
@@ -556,7 +556,7 @@ gdbscm_parse_command_name (const char *name,
 static const scheme_integer_constant command_classes[] =
 {
   /* Note: alias and user are special; pseudo appears to be unused,
-     and there is no reason to expose tui or xdb, I think.  */
+     and there is no reason to expose tui, I think.  */
   { "COMMAND_NONE", no_class },
   { "COMMAND_RUNNING", class_run },
   { "COMMAND_DATA", class_vars },
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 0211b5d..9aa6c7b 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -100,10 +100,6 @@ static void step_command (char *, int);
 
 static void run_command (char *, int);
 
-static void run_no_args_command (char *args, int from_tty);
-
-static void go_command (char *line_no, int from_tty);
-
 void _initialize_infcmd (void);
 
 #define ERROR_NO_INFERIOR \
@@ -647,13 +643,6 @@ run_command (char *args, int from_tty)
   run_command_1 (args, from_tty, 0);
 }
 
-static void
-run_no_args_command (char *args, int from_tty)
-{
-  set_inferior_args ("");
-}
-\f
-
 /* Start the execution of the program up until the beginning of the main
    program.  */
 
@@ -1231,22 +1220,6 @@ jump_command (char *arg, int from_tty)
   proceed (addr, GDB_SIGNAL_0, 0);
 }
 \f
-
-/* Go to line or address in current procedure.  */
-
-static void
-go_command (char *line_no, int from_tty)
-{
-  if (line_no == (char *) NULL || !*line_no)
-    printf_filtered (_("Usage: go <location>\n"));
-  else
-    {
-      tbreak_command (line_no, from_tty);
-      jump_command (line_no, from_tty);
-    }
-}
-\f
-
 /* Continue program giving it specified signal.  */
 
 static void
@@ -3167,8 +3140,6 @@ Unlike \"step\", if the current source line calls a subroutine,\n\
 this command does not enter the subroutine, but instead steps over\n\
 the call, in effect treating it as a single source line."));
   add_com_alias ("n", "next", class_run, 1);
-  if (xdb_commands)
-    add_com_alias ("S", "next", class_run, 1);
 
   add_com ("step", class_run, step_command, _("\
 Step program until it reaches a different source line.\n\
@@ -3198,21 +3169,6 @@ for an address to start at."));
   set_cmd_completer (c, location_completer);
   add_com_alias ("j", "jump", class_run, 1);
 
-  if (xdb_commands)
-    {
-      c = add_com ("go", class_run, go_command, _("\
-Usage: go <location>\n\
-Continue program being debugged, stopping at specified line or \n\
-address.\n\
-Give as argument either LINENUM or *ADDR, where ADDR is an \n\
-expression for an address to start at.\n\
-This command is a combination of tbreak and jump."));
-      set_cmd_completer (c, location_completer);
-    }
-
-  if (xdb_commands)
-    add_com_alias ("g", "go", class_run, 1);
-
   add_com ("continue", class_run, continue_command, _("\
 Continue program being debugged, after signal or breakpoint.\n\
 Usage: continue [N]\n\
@@ -3238,9 +3194,6 @@ To cancel previous arguments and run with no arguments,\n\
 use \"set args\" without arguments."));
   set_cmd_completer (c, filename_completer);
   add_com_alias ("r", "run", class_run, 1);
-  if (xdb_commands)
-    add_com ("R", class_run, run_no_args_command,
-	     _("Start debugged program with no arguments."));
 
   c = add_com ("start", class_run, start_command, _("\
 Run the debugged program until the beginning of the main procedure.\n\
@@ -3260,14 +3213,6 @@ Register name as argument means describe only that register."));
   add_info_alias ("r", "registers", 1);
   set_cmd_completer (c, reg_or_group_completer);
 
-  if (xdb_commands)
-    {
-      c = add_com ("lr", class_info, nofp_registers_info, _("\
-List of integer registers and their contents, for selected stack frame.\n\
-Register name as argument means describe only that register."));
-      set_cmd_completer (c, reg_or_group_completer);
-    }
-
   c = add_info ("all-registers", all_registers_info, _("\
 List of all registers and their contents, for selected stack frame.\n\
 Register name as argument means describe only that register."));
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0f8f531..d81b288 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -88,8 +88,6 @@ static void set_schedlock_func (char *args, int from_tty,
 
 static int currently_stepping (struct thread_info *tp);
 
-static void xdb_handle_command (char *args, int from_tty);
-
 void _initialize_infrun (void);
 
 void nullify_last_target_wait_ptid (void);
@@ -7052,72 +7050,6 @@ handle_completer (struct cmd_list_element *ignore,
   return return_val;
 }
 
-static void
-xdb_handle_command (char *args, int from_tty)
-{
-  char **argv;
-  struct cleanup *old_chain;
-
-  if (args == NULL)
-    error_no_arg (_("xdb command"));
-
-  /* Break the command line up into args.  */
-
-  argv = gdb_buildargv (args);
-  old_chain = make_cleanup_freeargv (argv);
-  if (argv[1] != (char *) NULL)
-    {
-      char *argBuf;
-      int bufLen;
-
-      bufLen = strlen (argv[0]) + 20;
-      argBuf = (char *) xmalloc (bufLen);
-      if (argBuf)
-	{
-	  int validFlag = 1;
-	  enum gdb_signal oursig;
-
-	  oursig = gdb_signal_from_name (argv[0]);
-	  memset (argBuf, 0, bufLen);
-	  if (strcmp (argv[1], "Q") == 0)
-	    sprintf (argBuf, "%s %s", argv[0], "noprint");
-	  else
-	    {
-	      if (strcmp (argv[1], "s") == 0)
-		{
-		  if (!signal_stop[oursig])
-		    sprintf (argBuf, "%s %s", argv[0], "stop");
-		  else
-		    sprintf (argBuf, "%s %s", argv[0], "nostop");
-		}
-	      else if (strcmp (argv[1], "i") == 0)
-		{
-		  if (!signal_program[oursig])
-		    sprintf (argBuf, "%s %s", argv[0], "pass");
-		  else
-		    sprintf (argBuf, "%s %s", argv[0], "nopass");
-		}
-	      else if (strcmp (argv[1], "r") == 0)
-		{
-		  if (!signal_print[oursig])
-		    sprintf (argBuf, "%s %s", argv[0], "print");
-		  else
-		    sprintf (argBuf, "%s %s", argv[0], "noprint");
-		}
-	      else
-		validFlag = 0;
-	    }
-	  if (validFlag)
-	    handle_command (argBuf, from_tty);
-	  else
-	    printf_filtered (_("Invalid signal handling flag.\n"));
-	  if (argBuf)
-	    xfree (argBuf);
-	}
-    }
-  do_cleanups (old_chain);
-}
-
 enum gdb_signal
 gdb_signal_from_command (int num)
 {
@@ -7700,29 +7632,6 @@ may be interspersed with actions, with the actions being performed for\n\
 all signals cumulatively specified."));
   set_cmd_completer (c, handle_completer);
 
-  if (xdb_commands)
-    {
-      add_com ("lz", class_info, signals_info, _("\
-What debugger does when program gets various signals.\n\
-Specify a signal as argument to print info on that signal only."));
-      add_com ("z", class_run, xdb_handle_command, _("\
-Specify how to handle a signal.\n\
-Args are signals and actions to apply to those signals.\n\
-Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\
-from 1-15 are allowed for compatibility with old versions of GDB.\n\
-Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
-The special arg \"all\" is recognized to mean all signals except those\n\
-used by the debugger, typically SIGTRAP and SIGINT.\n\
-Recognized actions include \"s\" (toggles between stop and nostop),\n\
-\"r\" (toggles between print and noprint), \"i\" (toggles between pass and \
-nopass), \"Q\" (noprint)\n\
-Stop means reenter debugger if this signal happens (implies print).\n\
-Print means print a message if this signal happens.\n\
-Pass means let program see this signal; otherwise program doesn't know.\n\
-Ignore is a synonym for nopass and noignore is a synonym for pass.\n\
-Pass and Stop may be combined."));
-    }
-
   if (!dbx_commands)
     stop_command = add_cmd ("stop", class_obscure,
 			    not_just_help_class_command, _("\
diff --git a/gdb/main.c b/gdb/main.c
index 72b8714..efe6c0c 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -50,9 +50,6 @@
    do_setshow_command will free it.  */
 char *interpreter_p;
 
-/* Whether xdb commands will be handled.  */
-int xdb_commands = 0;
-
 /* Whether dbx commands will be handled.  */
 int dbx_commands = 0;
 
@@ -596,7 +593,6 @@ captured_main (void *data)
     static struct option long_options[] =
     {
       {"tui", no_argument, 0, OPT_TUI},
-      {"xdb", no_argument, &xdb_commands, 1},
       {"dbx", no_argument, &dbx_commands, 1},
       {"readnow", no_argument, &readnow_symbol_files, 1},
       {"r", no_argument, &readnow_symbol_files, 1},
@@ -1231,7 +1227,6 @@ Output and user interface control:\n\n\
 #endif
   fputs_unfiltered (_("\
   --dbx              DBX compatibility mode.\n\
-  --xdb              XDB compatibility mode.\n\
   -q, --quiet, --silent\n\
                      Do not print version number on startup.\n\n\
 "), stream);
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index 1d89912..7623584 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -697,7 +697,7 @@ gdbpy_initialize_commands (void)
     return -1;
 
   /* Note: alias and user are special; pseudo appears to be unused,
-     and there is no reason to expose tui or xdb, I think.  */
+     and there is no reason to expose tui, I think.  */
   if (PyModule_AddIntConstant (gdb_module, "COMMAND_NONE", no_class) < 0
       || PyModule_AddIntConstant (gdb_module, "COMMAND_RUNNING", class_run) < 0
       || PyModule_AddIntConstant (gdb_module, "COMMAND_DATA", class_vars) < 0
diff --git a/gdb/source.c b/gdb/source.c
index 49c9d83..fbec0f1 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -2047,16 +2047,6 @@ Setting the value to an empty string sets it to $cdir:$cwd, the default."),
 			    show_directories_command,
 			    &setlist, &showlist);
 
-  if (xdb_commands)
-    {
-      add_com_alias ("D", "directory", class_files, 0);
-      add_cmd ("ld", no_class, show_directories_1, _("\
-Current search path for finding source files.\n\
-$cwd in the path means the current working directory.\n\
-$cdir in the path means the compilation directory of the source file."),
-	       &cmdlist);
-    }
-
   add_info ("source", source_info,
 	    _("Information about the current source file."));
 
@@ -2083,12 +2073,6 @@ Search backward for regular expression (see regex(3)) from last line listed.\n\
 The matching line number is also stored as the value of \"$_\"."));
   add_com_alias ("rev", "reverse-search", class_files, 1);
 
-  if (xdb_commands)
-    {
-      add_com_alias ("/", "forward-search", class_files, 0);
-      add_com_alias ("?", "reverse-search", class_files, 0);
-    }
-
   add_setshow_integer_cmd ("listsize", class_support, &lines_to_list, _("\
 Set number of source lines gdb will list by default."), _("\
 Show number of source lines gdb will list by default."), _("\
diff --git a/gdb/stack.c b/gdb/stack.c
index 76a2360..eea575a 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1940,13 +1940,6 @@ backtrace_command (char *arg, int from_tty)
   do_cleanups (old_chain);
 }
 
-static void
-backtrace_full_command (char *arg, int from_tty)
-{
-  backtrace_command_1 (arg, 1 /* show_locals */, 0, from_tty);
-}
-\f
-
 /* Iterate over the local variables of a block B, calling CB with
    CB_DATA.  */
 
@@ -2218,15 +2211,6 @@ args_info (char *ignore, int from_tty)
 			gdb_stdout);
 }
 
-
-static void
-args_plus_locals_info (char *ignore, int from_tty)
-{
-  args_info (ignore, from_tty);
-  locals_info (ignore, from_tty);
-}
-\f
-
 /* Select frame FRAME.  Also print the stack frame and show the source
    if this is the tui version.  */
 static void
@@ -2315,14 +2299,6 @@ frame_command (char *level_exp, int from_tty)
   print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
 }
 
-/* The XDB Compatibility command to print the current frame.  */
-
-static void
-current_frame_command (char *level_exp, int from_tty)
-{
-  print_stack_frame (get_selected_frame (_("No stack.")), 1, SRC_AND_LOC, 1);
-}
-
 /* Select the frame up one or COUNT_EXP stack levels from the
    previously selected frame, and print it briefly.  */
 
@@ -2670,12 +2646,6 @@ a command file or a user-defined command."));
 
   add_com_alias ("f", "frame", class_stack, 1);
 
-  if (xdb_commands)
-    {
-      add_com ("L", class_stack, current_frame_command,
-	       _("Print the current stack frame.\n"));
-      add_com_alias ("V", "frame", class_stack, 1);
-    }
   add_com ("select-frame", class_stack, select_frame_command, _("\
 Select a stack frame without printing anything.\n\
 An argument specifies the frame to select.\n\
@@ -2688,15 +2658,6 @@ With a negative argument, print outermost -COUNT frames.\nUse of the \
 Use of the 'no-filters' qualifier prohibits frame filters from executing\n\
 on this backtrace.\n"));
   add_com_alias ("bt", "backtrace", class_stack, 0);
-  if (xdb_commands)
-    {
-      add_com_alias ("t", "backtrace", class_stack, 0);
-      add_com ("T", class_stack, backtrace_full_command, _("\
-Print backtrace of all stack frames, or innermost COUNT frames\n\
-and the values of the local variables.\n\
-With a negative argument, print outermost -COUNT frames.\n\
-Usage: T <count>\n"));
-    }
 
   add_com_alias ("where", "backtrace", class_alias, 0);
   add_info ("stack", backtrace_command,
@@ -2709,9 +2670,6 @@ Usage: T <count>\n"));
 	    _("Local variables of current stack frame."));
   add_info ("args", args_info,
 	    _("Argument variables of current stack frame."));
-  if (xdb_commands)
-    add_com ("l", class_info, args_plus_locals_info,
-	     _("Argument and local variables of current stack frame."));
 
   if (dbx_commands)
     add_com ("func", class_stack, func_command, _("\
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 634cf97..f4d68b7 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -6239,14 +6239,6 @@ All global and static variable names, or those matching REGEXP."));
   add_com ("rbreak", class_breakpoint, rbreak_command,
 	   _("Set a breakpoint for all functions matching REGEXP."));
 
-  if (xdb_commands)
-    {
-      add_com ("lf", class_info, sources_info,
-	       _("Source files in the program"));
-      add_com ("lg", class_info, variables_info, _("\
-All global and static variable names, or those matching REGEXP."));
-    }
-
   add_setshow_enum_cmd ("multiple-symbols", no_class,
                         multiple_symbols_modes, &multiple_symbols_mode,
                         _("\
diff --git a/gdb/thread.c b/gdb/thread.c
index 01eb2ba..8e49046 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -1786,8 +1786,7 @@ Usage: thread find REGEXP\n\
 Will display thread ids whose name, target ID, or extra info matches REGEXP."),
 	   &thread_cmd_list);
 
-  if (!xdb_commands)
-    add_com_alias ("t", "thread", class_run, 1);
+  add_com_alias ("t", "thread", class_run, 1);
 
   add_setshow_boolean_cmd ("thread-events", no_class,
          &print_thread_events, _("\
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 6547404..4c25d43 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -63,10 +63,7 @@ static void show_data (enum tui_layout_type);
 static enum tui_layout_type next_layout (void);
 static enum tui_layout_type prev_layout (void);
 static void tui_layout_command (char *, int);
-static void tui_toggle_layout_command (char *, int);
-static void tui_toggle_split_layout_command (char *, int);
 static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *);
-static void tui_handle_xdb_layout (struct tui_layout_def *);
 
 
 /***************************************
@@ -396,14 +393,6 @@ Layout names are:\n\
            source/assembly/command (split) is displayed, \n\
            the register window is displayed with \n\
            the window that has current logical focus.\n"));
-  if (xdb_commands)
-    {
-      add_com ("td", class_tui, tui_toggle_layout_command, _("\
-Toggle between Source/Command and Disassembly/Command layouts.\n"));
-      add_com ("ts", class_tui, tui_toggle_split_layout_command, _("\
-Toggle between Source/Command or Disassembly/Command and \n\
-Source/Disassembly/Command layouts.\n"));
-    }
 }
 
 
@@ -554,53 +543,6 @@ extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
 
 
 static void
-tui_handle_xdb_layout (struct tui_layout_def *layout_def)
-{
-  if (layout_def->split)
-    {
-      tui_set_layout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
-      tui_set_win_focus_to (tui_win_list[layout_def->display_mode]);
-    }
-  else
-    {
-      if (layout_def->display_mode == SRC_WIN)
-	tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
-      else
-	tui_set_layout (DISASSEM_DATA_COMMAND, layout_def->regs_display_type);
-    }
-}
-
-
-static void
-tui_toggle_layout_command (char *arg, int from_tty)
-{
-  struct tui_layout_def *layout_def = tui_layout_def ();
-
-  /* Make sure the curses mode is enabled.  */
-  tui_enable ();
-  if (layout_def->display_mode == SRC_WIN)
-    layout_def->display_mode = DISASSEM_WIN;
-  else
-    layout_def->display_mode = SRC_WIN;
-
-  if (!layout_def->split)
-    tui_handle_xdb_layout (layout_def);
-}
-
-
-static void
-tui_toggle_split_layout_command (char *arg, int from_tty)
-{
-  struct tui_layout_def *layout_def = tui_layout_def ();
-
-  /* Make sure the curses mode is enabled.  */
-  tui_enable ();
-  layout_def->split = (!layout_def->split);
-  tui_handle_xdb_layout (layout_def);
-}
-
-
-static void
 tui_layout_command (char *arg, int from_tty)
 {
   /* Make sure the curses mode is enabled.  */
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 961491f..feb11ba 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -58,9 +58,6 @@ static enum tui_status tui_get_register (struct frame_info *frame,
 					 struct tui_data_element *data,
 					 int regnum, int *changedp);
 
-static void tui_scroll_regs_forward_command (char *, int);
-static void tui_scroll_regs_backward_command (char *, int);
-
 
 
 /*****************************************
@@ -637,20 +634,6 @@ _initialize_tui_regs (void)
   add_cmd ("next", class_tui, tui_reg_next_command,
            _("Display next register group."),
            &tuireglist);
-
-  if (xdb_commands)
-    {
-      add_com ("fr", class_tui, tui_reg_float_command,
-	       _("Display only floating point registers\n"));
-      add_com ("gr", class_tui, tui_reg_general_command,
-	       _("Display only general registers\n"));
-      add_com ("sr", class_tui, tui_reg_system_command,
-	       _("Display only special registers\n"));
-      add_com ("+r", class_tui, tui_scroll_regs_forward_command,
-	       _("Scroll the registers window forward\n"));
-      add_com ("-r", class_tui, tui_scroll_regs_backward_command,
-	       _("Scroll the register window backward\n"));
-    }
 }
 
 
@@ -730,16 +713,3 @@ tui_get_register (struct frame_info *frame,
     }
   return ret;
 }
-
-static void
-tui_scroll_regs_forward_command (char *arg, int from_tty)
-{
-  tui_scroll (FORWARD_SCROLL, TUI_DATA_WIN, 1);
-}
-
-
-static void
-tui_scroll_regs_backward_command (char *arg, int from_tty)
-{
-  tui_scroll (BACKWARD_SCROLL, TUI_DATA_WIN, 1);
-}
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 4dfa834..77218e8 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -64,7 +64,6 @@ static int new_height_ok (struct tui_win_info *, int);
 static void tui_set_tab_width_command (char *, int);
 static void tui_refresh_all_command (char *, int);
 static void tui_set_win_height_command (char *, int);
-static void tui_xdb_set_win_height_command (char *, int);
 static void tui_all_windows_info (char *, int);
 static void tui_set_focus_command (char *, int);
 static void tui_scroll_forward_command (char *, int);
@@ -380,8 +379,6 @@ _initialize_tui_win (void)
 
   add_com ("refresh", class_tui, tui_refresh_all_command,
            _("Refresh the terminal display.\n"));
-  if (xdb_commands)
-    add_com_alias ("U", "refresh", class_tui, 0);
   add_com ("tabset", class_tui, tui_set_tab_width_command, _("\
 Set the width (in characters) of tab stops.\n\
 Usage: tabset <n>\n"));
@@ -417,10 +414,6 @@ Usage: < [win] [n]\n"));
   add_com (">", class_tui, tui_scroll_right_command, _("\
 Scroll window text to the right.\n\
 Usage: > [win] [n]\n"));
-  if (xdb_commands)
-    add_com ("w", class_xdb, tui_xdb_set_win_height_command, _("\
-XDB compatibility command for setting the height of a command window.\n\
-Usage: w <#lines>\n"));
 
   /* Define the tui control variables.  */
   add_setshow_enum_cmd ("border-kind", no_class, tui_border_kind_enums,
@@ -1167,45 +1160,6 @@ tui_set_win_height_command (char *arg, int from_tty)
   tui_set_win_height (arg, from_tty);
 }
 
-
-/* XDB Compatibility command for setting the window height.  This will
-   increase or decrease the command window by the specified
-   amount.  */
-static void
-tui_xdb_set_win_height (char *arg, int from_tty)
-{
-  /* Make sure the curses mode is enabled.  */
-  tui_enable ();
-  if (arg != (char *) NULL)
-    {
-      int input_no = atoi (arg);
-
-      if (input_no > 0)
-	{			/* Add 1 for the locator.  */
-	  int new_height = tui_term_height () - (input_no + 1);
-
-	  if (!new_height_ok (tui_win_list[CMD_WIN], new_height)
-	      || tui_adjust_win_heights (tui_win_list[CMD_WIN],
-					 new_height) == TUI_FAILURE)
-	    warning (_("Invalid window height specified.\n%s"),
-		     XDBWIN_HEIGHT_USAGE);
-	}
-      else
-	warning (_("Invalid window height specified.\n%s"),
-		 XDBWIN_HEIGHT_USAGE);
-    }
-  else
-    warning (_("Invalid window height specified.\n%s"), XDBWIN_HEIGHT_USAGE);
-}
-
-/* Set the height of the specified window, with va_list.  */
-static void
-tui_xdb_set_win_height_command (char *arg, int from_tty)
-{
-  tui_xdb_set_win_height (arg, from_tty);
-}
-
-
 /* Function to adjust all window heights around the primary.   */
 static enum tui_status
 tui_adjust_win_heights (struct tui_win_info *primary_win_info,
diff --git a/gdb/utils.c b/gdb/utils.c
index 7172bba..a9350d9 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2670,18 +2670,6 @@ subset_compare (char *string_to_compare, char *template_string)
 }
 
 static void
-pagination_on_command (char *arg, int from_tty)
-{
-  pagination_enabled = 1;
-}
-
-static void
-pagination_off_command (char *arg, int from_tty)
-{
-  pagination_enabled = 0;
-}
-
-static void
 show_debug_timestamp (struct ui_file *file, int from_tty,
 		      struct cmd_list_element *c, const char *value)
 {
@@ -2725,14 +2713,6 @@ Turning pagination off is an alternative to \"set height unlimited\"."),
 			   show_pagination_enabled,
 			   &setlist, &showlist);
 
-  if (xdb_commands)
-    {
-      add_com ("am", class_support, pagination_on_command,
-	       _("Enable pagination"));
-      add_com ("sm", class_support, pagination_off_command,
-	       _("Disable pagination"));
-    }
-
   add_setshow_boolean_cmd ("sevenbit-strings", class_support,
 			   &sevenbit_strings, _("\
 Set printing of 8-bit characters in strings as \\nnn."), _("\

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [patch] Re: Remove --xdb? (Re: [testsuite patch] Remove gdb.hp)
  2015-03-20 17:48       ` [patch] Re: Remove --xdb? (Re: [testsuite patch] Remove gdb.hp) Jan Kratochvil
@ 2015-04-10 19:27         ` Pedro Alves
  2015-04-11 17:06           ` [doc patch] Remove --xdb Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Pedro Alves @ 2015-04-10 19:27 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Yao Qi, gdb-patches, Joel Brobecker

On 03/20/2015 05:47 PM, Jan Kratochvil wrote:
> On Wed, 18 Mar 2015 15:58:08 +0100, Pedro Alves wrote:
>> > I think it's time to drop "support" for the --xdb switch too.
> Attached, OK to check it in?
> 
> No regressions on {x86_64,x86_64-m32,i686}-fedora23pre-linux-gnu.

Nobody spoke up for it, so, OK.

I think this should have a NEWS entry.  Could you prepare one?

Thanks for doing this.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [doc patch] Remove --xdb
  2015-04-10 19:27         ` Pedro Alves
@ 2015-04-11 17:06           ` Jan Kratochvil
  2015-04-11 17:40             ` Eli Zaretskii
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2015-04-11 17:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Yao Qi, gdb-patches, Joel Brobecker, Pedro Alves

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

On Fri, 10 Apr 2015 21:27:18 +0200, Pedro Alves wrote:
> Nobody spoke up for it, so, OK.
> 
> I think this should have a NEWS entry.  Could you prepare one?

OK for check-in (merged with the other patch), Eli?


Thanks,
Jan

[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 486 bytes --]

gdb/
2015-04-11  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* NEWS (Changes since GDB 7.9): Add removed -xdb.

diff --git a/gdb/NEWS b/gdb/NEWS
index 884c381..c24195e 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -112,6 +112,10 @@ vFile:fstat:
 * GDB now supports access to vector registers on S/390 GNU/Linux
   targets.
 
+* Removed command line options
+
+-xdb  HP-UX XDB compatibility mode.
+
 * Removed targets and native configurations
 
 HP/PA running HP-UX           hppa*-*-hpux*

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [doc patch] Remove --xdb
  2015-04-11 17:06           ` [doc patch] Remove --xdb Jan Kratochvil
@ 2015-04-11 17:40             ` Eli Zaretskii
  2015-04-11 17:54               ` [commit] " Jan Kratochvil
  0 siblings, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2015-04-11 17:40 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: yao, gdb-patches, brobecker, palves

> Date: Sat, 11 Apr 2015 19:06:41 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org,
>         Joel Brobecker <brobecker@adacore.com>,
>         Pedro Alves <palves@redhat.com>
> 
> > I think this should have a NEWS entry.  Could you prepare one?
> 
> OK for check-in (merged with the other patch), Eli?

Yes, thanks.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [commit] Remove --xdb
  2015-04-11 17:40             ` Eli Zaretskii
@ 2015-04-11 17:54               ` Jan Kratochvil
  0 siblings, 0 replies; 28+ messages in thread
From: Jan Kratochvil @ 2015-04-11 17:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: yao, gdb-patches, brobecker, palves

On Sat, 11 Apr 2015 19:40:12 +0200, Eli Zaretskii wrote:
> Yes, thanks.

Checked in:
	4f45d44599b232266c49ff470868efe6771832a0


Jan

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2015-04-11 17:54 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 23:00 [patch] Remove HPUX Jan Kratochvil
2014-10-17  0:21 ` Michael Eager
2014-10-17 13:26   ` Joel Brobecker
2014-10-17 17:18     ` Michael Eager
2014-11-19 18:54       ` Jan Kratochvil
2014-11-19 19:39         ` Michael Eager
2014-11-21  9:32           ` Pedro Alves
2015-03-13 19:26             ` [commit] " Jan Kratochvil
2015-03-13 19:43               ` Pedro Alves
2015-03-13 19:46                 ` Jan Kratochvil
2015-03-13 19:55                   ` Pedro Alves
2015-03-13 19:57                     ` Jan Kratochvil
2015-03-10  5:04         ` Sergio Durigan Junior
2015-03-10 14:23           ` Michael Eager
2014-11-21  3:20 ` Yao Qi
2015-03-13 19:17   ` [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX] Jan Kratochvil
2015-03-18 14:58     ` Remove --xdb? (Re: [testsuite patch] Remove gdb.hp [Re: [patch] Remove HPUX]) Pedro Alves
2015-03-20 16:17       ` [commit] [testsuite patch] Remove gdb.hp Jan Kratochvil
2015-03-20 17:48       ` [patch] Re: Remove --xdb? (Re: [testsuite patch] Remove gdb.hp) Jan Kratochvil
2015-04-10 19:27         ` Pedro Alves
2015-04-11 17:06           ` [doc patch] Remove --xdb Jan Kratochvil
2015-04-11 17:40             ` Eli Zaretskii
2015-04-11 17:54               ` [commit] " Jan Kratochvil
2014-12-01 14:21 ` [patch] Remove HPUX Simon Marchi
2015-03-11 21:57   ` Jan Kratochvil
2015-03-12 17:05     ` Pedro Alves
2015-03-13 18:34       ` Jan Kratochvil
2015-03-13 19:40         ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).