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

Message ID cover.1545918068.git.andrew.burgess@embecosm.com
Headers show
Series
  • Make use of default gdbarch methods for some targets
Related show

Message

Andrew Burgess Dec. 27, 2018, 2:08 p.m.
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

Comments

Simon Marchi Dec. 27, 2018, 10:01 p.m. | #1
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
Andrew Burgess Feb. 27, 2019, 3:02 p.m. | #2
* Andrew Burgess <andrew.burgess@embecosm.com> [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

>