summaryrefslogtreecommitdiffstats
path: root/sys/x86/include/ptrace.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-06-29 07:07:24 +0000
committerkib <kib@FreeBSD.org>2015-06-29 07:07:24 +0000
commit9b07cc4555d768bce899b392913d51e9a69734f8 (patch)
treef7e0f53bc3601b9dd920b75c3d7225a7e4c39c46 /sys/x86/include/ptrace.h
parentca9c7970de41dd642320b66ac3c906d289556762 (diff)
downloadFreeBSD-src-9b07cc4555d768bce899b392913d51e9a69734f8.zip
FreeBSD-src-9b07cc4555d768bce899b392913d51e9a69734f8.tar.gz
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
Diffstat (limited to 'sys/x86/include/ptrace.h')
-rw-r--r--sys/x86/include/ptrace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/x86/include/ptrace.h b/sys/x86/include/ptrace.h
index 16f9c62..40c7663 100644
--- a/sys/x86/include/ptrace.h
+++ b/sys/x86/include/ptrace.h
@@ -51,6 +51,10 @@
#define PT_GETXSTATE_INFO (PT_FIRSTMACH + 4)
#define PT_GETXSTATE (PT_FIRSTMACH + 5)
#define PT_SETXSTATE (PT_FIRSTMACH + 6)
+#define PT_GETFSBASE (PT_FIRSTMACH + 7)
+#define PT_SETFSBASE (PT_FIRSTMACH + 8)
+#define PT_GETGSBASE (PT_FIRSTMACH + 9)
+#define PT_SETGSBASE (PT_FIRSTMACH + 10)
/* Argument structure for PT_GETXSTATE_INFO. */
struct ptrace_xstate_info {
OpenPOWER on IntegriCloud