recent gdb changes break powerpc-eabi target?

Nick Duffek nsd@redhat.com
Wed Jun 21 09:41:00 GMT 2000


On 20-Jun-2000, J . T . Conklin wrote:

>I'm having problems building GDB for the powerpc-eabi target from the
>current GDB sources.  I'm guessing that this was caused by your recent
>changes.

Yup, sorry about that.  In the process of multi-arching rs6000-tdep.c, I
broke non-AIX architectures.

Here's a patch that might get you past the rs6000-tdep.c errors.  The
change to use generic_pc_in_call_dummy might cause some test suite
regressions; I'm checking that on AIX.  If there are regressions, the
patch will need to be modified.

Nick

Index: gdb/rs6000-tdep.c
===================================================================
diff -up gdb/rs6000-tdep.c gdb/rs6000-tdep.c
--- gdb/rs6000-tdep.c	Tue Jun 20 21:19:07 2000
+++ gdb/rs6000-tdep.c	Tue Jun 20 21:17:27 2000
@@ -56,9 +56,6 @@
 #define SIG_FRAME_LR_OFFSET 108
 #define SIG_FRAME_FP_OFFSET 284
 
-/* Default offset from SP where the LR is stored */
-#define	DEFAULT_LR_SAVE 8
-
 /* To be used by skip_prologue. */
 
 struct rs6000_framedata
@@ -2048,7 +2045,7 @@ rs6000_gdbarch_init (struct gdbarch_info
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
-  set_gdbarch_pc_in_call_dummy (gdbarch, rs6000_pc_in_call_dummy);
+  set_gdbarch_pc_in_call_dummy (gdbarch, generic_pc_in_call_dummy);
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
Index: gdb/config/rs6000/tm-rs6000.h
===================================================================
diff -up gdb/config/rs6000/tm-rs6000.h gdb/config/rs6000/tm-rs6000.h
--- gdb/config/rs6000/tm-rs6000.h	Tue Jun 20 21:19:13 2000
+++ gdb/config/rs6000/tm-rs6000.h	Tue Jun 20 21:18:24 2000
@@ -94,6 +94,9 @@ extern void aix_process_linenos (void);
 	      prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
 #define INIT_FRAME_PC(fromleaf, prev)	/* nothing */
 
+/* Default offset from SP where the LR is stored */
+#define	DEFAULT_LR_SAVE 8
+
 /* Usually a function pointer's representation is simply the address
    of the function. On the RS/6000 however, a function pointer is
    represented by a pointer to a TOC entry. This TOC entry contains
Index: gdb/config/powerpc/tm-ppc-eabi.h
===================================================================
diff -up gdb/config/powerpc/tm-ppc-eabi.h gdb/config/powerpc/tm-ppc-eabi.h
--- gdb/config/powerpc/tm-ppc-eabi.h	Tue Jun 20 21:19:23 2000
+++ gdb/config/powerpc/tm-ppc-eabi.h	Tue Jun 20 21:17:58 2000
@@ -30,8 +30,6 @@
 #undef	DEFAULT_LR_SAVE
 #define	DEFAULT_LR_SAVE 4	/* eabi saves LR at 4 off of SP */
 
-#define GDB_TARGET_POWERPC
-
 #undef PC_LOAD_SEGMENT
 #undef PROCESS_LINENUMBER_HOOK
 
@@ -42,38 +40,6 @@
 #define ELF_OBJECT_FORMAT 1
 
 #define TARGET_BYTE_ORDER_SELECTABLE_P 1
-
-/* return true if a given `pc' value is in `call dummy' function. */
-/* FIXME: This just checks for the end of the stack, which is broken
-   for things like stepping through gcc nested function stubs.  */
-#undef PC_IN_CALL_DUMMY
-
-/* generic dummy frame stuff */
-
-
-
-/* target-specific dummy_frame stuff */
-
-extern struct frame_info *rs6000_pop_frame (struct frame_info *frame);
-
-extern CORE_ADDR ppc_push_return_address (CORE_ADDR, CORE_ADDR);
-
-#undef PUSH_DUMMY_FRAME
-#define PUSH_DUMMY_FRAME             generic_push_dummy_frame ()
-
-#define PUSH_RETURN_ADDRESS(PC, SP)      ppc_push_return_address (PC, SP)
-
-/* override the standard get_saved_register function with 
-   one that takes account of generic CALL_DUMMY frames */
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-      generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
-
-#define USE_GENERIC_DUMMY_FRAMES 1
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-#define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
-#define CALL_DUMMY_ADDRESS()         entry_point_address ()
-#undef CALL_DUMMY_START_OFFSET
-#define CALL_DUMMY_START_OFFSET      0
 
 /* The value of symbols of type N_SO and N_FUN maybe null when 
    it shouldn't be. */


More information about the Gdb-patches mailing list