【问题标题】:Very strange windbg behavior with WaitForSingleObject()WaitForSingleObject() 非常奇怪的 windbg 行为
【发布时间】:2009-10-28 02:26:42
【问题描述】:

下面是我的程序,当进程在使用 windbg 的 WaitForSingleObject() 调用中被阻塞时,我试图获取调用堆栈。奇怪的是,当进程阻塞时,windbg 只打印出非常奇怪的堆栈。

wow64cpu!TurboDispatchJumpAddressEnd+0x690
wow64cpu!TurboDispatchJumpAddressEnd+0x484
wow64!Wow64SystemServiceEx+0x1ce
wow64!Wow64LdrpInitialize+0x429
ntdll!RtlResetRtlTranslations+0x1b08
ntdll!RtlResetRtlTranslations+0xc63
ntdll!LdrInitializeThunk+0xe

// process2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "windows.h"

HANDLE g_hWriteEvent;    

int _tmain(int argc, _TCHAR* argv[])
{    
    g_hWriteEvent = OpenEvent(
        EVENT_ALL_ACCESS,
        FALSE,
        TEXT("WriteEvent")
        );

    if (g_hWriteEvent == NULL) {
        printf("OpenEvent error (%d)\n", GetLastError());
        return 0;
    }

    // while (1);
    WaitForSingleObject(g_hWriteEvent, INFINITE);

    return 0;
}

请注意,如果我取消注释 while(1) 行,windbg 可以识别出进程在 _tmain 函数中阻塞。

谢谢。 斌

【问题讨论】:

  • 看起来这是一个在 64 位操作系统上运行的 Wow64 32 位进程。确保将 64 位 Windbg 附加到进程,而不是 32 位 Windbg。
  • 谢谢,确实是问题所在!在我发出 32 位切换命令后,回溯现在好了! !wow64exts.sw

标签: windbg waitforsingleobject


【解决方案1】:

看起来这是一个在 64 位操作系统上运行的 Wow64 32 位进程。确保将 64 位 Windbg 附加到进程,而不是 32 位 Windbg。

【讨论】:

    猜你喜欢
    • 2016-03-13
    • 2011-03-01
    • 2020-12-02
    • 1970-01-01
    • 1970-01-01
    • 2018-04-20
    • 2020-02-09
    • 2016-12-04
    • 1970-01-01
    相关资源
    最近更新 更多