HomeFreeBSD

Extend support for ptrace() tests using breakpoints.

Description

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.

Tested on: amd64, i386, mips (after adding a breakpoint() to mips)
MFC after: 1 month

Details

Provenance
jhbAuthored on
Parents
rS332905: Use calloc() instead of malloc+bzero.
Branches
Unknown
Tags
Unknown