zoukankan      html  css  js  c++  java
  • 将windbg与.dmp文件关联

    如果您厌倦了启动调试器、加载转储文件、设置sympath、加载扩展名等,这里有一个很好的方法,可以在.dmp文件的上下文菜单上获取“调试此转储文件”,并自动加载所有您喜欢的命令。
    首先创建一个包含以下内容的.reg文件(在修改注册表时一定要非常小心)

    Windows Registry Editor Version 5.00
    
    
    [HKEY_CLASSES_ROOT.dmp]
    
    @="Debugger.Dump"
    
    [HKEY_CLASSES_ROOTDebugger.Dump]
    
    [HKEY_CLASSES_ROOTDebugger.DumpDefaultIcon]
    
    @="c:\debuggers\cdb.exe"
    
    [HKEY_CLASSES_ROOTDebugger.DumpShell]
    
    [HKEY_CLASSES_ROOTDebugger.DumpShellDebug_Without_Remote]
    
    @="Debug This Dump"
    
    [HKEY_CLASSES_ROOTDebugger.DumpShellDebug_Without_RemoteCommand]
    
    @=""C:\debuggers\windbg" -z "%1" -c "$<c:\debuggers\commands.txt""
    
    [HKEY_CLASSES_ROOTDebugger.DumpShellDebug_With_Remote70]
    
    @="Debug this Dump With Remote:70"
    
    [HKEY_CLASSES_ROOTDebugger.DumpShellDebug_With_Remote70Command]
    
    @=""C:\debuggers\windbg" -server tcp:port=70 -z "%1" -c "$<c:\debuggers\commands.txt""

    右键单击.dmp文件时,将在上下文菜单上提供两个附加选项。首先“调试此转储”,它将用转储打开windbg,然后运行commands.txt中的命令。第二个选项“Debug this Dump With Remote:70”将执行相同的操作,但也将设置一个远程,以便您的同事可以通过端口70远程进入您的调试会话。(记住要更改路径,使它们指向windbg.exe和commands.txt所在的目录)

    其次,创建一个名为commands.txt的文件,其中包含调试器启动时要运行的任何命令。下面的一个设置公共符号的符号路径并加载sos.dll。

    .sympath srv*c:websymbols*http://msdl.microsoft.com/download/symbols
    .load clr10sos
  • 相关阅读:
    NPOI 的使用心得
    uploadfiy 动态传递Form 参数
    积分系统总结
    easyui dataBox 增加一天,减少一天
    easyui datagrid footer 页脚问题
    sql server 视图 的一个例子
    sql server int 列 NULLIF,isnull 判断是0还是1 ,如果是0就变成1
    easyui 小知识
    获取 日期 最后一天
    my97 日期控件
  • 原文地址:https://www.cnblogs.com/yilang/p/11947382.html
Copyright © 2011-2022 走看看