aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2004-11-13 02:19:03 +0000
committerRandolph Chung <tausq@debian.org>2004-11-13 02:19:03 +0000
commit89676665cf9b9365020080047d199d67c2122378 (patch)
tree520708c0e97a27839dd183186765b3743d31ed8d
parent4991999e3530290962590480d1de73c5483f8b2a (diff)
downloadgdb-89676665cf9b9365020080047d199d67c2122378.zip
gdb-89676665cf9b9365020080047d199d67c2122378.tar.gz
gdb-89676665cf9b9365020080047d199d67c2122378.tar.bz2
2004-11-12 Randolph Chung <tausq@debian.org>
* pa64solib.c (pa64_solib_thread_start_addr): Rename from so_lib_thread_start_addr. * pa64solib.h (so_list): Forward declare. (pa64_solib_thread_start_addr): Prototype. * somsolib.c (SHL_LOAD, SHL_UNLOAD): Define if not already defined. (no_shared_libraries): Remove. (som_solib_thread_start_addr): Rename from so_lib_thread_start_addr. * somsolib.h (som_solib_thread_start_addr): Likewise; prototype. * hpread.c (hpread_process_one_debug_symbol): Use either the som or the elf solib handler to find the start address. * config/pa/hppahpux.mh (NATDEPFILES): Move target-specific support files to the target makefile. * config/pa/hpux1020.mh (NATDEPFILES): Likewise. * config/pa/hpux11.mh (NATDEPFILES): Likewise. * config/pa/hpux11w.mh (NATDEPFILES): Likewise. * config/pa/hppa64.mt (TDEPFILES): Put target-specific support files for symbol reading and shared library handling here. * config/pa/hppahpux.mt (TDEPFILES): Likewise. (PA_SOM_ONLY): Define so we can build a 32-bit SOM only target without bringing in 64-bit support.
-rw-r--r--gdb/ChangeLog25
-rw-r--r--gdb/config/pa/hppa64.mt2
-rw-r--r--gdb/config/pa/hppahpux.mh2
-rw-r--r--gdb/config/pa/hppahpux.mt3
-rw-r--r--gdb/config/pa/hpux1020.mh2
-rw-r--r--gdb/config/pa/hpux11.mh2
-rw-r--r--gdb/config/pa/hpux11w.mh2
-rw-r--r--gdb/hpread.c10
-rw-r--r--gdb/pa64solib.h3
-rw-r--r--gdb/somsolib.c29
-rw-r--r--gdb/somsolib.h2
11 files changed, 53 insertions, 29 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c9af0e7..24523d3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,28 @@
+2004-11-12 Randolph Chung <tausq@debian.org>
+
+ * pa64solib.c (pa64_solib_thread_start_addr): Rename from
+ so_lib_thread_start_addr.
+ * pa64solib.h (so_list): Forward declare.
+ (pa64_solib_thread_start_addr): Prototype.
+ * somsolib.c (SHL_LOAD, SHL_UNLOAD): Define if not already defined.
+ (no_shared_libraries): Remove.
+ (som_solib_thread_start_addr): Rename from so_lib_thread_start_addr.
+ * somsolib.h (som_solib_thread_start_addr): Likewise; prototype.
+ * hpread.c (hpread_process_one_debug_symbol): Use either the som or
+ the elf solib handler to find the start address.
+
+ * config/pa/hppahpux.mh (NATDEPFILES): Move target-specific support
+ files to the target makefile.
+ * config/pa/hpux1020.mh (NATDEPFILES): Likewise.
+ * config/pa/hpux11.mh (NATDEPFILES): Likewise.
+ * config/pa/hpux11w.mh (NATDEPFILES): Likewise.
+
+ * config/pa/hppa64.mt (TDEPFILES): Put target-specific support
+ files for symbol reading and shared library handling here.
+ * config/pa/hppahpux.mt (TDEPFILES): Likewise.
+ (PA_SOM_ONLY): Define so we can build a 32-bit SOM only target
+ without bringing in 64-bit support.
+
2004-11-12 Andrew Cagney <cagney@gnu.org>
* sparc-tdep.c: Replace VALUE_TYPE with value_type.
diff --git a/gdb/config/pa/hppa64.mt b/gdb/config/pa/hppa64.mt
index f7baa4a..c0942b5 100644
--- a/gdb/config/pa/hppa64.mt
+++ b/gdb/config/pa/hppa64.mt
@@ -1,3 +1,3 @@
# Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o pa64solib.o somsolib.o somread.o hpread.o solib.o
DEPRECATED_TM_FILE= tm-hppa64.h
diff --git a/gdb/config/pa/hppahpux.mh b/gdb/config/pa/hppahpux.mh
index b80a085..f07ddab 100644
--- a/gdb/config/pa/hppahpux.mh
+++ b/gdb/config/pa/hppahpux.mh
@@ -1,6 +1,6 @@
# Host: Hewlett-Packard PA-RISC machine, running HPUX
NAT_FILE= nm-hppah.h
-NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
+NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infptrace.o
HOST_IPC=-DBSD_IPC -DPOSIX_WAIT
diff --git a/gdb/config/pa/hppahpux.mt b/gdb/config/pa/hppahpux.mt
index f997d89..a3169e2 100644
--- a/gdb/config/pa/hppahpux.mt
+++ b/gdb/config/pa/hppahpux.mt
@@ -1,3 +1,4 @@
# Target: HP PA-RISC running hpux
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o
+MT_CFLAGS = -DPA_SOM_ONLY=1
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o somread.o hpread.o somsolib.o solib.o
DEPRECATED_TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/hpux1020.mh b/gdb/config/pa/hpux1020.mh
index ac25383..647130e 100644
--- a/gdb/config/pa/hpux1020.mh
+++ b/gdb/config/pa/hpux1020.mh
@@ -7,6 +7,6 @@
MH_CFLAGS = -Dvfork=fork
NAT_FILE= nm-hppah.h
-NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infptrace.o somread.o hpread.o somsolib.o
+NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infptrace.o
HOST_IPC=-DBSD_IPC -DPOSIX_WAIT
diff --git a/gdb/config/pa/hpux11.mh b/gdb/config/pa/hpux11.mh
index 1ad2a4e..d3aeb33 100644
--- a/gdb/config/pa/hpux11.mh
+++ b/gdb/config/pa/hpux11.mh
@@ -7,6 +7,6 @@
MH_CFLAGS = -Dvfork=fork
NAT_FILE= nm-hppah11.h
-NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o somread.o hpread.o somsolib.o
+NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o
HOST_IPC=-DBSD_IPC -DPOSIX_WAIT
diff --git a/gdb/config/pa/hpux11w.mh b/gdb/config/pa/hpux11w.mh
index 51c9f2c..d3aeb33 100644
--- a/gdb/config/pa/hpux11w.mh
+++ b/gdb/config/pa/hpux11w.mh
@@ -7,6 +7,6 @@
MH_CFLAGS = -Dvfork=fork
NAT_FILE= nm-hppah11.h
-NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o hpread.o pa64solib.o solib.o
+NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o
HOST_IPC=-DBSD_IPC -DPOSIX_WAIT
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 36aaa07..a9287c0 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -5779,8 +5779,14 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
* where to look for this variable, using a call-back
* to interpret the private shared-library data.
*/
- SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
- so_lib_thread_start_addr (so);
+ if (bfd_get_flavour(objfile->obfd) == bfd_target_som_flavour)
+ SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
+ som_solib_thread_start_addr (so);
+#ifndef PA_SOM_ONLY
+ else
+ SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
+ pa64_solib_thread_start_addr (so);
+#endif
}
}
break;
diff --git a/gdb/pa64solib.h b/gdb/pa64solib.h
index 7a3a068..d8b01bb 100644
--- a/gdb/pa64solib.h
+++ b/gdb/pa64solib.h
@@ -22,6 +22,7 @@
struct target_ops;
struct objfile;
struct section_offsets;
+struct so_list;
/* Called to add symbols from a shared library to gdb's symbol table. */
@@ -147,3 +148,5 @@ extern char *pa64_solib_address (CORE_ADDR); /* somsolib.c */
/* If ADDR lies in a shared library, return its name. */
#define PC_SOLIB(addr) pa64_solib_address (addr)
+
+CORE_ADDR pa64_solib_thread_start_addr (struct so_list *so);
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index e70d6bd..41e938e 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -51,6 +51,14 @@
#define O_BINARY 0
#endif
+#ifndef SHL_LOAD
+#define SHL_LOAD 4
+#endif
+
+#ifndef SHL_UNLOAD
+#define SHL_UNLOAD 8
+#endif
+
/* Uncomment this to turn on some debugging output.
*/
@@ -1557,25 +1565,6 @@ som_solib_restart (void)
}
-/* LOCAL FUNCTION
-
- no_shared_libraries -- handle command to explicitly discard symbols
- from shared libraries.
-
- DESCRIPTION
-
- Implements the command "nosharedlibrary", which discards symbols
- that have been auto-loaded from shared libraries. Symbols from
- shared libraries that were added by explicit request of the user
- are not discarded. Also called from remote.c. */
-
-void
-no_shared_libraries (char *ignored, int from_tty)
-{
- /* FIXME */
-}
-
-
void
_initialize_som_solib (void)
{
@@ -1621,7 +1610,7 @@ threshold in megabytes. Is ignored when using `sharedlibrary'.",
/* Get some HPUX-specific data from a shared lib.
*/
CORE_ADDR
-so_lib_thread_start_addr (struct so_list *so)
+som_solib_thread_start_addr (struct so_list *so)
{
return so->som_solib.tsd_start_addr;
}
diff --git a/gdb/somsolib.h b/gdb/somsolib.h
index c241411..952718b 100644
--- a/gdb/somsolib.h
+++ b/gdb/somsolib.h
@@ -171,7 +171,7 @@ extern char *som_solib_address (CORE_ADDR); /* somsolib.c */
extern CORE_ADDR som_solib_get_solib_by_pc (CORE_ADDR addr);
struct so_list;
-extern CORE_ADDR so_lib_thread_start_addr (struct so_list *so);
+extern CORE_ADDR som_solib_thread_start_addr (struct so_list *so);
extern void no_shared_libraries (char *ignored, int from_tty);