0

当我们使用 Windbg 或 Visual Studio 分析转储文件时,我对使用哪个符号文件感兴趣。假设我的应用程序正在使用一个实用程序库,并且该实用程序库有相关的私有符号文件。当我的应用程序中出现故障转储时,我需要实用程序库的符号来分析完整的调用堆栈。但有时构建/运行时/调试环境安装有不同版本的实用程序库——(肯定)是不同版本的实用程序库符号。

假设我们有一个版本(例如版本 A)的实用程序库(和相关符号)用于构建(链接)我的应用程序,当发生崩溃时,在运行时使用另一个版本(例如版本 B)的实用程序库(和相关符号),并且当我分析故障转储时,在 Windbg 中使用另一个不同版本(例如版本 C)的实用程序库(和相关符号)。

我的问题是,在运行时生成崩溃时,使用版本 B 符号生成崩溃转储(用符号信息填充转储)?但是在Windbg调试环境中使用不同版本的符号C时,会出现符号不匹配的问题?并且使用哪个版本的库来构建无关紧要?我的理解都正确吗?

提前谢谢,乔治

4

2 回答 2

3

It sounds like you want to use a Symbol Server so that WinDBG or VS can pull down symbols that correspond to the build of the library you're debugging. If it's a third party component and you have private symbols you can either put them symbols in your own server or see if the third party has a public symbol server.

Windbg won't load symbols if they don't match the dll you're debugging, you can use !sym noisy to see more about the symbol loading process. If you choose not to use a symbol server you can manage all the pdb's by hand and load them manually into windbg (use lm v to get detailed information about a module loaded in your process)

于 2009-03-20T05:06:26.793 回答
1

Generally the symbols should be in the same file as the code (that's why debug versions are generally bigger). I can't recall a case where a debugger would pull the symbols from one binary while running another--but then, this is from general knowledge and not from any specialized information about your environment.

于 2009-03-20T05:01:11.830 回答