2000-12-20 Michael Snyder <msnyder@mvstp600e.cygnus.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 2 Jan 2001 20:21:53 +0000 (20:21 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 2 Jan 2001 20:21:53 +0000 (20:21 +0000)
        * arch-utils.c (default_frame_address): New function.  Default
        implementation of frame_args_address and frame_locals_address.
        * arch-utils.h (default_frame_address): Export.
        * d10v-tdep.c (d10v_gdbarch_init): Use default_frame_address.
        (d10v_frame_args_address, d10v_frame_locals_address): Delete.
        * sh-tdep.c (sh_gdbarch_init): Use default_frame_address.
        (sh_frame_args_address, sh_frame_locals_address): Delete.
        * sparc-tdep.c (sparc_gdbarch_init): Use default_frame_address.
        (sparc_frame_address): Delete.

gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/d10v-tdep.c
gdb/sh-tdep.c
gdb/sparc-tdep.c

index 160b19fa736cb170a66b883106f40d540ded14c1..93a693dbc6f0f1cc0659f37509d029e10db89d48 100644 (file)
@@ -1,3 +1,15 @@
+2000-12-20  Michael Snyder  <msnyder@mvstp600e.cygnus.com>
+
+       * arch-utils.c (default_frame_address): New function.  Default
+       implementation of frame_args_address and frame_locals_address.
+       * arch-utils.h (default_frame_address): Export.
+       * d10v-tdep.c (d10v_gdbarch_init): Use default_frame_address.
+       (d10v_frame_args_address, d10v_frame_locals_address): Delete.
+       * sh-tdep.c (sh_gdbarch_init): Use default_frame_address.
+       (sh_frame_args_address, sh_frame_locals_address): Delete.
+       * sparc-tdep.c (sparc_gdbarch_init): Use default_frame_address.
+       (sparc_frame_address): Delete.
+
 2000-12-27  Mark Kettenis  <kettenis@gnu.org>
 
        Fix debugging programs statically linked against the thread library.
index 7a806287cef73f4c1fac2cc0f82910f1b37fa3f6..00aad2f7e2653d0b85071021c6d64c1a8dc599f1 100644 (file)
@@ -239,6 +239,13 @@ no_op_reg_to_regnum (int reg)
   return reg;
 }
 
+/* For use by frame_args_address and frame_locals_address.  */
+CORE_ADDR
+default_frame_address (struct frame_info *fi)
+{
+  return fi->frame;
+}
+
 /* Functions to manipulate the endianness of the target.  */
 
 #ifdef TARGET_BYTE_ORDER_SELECTABLE
index 523b58d2efb23b25fb13cf9245e61ecc1739bcca..233e969e800533979987a7a300a974ced6ca44a0 100644 (file)
@@ -101,4 +101,9 @@ extern CORE_ADDR default_convert_from_func_ptr_addr (CORE_ADDR addr);
 
 extern int no_op_reg_to_regnum (int reg);
 
+/* Default frame_args_address and frame_locals_address.  */
+
+extern CORE_ADDR default_frame_address (struct frame_info *);
+
+
 #endif
index ee14abacb43c1a1c2478016780a198d8f4a1b8ed..58e2e833fd84ebcdcb45722d75ff3d611d66aee7 100644 (file)
@@ -438,18 +438,6 @@ d10v_frame_saved_pc (struct frame_info *frame)
   return ((frame)->extra_info->return_pc);
 }
 
-CORE_ADDR
-d10v_frame_args_address (struct frame_info *fi)
-{
-  return (fi)->frame;
-}
-
-CORE_ADDR
-d10v_frame_locals_address (struct frame_info *fi)
-{
-  return (fi)->frame;
-}
-
 /* Immediately after a function call, return the saved pc.  We can't
    use frame->return_pc beause that is determined by reading R13 off
    the stack and that may not be written yet. */
@@ -1592,8 +1580,8 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_frame_chain (gdbarch, d10v_frame_chain);
   set_gdbarch_frame_chain_valid (gdbarch, d10v_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, d10v_frame_saved_pc);
-  set_gdbarch_frame_args_address (gdbarch, d10v_frame_args_address);
-  set_gdbarch_frame_locals_address (gdbarch, d10v_frame_locals_address);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
   set_gdbarch_saved_pc_after_call (gdbarch, d10v_saved_pc_after_call);
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
   set_gdbarch_stack_align (gdbarch, d10v_stack_align);
index f83ad7e09f636cbb60decef94ab9ba87dd1174ac..0ef158c57b05766583106fc637f855a8dc33dcf7 100644 (file)
@@ -850,18 +850,6 @@ sh_frame_saved_pc (struct frame_info *frame)
   return ((frame)->extra_info->return_pc);
 }
 
-static CORE_ADDR
-sh_frame_args_address (struct frame_info *fi)
-{
-  return (fi)->frame;
-}
-
-static CORE_ADDR
-sh_frame_locals_address (struct frame_info *fi)
-{
-  return (fi)->frame;
-}
-
 /* Discard from the stack the innermost frame,
    restoring all saved registers.  */
 static void
@@ -2116,8 +2104,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_frame_chain (gdbarch, sh_frame_chain);
   set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, sh_frame_saved_pc);
-  set_gdbarch_frame_args_address (gdbarch, sh_frame_args_address);
-  set_gdbarch_frame_locals_address (gdbarch, sh_frame_locals_address);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
   set_gdbarch_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
index 31d7792ae6452cc15469cfbe6ad81927d8475355..1b7c5941590d536c109677477bf5581eb1b54608 100644 (file)
@@ -2810,14 +2810,6 @@ sparc_frame_init_saved_regs (struct frame_info *fi_ignored)
 {      /* no-op */
 }
 
-/* The frame address: stored in the 'frame' field of the frame_info.  */
-
-static CORE_ADDR
-sparc_frame_address (struct frame_info *fi)
-{
-  return fi->frame;
-}
-
 /* gdbarch fix call dummy:
    All this function does is rearrange the arguments before calling
    sparc_fix_call_dummy (which does the real work).  */
@@ -2957,10 +2949,10 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
   set_gdbarch_fp_regnum (gdbarch, SPARC_FP_REGNUM);
   set_gdbarch_fp0_regnum (gdbarch, SPARC_FP0_REGNUM);
-  set_gdbarch_frame_args_address (gdbarch, sparc_frame_address);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
   set_gdbarch_frame_chain (gdbarch, sparc_frame_chain);
   set_gdbarch_frame_init_saved_regs (gdbarch, sparc_frame_init_saved_regs);
-  set_gdbarch_frame_locals_address (gdbarch, sparc_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
   set_gdbarch_frame_saved_pc (gdbarch, sparc_frame_saved_pc);
   set_gdbarch_frameless_function_invocation (gdbarch,