]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
nat: Split out platform-independent aarch64 debug register support.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 22 Mar 2022 19:05:43 +0000 (12:05 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 22 Mar 2022 19:05:43 +0000 (12:05 -0700)
commit4bd817e71eefd659f51ec75bfb13109c486e8311
treed7a767fcc3fff651237b5c29eea74588cb3c1ad8
parent041a4212d37de6172b3428613c9f9f52ab950c6c
nat: Split out platform-independent aarch64 debug register support.

Move non-Linux-specific support for hardware break/watchpoints from
nat/aarch64-linux-hw-point.c to nat/aarch64-hw-point.c.  Changes
beyond a simple split of the code are:

- aarch64_linux_region_ok_for_watchpoint and
  aarch64_linux_any_set_debug_regs_state renamed to drop linux_ as
  they are not platform specific.

- Platforms must implement the aarch64_notify_debug_reg_change
  function which is invoked from the platform-independent code when a
  debug register changes for a given debug register state.  This does
  not use the indirection of a 'low' structure as is done for x86.

- The handling for kernel_supports_any_contiguous_range is not
  pristine.  For non-Linux it is simply defined to true.  Some uses of
  this could perhaps be implemented as new 'low' routines for the
  various places that check it instead?

- Pass down ptid into aarch64_handle_breakpoint and
  aarch64_handle_watchpoint rather than using current_lwp_ptid which
  is only defined on Linux.  In addition, pass the ptid on to
  aarch64_notify_debug_reg_change instead of the unused state
  argument.
gdb/aarch64-linux-nat.c
gdb/configure.nat
gdb/nat/aarch64-hw-point.c [new file with mode: 0644]
gdb/nat/aarch64-hw-point.h [new file with mode: 0644]
gdb/nat/aarch64-linux-hw-point.c
gdb/nat/aarch64-linux-hw-point.h
gdb/nat/aarch64-linux.c
gdbserver/configure.srv
gdbserver/linux-aarch64-low.cc