WinDbg说“ .dll”。在图像列表中找不到 [英] WinDbg says ".dll" was not found in the image list

查看:216
本文介绍了WinDbg说“ .dll”。在图像列表中找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在WinDbg中加载dll并出现此错误。

I'm trying to load a dll in WinDbg and got this error. Here goes the detail.


  1. 使用VisualC ++ Express构建A.dll。

  1. Build A.dll using VisualC++ express.

将A.pdb和A.dll放在d:\test\目录中。

Place A.pdb and A.dll in d:\test\ directory.

将图像路径和符号路径设置为d:\test

Set the image path and symbol path to d:\test

.sympath gives 
OK                 D:\test


  • 使用以下命令尝试加载

  • try loading by using the following command

    .reload /f A.dll
    

    它给出了

    "A.dll" was not found in the image list.
     Debugger will attempt to load "A.dll" at given base 00000000.
    
    Please provide the full image name, including the extension (i.e. kernel32.dll)
    for more reliable results.Base address and size overrides can be given as
    .reload <image.ext>=<base>,<size>.
    DBGENG:  wined3dwddm.dll - Partial symbol image load missing image info
    DBGHELP: No header for wined3dwddm.dll.  Searching for dbg file
    DBGHELP: d:\test\A.dbg - file not found
    DBGHELP: d:\test\dll\A.dbg - path not found
    DBGHELP: d:\test\symbols\dll\A.dbg - path not found
    DBGHELP: .\A.dbg - file not found
    DBGHELP: .\dll\A.dbg - path not found
    DBGHELP: .\symbols\dll\A.dbg - path not found
    DBGHELP: A.dll missing debug info.  Searching for pdb anyway
    
    DBGHELP: wined3dwddm - private symbols & lines 
            d:\test\A.pdb - unmatched
    Unable to add module at 00000000
    

  • $ b中添加模块$ b

    在最后一行 d:\test\A.pdb-不匹配,尽管它说了这一点,但我确定pdb文件是一个来自生成结果,其中也从中生成安装的dll。

    In the last line "d:\test\A.pdb - unmatched", although it says this, I'm sure that the pdb file is the one from the build-result where the installed dlls are also generated from.

    其他问题

    由于答案表明A.dll可能不是已加载,这是一个可能的反例。为此,我需要对问题进行一些修改以反映我遇到的现实。

    As the answers suggest that A.dll is probably not loaded, here is an possible counter example. For this, I need to revise the question a bit to reflect the reality that I ran into.

    我有一组dll(例如A到Z dll),它们是从开源项目构建。老实说,我不了解整个项目的全部情况,我想通过WinDbg通过跟踪函数来解决这个问题。

    I have set of dlls (say, A to Z dlls) which are built from open-source project. To be honest, I don't understand the full picture of the whole project and I want to figure this out with WinDbg by tracing functions.

    此外,当我找到A时.dll在进程浏览器中,它在那里。
    而且,如果我尝试加载A.dll的符号,则会收到上述消息。我在这里错过什么吗?

    Moreover, when I find A.dll in process explorer, it is there. And, if I try to load A.dll's symbol, I've got the above message. Is there something I miss here?

    为什么我相信A.dll已加载


    1. 我在A.dll中打印一条uniqe消息,例如( this_is_uniqe_message_from_A.dll),然后我看到消息正在连续打印。

    1. I print a uniqe message such as ("this_is_uniqe_message_from_A.dll") in A.dll and I can see the message is printing continuously.

    我可以在进程资源管理器中看到一个A.dll,它链接到资源管理器进程。

    I can see A.dll in process explorer, linked to explorer process.

    此外,(我不确定是否很重要),我在QEMU版本1.7.0上使用Windows 8.1。

    Additionally, (I'm not sure if it matters), I'm using Windows 8.1 on QEMU version 1.7.0.

    此问题的原因和解决方案

    原因:原因实际上很简单。我要调试的过程在用户空间中,当我尝试列出已加载的模块时,我处于内核模式。

    The cause: The cause was actually very simple. The process that I want to debug is in user-space and I was in kernel-mode when I try to list the loaded modules.

    解决方案:我需要中断进入用户空间(进入要调试的进程),然后,我可以看到模块列表。另外,我可以设置断点等。

    The solution: I need to break into user-space (to the process that I want to debug) and then, I can see the module lists. Also, I can set breakpoint, etc.

    我在MSDN论坛中发布了相同的问题,他们回答了我。请参阅

    I've posted the same question in MSDN forum and they answered me. See

    http://social.msdn.microsoft.com /论坛/ vstudio / zh-CN / 263a3d84-8256-4f03-a70e-47d482a24cfb / windbg-lm-command-not-show-all-all-loaded-modules?forum = windbg#263a3d84-8256-4f03-a70e-47d482a24cfb

    推荐答案

    路径信息不完整



    您还没有描述了您是在进行实时调试还是在分析故障转储。如果是崩溃转储,路径信息可能会丢失(例如,如果转储是使用 .dump / marR 创建的)。在这种情况下,您需要指定可执行路径。

    Incomplete path information

    You have not described whether you're doing live debugging or analyzing a crash dump. In case of a crash dump, the path information can be missing (e.g. if the dump was created using .dump /marR). If this is the case, you need to specify the executable path.

    在步骤3中,您说您已将图像路径和符号路径设置为D:\test。但是,该命令的输出看起来不像典型的 .sympath 输出。看起来应该像这样:

    In step 3 you say you have set the image path and symbol path to D:\test. However, the output of the command does not look like a typical .sympath output. It should look like this:

    0:022> .sympath d:\test
    Symbol search path is: d:\test
    Expanded Symbol search path is: d:\test
    

    接下来,您说您也指定了图像路径,但没有显示 .exepath :

    Next you say that you have specified the image path as well, but you have not shown the output of .exepath:

    0:022> .exepath d:\test
    Executable image search path is: d:\test
    Expanded Executable image search path is: d:\test
    

    如果未指定映像路径,则不确定WinDbg是否会在Symbol路径中查找以找到DLL。至此,我有两种选择:

    If you didn't specify the image path, I'm not sure whether WinDbg would look in the Symbol path to find the DLL. At this point I would say you have two choices:


    • 设置 .exepath

    • 指定要加载的DLL的全名: .reload / f D:\test\A.dll

    • set .exepath as described before
    • Specify the full name of the DLL to load: .reload /f D:\test\A.dll

    一个问题可能是WinDbg使用的模块与DLL名称不匹配。名称可以例如是 image01000 或类似名称。如果名称不像 A.dll 那样简单并且包含特殊字符,则可以替换这些字符,例如。对于Notepad ++:

    One problem might be that the name of the module used by WinDbg does not match the DLL name. The name can e.g. be image01000 or similar. In case the name is not as simple as A.dll and contains special characters, these characters might be replaced, e.g. in case of Notepad++:

    0:007> lm m note*
    start    end        module name
    00400000 005f5000   notepad__   (deferred)
    

    要查看DLL名称,请使用 lmf

    To see the DLL names, use lmf:

    0:007> lmf m note*
    start    end        module name
    00400000 005f5000   notepad__ C:\Program Files (x86)\Notepad++\notepad++.exe
    



    不匹配的符号



    如果您不信任WinDbg有关匹配或不匹配符号的信息,也可以

    Unmatched symbols

    If you don't trust WinDbg about matching or non-matching symbols, you can also verify outside of WinDbg whether or not the PDB file matches the DLL.

    要检查您是否有私人符号:

    To check if you have private symbols:

    Symchk /if <dll> /s <pdbdir> /av /od /pf
    

    要检查您是否有公共符号:

    To check if you have public symbols:

    Symchk /if <dll> /s <pdbdir> /av /od /ps
    



    用ChkMatch检查



    下载 ChkMatch 并执行

    ChkMatch -c <dll> <pdb>
    

    这篇关于WinDbg说“ .dll”。在图像列表中找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