Page MenuHomeFreeBSD

D55189.1793854336.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D55189.1793854336.diff

diff --git a/sys/arm/include/frame.h b/sys/arm/include/frame.h
--- a/sys/arm/include/frame.h
+++ b/sys/arm/include/frame.h
@@ -56,8 +56,11 @@
/*
* Trap frame. Pushed onto the kernel stack on a trap (synchronous exception).
+ *
+ * struct trapframe is known to and used by kernel debuggers. Its layout must
+ * be kept stable. When adding extra fields that are accessed by kernel
+ * debuggers, debuggers should be backward compatible by using osreldate.
*/
-
struct trapframe {
register_t tf_spsr;
register_t tf_r0;
diff --git a/sys/arm64/include/frame.h b/sys/arm64/include/frame.h
--- a/sys/arm64/include/frame.h
+++ b/sys/arm64/include/frame.h
@@ -42,6 +42,10 @@
/*
* NOTE: keep this structure in sync with struct reg and struct mcontext.
+ *
+ * struct trapframe is known to and used by kernel debuggers. Its layout must
+ * be kept stable. When adding extra fields that are accessed by kernel
+ * debuggers, debuggers should be backward compatible by using osreldate.
*/
struct trapframe {
uint64_t tf_sp;
diff --git a/sys/powerpc/include/frame.h b/sys/powerpc/include/frame.h
--- a/sys/powerpc/include/frame.h
+++ b/sys/powerpc/include/frame.h
@@ -48,6 +48,12 @@
*
* Change ordering to cluster together these register_t's. XXX
*/
+
+/*
+ * struct trapframe is known to and used by kernel debuggers. Its layout must
+ * be kept stable. When adding extra fields that are accessed by kernel
+ * debuggers, debuggers should be backward compatible by using osreldate.
+ */
struct trapframe {
register_t fixreg[32];
register_t lr;
diff --git a/sys/riscv/include/frame.h b/sys/riscv/include/frame.h
--- a/sys/riscv/include/frame.h
+++ b/sys/riscv/include/frame.h
@@ -42,6 +42,10 @@
/*
* NOTE: keep this structure in sync with struct reg and struct mcontext.
+ *
+ * struct trapframe is known to and used by kernel debuggers. Its layout must
+ * be kept stable. When adding extra fields that are accessed by kernel
+ * debuggers, debuggers should be backward compatible by using osreldate.
*/
struct trapframe {
uint64_t tf_ra;
diff --git a/sys/x86/include/frame.h b/sys/x86/include/frame.h
--- a/sys/x86/include/frame.h
+++ b/sys/x86/include/frame.h
@@ -43,8 +43,11 @@
#ifdef __i386__
/*
* Exception/Trap Stack Frame
+ *
+ * struct trapframe is known to and used by kernel debuggers. Its layout must
+ * be kept stable. When adding extra fields that are accessed by kernel
+ * debuggers, debuggers should be backward compatible by using osreldate.
*/
-
struct trapframe {
int tf_fs;
int tf_es;
@@ -114,8 +117,11 @@
*
* The ordering of this is specifically so that we can take first 6
* the syscall arguments directly from the beginning of the frame.
+ *
+ * struct trapframe is known to and used by kernel debuggers. Its layout must
+ * be kept stable. When adding extra fields that are accessed by kernel
+ * debuggers, debuggers should be backward compatible by using osreldate.
*/
-
struct trapframe {
register_t tf_rdi;
register_t tf_rsi;

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 5, 4:52 AM (5 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41457523
Default Alt Text
D55189.1793854336.diff (2 KB)

Event Timeline