[v4,00/12] GDB support for more powerpc registers on linux

Message ID 20180815000608.26840-1-pedromfc@linux.ibm.com
Headers show
Series
  • GDB support for more powerpc registers on linux
Related show

Message

Pedro Franco de Carvalho Aug. 15, 2018, 12:05 a.m.
Please ignore V3.

I forgot to rebase my patches on master since Friday, and a commit
since then has also changed the linux-tdep.c code for generating a
core-file, which caused rebase conflicts. Sorry for the spam!

This is V4 of: https://sourceware.org/ml/gdb-patches/2018-08/msg00243.html

These are all the changes compared to V2, following the suggestions
there, and following the changes to linux-tdep.c:

* Adapted "Zero-initialize linux note sections" due to recent changes
  from commit a616bb9450.

* Added a comment to "Zero-initialize linux note sections"

* Adapted all the four main patches that enable the registers
  (PPR/DSCR, TAR, EBB/PMU and HTM) to account for the changes from
  commit a616bb9450.

* De-duplicated testcase names.  Changed a few of the test names so
  that they are environment-independent.  Fixed a few other minor
  issues with the testcases.

* Changed one of the testcases for the HTM registers so that it
  XFAILs.  This testcase occasionally failed, possibly due to a kernel
  bug.

* Fixed some of the formatting and const-correctness in "[PowerPC] Add
  support for HTM registers", in gdbserver/linux-ppc-low.c.

* Added an item in the NEWS file on the last commit, indicating all
  the newly supported registers from this series.

Edjunior Barbosa Machado (4):
  [PowerPC] Add support for PPR and DSCR
  [PowerPC] Add support for TAR
  [PowerPC] Add support for EBB and PMU registers
  [PowerPC] Add support for HTM registers

