[PATCH 03/12] gdb/arc: Use default gdbarch method default_dummy_id.

Andrew Burgess andrew.burgess@embecosm.com
Thu Dec 27 14:09:00 GMT 2018


Make use of the default gdbarch method for gdbarch_dummy_id.

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

The arc target supplies its own gdbarch_unwind_pc method that includes
custom debug output, in all other respects the arc method is the same
as default_unwind_pc, however I have left the arc method in place so
that the debug can remain.

gdb/ChangeLog:

	* gdb/arc-tdep.c (arc_dummy_id): Delete.
	(arc_gdbarch_init): Don't register deleted function with
	gdbarch.
---
 gdb/ChangeLog  |  6 ++++++
 gdb/arc-tdep.c | 14 --------------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index c3c78395201..454f69fd3e4 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -509,19 +509,6 @@ arc_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
   *offset_ptr = 0;
 }
 
-/* Implement the "dummy_id" gdbarch method.
-
-   Tear down a dummy frame created by arc_push_dummy_call ().  This data has
-   to be constructed manually from the data in our hand.  The stack pointer
-   and program counter can be obtained from the frame info.  */
-
-static struct frame_id
-arc_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_sp (this_frame),
-			 get_frame_pc (this_frame));
-}
-
 /* Implement the "push_dummy_call" gdbarch method.
 
    Stack Frame Layout
@@ -2015,7 +2002,6 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_ps_regnum (gdbarch, ARC_STATUS32_REGNUM);
   set_gdbarch_fp0_regnum (gdbarch, -1);	/* No FPU registers.  */
 
-  set_gdbarch_dummy_id (gdbarch, arc_dummy_id);
   set_gdbarch_push_dummy_call (gdbarch, arc_push_dummy_call);
   set_gdbarch_push_dummy_code (gdbarch, arc_push_dummy_code);
 
-- 
2.14.5



More information about the Gdb-patches mailing list