]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to
authorkib <kib@FreeBSD.org>
Mon, 29 Jun 2015 07:07:24 +0000 (07:07 +0000)
committerkib <kib@FreeBSD.org>
Mon, 29 Jun 2015 07:07:24 +0000 (07:07 +0000)
commit9b07cc4555d768bce899b392913d51e9a69734f8
treef7e0f53bc3601b9dd920b75c3d7225a7e4c39c46
parentca9c7970de41dd642320b66ac3c906d289556762
Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to
obtain the thread %fs and %gs bases.  Add x86 PT_SETFSBASE and
PT_SETGSBASE requests to set the bases from debuggers.  The set
requests, similarly to the sysarch({I386,AMD64}_SET_FSBASE),
override the corresponding segment registers.

The main purpose of the operations is to retrieve and modify the tcb
address for debuggee.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
sys/amd64/amd64/ptrace_machdep.c
sys/i386/i386/ptrace_machdep.c
sys/x86/include/ptrace.h