Windbg + psscor2 debug the. NET Program

Source: Internet
Author: User
Tags mscorlib
Load CLR debugging plug-in

. Load psscor2

Set the address of the debugging symbol file, which generally points to the bin directory of the website. Each dll contains a PDB file.

. Sympath D: \ website \ pdhbj \ pdhb. synadmin \ bin

Or execute File> symbol file path and fill in:

SRV *
D: \ website \ pdhbj \ pdhb. synadmin \ bin * http://msdl.microsoft.com/download/symbols

When a CLR exception is thrown, the breakpoint can be stopped to facilitate debugging.

Sxe CLR

! Name2ee beyondbit_pdhb_synadmin! Beyondbit. synadmin. synadminproject. outnewprojectbook. btnmanage_click! Bpmd-MD 00000642803d2ae8g

Run

! PE gets the following results:

Exception object: 0001bf44b470exception type: system. nullreferenceexceptionmessage: helloinnerexception: <none> stacktrace (generated): <none> stacktracestring: <none>

Hresult: 80004003.

In this way, we will know the exception message text.

------------------------------------------------------------------------

! Dae

The following text is displayed:

Number of exceptions of this type: 2 exception methodtable: 000007feedb63078exception object: 00000001bfcb2ca8exception type: system. nullreferenceexceptionmessage: helloinnerexception: <none> stacktrace (generated): sp ip function 000000000161e1c0 000007ff001c064c webapplication1. _ default. go (int32, system. string) 000000000161e200 000007ff001c05a7 webapplication1. _ default. page_load (system. object, system. eventargs) 000000000161e230 000007fee3c13eca system. web. util. callihelper. eventargfunctioncaller (intptr, system. object, system. object, system. eventargs) 000000000161e260 000007fee9219dcb system. web. util. callieventhandlerdelegateproxy. callback (system. object, system. eventargs) 000000000161e290 000007fee9210585 system. web. UI. control. onload (system. eventargs) 000000000161e2d0 000007fee92105e3 system. web. UI. control. loadrecursive () 000000000161e320 000007fee920cb6d system. web. UI. page. processrequestmain (Boolean, Boolean) stacktracestring: <none> hresult: 80004003 bytes ------------------------------------------------------------------------------------------------------------------------------

Run dumpstack to view where the exception is thrown in webapplication1! Webapplication1. _ default. Go (int32, system. String) + 0x7b, that is, the Go Method of the default page

0: 029>! Dumpstackos thread ID: 0xa3c (29) Child-SP retaddr call site000000000505df80 000007feef989413 kernelbase! Raiseexception + 0x3d000000000505e050 000007feefec3310 mscorwks! Strongnamefreebuffer + 0x53b7000000000505e140 000007ff001a064b mscorwks! Corlaunchapplication + 0xee900109505e2f0 000007ff001a05a6 webapplication1! Webapplication1. _ default. Go (int32, system. String) + 0x7b000000000505e330 000007fede0f3ec9 webapplication1! Webapplication1. _ default. page_load (system. Object, system. eventargs) + 0x46000000000505e360 000007fee8289dca system_web_regularexpressions_ni! System. Web. util. callihelper. eventargfunctioncaller (intptr, system. Object, system. Object, system. eventargs) + 0x19000000000505e390 000007fee8280584 system_web_ni! System. Web. util. callieventhandlerdelegateproxy. Callback (system. Object, system. eventargs) + 0x2a000000000505e3c0 000007fee82805e2 system_web_ni! System. Web. UI. Control. onload (system. eventargs) + 0x84000000000505e400 000007fee827cb6c system_web_ni! System. Web. UI. Control. loadrecursive () + 0x42000000000505e450 000007fee827c070 system_web_ni! System. Web. UI. Page. processrequestmain (Boolean, Boolean) + 0x97c000000000505e520 000007fee827bf9b system_web_ni! System. Web. UI. Page. processrequest (Boolean, Boolean) + 0xa0000000000505e580 000007fee827bf30 system_web_ni! System. Web. UI. Page. processrequest () + 0x5b000000000505e5e0 000007ff001a0269 system_web_ni! System. Web. UI. Page. processrequest (system. Web. httpcontext) + 0xf00000000000000505e640 000007fee82833d7 app_web_nxt80xwq! ASP. default_aspx.processrequest (system. Web. httpcontext) + 0x9000000000505e670 000007fee0000679b system_web_ni! System. Web. httpapplication + callhandlerexecutionstep. system. Web. httpapplication. iexecutionstep. Execute () + 0x257000000000505e720 000007fee8254d95 system_web_ni! System. Web. httpapplication. executestep (iexecutionstep, Boolean byref) + 0xab000000000505e7c0 000007fee00005853 system_web_ni! System. Web. httpapplication + applicationstepmanager. resumesteps (system. Exception) + 0x1a5000000000505e870 000007fee00009b74 system_web_ni! System. Web. httpapplication. system. Web. ihttpasynchandler. beginprocessrequest (system. Web. httpcontext, system. asynccallback, system. Object) + 0xd3000000000505e8d0 000007fee0000975c system_web_ni! System. Web. httpruntime. processrequestinternal (system. Web. httpworkerrequest) + 0x1c4000000000505e960 000007fee0000838c system_web_ni! System. Web. httpruntime. processrequestnodemand (system. Web. httpworkerrequest) + 0x7c000000000505e9a0 000007feefa80282 system_web_ni! System. Web. Hosting. isapiruntime. processrequest (intptr, int32) + 0x18c000000000505ead0 000007feef964363 mscorwks! IEE + 0xda36000000000505eb30 000007feef972d6e mscorwks! Createassemblynameobject + 0x60ab000000000505ebd0 000007feeff651a6 mscorwks! Compareassemblyidentity + 0x51f2000000000505ec70 000007feef9a44c0 mscorwks! Corexemain2 + 0x151642500000505eec0 000007feef9534ca mscorwks! Strongnamefreebuffer + 0x20464000000000505ef30 000007feefa803fe mscorwks! Strongnametokenfrompublickey + 0x8bf6a000000000505f220 000007fee0548433 mscorwks! IEE + 0xdbb2000000000505f2d0 000007fee05487f3 webengine! Initializemanagedcode + 0x9d3000000000505f780 000007fee058adc4 webengine! Ismanageddebuggerconnectedindirect + 0x73000000000505f7c0 000007feef8dbb37 webengine! Setminrequestsexecutingtodetectdeadlock + 0x284000000000505f7f0 000007feef8ee92a mscorwks! Strongnametokenfrompublickey + 0x145d7000000000505f890 000007feef8ab1fc mscorwks! Strongnametokenfrompublickey + 0x273ca000000000505f930 10976c4652d mscorwks! Getmetadatainternalinterfacefrompublic + 0x93c4000000000505fd80 0000000076d7c521 Kernel32! Basethreadinitthunk + 0xd

