Page MenuHomeFreeBSD

DTrace: fix reading a 64-bits register on amd64
ClosedPublic

Authored by oshogbo on May 22 2019, 7:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 22, 2:49 AM
Unknown Object (File)
Apr 30 2025, 3:36 PM
Unknown Object (File)
Apr 20 2025, 3:04 PM
Unknown Object (File)
Mar 22 2025, 7:16 AM
Unknown Object (File)
Feb 21 2025, 11:03 AM
Unknown Object (File)
Feb 21 2025, 6:01 AM
Unknown Object (File)
Feb 19 2025, 10:30 PM
Unknown Object (File)
Jan 18 2025, 2:23 AM
Subscribers

Details

Summary

The registers in ilumos and FreeBSD have a different number.
In the illumos, last 32-bits register defined is SS an in FreeBSD is GS.
This off-by-one caused the uregs array to returns the wrong 64-bits register
on amd64.

Diff Detail

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

Event Timeline

markj added inline comments.
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
519 ↗(On Diff #57718)

I wouldn't bother with the comment in such a small block.

This revision is now accepted and ready to land.May 22 2019, 9:10 PM
This revision was automatically updated to reflect the committed changes.