public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Add SVE support for Aarch64 GDB
@ 2018-05-11 10:53 Alan Hayward
  2018-05-11 10:53 ` [PATCH 1/8] Add Aarch64 SVE target description Alan Hayward
                   ` (8 more replies)
  0 siblings, 9 replies; 47+ messages in thread
From: Alan Hayward @ 2018-05-11 10:53 UTC (permalink / raw)
  To: gdb-patches; +Cc: nd, Alan Hayward

This set of patches adds gdb support for SVE on AArch64.

SVE is the new vector extension for Aarch64. SVE is different in that the
length of a vector register is not fixed - it is can vary for different
hardware implementors. All code compiled for SVE is vector length agnostic.
The Linux kernel can then further restrict the vector length up to the
supported maximum for the hardware. Potentially different process and
threads can have different vector lengths, and they could change at any
time. However, in practice, we expect the vector length to remain constant
across the lifetime of a process.
This set of patches assumes the vector length will not change and either
warns once (when reading registers) or errors (when writing registers) if the
vector length has changed. A future set of patches will offer full support.

This series does not support gdbserver. However, where it makes sense I have
commonised as much code as possible and have added the groundwork in
gdbserver. Enabling gdbserver should be a small set of additional patches.

Core files and watchpoints are not yet supported.

The vector length is read from ptrace and is required to create the target
description for the running process. There is no hardcoded SVE XML.

The patches require recent linux header files for all the SVE ptrace macros.
To allow builds for older headers, I've added all required macros and
structures within ifdef checks. I'm not sure if this is the ideal solution.
When including kernel header code, I've not performed any reformatting (ie
they are not in GNU style).

One of the later patches adds functions to gdbserver regcache so that I can
add common functionality that works on gdb and gdbserver.

Given there are no working SVE systems available today, this was manually
tested on an Aarch64 SVE emulator running Ubuntu. In addition I've run make
check on X86 and Aarch64 builds for both unix and native-gdbserver.


Alan.

Alan Hayward (8):
  Add Aarch64 SVE target description
  Function for reading the Aarch64 SVE vector length.
  Add SVE register defines
  Enable SVE for GDB
  Add aarch64 psuedo help functions
  Aarch64 SVE pseudo register support
  Add methods to gdbserver regcache and raw_compare
  Ptrace support for Aarch64 SVE

 gdb/Makefile.in                     |   1 +
 gdb/aarch64-linux-nat.c             |  60 +++++-
 gdb/aarch64-linux-tdep.c            |   5 +-
 gdb/aarch64-tdep.c                  | 402 +++++++++++++++++++++++-------------
 gdb/aarch64-tdep.h                  |  12 +-
 gdb/arch/aarch64.c                  |  12 +-
 gdb/arch/aarch64.h                  |  37 +++-
 gdb/configure.nat                   |   2 +-
 gdb/doc/gdb.texinfo                 |   4 +
 gdb/features/aarch64-sve.c          | 158 ++++++++++++++
 gdb/gdbserver/Makefile.in           |   1 +
 gdb/gdbserver/configure.srv         |   1 +
 gdb/gdbserver/linux-aarch64-tdesc.c |   3 +-
 gdb/gdbserver/regcache.c            |  55 ++++-
 gdb/gdbserver/regcache.h            |   8 +
 gdb/nat/aarch64-sve-linux-ptrace.c  | 315 ++++++++++++++++++++++++++++
 gdb/nat/aarch64-sve-linux-ptrace.h  | 193 +++++++++++++++++
 gdb/regcache.c                      |  17 ++
 gdb/regcache.h                      |   2 +
 19 files changed, 1122 insertions(+), 166 deletions(-)
 create mode 100644 gdb/features/aarch64-sve.c
 create mode 100644 gdb/nat/aarch64-sve-linux-ptrace.c
 create mode 100644 gdb/nat/aarch64-sve-linux-ptrace.h

-- 
2.15.1 (Apple Git-101)

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2018-06-06 21:36 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 10:53 [PATCH 0/8] Add SVE support for Aarch64 GDB Alan Hayward
2018-05-11 10:53 ` [PATCH 1/8] Add Aarch64 SVE target description Alan Hayward
2018-05-11 14:56   ` Eli Zaretskii
2018-05-11 16:46     ` Alan Hayward
2018-05-31 11:56   ` Simon Marchi
2018-05-31 14:12     ` Alan Hayward
2018-05-11 10:53 ` [PATCH 6/8] Aarch64 SVE pseudo register support Alan Hayward
2018-05-31 13:26   ` Simon Marchi
2018-06-04 13:29     ` Alan Hayward
2018-05-31 14:59   ` Pedro Alves
2018-05-11 10:53 ` [PATCH 8/8] Ptrace support for Aarch64 SVE Alan Hayward
2018-05-31 13:40   ` Simon Marchi
2018-05-31 14:56     ` Alan Hayward
2018-06-01 15:17       ` Simon Marchi
2018-06-04 15:49         ` Alan Hayward
2018-05-31 20:17   ` Simon Marchi
2018-05-11 10:53 ` [PATCH 7/8] Add methods to gdbserver regcache and raw_compare Alan Hayward
2018-05-31 14:57   ` Pedro Alves
2018-05-11 10:53 ` [PATCH 4/8] Enable SVE for GDB Alan Hayward
2018-05-31 12:22   ` Simon Marchi
2018-06-04 11:19     ` Alan Hayward
2018-05-31 14:58   ` Pedro Alves
2018-05-31 16:13   ` Pedro Alves
2018-05-31 16:20     ` Alan Hayward
2018-05-31 16:27       ` Pedro Alves
2018-05-31 18:06         ` Alan Hayward
2018-05-11 10:53 ` [PATCH 2/8] Function for reading the Aarch64 SVE vector length Alan Hayward
2018-05-31 12:06   ` Simon Marchi
2018-05-31 14:18     ` Alan Hayward
2018-05-31 14:57   ` Pedro Alves
2018-06-05 20:01   ` Sergio Durigan Junior
2018-06-05 22:06     ` [PATCH] Guard declarations of 'sve_*_from_*' macros on Aarch64 (and unbreak build) Sergio Durigan Junior
2018-06-05 23:37       ` Sergio Durigan Junior
2018-06-06  7:34       ` Alan Hayward
2018-06-06 21:19         ` Simon Marchi
2018-06-06 21:36         ` Sergio Durigan Junior
2018-05-11 11:52 ` [PATCH 5/8] Add aarch64 psuedo help functions Alan Hayward
2018-05-31 13:22   ` Simon Marchi
2018-05-31 15:20     ` Pedro Alves
2018-06-04 13:13     ` Alan Hayward
2018-05-11 12:12 ` [PATCH 3/8] Add SVE register defines Alan Hayward
2018-06-01  8:33   ` Alan Hayward
2018-06-01 15:18     ` Simon Marchi
2018-05-22 11:00 ` [PATCH 0/8] Add SVE support for Aarch64 GDB Alan Hayward
2018-05-29 12:09   ` [PING 2][PATCH " Alan Hayward
2018-05-29 14:35     ` Omair Javaid
2018-05-29 14:59       ` Alan Hayward

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).