This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 22/25] gdb/vax: Use default gdbarch methods where possible
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: gdb-patches at sourceware dot org
- Cc: kevinb at redhat dot com, macro at linux-mips dot org, brobecker at adacore dot com, green at moxielogic dot com, qiyao at sourceware dot org, shorne at gmail dot com, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Wed, 27 Mar 2019 21:34:18 +0000
- Subject: [PATCH 22/25] gdb/vax: Use default gdbarch methods where possible
- References: <cover.1553721864.git.andrew.burgess@embecosm.com>
- References: <cover.1553721864.git.andrew.burgess@embecosm.com>
Make use of the default gdbarch method gdbarch_unwind_pc 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:
* vax-tdep.c (vax_unwind_pc): Delete.
(vax_gdbarch_init): Don't register deleted function with gdbarch.
---
gdb/ChangeLog | 5 +++++
gdb/vax-tdep.c | 7 -------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 6046c0e98b4..e4a565df050 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -437,11 +437,6 @@ vax_frame_num_args (struct frame_info *frame)
return get_frame_memory_unsigned (frame, args, 1);
}
-static CORE_ADDR
-vax_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, VAX_PC_REGNUM);
-}
/* Initialize the current architecture based on INFO. If possible, re-use an
@@ -502,8 +497,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_function_start_offset (gdbarch, 2);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- set_gdbarch_unwind_pc (gdbarch, vax_unwind_pc);
-
frame_base_set_default (gdbarch, &vax_frame_base);
/* Hook in ABI-specific overrides, if they have been registered. */
--
2.14.5