Pedro Franco de Carvalho (8):
  Zero-initialize linux note sections
  [PowerPC] Don't zero-initialize vector register buffers
  Add decfloat registers to float reggroup
  [PowerPC] Remove rs6000_pseudo_register_reggroup_p
  [PowerPC] Fix two if statements in gdb/ppc-linux-nat.c
  [PowerPC] Fix indentation in arch/ppc-linux-common.c
  [PowerPC] Refactor have_ initializers in rs6000-tdep.c
  [PowerPC] Reject tdescs with VSX and no FPU or Altivec

 gdb/NEWS                                           |   4 +
 gdb/arch/ppc-linux-common.c                        |  30 +-
 gdb/arch/ppc-linux-common.h                        |  20 +
 gdb/arch/ppc-linux-tdesc.h                         |   6 +
 gdb/doc/gdb.texinfo                                |  60 ++
 gdb/features/Makefile                              |  11 +
 gdb/features/rs6000/power-dscr.xml                 |  12 +
 gdb/features/rs6000/power-ebb.xml                  |  14 +
 gdb/features/rs6000/power-htm-altivec.xml          |  58 ++
 gdb/features/rs6000/power-htm-core.xml             |  48 ++
 gdb/features/rs6000/power-htm-dscr.xml             |  12 +
 gdb/features/rs6000/power-htm-fpu.xml              |  45 ++
 gdb/features/rs6000/power-htm-ppr.xml              |  12 +
 gdb/features/rs6000/power-htm-spr.xml              |  14 +
 gdb/features/rs6000/power-htm-tar.xml              |  12 +
 gdb/features/rs6000/power-htm-vsx.xml              |  43 ++
 gdb/features/rs6000/power-linux-pmu.xml            |  17 +
 gdb/features/rs6000/power-ppr.xml                  |  12 +
 gdb/features/rs6000/power-tar.xml                  |  12 +
 gdb/features/rs6000/power64-htm-core.xml           |  48 ++
 .../rs6000/powerpc-isa205-ppr-dscr-vsx32l.c        | 200 +++++
 .../rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml      |  18 +
 .../rs6000/powerpc-isa205-ppr-dscr-vsx64l.c        | 200 +++++
 .../rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml      |  18 +
 gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c    | 396 ++++++++++
 gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml  |  29 +
 gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c    | 396 ++++++++++
 gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml  |  29 +
 gdb/features/rs6000/powerpc-isa207-vsx32l.c        | 215 ++++++
 gdb/features/rs6000/powerpc-isa207-vsx32l.xml      |  21 +
 gdb/features/rs6000/powerpc-isa207-vsx64l.c        | 215 ++++++
 gdb/features/rs6000/powerpc-isa207-vsx64l.xml      |  21 +
 gdb/gdbserver/configure.srv                        |  28 +-
 gdb/gdbserver/linux-ppc-ipa.c                      |  18 +
 gdb/gdbserver/linux-ppc-low.c                      | 360 ++++++++-
 gdb/gdbserver/linux-ppc-tdesc-init.h               |  21 +
 gdb/linux-tdep.c                                   |  14 +-
 gdb/nat/ppc-linux.h                                |  80 ++
 gdb/ppc-linux-nat.c                                | 560 +++++++++++++-
 gdb/ppc-linux-tdep.c                               | 458 +++++++++++-
 gdb/ppc-linux-tdep.h                               |  21 +
 gdb/ppc-tdep.h                                     |  93 +++
 .../rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat      | 146 ++++
 .../rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat      | 146 ++++
 .../rs6000/powerpc-isa207-htm-vsx32l.dat           | 296 ++++++++
 .../rs6000/powerpc-isa207-htm-vsx64l.dat           | 296 ++++++++
 gdb/regformats/rs6000/powerpc-isa207-vsx32l.dat    | 155 ++++
 gdb/regformats/rs6000/powerpc-isa207-vsx64l.dat    | 155 ++++
 gdb/reggroups.c                                    |   4 +-
 gdb/rs6000-tdep.c                                  | 804 ++++++++++++++++++---
 gdb/testsuite/gdb.arch/powerpc-htm-regs.c          |  39 +
 gdb/testsuite/gdb.arch/powerpc-htm-regs.exp        | 320 ++++++++
 gdb/testsuite/gdb.arch/powerpc-ppr-dscr.c          |  34 +
 gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp        | 117 +++
 gdb/testsuite/gdb.arch/powerpc-tar.c               |  33 +
 gdb/testsuite/gdb.arch/powerpc-tar.exp             | 117 +++
 56 files changed, 6407 insertions(+), 156 deletions(-)
 create mode 100644 gdb/features/rs6000/power-dscr.xml
 create mode 100644 gdb/features/rs6000/power-ebb.xml
 create mode 100644 gdb/features/rs6000/power-htm-altivec.xml
 create mode 100644 gdb/features/rs6000/power-htm-core.xml
 create mode 100644 gdb/features/rs6000/power-htm-dscr.xml
 create mode 100644 gdb/features/rs6000/power-htm-fpu.xml
 create mode 100644 gdb/features/rs6000/power-htm-ppr.xml
 create mode 100644 gdb/features/rs6000/power-htm-spr.xml
 create mode 100644 gdb/features/rs6000/power-htm-tar.xml
 create mode 100644 gdb/features/rs6000/power-htm-vsx.xml
 create mode 100644 gdb/features/rs6000/power-linux-pmu.xml
 create mode 100644 gdb/features/rs6000/power-ppr.xml
 create mode 100644 gdb/features/rs6000/power-tar.xml
 create mode 100644 gdb/features/rs6000/power64-htm-core.xml
 create mode 100644 gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c
 create mode 100644 gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml
 create mode 100644 gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c
 create mode 100644 gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml
 create mode 100644 gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c
 create mode 100644 gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml
 create mode 100644 gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c
 create mode 100644 gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml
 create mode 100644 gdb/features/rs6000/powerpc-isa207-vsx32l.c
 create mode 100644 gdb/features/rs6000/powerpc-isa207-vsx32l.xml
 create mode 100644 gdb/features/rs6000/powerpc-isa207-vsx64l.c
 create mode 100644 gdb/features/rs6000/powerpc-isa207-vsx64l.xml
 create mode 100644 gdb/regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat
 create mode 100644 gdb/regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat
 create mode 100644 gdb/regformats/rs6000/powerpc-isa207-htm-vsx32l.dat
 create mode 100644 gdb/regformats/rs6000/powerpc-isa207-htm-vsx64l.dat
 create mode 100644 gdb/regformats/rs6000/powerpc-isa207-vsx32l.dat
 create mode 100644 gdb/regformats/rs6000/powerpc-isa207-vsx64l.dat
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-htm-regs.c
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-ppr-dscr.c
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-tar.c
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-tar.exp

