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)
Dec 20 2023, 1:11 AM
Unknown Object (File)
Oct 17 2023, 3:51 AM
Unknown Object (File)
May 11 2023, 2:56 PM
Unknown Object (File)
Feb 22 2023, 8:29 PM
Unknown Object (File)
Jan 26 2023, 3:25 PM
Unknown Object (File)
Jan 26 2023, 6:45 AM
Unknown Object (File)
Jan 12 2023, 6:55 AM
Unknown Object (File)
Dec 12 2022, 11:44 AM
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 Not Applicable
Unit
Tests Not Applicable

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.