aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-24 21:14:17 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-24 21:14:17 +0000
commitd542061a791651ada2064bcc23f62ec142acc628 (patch)
tree2a2dfa13e450a5ac8464bdfdb0999d5bb315c4d5
parent917630e4a052582e310992c23cdf912b39687d42 (diff)
downloadgdb-d542061a791651ada2064bcc23f62ec142acc628.zip
gdb-d542061a791651ada2064bcc23f62ec142acc628.tar.gz
gdb-d542061a791651ada2064bcc23f62ec142acc628.tar.bz2
* configure.tgt: Remove hppa*64*-*-hpux11* special case.
* config/pa/hppa64.mt: Delete file. * config/pa/hppahpux.mt (MT_CFLAGS): Remove. (TDEPFILES): Move somread.o to ... * config/pa/hpux.mh (NATDEPFILES): ... here. * configure.ac: Add check for elf_hp.h header. Search libdl and libxpdl for dlgetmodinfo. * config.in, configure: Regenerate. * solib-pa64.c: Conditionalize compilation on #ifdef HAVE_ELF_HP_H instead of #ifndef PA_SOM_ONLY. Include "solib.h". (pa64_solib_select): Take gdbarch instead of tdep argument. Call set_solib_ops instead of modifying current_target_so_ops. * solib-pa64.h (pa64_solib_select): Update prototype. * solib-som.c: Remove include of "som.h". Include "solib.h". (som_solib_select): Take gdbarch instead of tdep argument. Call set_solib_ops instead of modifying current_target_so_ops. * solib-som.h (som_solib_select): Update prototype. * hppa-hpux-tdep.c (hppa_hpux_som_init_abi): Pass gdbarch instead of tdep to som_solib_select call. (hppa_hpux_elf_init_abi): Pass gdbarch instead of tdep to pa64_solib_select call. * Makefile.in: Update dependencies.
-rw-r--r--gdb/ChangeLog26
-rw-r--r--gdb/Makefile.in8
-rw-r--r--gdb/config.in3
-rw-r--r--gdb/config/pa/hppa64.mt2
-rw-r--r--gdb/config/pa/hppahpux.mt3
-rw-r--r--gdb/config/pa/hpux.mh2
-rwxr-xr-xgdb/configure280
-rw-r--r--gdb/configure.ac6
-rw-r--r--gdb/configure.tgt1
-rw-r--r--gdb/hppa-hpux-tdep.c4
-rw-r--r--gdb/solib-pa64.c15
-rw-r--r--gdb/solib-pa64.h2
-rw-r--r--gdb/solib-som.c7
-rw-r--r--gdb/solib-som.h4
14 files changed, 339 insertions, 24 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e1aebb6..e78fc31 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,31 @@
2007-10-24 Ulrich Weigand <uweigand@de.ibm.com>
+ * configure.tgt: Remove hppa*64*-*-hpux11* special case.
+ * config/pa/hppa64.mt: Delete file.
+ * config/pa/hppahpux.mt (MT_CFLAGS): Remove.
+ (TDEPFILES): Move somread.o to ...
+ * config/pa/hpux.mh (NATDEPFILES): ... here.
+
+ * configure.ac: Add check for elf_hp.h header.
+ Search libdl and libxpdl for dlgetmodinfo.
+ * config.in, configure: Regenerate.
+ * solib-pa64.c: Conditionalize compilation on #ifdef HAVE_ELF_HP_H
+ instead of #ifndef PA_SOM_ONLY. Include "solib.h".
+ (pa64_solib_select): Take gdbarch instead of tdep argument. Call
+ set_solib_ops instead of modifying current_target_so_ops.
+ * solib-pa64.h (pa64_solib_select): Update prototype.
+ * solib-som.c: Remove include of "som.h". Include "solib.h".
+ (som_solib_select): Take gdbarch instead of tdep argument. Call
+ set_solib_ops instead of modifying current_target_so_ops.
+ * solib-som.h (som_solib_select): Update prototype.
+ * hppa-hpux-tdep.c (hppa_hpux_som_init_abi): Pass gdbarch instead
+ of tdep to som_solib_select call.
+ (hppa_hpux_elf_init_abi): Pass gdbarch instead of tdep to
+ pa64_solib_select call.
+ * Makefile.in: Update dependencies.
+
+2007-10-24 Ulrich Weigand <uweigand@de.ibm.com>
+
* frv-tdep.c: Include "solib.h".
(frv_gdbarch_init): Call set_solib_ops.
* frv-tdep.h (struct target_so_ops): Add forward reference.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 9b835b8..a2b192b 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2637,10 +2637,10 @@ solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h)
solib-pa64.o: solib-pa64.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \
- $(solist_h) $(solib_pa64_h)
-solib-som.o: solib-som.c $(defs_h) $(som_h) $(symtab_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) \
- $(hppa_tdep_h) $(solist_h)
+ $(solist_h) $(solib_h) $(solib_pa64_h)
+solib-som.o: solib-som.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) \
+ $(hppa_tdep_h) $(solist_h) $(solib_h)
solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
$(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \
$(bcache_h) $(regcache_h)
diff --git a/gdb/config.in b/gdb/config.in
index f58b70a..39e00e0 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -113,6 +113,9 @@
/* Define if ELF support should be included. */
#undef HAVE_ELF
+/* Define to 1 if you have the <elf_hp.h> header file. */
+#undef HAVE_ELF_HP_H
+
/* Define to 1 if your system has the etext variable. */
#undef HAVE_ETEXT
diff --git a/gdb/config/pa/hppa64.mt b/gdb/config/pa/hppa64.mt
deleted file mode 100644
index 5d2f609..0000000
--- a/gdb/config/pa/hppa64.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-# Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o somread.o solib.o
diff --git a/gdb/config/pa/hppahpux.mt b/gdb/config/pa/hppahpux.mt
index 46a6816..8053385 100644
--- a/gdb/config/pa/hppahpux.mt
+++ b/gdb/config/pa/hppahpux.mt
@@ -1,3 +1,2 @@
# Target: HP PA-RISC running hpux
-MT_CFLAGS = -DPA_SOM_ONLY=1
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o solib-som.o solib-pa64.o solib.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o solib-som.o solib-pa64.o solib.o
diff --git a/gdb/config/pa/hpux.mh b/gdb/config/pa/hpux.mh
index f338e9a..7b4fd07 100644
--- a/gdb/config/pa/hpux.mh
+++ b/gdb/config/pa/hpux.mh
@@ -1,3 +1,3 @@
# Host: PA-RISC HP-UX
NATDEPFILES= fork-child.o inf-ptrace.o inf-ttrace.o \
- hppa-hpux-nat.o corelow.o
+ hppa-hpux-nat.o corelow.o somread.o
diff --git a/gdb/configure b/gdb/configure
index 4e16b61..ebd6980 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -5629,6 +5629,134 @@ if test "$ac_cv_search_waddstr" != no; then
fi
+# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
+echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
+echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
+if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_dlgetmodinfo=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlgetmodinfo ();
+int
+main ()
+{
+dlgetmodinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_dlgetmodinfo="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_dlgetmodinfo" = no; then
+ for ac_lib in dl xpdl; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlgetmodinfo ();
+int
+main ()
+{
+dlgetmodinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_dlgetmodinfo="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
+echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
+if test "$ac_cv_search_dlgetmodinfo" != no; then
+ test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
+
+fi
+
+
# Since GDB uses Readline, we need termcap functionality. In many
# cases this will be provided by the curses library, but some systems
# have a seperate termcap library, or no curses library at all.
@@ -11335,6 +11463,158 @@ fi
done
+# Check for HP/UX 64-bit shared library support
+
+for ac_header in elf_hp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
# FIXME: kettenis/20030102: In most cases we include these
# unconditionally, so what's the point in checking these?
diff --git a/gdb/configure.ac b/gdb/configure.ac
index aa81134..491e753 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -319,6 +319,9 @@ AC_SEARCH_LIBS(socketpair, socket)
# a situation.
AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses])
+# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
+AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl])
+
# Since GDB uses Readline, we need termcap functionality. In many
# cases this will be provided by the curses library, but some systems
# have a seperate termcap library, or no curses library at all.
@@ -457,6 +460,9 @@ AC_CHECK_HEADERS(term.h, [], [],
#endif
])
+# Check for HP/UX 64-bit shared library support
+AC_CHECK_HEADERS(elf_hp.h)
+
# FIXME: kettenis/20030102: In most cases we include these
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index cf5a6e3..f7de98d 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -101,7 +101,6 @@ frv-*-*) gdb_target=frv ;;
h8300-*-*) gdb_target=h8300 ;;
-hppa*64*-*-hpux11*) gdb_target=hppa64 ;;
hppa*-*-hpux*) gdb_target=hppahpux ;;
hppa*-*-linux*) gdb_target=linux ;;
hppa*-*-openbsd*) gdb_target=obsd ;;
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index bbbd643..509de35 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -1496,7 +1496,7 @@ hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->find_global_pointer = hppa32_hpux_find_global_pointer;
hppa_hpux_init_abi (info, gdbarch);
- som_solib_select (tdep);
+ som_solib_select (gdbarch);
}
static void
@@ -1508,7 +1508,7 @@ hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->find_global_pointer = hppa64_hpux_find_global_pointer;
hppa_hpux_init_abi (info, gdbarch);
- pa64_solib_select (tdep);
+ pa64_solib_select (gdbarch);
}
static enum gdb_osabi
diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c
index 599f3f3..97a105d 100644
--- a/gdb/solib-pa64.c
+++ b/gdb/solib-pa64.c
@@ -39,12 +39,14 @@
#include "hppa-tdep.h"
#include "solist.h"
+#include "solib.h"
#include "solib-pa64.h"
#undef SOLIB_PA64_DBG
-/* If we are building for a SOM-only target, then we don't need this. */
-#ifndef PA_SOM_ONLY
+/* 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. */
+#ifdef HAVE_ELF_HP_H
/* FIXME: kettenis/20041213: These includes should be eliminated. */
#include <dlfcn.h>
@@ -657,9 +659,10 @@ _initialize_pa64_solib (void)
memset (&dld_cache, 0, sizeof (dld_cache));
}
-void pa64_solib_select (struct gdbarch_tdep *tdep)
+void pa64_solib_select (struct gdbarch *gdbarch)
{
- current_target_so_ops = &pa64_so_ops;
+ 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;
@@ -667,7 +670,7 @@ void pa64_solib_select (struct gdbarch_tdep *tdep)
tdep->solib_get_text_base = pa64_solib_get_text_base;
}
-#else /* PA_SOM_ONLY */
+#else /* HAVE_ELF_HP_H */
extern initialize_file_ftype _initialize_pa64_solib; /* -Wmissing-prototypes */
@@ -676,7 +679,7 @@ _initialize_pa64_solib (void)
{
}
-void pa64_solib_select (struct gdbarch_tdep *tdep)
+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. */
diff --git a/gdb/solib-pa64.h b/gdb/solib-pa64.h
index e8d7125..94fa5e2 100644
--- a/gdb/solib-pa64.h
+++ b/gdb/solib-pa64.h
@@ -20,6 +20,6 @@
#ifndef SOLIB_PA64_H
#define SOLIB_PA64_H
-void pa64_solib_select (struct gdbarch_tdep *tdep);
+void pa64_solib_select (struct gdbarch *gdbarch);
#endif
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index 96a25da..2c9b001 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -18,7 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "som.h"
#include "symtab.h"
#include "bfd.h"
#include "symfile.h"
@@ -29,6 +28,7 @@
#include "hppa-tdep.h"
#include "solist.h"
+#include "solib.h"
#undef SOLIB_SOM_DBG
@@ -759,9 +759,10 @@ _initialize_som_solib (void)
som_so_ops.in_dynsym_resolve_code = som_in_dynsym_resolve_code;
}
-void som_solib_select (struct gdbarch_tdep *tdep)
+void som_solib_select (struct gdbarch *gdbarch)
{
- current_target_so_ops = &som_so_ops;
+ 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;
diff --git a/gdb/solib-som.h b/gdb/solib-som.h
index 40d7f47..eaaf214 100644
--- a/gdb/solib-som.h
+++ b/gdb/solib-som.h
@@ -22,9 +22,9 @@
struct objfile;
struct section_offsets;
-struct gdbarch_tdep;
+struct gdbarch;
-void som_solib_select (struct gdbarch_tdep *tdep);
+void som_solib_select (struct gdbarch *gdbarch);
int som_solib_section_offsets (struct objfile *objfile,
struct section_offsets *offsets);