Debug Diagnostics Tool Create exception dump and parse exception with WinDbg

Source: Internet
Author: User
Tags mscorlib

When we want to analyze the exception in the IIS PRD environment, and have no clue to the problem, and do not have the right to directly hit the log code. This is the time for debug Diagnostics Tool & WinDbg to show great prowess.

Debug Diagnostics Tool

Installation method Heroes Please Baidu, focus on the capture of the dump file.

The first is the selection of the crawl program, I certainly want to catch IIS application pool ...

Set the number of files to crawl, click Exceptions to set what happens when the exception is crawled.

Of course I'm going to catch the tall one. NET exception ...

The next step is to set the saved location.

To demonstrate a random page that throws an exception:

Take a look at the resulting dump file that looks like a long hair wow:

Windbg

Below the WinDbg shot, this online tutorial more, directly said the focus:

~#: View problem thread, ~ thread ID S: Toggle thread,!clrstack-l: View current stack and print local variables.

0:023>~#
. id:790.1280 suspend:1 teb:000007ff ' ffec6000 unfrozen
start:clr! Thread::intermediatethreadproc (000007FE ' EF57DAFC)
priority:0 Priority class:32 Affinity:f
0:023>~23 S
kernelbase! raiseexception+0x39:
000007fe ' Fdfaaaad 4881c4c8000000 add rsp,0c8h
0:023>!clrstack-l
OS Thread id:0x1280 (23)
Child SP IP Call Site
000000000d3ad610 000007fefdfaaaad [faultingexceptionframe:000000000d3ad610]
000000000D3ADB60 000007fe8fe415cc * * * warning:unable to verify checksum for App_web_ix1d1jtk.dll
_default.page_load (System.Object, System.EventArgs) [C:\inetpub\wwwroot\Default.aspx.cs @ 17]
LOCALS:
0x000000000d3adb80 =0x00000000fff4d4e8
0x000000000d3adb88 = 0x0000000000000000
0x000000000d3adb8c = 0x0000000000000001

Oh, 0x00000000fff4d4e8 this address is our code in the random new object: Sssssss, do take a look at this object:

0:023>!do 0x00000000fff4d4e8
name:teststatic

Methodtable:000007fe8fe2c3d8
Eeclass:000007fe8fe18bc8
size:24 (0x18) bytes
file:c:\windows\microsoft.net\framework64\v4.0.30319\temporary ASP. Files\root\e22c2559\92c7e946\app_web_ Ix1d1jtk.dll
Fields :
MT Field Offset Type VT Attr Value Name
000007feee4f0e08 400000d System.String 0 static 0000000400031900 ABC


Look again at his string member ABC

0:023>!do 0000000400031900
Name:System.String
Methodtable:000007feee4f0e08
eeclass:000007feede14860
size:48 (0x30) bytes
File:c:\windows\microsoft.net\assembly\gac_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
String: 11111111111
Fields :
MT Field Offset Type VT Attr Value Name
000007feee4f3980 40000ab 8 System.Int32 1 Instance m_stringlength
000007feee4f20f0 40000ac C System.Char 1 instance M_firstchar
000007feee4f0e08 40000AD System.String 0 shared static Empty

Debug Diagnostics Tool Create exception dump and parse exception with WinDbg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.