将dbg符号文件加载到WinDbg
我有一个映射文件的DLL,我正试图调试。我使用Map2Dbg工具将其转换为DBG文件,并将其放入符号路径 但是,如果发出.reload/f mydll.dll无效,则会发生符号加载错误 然后我试着用它来诊断!sym嘈杂,它告诉我Windbg查找正确的符号路径,但只查找PDB文件(mydll.PDB) 有没有办法强迫Windbg找到我的DBG文件 编辑: 以下是一些进一步的信息: Windbg中的符号搜索路径:将dbg符号文件加载到WinDbg,windbg,debug-symbols,Windbg,Debug Symbols,我有一个映射文件的DLL,我正试图调试。我使用Map2Dbg工具将其转换为DBG文件,并将其放入符号路径 但是,如果发出.reload/f mydll.dll无效,则会发生符号加载错误 然后我试着用它来诊断!sym嘈杂,它告诉我Windbg查找正确的符号路径,但只查找PDB文件(mydll.PDB) 有没有办法强迫Windbg找到我的DBG文件 编辑: 以下是一些进一步的信息: Windbg中的符号搜索路径: > .sympath e:\code-factory\symbols;cache
> .sympath
e:\code-factory\symbols;cache*;SRV*http://msdl.microsoft.com/download/symbols
dbg文件位于该目录中:
e:\code-factory\symbols> dir /b
cdmod.dbg
cdmod.map
...
.重新加载输出:
> .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.
谢谢
将*.dbg文件拖放到存在exe的文件夹中
如果模块的lm输出
独立于imagexxxxxxx
而不是模块名称
更改dbg文件的名称以匹配它,如imagexxxxx.dbg
执行.reload/f
,windbg应使用cv代码符号加载您的dbg文件
目录前内容
:\>dir /b
msgbox.exe
msgbox.map < created via ida produce map
:\>dir /b
msgbox.dbg
msgbox.exe
msgbox.map
发布目录内容
:\>dir /b
msgbox.exe
msgbox.map < created via ida produce map
:\>dir /b
msgbox.dbg
msgbox.exe
msgbox.map
在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
重命名dbg文件
:\>ren msgbox.dbg image00400000.dbg
:\>dir /b
image00400000.dbg
msgbox.exe
msgbox.map
将cv代码符号信息加载到windbg的符号文件
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"
0:000>。重新加载/f
重新加载电流模块
0:000>lme
起始端模块名称
0:000>lm m i*
起始端模块名称
00400000 00404000图像00400000(代码视图符号)
C:\Documents and Settings\Admin\Desktop\nosym\image00400000.dbg
0:000>x图像00400000*
00401000图像00400000!开始=
0040101a图像00400000!MessageBoxA=
00401020图像00400000!出口流程=
00403000图像00400000!标题=
00403019图像00400000!文本=
0:000>da image00400000!说明文字
00403000“Iczelion第2号教程”
当我尝试.reload
时,我看到Windbg正在寻找.dbg文件。您能发布.reload
命令的输出吗?