Page MenuHomeFreeBSD

x86: Add a NT_X86_SEGBASES register set.
ClosedPublic

Authored by jhb on Mar 24 2022, 12:05 AM.
Tags
None
Referenced Files
F154085223: D34650.diff
Sun, Apr 26, 1:25 AM
Unknown Object (File)
Sat, Apr 25, 2:23 AM
Unknown Object (File)
Sat, Apr 25, 2:22 AM
Unknown Object (File)
Fri, Apr 24, 11:44 PM
Unknown Object (File)
Fri, Apr 24, 10:36 AM
Unknown Object (File)
Fri, Apr 24, 8:30 AM
Unknown Object (File)
Thu, Apr 23, 7:11 AM
Unknown Object (File)
Sun, Apr 19, 10:54 AM
Subscribers

Details

Summary

This register set contains the values of the fsbase and gsbase
registers. Note that these registers can already be controlled
individually via ptrace(2) via MD operations, so the main reason for
adding this is to include these register values in core dumps. In
particular this will enable looking up the value of TLS variables from
core dumps in gdb.

The value of NT_X86_SEGBASES was chosen to match the value of
NT_386_TLS on Linux. The notes serve similar purposes, but FreeBSD
will never dump a note equivalent to NT_386_TLS (which dumps a single
segment descriptor rather than a pair of addresses) and picking a
currently-unused value in the NT_X86_* range could result in a future
conflict.

Diff Detail

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