From ec48b315d31f7339d80c6c3339e19253b43ea364 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 26 Aug 2026 23:45:13 +0800 Subject: [PATCH] =?UTF-8?q?debug(structgen):=20add=5Ffield=20=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E6=AF=8F=E5=AD=97=E6=AE=B5=E5=90=8D+=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=EF=BC=8C=E7=A1=AE=E8=AE=A4=20Thread.arg=20=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=BC=8F=E6=B3=A8=E5=86=8C=E6=88=96=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D=E6=82=AC=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/lib/core/Gen/StructGenMixin.vp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/App/lib/core/Gen/StructGenMixin.vp b/App/lib/core/Gen/StructGenMixin.vp index 73b6d07..d76d16e 100644 --- a/App/lib/core/Gen/StructGenMixin.vp +++ b/App/lib/core/Gen/StructGenMixin.vp @@ -346,6 +346,12 @@ class StructGenMixin: fe.DefaultVal = default_val struct_entry.FieldCount = idx + 1 + # [ADF-DIAG] 确认字段表实际注册内容(定位 Thread.arg 缺失/索引错位) + dbg_adf: str = fname_pool.alloc(192) + if dbg_adf is not None: + viperlib.snprintf(dbg_adf, 192, "[ADF] struct=%s field=%s idx=%d\n", + struct_entry.Name, field_name, idx) + stdio.printf("%s", dbg_adf) return idx def _deep_copy_default_ast(self, pool: memhub.MemBuddy | t.CPtr,