简体   繁体   中英

Debugging .dmp file with Visual Studio 2010 to specific line of source

I have a dump file from an mvc4 web api that is pretty much crashing the w3wp.exe process (the bits are based off a debug build). I started diag debug diag to get the .dmp and there are parts of the .net stack .html summary for the crash report of the .dmp file that reference some of my methods which are probably suspect including a cacheing object as well as a db context that are somehow crashing due to systemobject dispose (something is going out of scope when I reference something..either cache or db context or both). It makes sense that those items are contained in the list summary of the .html .dmp report but they really don't tell me where the code is throwing.

With the .dmp file at hand when I try to load it within Visual Studio to Debug and link back to source code I get the following errors:

1) Debugging inforamtion for w3wp.exe cannot be found or does not match. Symbols loaded (source information stripped). Do you want to continue debugging?

continue selected...

2) Unhandled exception at 0x000007fefdc3cacd (KERNELBASE.dll) in w3wp_ MyApp _PID_ 36504 _Date__02_14_2013__Time_04_32_57PM_ 276 _First chance exception 0XE0434352.dmp: 0xE0434352: 0xe0434352

I have the Debug/General "microsoft symbol servers" checked to presumably down any necessary symbols and linkage. However, when I continue and break after the last error, there are no references to my code within the call stack or the Debug/Windows/Paralell Stacks but I dont' see any of my classes or object called or spelled out. All is see are offsets and the disassembly with a carret as the break point at some "mov" operation.

I've followed this troubleshooting/debugging link to book but still cannot get any symbols to resolves to locals or see any of my method names being called. http://blogs.msdn.com/b/tess/archive/2009/06/16/first-look-at-debugging-net-4-0-dumps-in-visual-studio-2010.aspx

ASK: How can I link this .dmp to the exact line of code that is throwing? Thanks!

  • Load it in windbg.
  • Load sos (in .NET 4 .loadby sos clr or in previous versions .loadby sos mscorwks )
  • !Threads

At this point you should see an exception in the relevant thread. If not, you might need to go searching for it using !DumpHeap -type Exception or something similar.

  • Use !pe <address> to examine the exception.

I'm happy to help if you get lost. Windbg is not easy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM