chore(gentype): ctypedef 检查加 attr 读取断点,对比构造与读取地址

This commit is contained in:
TermiNexus committed 2026-08-18 09:25:36 +08:00
1 parent 7a7c3939db
commit 7178d169e3
1 file changed
+1
+1
View File
@@ -142,6 +142,7 @@ class TypeGenCType(TypeGenBase.TypeGenBase):
# TypeGenCType 直接访问 at.attr 可能按 stub 类型生成错误 GEP,
# 读垃圾地址 → strcmp 0xC0000005 崩溃,stdint.vp 根因)。
at_attr_v: str = ast.attribute_get_attr(at)
stdio.printf("[DIAG] ctypedef 检查: attr=%llu\n", t.CUInt64T(at_attr_v))
if at_attr_v is None:
return 0
if string.strcmp(at_attr_v, "CTypedef") != 0: