Windbg嵌入了xp,ntdll.dll符号失败,其他符号受到影响?

时间:2010-08-30 21:58:57

标签: debugging windows-xp windbg windows-xp-embedded

我正在使用带有xp嵌入式的windbg。尝试获取操作系统符号失败,并显示消息“无法找到符号文件。默认导出ntdll.dll的符号”。 (这对xp嵌入是典型的吗?)

找到并加载我自己的代码的符号和源代码没有问题。然而,逐步执行代码表明代码与符号文件之间存在严重的不匹配,因为dv返回的内存中变量的位置似乎与实际内存内容不一致(例如,分配变量,但之后,地址) dv声明对应它并没有显示不变。)

我的同情首先列出符号目录,然后是缓存,然后是服务器,因此缓存的符号文件不应该干扰。

这是否是找不到ntdll符号文件并使用另一个不正确匹配的文件或是否还有其他可能导致这种情况的潜在影响?

例:
.sympath D:/Symbols
.symfix+
.srcpath D:/Symbols ** Yes, currently the source is in with the symbols
.reload
** (defaults to export symbols for ntdll.dll since symbol file can't be found)
bp 00401000 (break at a constructor)
g
(program runs till it hits constructor)
l+t
dv /i /t /V ** look up this pointer memory location to check constructor
** We bring up a memory window at the location the this pointer refers to and
** step through the code, but no changes appear in that memory window
** moreover a local LARGE_INTEGER whose value is set with QueryPerformanceCounter
** also appears unchanged after the call
** when the constructor returns we assign the memory address returned by
** new to a global pointer, whose memory address we look up with dt, but
** after the call that address still has 0 in it

有谁能告诉我如何解决这个问题?

作为旁注,我们实际上在xp嵌入式计算机上运行cdb作为服务器,并使用windbg的“connect to remote session”选项。以上命令都是通过windbg执行的。

1 个答案:

答案 0 :(得分:1)

在.reload之前执行!sym noisy会让你知道为什么它找不到ntdll.dll的符号。完全有可能它们根本没有在符号服务器上编入索引,这通常意味着你运气不好(不幸的是没有任何人可以联系以解决这个问题)。

至于你的其他符号问题:

1)这是您的代码的发布版本吗?如果是这样,那完全可以预期

2)如果是调试版本,您是否100%确定您指向的源与目标计算机匹配?在回答之前确保你是100%:)

-Scott