-- 
2.13.6

Comments

Pedro Franco de Carvalho Aug. 16, 2018, 4:44 p.m. | #1
Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:

> These are all the changes compared to V2, following the suggestions

> there, and following the changes to linux-tdep.c:

>

> * Adapted "Zero-initialize linux note sections" due to recent changes

>   from commit a616bb9450.

>

> * Added a comment to "Zero-initialize linux note sections"

>

> * Adapted all the four main patches that enable the registers

>   (PPR/DSCR, TAR, EBB/PMU and HTM) to account for the changes from

>   commit a616bb9450.

>

> * De-duplicated testcase names.  Changed a few of the test names so

>   that they are environment-independent.  Fixed a few other minor

>   issues with the testcases.

>

> * Changed one of the testcases for the HTM registers so that it

>   XFAILs.  This testcase occasionally failed, possibly due to a kernel

>   bug.

>

> * Fixed some of the formatting and const-correctness in "[PowerPC] Add

>   support for HTM registers", in gdbserver/linux-ppc-low.c.

>

> * Added an item in the NEWS file on the last commit, indicating all

>   the newly supported registers from this series.


Considering Ulrich had already approved the V2 patches, do these changes
need to be re-approved, or can they be considered as obvious, and can I
commit them?

I don't know if a NEWS item counts as obvious, but if not, I can submit
it in a separate patch.

Thanks!

--
Pedro Franco de Carvalho
Pedro Alves Aug. 16, 2018, 5 p.m. | #2
-- 
Thanks,
Pedro Alves
On 08/16/2018 05:44 PM, Pedro Franco de Carvalho wrote:
> 

> Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:

> 

>> These are all the changes compared to V2, following the suggestions

>> there, and following the changes to linux-tdep.c:

>>

>> * Adapted "Zero-initialize linux note sections" due to recent changes

>>   from commit a616bb9450.

>>

>> * Added a comment to "Zero-initialize linux note sections"

>>

>> * Adapted all the four main patches that enable the registers

>>   (PPR/DSCR, TAR, EBB/PMU and HTM) to account for the changes from

>>   commit a616bb9450.

>>

>> * De-duplicated testcase names.  Changed a few of the test names so

>>   that they are environment-independent.  Fixed a few other minor

>>   issues with the testcases.

>>

>> * Changed one of the testcases for the HTM registers so that it

>>   XFAILs.  This testcase occasionally failed, possibly due to a kernel

>>   bug.

>>

>> * Fixed some of the formatting and const-correctness in "[PowerPC] Add

>>   support for HTM registers", in gdbserver/linux-ppc-low.c.

>>

>> * Added an item in the NEWS file on the last commit, indicating all

>>   the newly supported registers from this series.

> 

> Considering Ulrich had already approved the V2 patches, do these changes

> need to be re-approved, or can they be considered as obvious, and can I

> commit them?

> 


I was reading through the series as you sent this.  I sent a couple
comments to patches #12 and #14.  The remarks in #12 is something that can
always be addressed with this series already merged.  Re. the comments for #14,
it would be nice to go over the series and add missing intro comments to
functions, etc.  Otherwise, it all LGTM.  I only really skimmed
it for mechanics, since as you say Ulrich already reviewed it, and I'm
far from a Power expert anyway.

> I don't know if a NEWS item counts as obvious, but if not, I can submit

> it in a separate patch.


It's usually reviewed like other patches.  gdb/NEWS falls under
Eli's documentation maintainership.

Thanks,
Pedro Alves
Pedro Franco de Carvalho Aug. 16, 2018, 5:41 p.m. | #3
Pedro Alves <palves@redhat.com> writes:

> I was reading through the series as you sent this.  I sent a couple

> comments to patches #12 and #14.  The remarks in #12 is something that can

> always be addressed with this series already merged.  Re. the comments for #14,

> it would be nice to go over the series and add missing intro comments to

> functions, etc.  Otherwise, it all LGTM.  I only really skimmed

> it for mechanics, since as you say Ulrich already reviewed it, and I'm

> far from a Power expert anyway.


Thanks a lot going through these!  I will add comments before
commiting.

>> I don't know if a NEWS item counts as obvious, but if not, I can submit