201700000505fdb0 0000000000000000 NTDLL! Rtluserthreadstart + 0x21

Bytes ------------------------------------------------------------------------------------------------------------------------------

! Dumpstackobjectsos thread ID: 0xa3c (29) RSP/REG object name000000000505e0f0 00000001bf42a018 system. web. caching. cacheentry000000000505e128 00000001bf44b470 system. nullreferenceexception000000000505e130 000000013f2f1808 system. eventargs000000000505e140 00000001bf44b470 system. nullreferenceexception000000000505e160 00000001bf44b470 system. nullreferenceexception000000000505e218 000000013f2f1808 system. eventargs000000000505e220 00000001bf44aa90 system. componentmodel. eventhandlerlist000000000505e230 00000001bf44b470 system. nullreferenceexception000000000505e238 000000013f2f1808 system. eventargs000000000505e240 00000001bf2e0998 system. string000000000505e2d0 00000001bf448dc0 ASP. default_aspx000000000505e2d8 00000001bf448dc0 ASP. default_aspx

 

Bytes ------------------------------------------------------------------------------------------------------------------------------

! Do 00000001bf2e0998 name: system. stringmethodtable: Clerk: 000007feedd8e550size: 36 (0x24) bytesgc generation: 0 (c: \ windows \ Assembly \ gac_64 \ mscorlib \ 2.0.0.0 _ b77a5c561934e089 \ mscorlib. DLL) string: hellofields: mT field offset type vt attr value name000007feee18ef10 4000096 8 system. int32 1 instance 6 m_arraylength000007feee18ef10 4000097 C system. int32 1 instance 5 m_stringlength000007feee1896e8 4000098 10 system. char 1 instance 68 m_firstchar000007feee187ca0 4000099 20 system. string 0 shared static empty> domain: Value 0000000001501640: 000000017f290370 0000000003bca6e0: 000000017f290370 <000007feee189598 400009a 28 system. char [] 0 shared static whitespacechars> domain: Value 0000000001501640: 000000017f290e58 0000000003bca6e0: 00000000ff2900b0 <

 

Bytes ------------------------------------------------------------------------------------------------------------------------------

... Total 9 exceptions available! Printexception 00000001bfcb2ca8

######################################## ######################################## ########

# X beyondbit. pdhb_synadmin! *

 

 

. Load psscor2.sympath D: \ website \ pdhbj \ pdhb. synadmin \ bin! Name2ee beyondbit_pdhb_synadmin! Beyondbit. synadmin. synadminproject. outnewprojectbook. btnmanage_click! Bpmd-MD 00000642803d2ae8x beyondbit. pdhb_synadmin! *! Name2ee beyondbit_pdhb_synadmin! Beyondbit. synadmin. synadminproject. outnewprojectbook. initproject! Bpmd-MD 0000064280467738! Name2ee beyondbit_pdhb_synadmin! Beyondbit. synadmin. synadminproject. outnewprojectbook. savepdhbadverinfomodule: 00000642801e30f0 (beyondbit. pdhb_synadmin.dll) token: 0x0000000006001236methoddesc: 0000064280467748 name: beyondbit. synadmin. synadminproject. outnewprojectbook. savepdhbadverinfo (int32, int32, int32) jitted Code address: 00000642804c66b0! Bpmd-MD 0000064280467748! Name2ee beyondbit_pdhb_synadmin! Beyondbit. synadmin. synadminproject. outnewprojectbook. savefiles! Name2ee beyondbit_synadmin_dataaccess! Beyondbit. synadmin. dataaccess. saveprojectspecialinfo

Sxe ld: beyondbit_synadmin_dataaccess

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.