gdb/score: Use default gdbarch methods where possible
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 10 Jan 2019 20:15:03 +0000 (20:15 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 23 Apr 2019 21:50:28 +0000 (22:50 +0100)
Make use of the default gdbarch methods for gdbarch_dummy_id,
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:

* score-tdep.c (score_unwind_sp): Delete.
(score_unwind_pc): Delete.
(score_dummy_id): Delete.
(score_gdbarch_init): Don't register deleted functions with
gdbarch.

gdb/ChangeLog
gdb/score-tdep.c

index 66193f0fa40db186ff44dbca5b09d91fe20fcf8a..89b65eabbb06f69104d5b0439610bed6b55190b0 100644 (file)
@@ -1,3 +1,11 @@
+2019-04-23  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * score-tdep.c (score_unwind_sp): Delete.
+       (score_unwind_pc): Delete.
+       (score_dummy_id): Delete.
+       (score_gdbarch_init): Don't register deleted functions with
+       gdbarch.
+
 2019-04-23  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * rx-tdep.c (rx_unwind_pc): Delete.
index 02f4ed4a12b3b2c4fd0d71dd84f56022b099e96b..19306d3464ee7cc054aa8d4ef7da5015b4216383 100644 (file)
@@ -64,18 +64,6 @@ score_register_type (struct gdbarch *gdbarch, int regnum)
   return builtin_type (gdbarch)->builtin_uint32;
 }
 
-static CORE_ADDR
-score_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, SCORE_SP_REGNUM);
-}
-
-static CORE_ADDR
-score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, SCORE_PC_REGNUM);
-}
-
 static const char *
 score7_register_name (struct gdbarch *gdbarch, int regnum)
 {
@@ -478,14 +466,6 @@ score_return_value (struct gdbarch *gdbarch, struct value *function,
     }
 }
 
-static struct frame_id
-score_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_register_unsigned (this_frame,
-                                                     SCORE_SP_REGNUM),
-                        get_frame_pc (this_frame));
-}
-
 static int
 score_type_needs_double_align (struct type *type)
 {
@@ -1480,8 +1460,6 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_register_type (gdbarch, score_register_type);
   set_gdbarch_frame_align (gdbarch, score_frame_align);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_unwind_sp (gdbarch, score_unwind_sp);
-  set_gdbarch_unwind_pc (gdbarch, score_unwind_pc);
 
   switch (target_mach)
     {
@@ -1519,7 +1497,6 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Dummy frame hooks.  */
   set_gdbarch_return_value (gdbarch, score_return_value);
   set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
-  set_gdbarch_dummy_id (gdbarch, score_dummy_id);
   set_gdbarch_push_dummy_call (gdbarch, score_push_dummy_call);
 
   /* Normal frame hooks.  */
This page took 0.031481 seconds and 4 git commands to generate.