From babf26b4507a226bdfb9985ebf79f1c62eaac481 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Thu, 8 Oct 2026 11:51:20 +0300 Subject: [PATCH] tools: debug_stream: set explicit ctypes layout to "ms" Setting the ctype to most logical choice was not correct. Python, both 3.12 and 3.14, have a 'feature' that a packed ctype struct forces layout to "ms". 3.12 did this silently, but 3.14 gives a warning if the layout is not explicitly set, and an error if its set to something else than "ms", in packed structs. Fixes: 24515224047f ("tools: debug_stream: set explicit ctypes layout") Signed-off-by: Jyri Sarha --- tools/debug_stream/debug_stream.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/debug_stream/debug_stream.py b/tools/debug_stream/debug_stream.py index 03c641efebe5..40e410ac7ab5 100644 --- a/tools/debug_stream/debug_stream.py +++ b/tools/debug_stream/debug_stream.py @@ -52,7 +52,7 @@ class CPUInfo(ctypes.Structure): """ _pack_ = 1 - _layout_ = "gcc-sysv" + _layout_ = "ms" _fields_ = [ ("hdr", DebugStreamRecord), ("load", ctypes.c_ubyte), @@ -66,7 +66,7 @@ class ThreadInfo(ctypes.Structure): """ _pack_ = 1 - _layout_ = "gcc-sysv" + _layout_ = "ms" _fields_ = [ ("stack_usage", ctypes.c_ubyte), ("cpu_load", ctypes.c_ubyte), @@ -80,7 +80,7 @@ class TextMsg(ctypes.Structure): """ _pack_ = 1 - _layout_ = "gcc-sysv" + _layout_ = "ms" _fields_ = [ ("hdr", DebugStreamRecord), ]