gdb/s12z: Use default gdbarch methods where possible
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 10 Jan 2019 20:38:42 +0000 (20:38 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 23 Apr 2019 22:06:54 +0000 (23:06 +0100)
Make use of the default gdbarch methods for 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:

* s12z-tdep.c (s12z_unwind_pc): Delete.
(s12z_unwind_sp): Delete.
(s12z_gdbarch_init): Don't register deleted functions with
gdbarch.

gdb/ChangeLog
gdb/s12z-tdep.c

index 94f19981cbdc11472262dd1e60bf78f4e3292f80..5c40683d3f69474743345943010a37e401241a4b 100644 (file)
@@ -1,3 +1,10 @@
+2019-04-23  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * s12z-tdep.c (s12z_unwind_pc): Delete.
+       (s12z_unwind_sp): Delete.
+       (s12z_gdbarch_init): Don't register deleted functions with
+       gdbarch.
+
 2019-04-23  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * rl78-tdep.c (rl78_unwind_sp): Delete.
index ea14992b1c6f7a8effc16931aab4fa13bdca003a..cef92d87743de5d9fa4a64d107933032da573427 100644 (file)
@@ -95,20 +95,6 @@ s12z_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
   return pc;
 }
 
-/* Implement the unwind_pc gdbarch method.  */
-static CORE_ADDR
-s12z_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, REG_P);
-}
-
-/* Implement the unwind_sp gdbarch method.  */
-static CORE_ADDR
-s12z_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, REG_S);
-}
-
 static struct type *
 s12z_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
@@ -581,10 +567,6 @@ s12z_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_register_type (gdbarch, s12z_register_type);
 
-  /* Functions to access frame data.  */
-  set_gdbarch_unwind_pc (gdbarch, s12z_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, s12z_unwind_sp);
-
   frame_unwind_append_unwinder (gdbarch, &s12z_frame_unwind);
   /* Currently, the only known producer for this archtecture, produces buggy
      dwarf CFI.   So don't append a dwarf unwinder until the situation is
This page took 0.028455 seconds and 4 git commands to generate.