public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/12] FreeBSD/aarch64 hardware watchpoint support
@ 2022-03-01  0:24 John Baldwin
  2022-03-01  0:24 ` [RFC PATCH 01/12] Remove USE_SIGTRAP_SIGINFO condition for FreeBSD/x86 debug regs support John Baldwin
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: John Baldwin @ 2022-03-01  0:24 UTC (permalink / raw)
  To: gdb-patches

The purpose of this series is to add support for aarch64 hardware
breakpoints and watchpoints on FreeBSD.

The first five patches are a detour to fix some small issues in the
x86 debug register support based on things I saw while porting the
aarch64 support over to FreeBSD.

Patches 6 and 7 work on splitting out platform-independent aarch64
debug register support from the Linux-specific aarch64 code.

Patch 6 has an open question about how best to handle having a
platform-specific hook for when debug registers have been changed.
Right now we require the platform to supply the function that
nat/aarch64-hw-point.c calls.  I did not choose to create an
equivalent to x86_dr_low, but perhaps that sort of structure, or at
least a function pointer should be used instead?

There is also some messiness around the Linux-specific
kernel_supports_any_contiguous_range workaround in patch 6.

One big concern is that while I have tested this on FreeBSD/amd64 and
FreeBSD/aarch64, I don't have a way to test this on Linux Aarch64.

John Baldwin (12):
  Remove USE_SIGTRAP_SIGINFO condition for FreeBSD/x86 debug regs
    support.
  x86-nat: Use an unordered_map to store per-pid debug reg state.
  x86-nat: Add x86_lookup_debug_reg_state.
  Add an x86_fbsd_nat_target mixin class for FreeBSD x86 native targets.
  fbsd-nat: Add a low_new_fork virtual method.
  x86-fbsd-nat: Copy debug register state on fork.
  nat: Split out platform-independent aarch64 debug register support.
  aarch64: Add an aarch64_nat_target mixin class.
  fbsd-nat: Add helper routine to fetch siginfo_t for a ptid.
  fbsd-nat: Add a low_delete_thread virtual method.
  fbsd-nat: Add a low_prepare_to_resume virtual method.
  Add support for hardware breakpoints/watchpoints on FreeBSD/Aarch64.

 gdb/NEWS                         |   2 +
 gdb/aarch64-fbsd-nat.c           | 260 ++++++++++++-
 gdb/aarch64-linux-nat.c          | 333 +---------------
 gdb/aarch64-nat.c                | 311 +++++++++++++++
 gdb/aarch64-nat.h                | 110 ++++++
 gdb/amd64-fbsd-nat.c             |  20 +-
 gdb/configure.nat                |  12 +-
 gdb/fbsd-nat.c                   |  28 +-
 gdb/fbsd-nat.h                   |  18 +
 gdb/i386-fbsd-nat.c              |  20 +-
 gdb/nat/aarch64-hw-point.c       | 625 +++++++++++++++++++++++++++++++
 gdb/nat/aarch64-hw-point.h       | 127 +++++++
 gdb/nat/aarch64-linux-hw-point.c | 605 +-----------------------------
 gdb/nat/aarch64-linux-hw-point.h | 105 +-----
 gdb/nat/aarch64-linux.c          |   4 +-
 gdb/x86-fbsd-nat.c               |  45 +++
 gdb/x86-fbsd-nat.h               |  36 ++
 gdb/x86-nat.c                    | 108 ++----
 gdb/x86-nat.h                    |   5 +
 gdbserver/linux-aarch64-low.cc   |  13 +-
 20 files changed, 1634 insertions(+), 1153 deletions(-)
 create mode 100644 gdb/aarch64-nat.c
 create mode 100644 gdb/aarch64-nat.h
 create mode 100644 gdb/nat/aarch64-hw-point.c
 create mode 100644 gdb/nat/aarch64-hw-point.h
 create mode 100644 gdb/x86-fbsd-nat.c
 create mode 100644 gdb/x86-fbsd-nat.h

-- 
2.34.1


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

end of thread, other threads:[~2022-03-05  0:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01  0:24 [RFC PATCH 00/12] FreeBSD/aarch64 hardware watchpoint support John Baldwin
2022-03-01  0:24 ` [RFC PATCH 01/12] Remove USE_SIGTRAP_SIGINFO condition for FreeBSD/x86 debug regs support John Baldwin
2022-03-01  0:24 ` [RFC PATCH 02/12] x86-nat: Use an unordered_map to store per-pid debug reg state John Baldwin
2022-03-03 19:20   ` Pedro Alves
2022-03-04  1:06     ` John Baldwin
2022-03-01  0:24 ` [RFC PATCH 03/12] x86-nat: Add x86_lookup_debug_reg_state John Baldwin
2022-03-01  0:24 ` [RFC PATCH 04/12] Add an x86_fbsd_nat_target mixin class for FreeBSD x86 native targets John Baldwin
2022-03-01  0:24 ` [RFC PATCH 05/12] fbsd-nat: Add a low_new_fork virtual method John Baldwin
2022-03-01  0:24 ` [RFC PATCH 06/12] x86-fbsd-nat: Copy debug register state on fork John Baldwin
2022-03-01  0:24 ` [RFC PATCH 07/12] nat: Split out platform-independent aarch64 debug register support John Baldwin
2022-03-03 19:26   ` Pedro Alves
2022-03-05  0:06     ` John Baldwin
2022-03-01  0:24 ` [RFC PATCH 08/12] aarch64: Add an aarch64_nat_target mixin class John Baldwin
2022-03-01  0:24 ` [RFC PATCH 09/12] fbsd-nat: Add helper routine to fetch siginfo_t for a ptid John Baldwin
2022-03-01  0:24 ` [RFC PATCH 10/12] fbsd-nat: Add a low_delete_thread virtual method John Baldwin
2022-03-01  0:24 ` [RFC PATCH 11/12] fbsd-nat: Add a low_prepare_to_resume " John Baldwin
2022-03-01  0:24 ` [RFC PATCH 12/12] Add support for hardware breakpoints/watchpoints on FreeBSD/Aarch64 John Baldwin
2022-03-01  3:35   ` Eli Zaretskii

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).