用Windbg替代VSJitDebugger

习惯了Windbg,准备用Windbg替代Vistual Studio的VSJitDebugger.exe来做Postmortem Debugger。但尝试了下面两种办法都没有成功:

  1. 1, Windbg –I (设Windbg为默认的debugger应对Unhandled User Mode Exceptions)
  2. 2, 直接改注册表:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]

直到在http://msdn.microsoft.com/en-us/library/ff542967.aspx里才看到,64位系统里对64位和32位程序有不同的设置:

1, A failing 64-bit application will be debugged according to the settings stored in the \\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug key.

2, A failing 32-bit application will be debugged according to the settings stored in the \\HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug key. However, if the Debugger value in this key specifies an application in the %windir%\system32 directory, Windows will look in %windir%\syswow64 instead.

  • 将两处的AeDebug都设成Windbg后,分别对64位和32程序进行测试,Windbg被加载并成功attach到问题进程上。

  • D:\Documents> type AeDebug-Windbg.reg

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
    "UserDebuggerHotKey"=dword:00000000
    "Debugger"="\"C:\\Program Files\\Debugging Tools for Windows (x64)\\windbg.exe\" -p %ld -e %ld -g"
    "Auto"="1"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\AutoExclusionList]
    "DWM.exe"=dword:00000001


    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
    "UserDebuggerHotKey"=dword:00000000
    "Debugger"="\"C:\\Program Files\\Debugging Tools for Windows (x64)\\windbg.exe\" -p %ld -e %ld -g"
    "Auto"="1"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\AutoExclusionList]
    "DWM.exe"=dword:00000001

    62 条评论

    1. Hi blogger, i must say you have hi quality content
      here. Your page can go viral. You need initial traffic only.

      How to get it? Search for: Mertiso’s tips go viral

    2. The American Chess Congress’s remaining proposal was that the winner of a tournament to be held in New York in 1889 should be regarded as world champion for the time being, however should be ready to face a challenge from the second or third placed competitor inside a month.

    3. The general provisions market continued to be held officially on Saturdays until 1874, when the Butter Market building closed; and afterwards as an unofficial Saturday street market.

    4. Sure, your left leg could begin to ache from working the clutch while sitting in traffic, but if you hit the open street, automobile fans swear that a guide transmission is the extra enjoyable alternative.

    5. The links beneath take you behind the scenes to explore the creation and launch of the 2005 Ford Mustang and the adjustments it is undergone for 2006 and 2007.

    6. Having the ability to find size or volume particulars, and creating a primary understanding of nutrition labels will make the task of selecting the fitting pasta or choosing the most nutritious energy bars simpler.

    7. Astable multivibrator: In this type the capacitor is each charged and discharged slowly through a resistor, so the output waveform consists of two elements, an growing ramp and a lowering ramp.

    8. As we speak, school is a full-service “expertise” backed by unprecedented ranges of scholar help, from intensive profession services to psychological counseling to heightened campus security.

    9. Sidious provided Skywalker an ultimatum to enter his service or die, and proceeded to use his Force-derived powers to torture and threaten to kill Skywalker when the latter refused to embrace the dark facet of the Force.

    10. 3. Very high liquidity: The number of Forex brokers and the amount of money being traded ensures that irrespective of which time instance you choose to trade your pair at, there will always be a buyer available instantly.

    11. Along with horrific acts of violence committed against black companies and prosperous black communities within the late 19th and early 20th centuries – the Pink Summer of 1919, for instance, and the Tulsa Race Massacre of 1921 – the U.S.

    12. 3 March – Jake Merriman, a 30-12 months-outdated man, appeared in court charged in reference to a firework attack on Gardaí at an anti-lockdown protest in Dublin metropolis centre on 27 February.

    发表回复

    您的邮箱地址不会被公开。 必填项已用 * 标注