Skip to content

Commit 2b8e294

Browse files
Jyri Sarhakv2019i
authored andcommitted
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: 2451522 ("tools: debug_stream: set explicit ctypes layout") Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent ae545eb commit 2b8e294

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tools/debug_stream/debug_stream.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class CPUInfo(ctypes.Structure):
5252
"""
5353

5454
_pack_ = 1
55-
_layout_ = "gcc-sysv"
55+
_layout_ = "ms"
5656
_fields_ = [
5757
("hdr", DebugStreamRecord),
5858
("load", ctypes.c_ubyte),
@@ -66,7 +66,7 @@ class ThreadInfo(ctypes.Structure):
6666
"""
6767

6868
_pack_ = 1
69-
_layout_ = "gcc-sysv"
69+
_layout_ = "ms"
7070
_fields_ = [
7171
("stack_usage", ctypes.c_ubyte),
7272
("cpu_load", ctypes.c_ubyte),
@@ -80,7 +80,7 @@ class TextMsg(ctypes.Structure):
8080
"""
8181

8282
_pack_ = 1
83-
_layout_ = "gcc-sysv"
83+
_layout_ = "ms"
8484
_fields_ = [
8585
("hdr", DebugStreamRecord),
8686
]

0 commit comments

Comments
 (0)