debug(_withcontent): find 诊断增强(names[i] 地址/内容 + strcmp 对比)
第一轮诊断显示 TLS/栈/top 全正常但 strcmp 未命中,增强 find 循环内 打印 names[i] 指针与 %s 内容,直接观察 push 存的字段字符串是否损坏。
This commit is contained in:
1 parent
dc9a2848c1
commit
5f6dd8615a
1 file changed
+2
@@ -73,6 +73,8 @@ def _find_provider(field_name: str) -> t.CPtr:
|
||||
stack: _ProviderStack | t.CPtr = _get_stack()
|
||||
stdio.printf("[wdbg] find field=%s top=%lu\n", field_name, stack.top)
|
||||
for i in range(stack.top - 1, -1, -1):
|
||||
stdio.printf("[wdbg] find cmp i=%d names_ptr=%p names_str=%s field=%s\n",
|
||||
i, stack.names[i], (str)(stack.names[i]), field_name)
|
||||
# 字段名用 strcmp 内容比较:编译器对每次 create_global_string 生成
|
||||
# 独立的字符串常量(TPV 不去重),push/find 的指针地址不同,
|
||||
# 指针 == 永假会导致 provider 匹配失败(__mbuddy__ 注入不上)。
|
||||
|
||||
Reference in new issue
Block a user