开发者

Symbols files and debugging

Assume i have a custom service written in VC++ 6.0 and i have shipped it as part of a particular release. Unfortunately i did not take the pdb while building the binary.

At a later point of time my customer reported a crash and i had to get the pdb to identify the crash cause. Will a pdb that i take now be enough to identify the point of crash.

In other words i have taken binary an开发者_运维百科d pdb separately however i did not make any changes to the sourcecode after taking the binary.

My understanding is that even thought he symbols wont match in terms of date and time when they were built but in terms of the content it will match.

Is my understanding correct?


You'll need to make sure you compiled with exactly the same compiler version (patches could change code generation and addresses), set of compiler/linker options, the same library versions as well as the same source to make sure the addresses match. If you're able to do that then you should be able to take a pdb generated later.

However even if it doesn't match exactly it's possible that it gets you close enough to see the bug by inspection.


Yes, that should still work without a problem (though, if memory serves, you can expect a warning about the mismatched time-stamps).


The .pdb and the binary should be able to work together perfectly if the were built from the same source code even if not at the same time. However you will not be able to load this in any debugger. For example, the Visual Studio debugger will refuse to load it because it will say they are mismatched.

You need a debugger that can accept mismatched symbols such as WinDbg. To load with mismatched symbols type the magic command symopt +0x40.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