diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-01-10 20:08:18 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-04-23 22:50:27 +0100 |
commit | 833a4480dd7cadfd645d7b141168a0e22dc50665 (patch) | |
tree | f24633106adb449c3320377f7785a446e50a2bea /gdb | |
parent | 3f2cef4945a916e3b566010340bbc70cfe927916 (diff) | |
download | gdb-833a4480dd7cadfd645d7b141168a0e22dc50665.zip gdb-833a4480dd7cadfd645d7b141168a0e22dc50665.tar.gz gdb-833a4480dd7cadfd645d7b141168a0e22dc50665.tar.bz2 |
gdb/rs6000: Use default gdbarch methods where possible
Make use of the default gdbarch methods for gdbarch_dummy_id,
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:
* rs6000-tdep.c (rs6000_unwind_pc): Delete.
(rs6000_dummy_id): Delete.
(rs6000_gdbarch_init): Don't register deleted functions with
gdbarch.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 18 |
2 files changed, 7 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5eb9715..0c8fcce 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com> + * rs6000-tdep.c (rs6000_unwind_pc): Delete. + (rs6000_dummy_id): Delete. + (rs6000_gdbarch_init): Don't register deleted functions with + gdbarch. + +2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com> + * or1k-tdep.c (or1k_dummy_id): Delete. (or1k_gdbarch_init): Don't register deleted function with gdbarch. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 375b960..328b41c 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3404,20 +3404,6 @@ find_variant_by_arch (enum bfd_architecture arch, unsigned long mach) } -static CORE_ADDR -rs6000_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); -} - -static struct frame_id -rs6000_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - return frame_id_build (get_frame_register_unsigned - (this_frame, gdbarch_sp_regnum (gdbarch)), - get_frame_pc (this_frame)); -} struct rs6000_frame_cache { @@ -7101,19 +7087,15 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case GDB_OSABI_LINUX: case GDB_OSABI_NETBSD: case GDB_OSABI_UNKNOWN: - set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc); frame_unwind_append_unwinder (gdbarch, &rs6000_epilogue_frame_unwind); frame_unwind_append_unwinder (gdbarch, &rs6000_frame_unwind); - set_gdbarch_dummy_id (gdbarch, rs6000_dummy_id); frame_base_append_sniffer (gdbarch, rs6000_frame_base_sniffer); break; default: set_gdbarch_believe_pcc_promotion (gdbarch, 1); - set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc); frame_unwind_append_unwinder (gdbarch, &rs6000_epilogue_frame_unwind); frame_unwind_append_unwinder (gdbarch, &rs6000_frame_unwind); - set_gdbarch_dummy_id (gdbarch, rs6000_dummy_id); frame_base_append_sniffer (gdbarch, rs6000_frame_base_sniffer); } |