将 dbg 符号文件加载到 WinDbg 中

cod*_*ory 6 windbg debug-symbols

我有一个 DLL 的 MAP 文件,我正在尝试调试它。我使用 Map2Dbg-tool 将其转换为 DBG 文件并将其放入符号路径中。

但发出.reload /f mydll.dll不起作用,会发生符号加载错误。

然后我尝试使用!sym 噪音对其进行诊断,它告诉我 Windbg 会查找正确的符号路径,但仅限于 PDB 文件(mydll.pdb)。

有没有办法强制 Windbg 找到我的 DBG 文件?

编辑:

以下是一些进一步的信息:

Windbg中的符号搜索路径:

> .sympath
e:\code-factory\symbols;cache*;SRV*http://msdl.microsoft.com/download/symbols
Run Code Online (Sandbox Code Playgroud)

dbg 文件位于该目录中:

e:\code-factory\symbols> dir /b
cdmod.dbg
cdmod.map
...
Run Code Online (Sandbox Code Playgroud)

.重新加载输出:

> .reload /f cdmod.dll

DBGHELP: e:\code-factory\symbols\cdmod.pdb - file not found
DBGHELP: e:\code-factory\symbols\dll\cdmod.pdb - file not found
DBGHELP: e:\code-factory\symbols\symbols\dll\cdmod.pdb - file not found
SYMSRV:  D:\Portable\Debugging Tools for Windows\x86\sym\cdmod.pdb\BD09115E93474ABCB6152149A23F95372\cdmod.pdb not found
SYMSRV:  Get File Path: /download/symbols/cdmod.pdb/BD09115E93474ABCB6152149A23F95372/cdmod.pdb


************* Symbol Loading Error Summary **************
Module name            Error
cdmod                    PDB not found : e:\code-factory\symbols\symbols\dll\cdmod.pdb
                Unable to locate the .pdb file in this location

                       PDB not found : cache*
                Unable to locate the .pdb file in this location

                       The system cannot find the file specified : SRV*http://msdl.microsoft.com/download/symbols
                The SYMSRV client failed to find a file in the UNC store, or there
                is an invalid UNC store (an invalid path or the pingme.txt file is
                not present in the root directory), or the file is present in the
                symbol server exclusion list.
Run Code Online (Sandbox Code Playgroud)

谢谢

bla*_*abb 5

Drag and Drop*.dbg 文件到模块的folder where exe exists
if表示而不是模块名称, 更改 dbg 文件的名称以匹配它,就像 do一样,windbg 应该加载您的 dbg 文件lm outputimagexxxxxxx
imagexxxxx.dbg.reload /fcv code symbols

预目录内容

    :\>dir /b
    msgbox.exe
    msgbox.map  < created via ida produce map         
Run Code Online (Sandbox Code Playgroud)

将地图转换为 dbg

    :\>map2dbg msgbox.exe  lucian wischik utility
    Converted 7 symbols.
Run Code Online (Sandbox Code Playgroud)

发布目录内容

    :\>dir /b
    msgbox.dbg
    msgbox.exe
    msgbox.map 
Run Code Online (Sandbox Code Playgroud)

在windbg中加载exe

    :\>windbg msgbox.exe    
0:000> lm 
start    end        module name
00400000 00404000   image00400000   (deferred) 

0:000> .reload /f
Reloading current modules
ERROR:Module load completed but symbols could not be loaded for image00400000 

0:000> lm e
start    end        module name
00400000 00404000   image00400000   (no symbols)

$ rename the msgbox.dbg to image00400000.dbg  
Run Code Online (Sandbox Code Playgroud)

重命名dbg文件

    :\>ren msgbox.dbg image00400000.dbg        
    :\>dir /b
    image00400000.dbg
    msgbox.exe
    msgbox.map
Run Code Online (Sandbox Code Playgroud)

带有加载到windbg中的CV代码符号信息的符号文件

0:000> .reload /f
Reloading current modules
0:000> lm e
start    end        module name
0:000> lm m i*
start    end        module name
00400000 00404000   image00400000   (codeview symbols)     
C:\Documents and Settings\Admin\Desktop\nosym\image00400000.dbg

0:000> x image00400000!*
00401000 image00400000!start = <no type information>
0040101a image00400000!MessageBoxA = <no type information>
00401020 image00400000!ExitProcess = <no type information>
00403000 image00400000!Caption = <no type information>
00403019 image00400000!Text = <no type information>

0:000> da image00400000!Caption
00403000  "Iczelion's tutorial no.2"
Run Code Online (Sandbox Code Playgroud)