• Debugging DLL loading issues with GFLAGS


    GFlags (Global Flags)

    Note: basically you need to install Debugging Tools For Windows from http://www.microsoft.com/whdc/devtools/debugging/default.mspx to get it.

    Gflags released as part of debugging tools for windows (x86) from MS can be used to set an option for Inventor.exe that will enable additional diagnostic output to the Visual Studio debugger output window. This can help determine who is attempting to load a missing .dll or who is unable to resolve a symbol in a dll.

    How To Use It?

    1. Get GFlags, open it and do some settings. Keep it running.

    You may have a copy of gflags.exe on your machine under c:\Program Files\Support Tools.

    Type Inventor.exe in the "Image File Name" edit control, then click on the Image File Options radio button, check the loader snaps option, then press Apply & OK.

    If not, you can install the Debugging Tools For Windows from http://www.microsoft.com/whdc/devtools/debugging/default.mspx and there is a newer gflags.exe with a slightly different UI.

    Click on the Image File tab, type Inventor.exe then <tab>, check the loader snaps option, Apply, OK.See below snapshot:

    2. Load Inventor in the Visual Studio debugger and you will see lots of LDR messages in the output window. If you get an "Entry Point Not found" error dialog showing the symbol name and the dll that was expected to contain the symbol, you can look in the debugger output window and the last entry will tell you exactly which dll was trying to resolve its symbols when the error was detected. For example if DL.dll could not find an entry point in RSe.dll you would see this:

       LDR: rse.dll used by DL.dll

       LDR: Snapping imports for DL.dll from rse.dll

    Or, if a dll is missing, for example if DL.dll was not found, you will see the following output:

       LDR: DL.dll used by DWGExt.dll

       LDR: LdrpResolveDllName - call to RtlDosSearchPath_U failed

       DllName: "DL.dll"

    If you get the error dialogs but don't get the LDR messages then it probably means the error happened on the initial load of Inventor.exe, in that case you can just run Depends.exe on Inventor.exe to figure out the cause.

    Its recommended to turn off the loader snaps option when you are done, otherwise the output window will be too cluttered with these messages during normal debugging.

  • 相关阅读:
    关于[一个基于WF的业务流程平台]表设计的说明
    这几年开发工作流的感受
    在Silverlight中绘制贝塞尔曲线
    WF工作流设计器(WPF版)
    基于WF设计业务流程平台_消息收集、通知接口
    基于WF设计业务流程平台_数据冲突
    NET4.0 CTP 中的WF
    NET 4,3,2,1其实什么也没有变
    基于WF设计业务流程平台_权限在流程模板外部映射
    无题
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1594451.html
Copyright © 2020-2023  润新知