Page MenuHomeFreeBSD

Implement single stepping on arm64
ClosedPublic

Authored by andrew on Dec 29 2015, 9:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 21 2024, 11:31 PM
Unknown Object (File)
Sep 24 2024, 9:20 AM
Unknown Object (File)
Sep 24 2024, 4:29 AM
Unknown Object (File)
Sep 23 2024, 2:01 PM
Unknown Object (File)
Sep 16 2024, 7:04 AM
Unknown Object (File)
Sep 16 2024, 7:04 AM
Unknown Object (File)
Sep 16 2024, 7:04 AM
Unknown Object (File)
Sep 16 2024, 7:04 AM
Subscribers

Details

Summary

Implement single stepping on arm64 by setting the single step bits on the processor and debug state registers. We set mdscr on each context switch, this should be replaced by a flag to mark when this bit needs to be set.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Implement single stepping on arm64.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: kib, arm64.
andrew set the repository for this revision to rS FreeBSD src repository - subversion.
andrew added a subscriber: emaste.

Move to a flag to mark when to enable single stepping in mdscr_el1

sys/arm64/arm64/swtch.S
72 ↗(On Diff #11816)

I didn't mean to update this comment, it was part of a previous iteration & will be reverted.

kib edited edge metadata.

The implementation looks fine WRT to my limited amount of understanding of the spec.

My real questions are about the specification:

  1. Why is the single-stepping state is recorded in the global CPU (PE) control register instead of the context-switched registers, e.g. cpsr/spsr ? We have to add special register accesses to context switch.
  2. What does the PSTATE.SS bit designates ? Or rather, what is supposed the OS to do differently when exception handler is entered and sprs.ss == 0 or 1 ?
This revision is now accepted and ready to land.Dec 31 2015, 5:34 PM
This revision was automatically updated to reflect the committed changes.