Page MenuHomeFreeBSD

Raise a proper SIGTRAP / TRAP_TRACE signal for a PT_STEP step on arm.
ClosedPublic

Authored by jhb on Jul 2 2018, 5:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 29, 4:20 AM
Unknown Object (File)
Fri, Sep 26, 4:37 PM
Unknown Object (File)
Thu, Sep 25, 4:56 PM
Unknown Object (File)
Thu, Sep 25, 12:05 PM
Unknown Object (File)
Mon, Sep 22, 11:09 PM
Unknown Object (File)
Thu, Sep 18, 1:49 AM
Unknown Object (File)
Tue, Sep 16, 3:05 PM
Unknown Object (File)
Sep 1 2025, 8:33 PM
Subscribers

Details

Summary

Previously, a step by PT_STEP resulted in no signal being raised to
the debugger so that a step was silently completed with the program
continuing to execute after the step. Fix by raising a SIGTRAP
signal with TRAP_TRACE as the signal code.

To simplify the error handling cases (if ptrace_clear_single_step()
fails, etc.) move the handling of PTRACE_BREAKPOINT into the
gdb_trapper() function. If ptrace_clear_single_step() fails,
gdb_trapper() won't claim the fault, and the default case of
SIGILL / ILL_OPC will be used.

Test Plan
  • Run the ptrace_test kyua tests on arm. Previously the tests using PT_STEP would fail, now all tests pass.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17793
Build 17571: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jul 25 2018, 6:11 PM
This revision was automatically updated to reflect the committed changes.