This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 03/12] gdb/arc: Use default gdbarch method default_dummy_id.
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: gdb-patches at sourceware dot org, Anton dot Kolesov at synopsys dot com
- Cc: alan dot hayward at arm dot com, abidh at codesourcery dot com, hp at axis dot com, jamesb at excamera dot com, vapier at gentoo dot org, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Thu, 27 Dec 2018 14:08:27 +0000
- Subject: [PATCH 03/12] gdb/arc: Use default gdbarch method default_dummy_id.
- References: <cover.1545918068.git.andrew.burgess@embecosm.com>
- References: <cover.1545918068.git.andrew.burgess@embecosm.com>
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