This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/RFC] Fix "info shared" on 32-bit (SOM) HP-UX


Randolph, Joel,

I noticed that "info shared" is broken on 32-bit HP-UX targets right
now.  The reason is that both solib.c and somsolib.c provide an
implementation of "info shared" and solib.c wins.  Since 32-bit shared
libararies aren't handled by solib.c this results in GDB telling us
that no shared libraries have been loaded.  The attached patch tries
to fix this by leaving out solib.c and providing no_shared_libraries()
in somsolib.c, but only if PA_SOM_ONLY is defined.

This should all be temporary; we should make an effort *soon* to get
somsolib.c integrated in the solib.c framework of handling shared
libraries.  But at least this allows us to get a reasonable baseline.

OK?

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* somsolib.c [PA_SOM_ONLY] (no_shared_libraries): New function.
	* config/pa/hppahpux.mt (TDEPFILES): Remove solib.o.

 
Index: somsolib.c
===================================================================
RCS file: /cvs/src/src/gdb/somsolib.c,v
retrieving revision 1.38
diff -u -p -r1.38 somsolib.c
--- somsolib.c 13 Nov 2004 02:19:03 -0000 1.38
+++ somsolib.c 5 Dec 2004 17:00:26 -0000
@@ -1614,3 +1614,10 @@ som_solib_thread_start_addr (struct so_l
 {
   return so->som_solib.tsd_start_addr;
 }
+
+#ifdef PA_SOM_ONLY
+void
+no_shared_libraries (char *ignored, int from_tty)
+{
+}
+#endif
Index: config/pa/hppahpux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/hppahpux.mt,v
retrieving revision 1.4
diff -u -p -r1.4 hppahpux.mt
--- config/pa/hppahpux.mt 13 Nov 2004 02:19:03 -0000 1.4
+++ config/pa/hppahpux.mt 5 Dec 2004 17:00:26 -0000
@@ -1,4 +1,4 @@
 # Target: HP PA-RISC running hpux
 MT_CFLAGS = -DPA_SOM_ONLY=1
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o somread.o hpread.o somsolib.o solib.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o somread.o hpread.o somsolib.o
 DEPRECATED_TM_FILE= tm-hppah.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]