Reputation: 259
I have a MAP file for a DLL which I'm trying to debug. I converted this to a DBG file with the Map2Dbg-tool and put it into the symbol path.
Issuing a .reload /f mydll.dll doesn't work though, a symbol load error occurs.
I then tried to diagnose it with !sym noisy and it tells me that Windbg looks into the correct symbol path, but only for a PDB file (mydll.pdb).
Is there a way to force Windbg to find my DBG file?
Edit:
Here are some further infos:
Symbol search path in Windbg:
> .sympath
e:\code-factory\symbols;cache*;SRV*http://msdl.microsoft.com/download/symbols
dbg-file is in that directory:
e:\code-factory\symbols> dir /b
cdmod.dbg
cdmod.map
...
.reload output:
> .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.
Thanks
Upvotes: 6
Views: 21218
Reputation: 9007
Drag and Drop
the *.dbg file to the folder where exe exists
if lm output
of the module indivates imagexxxxxxx
instead of the module name
change the name of dbg file to match it like imagexxxxx.dbg
do .reload /f
and windbg should load your dbg file with cv code symbols
pre directory contents
:\>dir /b
msgbox.exe
msgbox.map < created via ida produce map
convert map to dbg
:\>map2dbg msgbox.exe lucian wischik utility
Converted 7 symbols.
post directory contents
:\>dir /b
msgbox.dbg
msgbox.exe
msgbox.map
load exe in windbg
:\>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
renaming the dbg file
:\>ren msgbox.dbg image00400000.dbg
:\>dir /b
image00400000.dbg
msgbox.exe
msgbox.map
symbol file with cv code symbol info loaded into 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"
Upvotes: 5