>> it in a separate patch.

>

> It's usually reviewed like other patches.  gdb/NEWS falls under

> Eli's documentation maintainership.


Ok, I'll submit it separately so that Eli can have a look at it.

--
Pedro Franco de Carvalho
Eli Zaretskii Aug. 16, 2018, 6:01 p.m. | #4
> From: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>

> Cc: uweigand@de.ibm.com, edjunior@gmail.com

> Date: Thu, 16 Aug 2018 14:41:51 -0300

> 

> > It's usually reviewed like other patches.  gdb/NEWS falls under

> > Eli's documentation maintainership.

> 

> Ok, I'll submit it separately so that Eli can have a look at it.


Didn't I review this already in some previous version?  I thought I
did.
Pedro Franco de Carvalho Aug. 16, 2018, 6:08 p.m. | #5
Eli Zaretskii <eliz@gnu.org> writes:

> Didn't I review this already in some previous version?  I thought I

> did.


You reviewed the documentation changes describing the new tdesc
features, which haven't changed.  The NEWS item only appeared in this
version.

It's in patch 12/12, but here's a copy of the relevant diff portion:

diff --git a/gdb/NEWS b/gdb/NEWS
index 16d3d72589..04be95bd2f 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,10 @@

 *** Changes since GDB 8.2

+* GDB and GDBserver now support access to additional registers on
+  PowerPC GNU/Linux targets: PPR, DSCR, TAR, EBB/PMU registers, and
+  HTM registers.
+
 * GDB and GDBserver now support IPv6 connections.  IPv6 addresses
   can be passed using the '[ADDRESS]:PORT' notation, or the regular
   'ADDRESS:PORT' method.

--
Pedro Franco de Carvalho
Eli Zaretskii Aug. 16, 2018, 6:44 p.m. | #6
> From: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>

> Cc: palves@redhat.com, gdb-patches@sourceware.org, uweigand@de.ibm.com,

>         edjunior@gmail.com

> Date: Thu, 16 Aug 2018 15:08:06 -0300

> 

> diff --git a/gdb/NEWS b/gdb/NEWS

> index 16d3d72589..04be95bd2f 100644

> --- a/gdb/NEWS

> +++ b/gdb/NEWS

> @@ -3,6 +3,10 @@

> 

>  *** Changes since GDB 8.2

> 

> +* GDB and GDBserver now support access to additional registers on

> +  PowerPC GNU/Linux targets: PPR, DSCR, TAR, EBB/PMU registers, and

> +  HTM registers.

> +

>  * GDB and GDBserver now support IPv6 connections.  IPv6 addresses

>    can be passed using the '[ADDRESS]:PORT' notation, or the regular

>    'ADDRESS:PORT' method.


This is OK, thanks.
Pedro Franco de Carvalho Aug. 16, 2018, 7:23 p.m. | #7
Eli Zaretskii <eliz@gnu.org> writes:

> This is OK, thanks.


Thank you!
Jan Kratochvil Oct. 8, 2018, 7:09 p.m. | #8
On Thu, 16 Aug 2018 19:00:19 +0200, Pedro Alves wrote:
> I was reading through the series as you sent this.  I sent a couple

> comments to patches #12 and #14.  The remarks in #12 is something that can

> always be addressed with this series already merged.  Re. the comments for #14,

> it would be nice to go over the series and add missing intro comments to

> functions, etc.  Otherwise, it all LGTM.


Is this the only reason why this patch series hasn't been checked in yet?


Jan
Pedro Franco de Carvalho Oct. 8, 2018, 7:32 p.m. | #9
Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> On Thu, 16 Aug 2018 19:00:19 +0200, Pedro Alves wrote:

>> I was reading through the series as you sent this.  I sent a couple

>> comments to patches #12 and #14.  The remarks in #12 is something that can

>> always be addressed with this series already merged.  Re. the comments for #14,

>> it would be nice to go over the series and add missing intro comments to

>> functions, etc.  Otherwise, it all LGTM.

>

> Is this the only reason why this patch series hasn't been checked in yet?


There was some further discussion after that comment about #12.  There
are some differences in one of the note sections generated by the kernel
for a core file and the one generated by GDB.  I'm working on resolving
this, sorry for the delay!

--
Pedro Franco de Carvalho