]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 332906,332907,332976,333679,336053: Expand testing of breakpoints.
authorjhb <jhb@FreeBSD.org>
Thu, 6 Sep 2018 22:23:39 +0000 (22:23 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 6 Sep 2018 22:23:39 +0000 (22:23 +0000)
commit459c4ec68e8f266bcd15fac9a5d8619b277560b1
treea05757094399e582d13007dceac0ee224313663b
parentb749b761e26fb408aca26d34d8a3e190445be58a
MFC 332906,332907,332976,333679,336053: Expand testing of breakpoints.

332906:
Extend support for ptrace() tests using breakpoints.

- Use a single list of platforms to define HAVE_BREAKPOINT for platforms
  that expose a functional breakpoint() inline to userland.  Replace
  existing lists of platform tests with HAVE_BREAKPOINT instead.
- Add support for advancing PC past a breakpoint inserted via breakpoint()
  to support the existing ptrace__PT_CONTINUE_different_thread test on
  non-x86 platforms (x86 advances the PC past the breakpoint instruction,
  but other platforms do not).  This is implemented by defining a new
  SKIP_BREAK macro which accepts a pointer to a 'struct reg' as its sole
  argument and modifies the contents to advance the PC.  The intention is
  to use it in between PT_GETREGS and PT_SETREGS.

332907:
Expose breakpoint() to userland from <machine/cpufunc.h> on MIPS.

Enable ptrace() tests using breakpoint on MIPS as well.

332976:
Shorten some recently-added lines that are an extra indent over 80 columns.

333679:
Export a breakpoint() function to userland for riscv.

As a result, enable tests using breakpoint() on riscv.

336053:
Export a breakpoint() function to userland for arm and arm64.

Enable ptrace() tests using breakpoint() on these architectures.
sys/arm/include/cpufunc.h
sys/arm64/include/cpufunc.h
sys/mips/include/cpufunc.h
sys/riscv/include/cpufunc.h
tests/sys/kern/ptrace_test.c