Wednesday, July 20, 2005

Force windbg to load symbols

I needed to analyze a crash dump yesterday but could not find the associated .pdb symbol file. Usually I check in all the binaries and symbols for public releases, but unfortunately there is a typo in my build script so that the symbol I am looking for is missing.

I do have the source code on my version control system, so it is quite easy for me to rebuild the symbol file. It should match the binary, but winbdg refused to load it since the timestamp differs:

*** WARNING: Unable to verify checksum for Your.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for Your.dll

Modifying the timestamp does not look easy, so I decided to force windbg to load the symbol. while impossible in VS.net, it is quiet easy with windbg, all you need is type in:

.symopt+0x40

This command indead enables SYMOPT_LOAD_ANYTHING option.

Now a complete stack trace showed up, nice...

12 Comments:

Anonymous Anonymous said...

Great find! save my ass.

4:05 PM  
Blogger Dennis said...

That has saved me a hell of a lot of trouble. Bookmarking this in my "useful crap" folder.
Thanks!

2:00 AM  
Anonymous Anonymous said...

This sure helps, thanks!

4:23 AM  
Blogger Raveesh Kumar said...

Thanks for sharing the info.

I was looking to resolve this issue from the last one week. Thanks once again.

10:29 PM  
Anonymous Anonymous said...

Great help with this simple tip for most of us.

9:53 AM  
Anonymous Anonymous said...

I know this is a very old post, but anyway, thanks a lot, you saved my ass aswell, If I ever meet you I will invite you for a beer :)

Bulltza

7:07 AM  
Blogger SAIRAMA said...

late friday night and need to analyze the dump and having similar problem with symbols and what can i say ,this is saved my weekend. thanks a lot

10:33 PM  
Anonymous Anonymous said...

The latest version of WinDbg insisted on

.symopt SYMOPT_LOAD_ANYTHING

instead.

1:58 AM  
Anonymous Anonymous said...

Thanks, ur post only saved me, Great finding.

7:41 AM  
Blogger Srinivas said...

.reload /i will load the symbols even if there is a mismatch. Check Loading symbols with windbg for detailed information on symbols loading.

11:37 PM  
Anonymous Anonymous said...

Thanks!

2:10 AM  
Blogger AlexW said...

Hallelujah! Another ass saved!

Thanks :)

3:43 AM  

Post a Comment

<< Home