如何在异常处理导致崩溃时拉出异常上下文记录

时间:2014-07-16 13:14:56

标签: c++ windows exception windbg stack-trace

我有一个问题是使用windbg在我的应用程序中跟踪崩溃。通常我会在指定位置获取此应用程序的转储文件,并可以轻松调试问题。似乎这次应用程序在将异常的详细信息写入转储文件时崩溃了。我设法使用事件日志提取系统mdmp和hdmp文件来识别文件位置并查看了hdmp文件。异常的上下文记录似乎是异常的处理,而不是导致该问题的主要异常。有什么方法可以追溯到这些信息,以找出导致崩溃的原始异常的上下文?我真的需要在抛出异常时看到线程的堆栈跟踪,以帮助识别核心问题。

------------------------------------程序的上下文-------- ---------------------------

RetAddr           : Args to Child                                                           : Call Site
00000000`77983072 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!NtWaitForSingleObject+0xa
00000000`779832b5 : 00000000`0000122c 00000000`00001240 00000000`7eccecd0 00000000`00000000 : ntdll!RtlReportExceptionEx+0x1d2
00000000`7798331a : 00000000`c0000374 00000000`7eccecb0 00000000`7eccecb0 ffffffff`ee1e5d00 : ntdll!RtlReportException+0xb5
00000000`77984155 : 00000000`77984102 00000000`778e9b6e 00000000`00000000 000007fe`00000000 : ntdll!RtlpTerminateFailureFilter+0x1a
00000000`778d85c8 : 00000000`00000000 00000000`00000000 00000000`779dd700 00000000`779f7350 : ntdll!RtlReportCriticalFailure+0x96
00000000`778e9d2d : 00000000`7ecd0000 00000000`7eccecb0 00000000`7eccecb0 00000000`77a0ee9c : ntdll!_C_specific_handler+0x8c
00000000`778d91cf : 00000000`7ecd0000 00000000`00000048 00000000`00012f00 00000000`00250a90 : ntdll!RtlpExecuteHandlerForException+0xd
00000000`778d97c8 : 00000000`7eccecd0 00000000`7ecce6a0 00000000`00000001 00000000`00000000 : ntdll!RtlDispatchException+0x45a
00000000`77984102 : 00000000`c0000374 00000000`00000000 00000000`779fb4b0 00000000`fffffff7 : ntdll!RtlRaiseException+0x22f
00000000`77984746 : 00000000`00000002 00000000`00000023 00000000`7eccf0c0 00000000`00000003 : ntdll!RtlReportCriticalFailure+0x62
00000000`77985952 : 00000000`846fb401 00000000`00000000 00000005`00000011 41b0d0a0`00000000 : ntdll!RtlpReportHeapFailure+0x26
00000000`77987604 : 00000000`00fb0000 00000000`00fb0000 00000000`00000000 00000000`03d24a80 : ntdll!RtlpHeapHandleError+0x12
00000000`7792150b : 00000000`00fb0000 00000000`88062a40 00000000`88062c10 00000000`03d24a80 : ntdll!RtlpLogHeapFailure+0xa4
00000000`779140fd : 00000000`00fb0000 000007fe`fd8c0001 00000000`88062a40 00000000`88062a50 : ntdll!RtlpFreeHeap+0x1649
00000000`777c300a : ffffffff`fffffffe 00000000`74b10f80 22739480`0007001a 000f0002`000707de : ntdll!RtlFreeHeap+0x1a6
00000000`6c33cabc : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!HeapFree+0xa
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`74b10f80 : msvcr90!free+0x1c

- 异常上下文记录指向异常处理而不是原始异常的位置。请注意,未列出RtlRaiseException,其中参数可能指向它正在处理的异常上下文的位置.--

rax=00000000068a285b rbx=00000000c0000374 rcx=000000007ecce6a0
rdx=00000000779fb4b0 rsi=0000000000000000 rdi=00000000779fb4b0
rip=0000000077984102 rsp=000000007eccecb0 rbp=0000000000000002
r8=0ca97dc0e6ad047e  r9=00000000382a5066 r10=0000000000000000
r11=0000000000000286 r12=0000000000000003 r13=0000000088062a50
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei pl nz na pe nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
ntdll!RtlReportCriticalFailure+0x62:
00000000`77984102 eb00            jmp     ntdll!RtlReportCriticalFailure+0x64 (00000000`77984104)
0:088> kb
  *** Stack trace for last set context - .thread/.cxr resets it
RetAddr           : Args to Child                                                           : Call Site
00000000`77984746 : 00000000`00000002 00000000`00000023 00000000`7eccf0c0 00000000`00000003 : ntdll!RtlReportCriticalFailure+0x62
00000000`77985952 : 00000000`846fb401 00000000`00000000 00000005`00000011 41b0d0a0`00000000 : ntdll!RtlpReportHeapFailure+0x26
00000000`77987604 : 00000000`00fb0000 00000000`00fb0000 00000000`00000000 00000000`03d24a80 : ntdll!RtlpHeapHandleError+0x12
00000000`7792150b : 00000000`00fb0000 00000000`88062a40 00000000`88062c10 00000000`03d24a80 : ntdll!RtlpLogHeapFailure+0xa4
00000000`779140fd : 00000000`00fb0000 000007fe`fd8c0001 00000000`88062a40 00000000`88062a50 : ntdll!RtlpFreeHeap+0x1649
00000000`777c300a : ffffffff`fffffffe 00000000`74b10f80 22739480`0007001a 000f0002`000707de : ntdll!RtlFreeHeap+0x1a6
00000000`6c33cabc : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!HeapFree+0xa
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`74b10f80 : msvcr90!free+0x1c

一些有用的信息位于以下网址,但它无法帮助我找到此x64位流程的任何内容:http://www.nynaeve.net/?p=309

0 个答案:

没有答案