]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/arm: Use default gdbarch methods where possible
authorAndrew Burgess <andrew.burgess@embecosm.com>
Sun, 9 Sep 2018 16:10:21 +0000 (17:10 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 27 Feb 2019 14:54:43 +0000 (16:54 +0200)
Make use of the default gdbarch methods for gdbarch_dummy_id,
gdbarch_unwind_pc, and gdbarch_unwind_sp where possible.

I have not tested this change but, by inspecting the code, I believe
the default methods are equivalent to the code being deleted.

gdb/ChangeLog:

* gdb/arm-tdep.c (arm_dummy_id): Delete.
(arm_unwind_pc): Delete.
(arm_unwind_sp): Delete.
(arm_gdbarch_init): Don't register deleted functions with gdbarch.

gdb/ChangeLog
gdb/arm-tdep.c

index 05c5f87df20e33a77da99967fd30289bad63bd86..a35fc7c7f341a3b95e2d995820f7d2b0ed576dff 100644 (file)
@@ -1,3 +1,10 @@
+2019-02-27  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdb/arm-tdep.c (arm_dummy_id): Delete.
+       (arm_unwind_pc): Delete.
+       (arm_unwind_sp): Delete.
+       (arm_gdbarch_init): Don't register deleted functions with gdbarch.
+
 2019-02-27  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb/arc-tdep.c (arc_dummy_id): Delete.
index c0c20c55b98e122e2e8828dda08ea7342b053560..599f785b3494929cd53343f60fcf3f80e5762dbf 100644 (file)
@@ -3059,38 +3059,6 @@ struct frame_base arm_normal_base = {
   arm_normal_frame_base
 };
 
-/* Assuming THIS_FRAME is a dummy, return the frame ID of that
-   dummy frame.  The frame ID's base needs to match the TOS value
-   saved by save_dummy_frame_tos() and returned from
-   arm_push_dummy_call, and the PC needs to match the dummy frame's
-   breakpoint.  */
-
-static struct frame_id
-arm_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_register_unsigned (this_frame,
-                                                     ARM_SP_REGNUM),
-                        get_frame_pc (this_frame));
-}
-
-/* Given THIS_FRAME, find the previous frame's resume PC (which will
-   be used to construct the previous frame's ID, after looking up the
-   containing function).  */
-
-static CORE_ADDR
-arm_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR pc;
-  pc = frame_unwind_register_unsigned (this_frame, ARM_PC_REGNUM);
-  return arm_addr_bits_remove (gdbarch, pc);
-}
-
-static CORE_ADDR
-arm_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_unwind_register_unsigned (this_frame, ARM_SP_REGNUM);
-}
-
 static struct value *
 arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache,
                          int regnum)
@@ -9362,11 +9330,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_write_pc (gdbarch, arm_write_pc);
 
-  /* Frame handling.  */
-  set_gdbarch_dummy_id (gdbarch, arm_dummy_id);
-  set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp);
-
   frame_base_set_default (gdbarch, &arm_normal_base);
 
   /* Address manipulation.  */