2010-08-30 59 views
0

我使用帶有xp嵌入的windbg。嘗試獲取操作系統符號失敗,並顯示消息「無法找到符號文件,默認爲導出ntdll.dll的符號」。 (這是典型的XP嵌入???)帶有xp嵌入式Windbg,ntdll.dll符號失敗,其他符號受到影響?

我沒有問題找到和加載符號和我自己的代碼來源。然而,單步執行代碼表明代碼和符號文件之間存在嚴重的不匹配,因爲由dv返回的內存中變量的位置似乎與實際內存內容不一致(例如,分配變量,但之後的地址該dv聲稱對應於它不會顯示不變)。

我的sympath首先列出了符號目錄,然後是緩存,然後服務器如此緩存的符號文件不應該產生干擾。

這是否是找不到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

在.reload之前執行!sym noisy會讓你知道爲什麼它找不到ntdll.dll的符號。他們完全可能不會在符號服務器上索引,這通常意味着你運氣不好(不幸的是,沒有人聯繫到這個問題)。

至於你的其他符號的問題:

1)這是你的代碼的發佈版本?如果是這樣,這是完全預計的

2)如果它是調試版本,你是100%確定你指向的源匹配目標機器?請確保你在回答前100%:)

-scott

+0

是的,!sym嘈雜是非常有用的。在Microsoft符號服務器上找不到此類文件。 哇!沒有意識到發佈模式會這樣做(仍然是一個windbg初學者,以前的使用是在Win7上)。在發佈模式下關閉優化,現在它運行得更好。謝謝! – 2010-09-01 17:05:14

相關問題