Triggering an EL0 watchpoint generates SIGTRAP after this patch.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/arm64/arm64/trap.c | ||
---|---|---|
539 | I'm not sure here and I can't figure out the abstractions in Linux code but on Linux I'm getting a SIGTRAP with si_addr pointing to the watched memory rather than the instruction, and LLDB uses that to identify which watchpoint was hit. Do you have any suggestion if I can determine that any other way? |
sys/arm64/arm64/trap.c | ||
---|---|---|
539 | Hmm. Returning the watched address in si_addr does seem more useful. I don't think there is any other simple way to determine which watchpoint triggered the exception, so we can probably switch over to this. My only reservation is that FreeBSD/amd64 does not appear to behave this way, and it returns the trapping instruction address in si_addr. |
sys/arm64/arm64/trap.c | ||
---|---|---|
539 | Indeed it doesn't. We are working around that by checking DR7 directly. |
Pass the value of the Fault Address Register to si_addr. This contains the address that triggered the watchpoint.
share/man/man3/siginfo.3 | ||
---|---|---|
221–224 | I'm not sure I would keep the arm64 sentence as we don't document the MD behaviors for other signals here but instead just use "may" to indicate it can vary. |