This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 00/17] GDB support for more powerpc registers on linux
- From: Pedro Franco de Carvalho <pedromfc at linux dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: uweigand at de dot ibm dot com, edjunior at gmail dot com
- Date: Fri, 13 Jul 2018 10:52:09 -0300
- Subject: [PATCH 00/17] GDB support for more powerpc registers on linux
This patch series implements access to additional powerpc registers on
linux targets.
The new register are:
* The Program Priority Register.
* The Data Stream Control Register, used for cache control.
* The Target Address Register.
* The Hardware Transactional Memory registers, which include both a
set of three special-purpose registers that control the HTM facility
and the set of checkpointed registers, a copy of most of the other
registers used as a snapshot to restore processor state in the event
of a transaction failure.
* The Event-Based Branch (EBB) facility and Performance Monitoring
Unit (PMU) registers.
The first four patches refactor some parts of the code affected by the
patches.
Each group of registers is then enabled with one patch for support in
the native and core file targets and one for gdbserver support. Some
also have patches for related record/replay support and tests.
PPR and DSCR did not appear in the architecture at the same
time, but for simplicity they are added in a common tdesc. They will
be separated when I change the powerpc linux targets to use flexible
tdescs in the future.
Adding the HTM checkpointed registers has nearly doubled the number of
registers which causes regressions because some internal buffer sizes
related to tracepoints are longer be sufficient. These are being
addressed in separate patches:
https://sourceware.org/ml/gdb-patches/2018-06/msg00501.html
That is V1 of the series that only addresses one of the regressions, I
will send a V2 that also addresses another related regression when
saving a trace file wiht -ctf.
This series also depends on binutils patch recently submitted that
enables writing and reading the core file note sections for these
register sets:
https://sourceware.org/ml/binutils/2018-07/msg00191.html
Much of the original work to implement access to these registers was
done by Edjunior when he was at IBM, so I have kept him as the author
in the patches he had worked on. I have made modifications to these
patches, so I have also added myself to the changelog entries for
these patches, in addition to Edjunior. Errors in these patches might
be my own.
Edjunior Barbosa Machado (5):
[PowerPC] Add support for PPR and DSCR
[PowerPC] Add gdbserver support for PPR and DSCR
[PowerPC] Add support for TAR
[PowerPC] Add support for HTM registers
[PowerPC] Add support for EBB and PMU registers
Pedro Franco de Carvalho (12):
[PowerPC] Simplify 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] Add record/replay support for PPR and DSCR
[PowerPC] Add tests for PPR and DSCR
[PowerPC] Add record/replay support for TAR
[PowerPC] Add gdbserver support for TAR
[PowerPC] Add tests for TAR
[PowerPC] Add gdbserver support for HTM registers
[PowerPC] Add tests for HTM registers
[PowerPC] Add gdbserver support for EBB and PMU registers
gdb/arch/ppc-linux-common.c | 30 +-
gdb/arch/ppc-linux-common.h | 20 +
gdb/arch/ppc-linux-tdesc.h | 6 +
gdb/features/Makefile | 11 +
gdb/features/rs6000/power-dscr.xml | 12 +
gdb/features/rs6000/power-ebb.xml | 14 +
gdb/features/rs6000/power-htm.xml | 174 +++++++
gdb/features/rs6000/power-pmu.xml | 16 +
gdb/features/rs6000/power-ppr.xml | 12 +
gdb/features/rs6000/power-tar.xml | 12 +
gdb/features/rs6000/power64-htm.xml | 174 +++++++
.../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 | 382 +++++++++++++++
gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml | 22 +
gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c | 382 +++++++++++++++
gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml | 22 +
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 | 21 +-
gdb/gdbserver/linux-ppc-ipa.c | 18 +
gdb/gdbserver/linux-ppc-low.c | 349 +++++++++++++
gdb/gdbserver/linux-ppc-tdesc-init.h | 21 +
gdb/nat/ppc-linux.h | 80 +++
gdb/ppc-linux-nat.c | 544 ++++++++++++++++++++-
gdb/ppc-linux-tdep.c | 412 +++++++++++++++-
gdb/ppc-linux-tdep.h | 29 ++
gdb/ppc-tdep.h | 81 +++
.../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/rs6000-tdep.c | 400 ++++++++++++++-
gdb/testsuite/gdb.arch/powerpc-htm-regs.c | 34 ++
gdb/testsuite/gdb.arch/powerpc-htm-regs.exp | 311 ++++++++++++
gdb/testsuite/gdb.arch/powerpc-ppr-dscr.c | 32 ++
gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp | 110 +++++
gdb/testsuite/gdb.arch/powerpc-tar.c | 33 ++
gdb/testsuite/gdb.arch/powerpc-tar.exp | 115 +++++
45 files changed, 5946 insertions(+), 35 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.xml
create mode 100644 gdb/features/rs6000/power-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.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