* [PATCH] Define SVR4 link map offset fetcher for Linux/PPC
@ 2001-11-25 8:55 Kevin Buettner
2001-11-30 16:35 ` Kevin Buettner
2001-12-02 10:02 ` Andrew Cagney
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Buettner @ 2001-11-25 8:55 UTC (permalink / raw)
To: gdb-patches
I've just committed the patch below. It adds cross platform SVR4 shared
library support for Linux/PPC. Note that all PowerPC targets are affected
due to the multiarched nature of this support.
I've tested this patch on AIX (to make sure I didn't break the build
or cause any regressions) and also in a Linux/x86 cross Linux/PPC test
environment.
* ppc-linux-tdep.c (solib-svr4.h): Include.
(ppc_linux_svr4_fetch_link_map_offsets): New function.
* ppc-tdep.h (ppc_linux_svr4_fetch_link_map_offsets): Declare.
* rs6000-tdep.c (solib-svr4.h): Include.
(rs6000_gdbarch_init): Set up ppc_linux_svr4_fetch_link_map_offsets()
as the link map offsets fetcher.
* config/powerpc/aix.mt (TDEPFILES): Add solib-svr4.o.
* config/powerpc/macos.mt (TDEPFILES): Likewise.
* config/powerpc/nbsd.mt (TDEPFILES): Likewise.
* config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
* config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
* config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
* config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
* config/powerpc/vxworks.mt (TDEPFILES): Likewise.
* config/rs6000/aix4.mt (TDEPFILES): Likewise.
* config/rs6000/rs6000.mt (TDEPFILES): Likewise.
* config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.10
diff -u -p -r1.10 ppc-linux-tdep.c
--- ppc-linux-tdep.c 2001/10/21 17:19:37 1.10
+++ ppc-linux-tdep.c 2001/12/01 00:20:03
@@ -32,6 +32,7 @@
#include "regcache.h"
#include "value.h"
+#include "solib-svr4.h"
#include "ppc-tdep.h"
/* The following two instructions are used in the signal trampoline
@@ -762,4 +763,44 @@ ppc_linux_memory_remove_breakpoint (CORE
val = target_write_memory (addr, contents_cache, bplen);
return val;
+}
+
+/* Fetch (and possibly build) an appropriate link_map_offsets
+ structure for Linux/PPC targets using the struct offsets
+ defined in link.h (but without actual reference to that file).
+
+ This makes it possible to access Linux/PPC shared libraries from a
+ GDB that was not built on an Linux/PPC host (for cross debugging). */
+
+struct link_map_offsets *
+ppc_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = NULL;
+
+ if (lmp == NULL)
+ {
+ lmp = &lmo;
+
+ lmo.r_debug_size = 8; /* The actual size is 20 bytes, but
+ this is all we need. */
+ lmo.r_map_offset = 4;
+ lmo.r_map_size = 4;
+
+ lmo.link_map_size = 20; /* The actual size is 560 bytes, but
+ this is all we need. */
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 4;
+
+ lmo.l_name_offset = 4;
+ lmo.l_name_size = 4;
+
+ lmo.l_next_offset = 12;
+ lmo.l_next_size = 4;
+
+ lmo.l_prev_offset = 16;
+ lmo.l_prev_size = 4;
+ }
+
+ return lmp;
}
Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.3
diff -u -p -r1.3 ppc-tdep.h
--- ppc-tdep.h 2001/11/30 02:14:08 1.3
+++ ppc-tdep.h 2001/12/01 00:20:03
@@ -34,6 +34,7 @@ CORE_ADDR ppc_linux_frame_chain (struct
CORE_ADDR ppc_sysv_abi_push_arguments (int, struct value **, CORE_ADDR, int,
CORE_ADDR);
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
+struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
/* From rs6000-tdep.c... */
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.28
diff -u -p -r1.28 rs6000-tdep.c
--- rs6000-tdep.c 2001/10/21 17:19:37 1.28
+++ rs6000-tdep.c 2001/12/01 00:20:07
@@ -40,6 +40,7 @@
#include "elf-bfd.h"
+#include "solib-svr4.h"
#include "ppc-tdep.h"
/* If the kernel has to deliver a signal, it pushes a sigcontext
@@ -2333,6 +2334,8 @@ rs6000_gdbarch_init (struct gdbarch_info
set_gdbarch_memory_remove_breakpoint (gdbarch,
ppc_linux_memory_remove_breakpoint);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
}
else
{
Index: config/powerpc/aix.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/aix.mt,v
retrieving revision 1.3
diff -u -p -r1.3 aix.mt
--- aix.mt 2000/11/09 09:49:00 1.3
+++ aix.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerPC running AIX
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-aix.h
Index: config/powerpc/macos.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/macos.mt,v
retrieving revision 1.2
diff -u -p -r1.2 macos.mt
--- macos.mt 2000/07/31 20:56:43 1.2
+++ macos.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerMac (PowerPC running MacOS)
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-macos.h
Index: config/powerpc/nbsd.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/nbsd.mt,v
retrieving revision 1.6
diff -u -p -r1.6 nbsd.mt
--- nbsd.mt 2001/10/20 00:16:44 1.6
+++ nbsd.mt 2001/12/01 00:20:08
@@ -1,5 +1,5 @@
# Target: PowerPC, running NetBSD
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
GDBSERVER_DEPFILES= low-nbsd.o
Index: config/powerpc/ppc-eabi.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-eabi.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppc-eabi.mt
--- ppc-eabi.mt 2001/06/28 03:33:26 1.3
+++ ppc-eabi.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerPC running eabi
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-eabi.h
Index: config/powerpc/ppc-sim.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-sim.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppc-sim.mt
--- ppc-sim.mt 2001/06/28 03:33:26 1.3
+++ ppc-sim.mt 2001/12/01 00:20:08
@@ -1,5 +1,5 @@
# Target: PowerPC running eabi and including the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-eabi.h
SIM_OBS = remote-sim.o
Index: config/powerpc/ppcle-eabi.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppcle-eabi.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppcle-eabi.mt
--- ppcle-eabi.mt 2001/06/28 03:33:26 1.3
+++ ppcle-eabi.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerPC running eabi in little endian mode
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppcle-eabi.h
Index: config/powerpc/ppcle-sim.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppcle-sim.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppcle-sim.mt
--- ppcle-sim.mt 2001/06/28 03:33:26 1.3
+++ ppcle-sim.mt 2001/12/01 00:20:08
@@ -1,5 +1,5 @@
# Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppcle-eabi.h
SIM_OBS = remote-sim.o
Index: config/powerpc/vxworks.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/vxworks.mt,v
retrieving revision 1.2
diff -u -p -r1.2 vxworks.mt
--- vxworks.mt 2000/07/31 20:56:43 1.2
+++ vxworks.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: Powerpc running VxWorks
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-vxworks.h
Index: config/rs6000/aix4.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/aix4.mt,v
retrieving revision 1.3
diff -u -p -r1.3 aix4.mt
--- aix4.mt 2000/11/09 09:49:00 1.3
+++ aix4.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: IBM RS/6000 running AIX4
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000-aix4.h
Index: config/rs6000/rs6000.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/rs6000.mt,v
retrieving revision 1.3
diff -u -p -r1.3 rs6000.mt
--- rs6000.mt 2000/11/09 09:49:00 1.3
+++ rs6000.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: IBM RS/6000 running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000.h
Index: config/rs6000/rs6000lynx.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/rs6000lynx.mt,v
retrieving revision 1.4
diff -u -p -r1.4 rs6000lynx.mt
--- rs6000lynx.mt 2000/10/25 20:48:59 1.4
+++ rs6000lynx.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: IBM RS6000 running LynxOS
-TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000ly.h
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] Define SVR4 link map offset fetcher for Linux/PPC
2001-11-25 8:55 [PATCH] Define SVR4 link map offset fetcher for Linux/PPC Kevin Buettner
@ 2001-11-30 16:35 ` Kevin Buettner
2001-12-02 10:02 ` Andrew Cagney
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Buettner @ 2001-11-30 16:35 UTC (permalink / raw)
To: gdb-patches
I've just committed the patch below. It adds cross platform SVR4 shared
library support for Linux/PPC. Note that all PowerPC targets are affected
due to the multiarched nature of this support.
I've tested this patch on AIX (to make sure I didn't break the build
or cause any regressions) and also in a Linux/x86 cross Linux/PPC test
environment.
* ppc-linux-tdep.c (solib-svr4.h): Include.
(ppc_linux_svr4_fetch_link_map_offsets): New function.
* ppc-tdep.h (ppc_linux_svr4_fetch_link_map_offsets): Declare.
* rs6000-tdep.c (solib-svr4.h): Include.
(rs6000_gdbarch_init): Set up ppc_linux_svr4_fetch_link_map_offsets()
as the link map offsets fetcher.
* config/powerpc/aix.mt (TDEPFILES): Add solib-svr4.o.
* config/powerpc/macos.mt (TDEPFILES): Likewise.
* config/powerpc/nbsd.mt (TDEPFILES): Likewise.
* config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
* config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
* config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
* config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
* config/powerpc/vxworks.mt (TDEPFILES): Likewise.
* config/rs6000/aix4.mt (TDEPFILES): Likewise.
* config/rs6000/rs6000.mt (TDEPFILES): Likewise.
* config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.10
diff -u -p -r1.10 ppc-linux-tdep.c
--- ppc-linux-tdep.c 2001/10/21 17:19:37 1.10
+++ ppc-linux-tdep.c 2001/12/01 00:20:03
@@ -32,6 +32,7 @@
#include "regcache.h"
#include "value.h"
+#include "solib-svr4.h"
#include "ppc-tdep.h"
/* The following two instructions are used in the signal trampoline
@@ -762,4 +763,44 @@ ppc_linux_memory_remove_breakpoint (CORE
val = target_write_memory (addr, contents_cache, bplen);
return val;
+}
+
+/* Fetch (and possibly build) an appropriate link_map_offsets
+ structure for Linux/PPC targets using the struct offsets
+ defined in link.h (but without actual reference to that file).
+
+ This makes it possible to access Linux/PPC shared libraries from a
+ GDB that was not built on an Linux/PPC host (for cross debugging). */
+
+struct link_map_offsets *
+ppc_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = NULL;
+
+ if (lmp == NULL)
+ {
+ lmp = &lmo;
+
+ lmo.r_debug_size = 8; /* The actual size is 20 bytes, but
+ this is all we need. */
+ lmo.r_map_offset = 4;
+ lmo.r_map_size = 4;
+
+ lmo.link_map_size = 20; /* The actual size is 560 bytes, but
+ this is all we need. */
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 4;
+
+ lmo.l_name_offset = 4;
+ lmo.l_name_size = 4;
+
+ lmo.l_next_offset = 12;
+ lmo.l_next_size = 4;
+
+ lmo.l_prev_offset = 16;
+ lmo.l_prev_size = 4;
+ }
+
+ return lmp;
}
Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.3
diff -u -p -r1.3 ppc-tdep.h
--- ppc-tdep.h 2001/11/30 02:14:08 1.3
+++ ppc-tdep.h 2001/12/01 00:20:03
@@ -34,6 +34,7 @@ CORE_ADDR ppc_linux_frame_chain (struct
CORE_ADDR ppc_sysv_abi_push_arguments (int, struct value **, CORE_ADDR, int,
CORE_ADDR);
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
+struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
/* From rs6000-tdep.c... */
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.28
diff -u -p -r1.28 rs6000-tdep.c
--- rs6000-tdep.c 2001/10/21 17:19:37 1.28
+++ rs6000-tdep.c 2001/12/01 00:20:07
@@ -40,6 +40,7 @@
#include "elf-bfd.h"
+#include "solib-svr4.h"
#include "ppc-tdep.h"
/* If the kernel has to deliver a signal, it pushes a sigcontext
@@ -2333,6 +2334,8 @@ rs6000_gdbarch_init (struct gdbarch_info
set_gdbarch_memory_remove_breakpoint (gdbarch,
ppc_linux_memory_remove_breakpoint);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
}
else
{
Index: config/powerpc/aix.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/aix.mt,v
retrieving revision 1.3
diff -u -p -r1.3 aix.mt
--- aix.mt 2000/11/09 09:49:00 1.3
+++ aix.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerPC running AIX
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-aix.h
Index: config/powerpc/macos.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/macos.mt,v
retrieving revision 1.2
diff -u -p -r1.2 macos.mt
--- macos.mt 2000/07/31 20:56:43 1.2
+++ macos.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerMac (PowerPC running MacOS)
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-macos.h
Index: config/powerpc/nbsd.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/nbsd.mt,v
retrieving revision 1.6
diff -u -p -r1.6 nbsd.mt
--- nbsd.mt 2001/10/20 00:16:44 1.6
+++ nbsd.mt 2001/12/01 00:20:08
@@ -1,5 +1,5 @@
# Target: PowerPC, running NetBSD
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
GDBSERVER_DEPFILES= low-nbsd.o
Index: config/powerpc/ppc-eabi.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-eabi.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppc-eabi.mt
--- ppc-eabi.mt 2001/06/28 03:33:26 1.3
+++ ppc-eabi.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerPC running eabi
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-eabi.h
Index: config/powerpc/ppc-sim.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-sim.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppc-sim.mt
--- ppc-sim.mt 2001/06/28 03:33:26 1.3
+++ ppc-sim.mt 2001/12/01 00:20:08
@@ -1,5 +1,5 @@
# Target: PowerPC running eabi and including the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-eabi.h
SIM_OBS = remote-sim.o
Index: config/powerpc/ppcle-eabi.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppcle-eabi.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppcle-eabi.mt
--- ppcle-eabi.mt 2001/06/28 03:33:26 1.3
+++ ppcle-eabi.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: PowerPC running eabi in little endian mode
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppcle-eabi.h
Index: config/powerpc/ppcle-sim.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppcle-sim.mt,v
retrieving revision 1.3
diff -u -p -r1.3 ppcle-sim.mt
--- ppcle-sim.mt 2001/06/28 03:33:26 1.3
+++ ppcle-sim.mt 2001/12/01 00:20:08
@@ -1,5 +1,5 @@
# Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppcle-eabi.h
SIM_OBS = remote-sim.o
Index: config/powerpc/vxworks.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/vxworks.mt,v
retrieving revision 1.2
diff -u -p -r1.2 vxworks.mt
--- vxworks.mt 2000/07/31 20:56:43 1.2
+++ vxworks.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: Powerpc running VxWorks
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-vxworks.h
Index: config/rs6000/aix4.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/aix4.mt,v
retrieving revision 1.3
diff -u -p -r1.3 aix4.mt
--- aix4.mt 2000/11/09 09:49:00 1.3
+++ aix4.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: IBM RS/6000 running AIX4
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000-aix4.h
Index: config/rs6000/rs6000.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/rs6000.mt,v
retrieving revision 1.3
diff -u -p -r1.3 rs6000.mt
--- rs6000.mt 2000/11/09 09:49:00 1.3
+++ rs6000.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: IBM RS/6000 running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000.h
Index: config/rs6000/rs6000lynx.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/rs6000lynx.mt,v
retrieving revision 1.4
diff -u -p -r1.4 rs6000lynx.mt
--- rs6000lynx.mt 2000/10/25 20:48:59 1.4
+++ rs6000lynx.mt 2001/12/01 00:20:08
@@ -1,3 +1,3 @@
# Target: IBM RS6000 running LynxOS
-TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o
+TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000ly.h
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Define SVR4 link map offset fetcher for Linux/PPC
2001-11-25 8:55 [PATCH] Define SVR4 link map offset fetcher for Linux/PPC Kevin Buettner
2001-11-30 16:35 ` Kevin Buettner
@ 2001-12-02 10:02 ` Andrew Cagney
2001-12-02 21:32 ` Elena Zannoni
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2001-12-02 10:02 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> I've tested this patch on AIX (to make sure I didn't break the build
> or cause any regressions) and also in a Linux/x86 cross Linux/PPC test
> environment.
Kevin, did you try this with --target=powerpc-eabi as listed in the
MAINTAINERS? I'm seeing a -Werror of solib_add() undefined:
> /home/scratch/PENDING/rm-obsolete/src/gdb/solib-svr4.c:912: warning: implicit declaration of function `solib_add'
> gmake[1]: *** [solib-svr4.o] Error 1
> gmake[1]: Leaving directory `/home/scratch/PENDING/rm-obsolete/carp/X-powerpc-eabi/gdb'
> gmake: *** [all-gdb] Error 2
enjoy,
Andrew
> * ppc-linux-tdep.c (solib-svr4.h): Include.
> (ppc_linux_svr4_fetch_link_map_offsets): New function.
> * ppc-tdep.h (ppc_linux_svr4_fetch_link_map_offsets): Declare.
> * rs6000-tdep.c (solib-svr4.h): Include.
> (rs6000_gdbarch_init): Set up ppc_linux_svr4_fetch_link_map_offsets()
> as the link map offsets fetcher.
>
> * config/powerpc/aix.mt (TDEPFILES): Add solib-svr4.o.
> * config/powerpc/macos.mt (TDEPFILES): Likewise.
> * config/powerpc/nbsd.mt (TDEPFILES): Likewise.
> * config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
> * config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
> * config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
> * config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
> * config/powerpc/vxworks.mt (TDEPFILES): Likewise.
> * config/rs6000/aix4.mt (TDEPFILES): Likewise.
> * config/rs6000/rs6000.mt (TDEPFILES): Likewise.
> * config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Define SVR4 link map offset fetcher for Linux/PPC
2001-12-02 10:02 ` Andrew Cagney
@ 2001-12-02 21:32 ` Elena Zannoni
2001-12-03 10:26 ` Kevin Buettner
0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2001-12-02 21:32 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Kevin Buettner, gdb-patches
Andrew Cagney writes:
> > I've tested this patch on AIX (to make sure I didn't break the build
> > or cause any regressions) and also in a Linux/x86 cross Linux/PPC test
> > environment.
>
> Kevin, did you try this with --target=powerpc-eabi as listed in the
> MAINTAINERS? I'm seeing a -Werror of solib_add() undefined:
>
> > /home/scratch/PENDING/rm-obsolete/src/gdb/solib-svr4.c:912: warning: implicit declaration of function `solib_add'
> > gmake[1]: *** [solib-svr4.o] Error 1
> > gmake[1]: Leaving directory `/home/scratch/PENDING/rm-obsolete/carp/X-powerpc-eabi/gdb'
> > gmake: *** [all-gdb] Error 2
>
> enjoy,
> Andrew
>
With powerpc-eabi I am also getting these:
/bart/ezannoni/uberbaum/src/gdb/solib-svr4.c:857: undefined reference to `remove_solib_event_breakpoints'
/bart/ezannoni/uberbaum/src/gdb/solib-svr4.c:984: undefined reference to `create_solib_event_breakpoint'
libgdb.a(solib.o): In function `clear_solib':
/bart/ezannoni/uberbaum/src/gdb/solib.c:732: undefined reference to `disable_breakpoints_in_shlibs'
collect2: ld returned 1 exit status
I guess it is missing the SOLIB_ADD macro definition.
Should an
#include "solib.h" be added to the config/powerpc/*.h files?
That seems to work.
Elena
> > * ppc-linux-tdep.c (solib-svr4.h): Include.
> > (ppc_linux_svr4_fetch_link_map_offsets): New function.
> > * ppc-tdep.h (ppc_linux_svr4_fetch_link_map_offsets): Declare.
> > * rs6000-tdep.c (solib-svr4.h): Include.
> > (rs6000_gdbarch_init): Set up ppc_linux_svr4_fetch_link_map_offsets()
> > as the link map offsets fetcher.
> >
> > * config/powerpc/aix.mt (TDEPFILES): Add solib-svr4.o.
> > * config/powerpc/macos.mt (TDEPFILES): Likewise.
> > * config/powerpc/nbsd.mt (TDEPFILES): Likewise.
> > * config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
> > * config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
> > * config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
> > * config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
> > * config/powerpc/vxworks.mt (TDEPFILES): Likewise.
> > * config/rs6000/aix4.mt (TDEPFILES): Likewise.
> > * config/rs6000/rs6000.mt (TDEPFILES): Likewise.
> > * config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Define SVR4 link map offset fetcher for Linux/PPC
2001-12-02 21:32 ` Elena Zannoni
@ 2001-12-03 10:26 ` Kevin Buettner
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Buettner @ 2001-12-03 10:26 UTC (permalink / raw)
To: Elena Zannoni, Andrew Cagney; +Cc: Kevin Buettner, gdb-patches
On Dec 3, 12:38am, Elena Zannoni wrote:
> Andrew Cagney writes:
> > > I've tested this patch on AIX (to make sure I didn't break the build
> > > or cause any regressions) and also in a Linux/x86 cross Linux/PPC test
> > > environment.
> >
> > Kevin, did you try this with --target=powerpc-eabi as listed in the
> > MAINTAINERS? I'm seeing a -Werror of solib_add() undefined:
> >
> > > /home/scratch/PENDING/rm-obsolete/src/gdb/solib-svr4.c:912: warning: implicit declaration of function `solib_add'
> > > gmake[1]: *** [solib-svr4.o] Error 1
> > > gmake[1]: Leaving directory `/home/scratch/PENDING/rm-obsolete/carp/X-powerpc-eabi/gdb'
> > > gmake: *** [all-gdb] Error 2
> >
> > enjoy,
> > Andrew
> >
>
>
> With powerpc-eabi I am also getting these:
>
> /bart/ezannoni/uberbaum/src/gdb/solib-svr4.c:857: undefined reference to `remove_solib_event_breakpoints'
> /bart/ezannoni/uberbaum/src/gdb/solib-svr4.c:984: undefined reference to `create_solib_event_breakpoint'
> libgdb.a(solib.o): In function `clear_solib':
> /bart/ezannoni/uberbaum/src/gdb/solib.c:732: undefined reference to `disable_breakpoints_in_shlibs'
> collect2: ld returned 1 exit status
>
> I guess it is missing the SOLIB_ADD macro definition.
> Should an
> #include "solib.h" be added to the config/powerpc/*.h files?
Yeah, I guess so. I was trying to think of a better way to handle this,
but this seems like the best solution for now.
Ultimately, we'd like to *not* have ``#include "solib.h"'' in *any*
config/*/{tm,nm}-*.h files. Rather, this include statement should either
be placed directly in defs.h, or even better still, in just those files
which require it. But to get to the point where we'll be able to do this,
we'll need to convert the other files which implement solib support over
to using the new mechanisms. The files which need to be converted are
coff-solib.c, irix5-nat.c, pa64solib.c, somsolib.c, and xcoffsolib.c.
(Thanks to Nick Duffek, osfsolib.c has already been converted. It
just needs to be marked as obsolete.)
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-12-03 18:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-25 8:55 [PATCH] Define SVR4 link map offset fetcher for Linux/PPC Kevin Buettner
2001-11-30 16:35 ` Kevin Buettner
2001-12-02 10:02 ` Andrew Cagney
2001-12-02 21:32 ` Elena Zannoni
2001-12-03 10:26 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox