[PATCH 00/12] Make use of default gdbarch methods for some targets

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 00/12] Make use of default gdbarch methods for some targets

Andrew Burgess
Following on from this patch:

    https://sourceware.org/ml/gdb-patches/2018-11/msg00132.html

This series removes the dummy_id, unwind_pc, and unwind_sp gdbarch
methods from some targets in cases where it seems obvious that the
default method, and the method being deleted are the same.

From this series only the RISC-V patch has been tested (due to lack of
targets), so I'm relying on manual code inspection to convince myself
the patches are correct.

I've CC'd target maintainers where I can find any in the hope people
might test their own target, however, not every target has an obvious
maintainer, so some are going to rely on review.

I've not adjusted every target, this is about half.  I wanted to see
if it's possible to get this set of changes accepted before I do the
remaining set.  I don't think updating half the targets now, and half
later will leave GDB in a worse state.

Final note, all of these patches are independent, each should apply
cleanly without the preceding patches, so feel free to review any that
are of interest, I'll push patches as they get approval.

Thanks,
Andrew

---

Andrew Burgess (12):
  gdb/aarch64: Use default gdbarch methods where possible
  gdb/alpha: Use default gdbarch methods where possible
  gdb/arc: Use default gdbarch method default_dummy_id.
  gdb/arm: Use default gdbarch methods where possible
  gdb/bfin: Use default gdbarch methods where possible
  gdb/cris: Use default gdbarch methods where possible
  gdb/csky: Use default gdbarch methods where possible
  gdb/riscv: Use default gdbarch methods where possible
  gdb/frv: Use default gdbarch methods where possible
  gdb/ft32: Use default gdbarch methods where possible
  gdb/h8300: Use default gdbarch methods where possible
  gdb/hppa: Use default gdbarch method default_dummy_id.

 gdb/ChangeLog      | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 gdb/aarch64-tdep.c | 38 -----------------------
 gdb/alpha-tdep.c   | 29 ------------------
 gdb/arc-tdep.c     | 14 ---------
 gdb/arm-tdep.c     | 37 -----------------------
 gdb/bfin-tdep.c    | 18 -----------
 gdb/cris-tdep.c    | 40 -------------------------
 gdb/csky-tdep.c    | 34 ---------------------
 gdb/frv-tdep.c     | 27 -----------------
 gdb/ft32-tdep.c    | 33 --------------------
 gdb/h8300-tdep.c   | 22 --------------
 gdb/hppa-tdep.c    |  9 ------
 gdb/riscv-tdep.c   | 30 -------------------
 13 files changed, 88 insertions(+), 331 deletions(-)

--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 01/12] gdb/aarch64: Use default gdbarch methods where possible

Andrew Burgess
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:

        * gdb/aarch64-tdep.c (aarch64_dummy_id): Delete.
        (aarch64_unwind_pc): Delete.
        (aarch64_unwind_sp): Delete.
        (aarch64_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog      |  8 ++++++++
 gdb/aarch64-tdep.c | 38 --------------------------------------
 2 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index ae56c9ca34c..34ee41b0a50 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -998,39 +998,6 @@ struct frame_base aarch64_normal_base =
   aarch64_normal_frame_base
 };
 
-/* Assuming THIS_FRAME is a dummy, return the frame ID of that
-   dummy frame.  The frame ID's base needs to match the TOS value
-   saved by save_dummy_frame_tos () and returned from
-   aarch64_push_dummy_call, and the PC needs to match the dummy
-   frame's breakpoint.  */
-
-static struct frame_id
-aarch64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_register_unsigned (this_frame,
-      AARCH64_SP_REGNUM),
- get_frame_pc (this_frame));
-}
-
-/* Implement the "unwind_pc" gdbarch method.  */
-
-static CORE_ADDR
-aarch64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR pc
-    = frame_unwind_register_unsigned (this_frame, AARCH64_PC_REGNUM);
-
-  return pc;
-}
-
-/* Implement the "unwind_sp" gdbarch method.  */
-
-static CORE_ADDR
-aarch64_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_unwind_register_unsigned (this_frame, AARCH64_SP_REGNUM);
-}
-
 /* Return the value of the REGNUM register in the previous frame of
    *THIS_FRAME.  */
 
@@ -3062,11 +3029,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_push_dummy_call (gdbarch, aarch64_push_dummy_call);
   set_gdbarch_frame_align (gdbarch, aarch64_frame_align);
 
-  /* Frame handling.  */
-  set_gdbarch_dummy_id (gdbarch, aarch64_dummy_id);
-  set_gdbarch_unwind_pc (gdbarch, aarch64_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, aarch64_unwind_sp);
-
   /* Advance PC across function entry code.  */
   set_gdbarch_skip_prologue (gdbarch, aarch64_skip_prologue);
 
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 02/12] gdb/alpha: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
Make use of the default gdbarch methods for gdbarch_dummy_id, and
gdbarch_unwind_pc.

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:

        * gdb/alpha-tdep.c (alpha_dummy_id): Delete.
        (alpha_unwind_pc): Delete.
        (alpha_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog    |  7 +++++++
 gdb/alpha-tdep.c | 29 -----------------------------
 2 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 91bbe06ebf7..77566bf625d 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1463,29 +1463,6 @@ reinit_frame_cache_sfunc (const char *args,
 {
   reinit_frame_cache ();
 }
-
-
-/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
-   dummy frame.  The frame ID's base needs to match the TOS value
-   saved by save_dummy_frame_tos(), and the PC match the dummy frame's
-   breakpoint.  */
-
-static struct frame_id
-alpha_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  ULONGEST base;
-  base = get_frame_register_unsigned (this_frame, ALPHA_SP_REGNUM);
-  return frame_id_build (base, get_frame_pc (this_frame));
-}
-
-static CORE_ADDR
-alpha_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  ULONGEST pc;
-  pc = frame_unwind_register_unsigned (next_frame, ALPHA_PC_REGNUM);
-  return pc;
-}
-
 
 /* Helper routines for alpha*-nat.c files to move register sets to and
    from core files.  The UNIQUE pointer is allowed to be NULL, as most
@@ -1807,12 +1784,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Settings for calling functions in the inferior.  */
   set_gdbarch_push_dummy_call (gdbarch, alpha_push_dummy_call);
 
-  /* Methods for saving / extracting a dummy frame's ID.  */
-  set_gdbarch_dummy_id (gdbarch, alpha_dummy_id);
-
-  /* Return the unwound PC value.  */
-  set_gdbarch_unwind_pc (gdbarch, alpha_unwind_pc);
-
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
 
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 03/12] gdb/arc: Use default gdbarch method default_dummy_id.

Andrew Burgess
In reply to this post by Andrew Burgess
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

Reply | Threaded
Open this post in threaded view
|

[PATCH 04/12] gdb/arm: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
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:

        * gdb/arm-tdep.c (arm_dummy_id): Delete.
        (arm_unwind_pc): Delete.
        (arm_unwind_sp): Delete.
        (arm_gdbarch_init): Don't register deleted functions with gdbarch.
---
 gdb/ChangeLog  |  7 +++++++
 gdb/arm-tdep.c | 37 -------------------------------------
 2 files changed, 7 insertions(+), 37 deletions(-)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 157f926afcd..91d597b6e94 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -3059,38 +3059,6 @@ struct frame_base arm_normal_base = {
   arm_normal_frame_base
 };
 
-/* Assuming THIS_FRAME is a dummy, return the frame ID of that
-   dummy frame.  The frame ID's base needs to match the TOS value
-   saved by save_dummy_frame_tos() and returned from
-   arm_push_dummy_call, and the PC needs to match the dummy frame's
-   breakpoint.  */
-
-static struct frame_id
-arm_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_register_unsigned (this_frame,
-      ARM_SP_REGNUM),
- get_frame_pc (this_frame));
-}
-
-/* Given THIS_FRAME, find the previous frame's resume PC (which will
-   be used to construct the previous frame's ID, after looking up the
-   containing function).  */
-
-static CORE_ADDR
-arm_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR pc;
-  pc = frame_unwind_register_unsigned (this_frame, ARM_PC_REGNUM);
-  return arm_addr_bits_remove (gdbarch, pc);
-}
-
-static CORE_ADDR
-arm_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_unwind_register_unsigned (this_frame, ARM_SP_REGNUM);
-}
-
 static struct value *
 arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache,
   int regnum)
@@ -9362,11 +9330,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_write_pc (gdbarch, arm_write_pc);
 
-  /* Frame handling.  */
-  set_gdbarch_dummy_id (gdbarch, arm_dummy_id);
-  set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp);
-
   frame_base_set_default (gdbarch, &arm_normal_base);
 
   /* Address manipulation.  */
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 05/12] gdb/bfin: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
Make use of the default gdbarch methods for gdbarch_dummy_id,
and gdbarch_unwind_pc.

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:

        * gdb/bfin-tdep.c (bfin_dummy_id): Delete.
        (bfin_unwind_pc): Delete.
        (bfin_gdbarch_init): Don't register deleted functions with gdbarch.
---
 gdb/ChangeLog   |  6 ++++++
 gdb/bfin-tdep.c | 18 ------------------
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index b064a6cef9f..995217b665c 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -756,22 +756,6 @@ static const struct frame_base bfin_frame_base =
   bfin_frame_args_address
 };
 
-static struct frame_id
-bfin_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR sp;
-
-  sp = get_frame_register_unsigned (this_frame, BFIN_SP_REGNUM);
-
-  return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
-static CORE_ADDR
-bfin_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, BFIN_PC_REGNUM);
-}
-
 static CORE_ADDR
 bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
 {
@@ -826,7 +810,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_dwarf2_reg_to_regnum (gdbarch, bfin_reg_to_regnum);
   set_gdbarch_register_name (gdbarch, bfin_register_name);
   set_gdbarch_register_type (gdbarch, bfin_register_type);
-  set_gdbarch_dummy_id (gdbarch, bfin_dummy_id);
   set_gdbarch_push_dummy_call (gdbarch, bfin_push_dummy_call);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
   set_gdbarch_return_value (gdbarch, bfin_return_value);
@@ -836,7 +819,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_sw_breakpoint_from_kind (gdbarch, bfin_sw_breakpoint_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 2);
   set_gdbarch_frame_args_skip (gdbarch, 8);
-  set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
   set_gdbarch_frame_align (gdbarch, bfin_frame_align);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 06/12] gdb/cris: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
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:

        * gdb/cris-tdep.c (cris_dummy_id): Delete.
        (cris_unwind_pc): Delete.
        (cris_unwind_sp): Delete.
        (cris_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog   |  8 ++++++++
 gdb/cris-tdep.c | 40 ----------------------------------------
 2 files changed, 8 insertions(+), 40 deletions(-)

diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index f9fdd86a3c4..962f935a8c3 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -651,12 +651,6 @@ static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc,
  struct frame_info *this_frame,
  struct cris_unwind_cache *info);
 
-static CORE_ADDR cris_unwind_pc (struct gdbarch *gdbarch,
- struct frame_info *next_frame);
-
-static CORE_ADDR cris_unwind_sp (struct gdbarch *gdbarch,
- struct frame_info *next_frame);
-
 /* When arguments must be pushed onto the stack, they go on in reverse
    order.  The below implements a FILO (stack) to do this.
    Copied from d10v-tdep.c.  */
@@ -767,18 +761,6 @@ cris_frame_prev_register (struct frame_info *this_frame,
   return trad_frame_get_prev_register (this_frame, info->saved_regs, regnum);
 }
 
-/* Assuming THIS_FRAME is a dummy, return the frame ID of that dummy
-   frame.  The frame ID's base needs to match the TOS value saved by
-   save_dummy_frame_tos(), and the PC match the dummy frame's breakpoint.  */
-
-static struct frame_id
-cris_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR sp;
-  sp = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch));
-  return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
 static CORE_ADDR
 cris_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 {
@@ -1372,24 +1354,6 @@ cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
   return pc_after_prologue;
 }
 
-static CORE_ADDR
-cris_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  ULONGEST pc;
-  pc = frame_unwind_register_unsigned (next_frame,
-       gdbarch_pc_regnum (gdbarch));
-  return pc;
-}
-
-static CORE_ADDR
-cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  ULONGEST sp;
-  sp = frame_unwind_register_unsigned (next_frame,
-       gdbarch_sp_regnum (gdbarch));
-  return sp;
-}
-
 /* Implement the breakpoint_kind_from_pc gdbarch method.  */
 
 static int
@@ -4095,10 +4059,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_breakpoint_kind_from_pc (gdbarch, cris_breakpoint_kind_from_pc);
   set_gdbarch_sw_breakpoint_from_kind (gdbarch, cris_sw_breakpoint_from_kind);
   
-  set_gdbarch_unwind_pc (gdbarch, cris_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, cris_unwind_sp);
-  set_gdbarch_dummy_id (gdbarch, cris_dummy_id);
-
   if (tdep->cris_dwarf2_cfi == 1)
     {
       /* Hook in the Dwarf-2 frame sniffer.  */
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 07/12] gdb/csky: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
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:

        * gdb/csky-tdep.c (csky_dummy_id): Delete.
        (csky_unwind_pc): Delete.
        (csky_unwind_sp): Delete.
        (csky_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog   |  8 ++++++++
 gdb/csky-tdep.c | 34 ----------------------------------
 2 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index ed56aed97a4..0bac82f0c75 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -162,14 +162,6 @@ csky_write_pc (regcache *regcache, CORE_ADDR val)
   regcache_cooked_write_unsigned (regcache, CSKY_PC_REGNUM, val);
 }
 
-/* Implement the unwind_sp gdbarch method.  */
-
-static CORE_ADDR
-csky_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, CSKY_SP_REGNUM);
-}
-
 /* C-Sky ABI register names.  */
 
 static const char *csky_register_names[] =
@@ -1885,14 +1877,6 @@ csky_frame_unwind_cache (struct frame_info *this_frame)
   return cache;
 }
 
-/* Implement the unwind_pc gdbarch method.  */
-
-static CORE_ADDR
-csky_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, CSKY_PC_REGNUM);
-}
-
 /* Implement the this_id function for the normal unwinder.  */
 
 static void
@@ -2047,19 +2031,6 @@ static const struct frame_base csky_frame_base = {
   csky_frame_base_address
 };
 
-/* Implement the dummy_id gdbarch method.  The frame ID's base
-   needs to match the TOS value saved by save_dummy_frame_tos,
-   and the PC should match the dummy frame's breakpoint.  */
-
-static struct frame_id
-csky_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  unsigned int sp_regnum = CSKY_SP_REGNUM;
-
-  CORE_ADDR sp = get_frame_register_unsigned (this_frame, sp_regnum);
-  return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
 /* Initialize register access method.  */
 
 static void
@@ -2247,13 +2218,8 @@ csky_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_frame_align (gdbarch, csky_frame_align);
   set_gdbarch_stack_frame_destroyed_p (gdbarch, csky_stack_frame_destroyed_p);
 
-  /* Functions to access frame data.  */
-  set_gdbarch_unwind_pc (gdbarch, csky_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, csky_unwind_sp);
-
   /* Functions handling dummy frames.  */
   set_gdbarch_push_dummy_call (gdbarch, csky_push_dummy_call);
-  set_gdbarch_dummy_id (gdbarch, csky_dummy_id);
 
   /* Frame unwinders.  Use DWARF debug info if available,
      otherwise use our own unwinder.  */
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 08/12] gdb/riscv: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
Make use of the default gdbarch methods for gdbarch_dummy_id,
gdbarch_unwind_pc, and gdbarch_unwind_sp where possible.

This change has been tested with no regressions.

gdb/ChangeLog:

        * gdb/riscv-tdep.c (riscv_dummy_id): Delete.
        (riscv_unwind_pc): Delete.
        (riscv_unwind_sp): Delete.
        (riscv_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog    |  8 ++++++++
 gdb/riscv-tdep.c | 30 ------------------------------
 2 files changed, 8 insertions(+), 30 deletions(-)

diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index ef3bb0998d4..d4437f28f74 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -2720,31 +2720,6 @@ riscv_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
   return align_down (addr, 16);
 }
 
-/* Implement the unwind_pc gdbarch method.  */
-
-static CORE_ADDR
-riscv_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, RISCV_PC_REGNUM);
-}
-
-/* Implement the unwind_sp gdbarch method.  */
-
-static CORE_ADDR
-riscv_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, RISCV_SP_REGNUM);
-}
-
-/* Implement the dummy_id gdbarch method.  */
-
-static struct frame_id
-riscv_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_register_signed (this_frame, RISCV_SP_REGNUM),
- get_frame_pc (this_frame));
-}
-
 /* Generate, or return the cached frame cache for the RiscV frame
    unwinder.  */
 
@@ -3185,15 +3160,10 @@ riscv_gdbarch_init (struct gdbarch_info info,
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_frame_align (gdbarch, riscv_frame_align);
 
-  /* Functions to access frame data.  */
-  set_gdbarch_unwind_pc (gdbarch, riscv_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, riscv_unwind_sp);
-
   /* Functions handling dummy frames.  */
   set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
   set_gdbarch_push_dummy_code (gdbarch, riscv_push_dummy_code);
   set_gdbarch_push_dummy_call (gdbarch, riscv_push_dummy_call);
-  set_gdbarch_dummy_id (gdbarch, riscv_dummy_id);
 
   /* Frame unwinders.  Use DWARF debug info if available, otherwise use our own
      unwinder.  */
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 09/12] gdb/frv: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
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:

        * gdb/frv-tdep.c (frv_dummy_id): Delete.
        (frv_unwind_pc): Delete.
        (frv_unwind_sp): Delete.
        (frv_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog  |  8 ++++++++
 gdb/frv-tdep.c | 27 ---------------------------
 2 files changed, 8 insertions(+), 27 deletions(-)

diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index f5c70007b2e..8760c9f70eb 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1367,12 +1367,6 @@ frv_return_value (struct gdbarch *gdbarch, struct value *function,
     return RETURN_VALUE_REGISTER_CONVENTION;
 }
 
-static CORE_ADDR
-frv_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, pc_regnum);
-}
-
 /* Given a GDB frame, determine the address of the calling function's
    frame.  This will be used to create a new GDB frame struct.  */
 
@@ -1439,24 +1433,6 @@ static const struct frame_base frv_frame_base = {
   frv_frame_base_address
 };
 
-static CORE_ADDR
-frv_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, sp_regnum);
-}
-
-
-/* Assuming THIS_FRAME is a dummy, return the frame ID of that dummy
-   frame.  The frame ID's base needs to match the TOS value saved by
-   save_dummy_frame_tos(), and the PC match the dummy frame's breakpoint.  */
-
-static struct frame_id
-frv_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR sp = get_frame_register_unsigned (this_frame, sp_regnum);
-  return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
 static struct gdbarch *
 frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
@@ -1540,8 +1516,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_return_value (gdbarch, frv_return_value);
 
   /* Frame stuff.  */
-  set_gdbarch_unwind_pc (gdbarch, frv_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, frv_unwind_sp);
   set_gdbarch_frame_align (gdbarch, frv_frame_align);
   frame_base_set_default (gdbarch, &frv_frame_base);
   /* We set the sniffer lower down after the OSABI hooks have been
@@ -1549,7 +1523,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   /* Settings for calling functions in the inferior.  */
   set_gdbarch_push_dummy_call (gdbarch, frv_push_dummy_call);
-  set_gdbarch_dummy_id (gdbarch, frv_dummy_id);
 
   /* Settings that should be unnecessary.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 10/12] gdb/ft32: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
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:

        * gdb/ft32-tdep.c (ft32_dummy_id): Delete.
        (ft32_unwind_pc): Delete.
        (ft32_unwind_sp): Delete.
        (ft32_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog   |  8 ++++++++
 gdb/ft32-tdep.c | 33 ---------------------------------
 2 files changed, 8 insertions(+), 33 deletions(-)

diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c
index 7198b84aca0..17f1ceb7a9b 100644
--- a/gdb/ft32-tdep.c
+++ b/gdb/ft32-tdep.c
@@ -383,14 +383,6 @@ ft32_address_class_name_to_type_flags (struct gdbarch *gdbarch,
     return 0;
 }
 
-/* Implement the "unwind_sp" gdbarch method.  */
-
-static CORE_ADDR
-ft32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, FT32_SP_REGNUM);
-}
-
 /* Given a return value in `regbuf' with a type `valtype',
    extract and copy its value into `valbuf'.  */
 
@@ -492,14 +484,6 @@ ft32_frame_cache (struct frame_info *this_frame, void **this_cache)
   return cache;
 }
 
-/* Implement the "unwind_pc" gdbarch method.  */
-
-static CORE_ADDR
-ft32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, FT32_PC_REGNUM);
-}
-
 /* Given a GDB frame, determine the address of the calling function's
    frame.  This will be used to create a new GDB frame struct.  */
 
@@ -567,14 +551,6 @@ static const struct frame_base ft32_frame_base =
   ft32_frame_base_address
 };
 
-static struct frame_id
-ft32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR sp = get_frame_register_unsigned (this_frame, FT32_SP_REGNUM);
-
-  return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
 /* Allocate and initialize the ft32 gdbarch object.  */
 
 static struct gdbarch *
@@ -602,8 +578,6 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
      func_void_type);
   TYPE_INSTANCE_FLAGS (tdep->pc_type) |= TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
 
-  set_gdbarch_unwind_sp (gdbarch, ft32_unwind_sp);
-
   set_gdbarch_num_regs (gdbarch, FT32_NUM_REGS);
   set_gdbarch_sp_regnum (gdbarch, FT32_SP_REGNUM);
   set_gdbarch_pc_regnum (gdbarch, FT32_PC_REGNUM);
@@ -622,13 +596,6 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   frame_base_set_default (gdbarch, &ft32_frame_base);
 
-  /* Methods for saving / extracting a dummy frame's ID.  The ID's
-     stack address must match the SP value returned by
-     PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos.  */
-  set_gdbarch_dummy_id (gdbarch, ft32_dummy_id);
-
-  set_gdbarch_unwind_pc (gdbarch, ft32_unwind_pc);
-
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 11/12] gdb/h8300: Use default gdbarch methods where possible

Andrew Burgess
In reply to this post by Andrew Burgess
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:

        * gdb/h8300-tdep.c (h8300_unwind_pc): Delete.
        (h8300_unwind_sp): Delete.
        (h8300_dummy_id): Delete.
        (h8300_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog    |  8 ++++++++
 gdb/h8300-tdep.c | 22 ----------------------
 2 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index eb4efd9efac..5d44429395c 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -92,25 +92,6 @@ static int is_h8300_normal_mode (struct gdbarch *gdbarch);
   && !is_h8300_normal_mode (gdbarch)) \
  ? h8300h_reg_size : h8300_reg_size)
 
-static CORE_ADDR
-h8300_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, E_PC_REGNUM);
-}
-
-static CORE_ADDR
-h8300_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
-  return frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
-}
-
-static struct frame_id
-h8300_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  CORE_ADDR sp = get_frame_register_unsigned (this_frame, E_SP_REGNUM);
-  return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
 /* Normal frames.  */
 
 /* Allocate and initialize a frame cache.  */
@@ -1349,9 +1330,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
 
   /* Frame unwinder.  */
-  set_gdbarch_unwind_pc (gdbarch, h8300_unwind_pc);
-  set_gdbarch_unwind_sp (gdbarch, h8300_unwind_sp);
-  set_gdbarch_dummy_id (gdbarch, h8300_dummy_id);
   frame_base_set_default (gdbarch, &h8300_frame_base);
 
   /*
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

[PATCH 12/12] gdb/hppa: Use default gdbarch method default_dummy_id.

Andrew Burgess
In reply to this post by Andrew Burgess
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 method is equivalent to the code being deleted.

gdb/ChangeLog:

        * gdb/hppa-tdep.c (hppa_dummy_id): Delete.
        (hppa_gdbarch_init): Don't register deleted functions with
        gdbarch.
---
 gdb/ChangeLog   | 6 ++++++
 gdb/hppa-tdep.c | 9 ---------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index d22b2cf5d28..7bc4c184e07 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -2506,14 +2506,6 @@ static const struct frame_unwind hppa_stub_frame_unwind = {
   hppa_stub_unwind_sniffer
 };
 
-static struct frame_id
-hppa_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_register_unsigned (this_frame,
-                                                      HPPA_SP_REGNUM),
- get_frame_pc (this_frame));
-}
-
 CORE_ADDR
 hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
@@ -3156,7 +3148,6 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_pseudo_register_read (gdbarch, hppa_pseudo_register_read);
 
   /* Frame unwind methods.  */
-  set_gdbarch_dummy_id (gdbarch, hppa_dummy_id);
   set_gdbarch_unwind_pc (gdbarch, hppa_unwind_pc);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
--
2.14.5

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 00/12] Make use of default gdbarch methods for some targets

Simon Marchi-4
In reply to this post by Andrew Burgess
On 2018-12-27 9:08 a.m., Andrew Burgess wrote:

> Following on from this patch:
>
>     https://sourceware.org/ml/gdb-patches/2018-11/msg00132.html
>
> This series removes the dummy_id, unwind_pc, and unwind_sp gdbarch
> methods from some targets in cases where it seems obvious that the
> default method, and the method being deleted are the same.
>
> From this series only the RISC-V patch has been tested (due to lack of
> targets), so I'm relying on manual code inspection to convince myself
> the patches are correct.
>
> I've CC'd target maintainers where I can find any in the hope people
> might test their own target, however, not every target has an obvious
> maintainer, so some are going to rely on review.
>
> I've not adjusted every target, this is about half.  I wanted to see
> if it's possible to get this set of changes accepted before I do the
> remaining set.  I don't think updating half the targets now, and half
> later will leave GDB in a worse state.
>
> Final note, all of these patches are independent, each should apply
> cleanly without the preceding patches, so feel free to review any that
> are of interest, I'll push patches as they get approval.

Hi Andrew,

This LGTM.  But let's give arch maintainers some time to take a look if
they want.  Since people may be on vacation right now, I'd say let's wait
until around January 15th to give them a chance.  If you don't hear anything
else, then please push then.

Thanks!

Simon
Reply | Threaded
Open this post in threaded view
|

RE: [PATCH 03/12] gdb/arc: Use default gdbarch method default_dummy_id.

Anton Kolesov
In reply to this post by Andrew Burgess
> -----Original Message-----
> From: Andrew Burgess <[hidden email]>
> Sent: Thursday, December 27, 2018 17:08
> To: [hidden email]; [hidden email]
> Cc: [hidden email]; [hidden email]; [hidden email];
> [hidden email]; [hidden email]; Andrew Burgess
> <[hidden email]>
> Subject: [PATCH 03/12] gdb/arc: Use default gdbarch method
> default_dummy_id.
>
> 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.

Hi Andrew,

LGTM. FWIW, I think custom unwind_pc could be removed as well, if it only
adds extra logging and nothing else.

Anton

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 06/12] gdb/cris: Use default gdbarch methods where possible

Hans-Peter Nilsson
In reply to this post by Andrew Burgess
> From: Andrew Burgess <[hidden email]>
> Date: Thu, 27 Dec 2018 14:08:30 +0000

> 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:
>
> * gdb/cris-tdep.c (cris_dummy_id): Delete.
> (cris_unwind_pc): Delete.
> (cris_unwind_sp): Delete.
> (cris_gdbarch_init): Don't register deleted functions with
> gdbarch.

LGTM, thanks.

brgds, H-P
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 01/12] gdb/aarch64: Use default gdbarch methods where possible

Alan Hayward
In reply to this post by Andrew Burgess

> On 27 Dec 2018, at 14:08, Andrew Burgess <[hidden email]> wrote:
>
> 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:
>
> * gdb/aarch64-tdep.c (aarch64_dummy_id): Delete.
> (aarch64_unwind_pc): Delete.
> (aarch64_unwind_sp): Delete.
> (aarch64_gdbarch_init): Don't register deleted functions with
> gdbarch.
> ---
> gdb/ChangeLog      |  8 ++++++++
> gdb/aarch64-tdep.c | 38 --------------------------------------
> 2 files changed, 8 insertions(+), 38 deletions(-)
>
> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
> index ae56c9ca34c..34ee41b0a50 100644
> --- a/gdb/aarch64-tdep.c
> +++ b/gdb/aarch64-tdep.c
> @@ -998,39 +998,6 @@ struct frame_base aarch64_normal_base =
>   aarch64_normal_frame_base
> };
>
> -/* Assuming THIS_FRAME is a dummy, return the frame ID of that
> -   dummy frame.  The frame ID's base needs to match the TOS value
> -   saved by save_dummy_frame_tos () and returned from
> -   aarch64_push_dummy_call, and the PC needs to match the dummy
> -   frame's breakpoint.  */
> -
> -static struct frame_id
> -aarch64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
> -{
> -  return frame_id_build (get_frame_register_unsigned (this_frame,
> -      AARCH64_SP_REGNUM),
> - get_frame_pc (this_frame));
> -}
> -
> -/* Implement the "unwind_pc" gdbarch method.  */
> -
> -static CORE_ADDR
> -aarch64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
> -{
> -  CORE_ADDR pc
> -    = frame_unwind_register_unsigned (this_frame, AARCH64_PC_REGNUM);
> -
> -  return pc;
> -}
> -
> -/* Implement the "unwind_sp" gdbarch method.  */
> -
> -static CORE_ADDR
> -aarch64_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
> -{
> -  return frame_unwind_register_unsigned (this_frame, AARCH64_SP_REGNUM);
> -}
> -
> /* Return the value of the REGNUM register in the previous frame of
>    *THIS_FRAME.  */
>
> @@ -3062,11 +3029,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
>   set_gdbarch_push_dummy_call (gdbarch, aarch64_push_dummy_call);
>   set_gdbarch_frame_align (gdbarch, aarch64_frame_align);
>
> -  /* Frame handling.  */
> -  set_gdbarch_dummy_id (gdbarch, aarch64_dummy_id);
> -  set_gdbarch_unwind_pc (gdbarch, aarch64_unwind_pc);
> -  set_gdbarch_unwind_sp (gdbarch, aarch64_unwind_sp);
> -
>   /* Advance PC across function entry code.  */
>   set_gdbarch_skip_prologue (gdbarch, aarch64_skip_prologue);
>


Updating to latest HEAD really helped to review this (given the default funcs
are new). :)

Code changes LGTM.
Make check on Aarch64 looks good too.



Alan.

> --
> 2.14.5
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 00/12] Make use of default gdbarch methods for some targets

Andrew Burgess
In reply to this post by Andrew Burgess
* Andrew Burgess <[hidden email]> [2018-12-27 14:08:24 +0000]:

> Following on from this patch:
>
>     https://sourceware.org/ml/gdb-patches/2018-11/msg00132.html
>
> This series removes the dummy_id, unwind_pc, and unwind_sp gdbarch
> methods from some targets in cases where it seems obvious that the
> default method, and the method being deleted are the same.
>
> From this series only the RISC-V patch has been tested (due to lack of
> targets), so I'm relying on manual code inspection to convince myself
> the patches are correct.
>
> I've CC'd target maintainers where I can find any in the hope people
> might test their own target, however, not every target has an obvious
> maintainer, so some are going to rely on review.
>
> I've not adjusted every target, this is about half.  I wanted to see
> if it's possible to get this set of changes accepted before I do the
> remaining set.  I don't think updating half the targets now, and half
> later will leave GDB in a worse state.
>
> Final note, all of these patches are independent, each should apply
> cleanly without the preceding patches, so feel free to review any that
> are of interest, I'll push patches as they get approval.
>
> Thanks,
> Andrew
>
> ---
>
> Andrew Burgess (12):
>   gdb/aarch64: Use default gdbarch methods where possible
>   gdb/alpha: Use default gdbarch methods where possible
>   gdb/arc: Use default gdbarch method default_dummy_id.
>   gdb/arm: Use default gdbarch methods where possible
>   gdb/bfin: Use default gdbarch methods where possible
>   gdb/cris: Use default gdbarch methods where possible
>   gdb/csky: Use default gdbarch methods where possible
>   gdb/riscv: Use default gdbarch methods where possible
>   gdb/frv: Use default gdbarch methods where possible
>   gdb/ft32: Use default gdbarch methods where possible
>   gdb/h8300: Use default gdbarch methods where possible
>   gdb/hppa: Use default gdbarch method default_dummy_id.

I've now pushed this series with the change Anton suggested - removing
the arc specific unwind_pc (and also the arc unwind_sp) functions.

Thanks,
Andrew



>
>  gdb/ChangeLog      | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  gdb/aarch64-tdep.c | 38 -----------------------
>  gdb/alpha-tdep.c   | 29 ------------------
>  gdb/arc-tdep.c     | 14 ---------
>  gdb/arm-tdep.c     | 37 -----------------------
>  gdb/bfin-tdep.c    | 18 -----------
>  gdb/cris-tdep.c    | 40 -------------------------
>  gdb/csky-tdep.c    | 34 ---------------------
>  gdb/frv-tdep.c     | 27 -----------------
>  gdb/ft32-tdep.c    | 33 --------------------
>  gdb/h8300-tdep.c   | 22 --------------
>  gdb/hppa-tdep.c    |  9 ------
>  gdb/riscv-tdep.c   | 30 -------------------
>  13 files changed, 88 insertions(+), 331 deletions(-)
>
> --
> 2.14.5
>