Discussion:
First time using WinDBg. Debugger can not find symbols in the .pdb file
(too old to reply)
cappy2112
2007-05-22 00:44:05 UTC
Permalink
I've compiled a very small (5K) Native application, using
WinDDK3790.1830, target is WinXp, using the WinXP Checked Build.

I can run the program just fine, but when I point WinDBG to the
directory containing the exe and PDB files, WinDBG tells me there are
no symbols in the PDB file.

When I open the pdb file with a hex editor, I can see my symbols.

Do I need to make any changes to the makefile.def file to enabled
*more* smybolic information?
Daniel Pravat [MSFT]
2007-05-22 05:05:11 UTC
Permalink
Please use !sym noisy extension command to activate the symbol loading logging. In the following listing it is easy to see what location was probed by debugger and what was the operation result.

0:000> .sympath c:\mySymLocation
DBGHELP: Symbol Search Path: c:\mySymLocation
Symbol search path is: c:\mySymLocation
0:000> !sym noisy
noisy mode - symbol prompts off
0:000> .reload /f notepad.exe
DBGHELP: c:\mySymLocation\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\exe\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\symbols\exe\notepad.pdb - file not found
DBGHELP: C:\Windows\system32\notepad.pdb - file not found
DBGHELP: notepad.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for notepad.exe
DBGHELP: notepad - no symbols loaded
0:000>

Daniel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by cappy2112
I've compiled a very small (5K) Native application, using
WinDDK3790.1830, target is WinXp, using the WinXP Checked Build.
I can run the program just fine, but when I point WinDBG to the
directory containing the exe and PDB files, WinDBG tells me there are
no symbols in the PDB file.
When I open the pdb file with a hex editor, I can see my symbols.
Do I need to make any changes to the makefile.def file to enabled
*more* smybolic information?
cappy2112
2007-05-22 16:35:20 UTC
Permalink
Thanks Daniel.
I've enabled the noisy extension, and reloaded the symbols, with the
following result.

BGENG: native.exe - Partial symbol image load missing image info
DBGHELP: No header for native.exe. Searching for dbg file
DBGHELP: C:\WINDDK\3790.1830\obj\i386\native.dbg - file not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\exe\native.dbg - path not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\symbols\exe\native.dbg - path
not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\exe\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\symbols\exe\native.dbg - path not
found
DBGHELP: .\native.dbg - file not found
DBGHELP: .\exe\native.dbg - path not found
DBGHELP: .\symbols\exe\native.dbg - path not found
DBGHELP: native.exe missing debug info. Searching for pdb anyway
DBGHELP: native - private symbols & lines
C:\WINDDK\3790.1830\obj\i386\native.pdb - unmatched


No dbg file is created, only a .pdb file is created using the checked
build.
How do I enable generating the dbg file- or do other issues prevail?

On May 21, 10:05 pm, "Daniel Pravat [MSFT]"
Post by Daniel Pravat [MSFT]
Please use !sym noisy extension command to activate the symbol loading logging. In the following listing it is easy to see what location was probed by debugger and what was the operation result.
0:000> .sympath c:\mySymLocation
DBGHELP: Symbol Search Path: c:\mySymLocation
Symbol search path is: c:\mySymLocation
0:000> !sym noisy
noisy mode - symbol prompts off
0:000> .reload /f notepad.exe
DBGHELP: c:\mySymLocation\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\exe\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\symbols\exe\notepad.pdb - file not found
DBGHELP: C:\Windows\system32\notepad.pdb - file not found
DBGHELP: notepad.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for notepad.exe
DBGHELP: notepad - no symbols loaded
0:000>
Daniel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm
Daniel Pravat [MSFT]
2007-05-22 18:36:04 UTC
Permalink
The PDB format is usually used instead of the DBG format.
I believe you have the symbol file in more than one location and you are
picking the wrong one. The default build environment generates the PDB in
the same location with the EXE file. In the instalation folder there is
symchk.exe tool that can be used in solving your problem.

C:\>c:\debug.last\symchk.exe /v <your EXE> /S <your SYM location>

Daniel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by cappy2112
Thanks Daniel.
I've enabled the noisy extension, and reloaded the symbols, with the
following result.
BGENG: native.exe - Partial symbol image load missing image info
DBGHELP: No header for native.exe. Searching for dbg file
DBGHELP: C:\WINDDK\3790.1830\obj\i386\native.dbg - file not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\exe\native.dbg - path not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\symbols\exe\native.dbg - path
not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\exe\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\symbols\exe\native.dbg - path not
found
DBGHELP: .\native.dbg - file not found
DBGHELP: .\exe\native.dbg - path not found
DBGHELP: .\symbols\exe\native.dbg - path not found
DBGHELP: native.exe missing debug info. Searching for pdb anyway
DBGHELP: native - private symbols & lines
C:\WINDDK\3790.1830\obj\i386\native.pdb - unmatched
No dbg file is created, only a .pdb file is created using the checked
build.
How do I enable generating the dbg file- or do other issues prevail?
On May 21, 10:05 pm, "Daniel Pravat [MSFT]"
Post by Daniel Pravat [MSFT]
Please use !sym noisy extension command to activate the symbol loading
logging. In the following listing it is easy to see what location was
probed by debugger and what was the operation result.
0:000> .sympath c:\mySymLocation
DBGHELP: Symbol Search Path: c:\mySymLocation
Symbol search path is: c:\mySymLocation
0:000> !sym noisy
noisy mode - symbol prompts off
0:000> .reload /f notepad.exe
DBGHELP: c:\mySymLocation\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\exe\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\symbols\exe\notepad.pdb - file not found
DBGHELP: C:\Windows\system32\notepad.pdb - file not found
DBGHELP: notepad.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for notepad.exe
DBGHELP: notepad - no symbols loaded
0:000>
Daniel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified
athttp://www.microsoft.com/info/cpyright.htm
Ivan Brugiolo [MSFT]
2007-05-22 22:23:02 UTC
Permalink
On top of Daniel's recomendation, can you explain how you build the binary ?
Certain unsupported compilers, like VC6,
cannot generate by default debug information understandable by
dbgeng/dbgehlp.
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by cappy2112
Thanks Daniel.
I've enabled the noisy extension, and reloaded the symbols, with the
following result.
BGENG: native.exe - Partial symbol image load missing image info
DBGHELP: No header for native.exe. Searching for dbg file
DBGHELP: C:\WINDDK\3790.1830\obj\i386\native.dbg - file not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\exe\native.dbg - path not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\symbols\exe\native.dbg - path
not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\exe\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\symbols\exe\native.dbg - path not
found
DBGHELP: .\native.dbg - file not found
DBGHELP: .\exe\native.dbg - path not found
DBGHELP: .\symbols\exe\native.dbg - path not found
DBGHELP: native.exe missing debug info. Searching for pdb anyway
DBGHELP: native - private symbols & lines
C:\WINDDK\3790.1830\obj\i386\native.pdb - unmatched
No dbg file is created, only a .pdb file is created using the checked
build.
How do I enable generating the dbg file- or do other issues prevail?
On May 21, 10:05 pm, "Daniel Pravat [MSFT]"
Post by Daniel Pravat [MSFT]
Please use !sym noisy extension command to activate the symbol loading
logging. In the following listing it is easy to see what location was
probed by debugger and what was the operation result.
0:000> .sympath c:\mySymLocation
DBGHELP: Symbol Search Path: c:\mySymLocation
Symbol search path is: c:\mySymLocation
0:000> !sym noisy
noisy mode - symbol prompts off
0:000> .reload /f notepad.exe
DBGHELP: c:\mySymLocation\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\exe\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\symbols\exe\notepad.pdb - file not found
DBGHELP: C:\Windows\system32\notepad.pdb - file not found
DBGHELP: notepad.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for notepad.exe
DBGHELP: notepad - no symbols loaded
0:000>
Daniel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified
athttp://www.microsoft.com/info/cpyright.htm
cappy2112
2007-05-22 16:30:58 UTC
Permalink
Thanks Daniel.
I've enabled the noisy extension, and reloaded the symbols, with the
following result.

BGENG: native.exe - Partial symbol image load missing image info
DBGHELP: No header for native.exe. Searching for dbg file
DBGHELP: C:\WINDDK\3790.1830\obj\i386\native.dbg - file not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\exe\native.dbg - path not found
DBGHELP: C:\WINDDK\3790.1830\obj\i386\symbols\exe\native.dbg - path
not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\exe\native.dbg - file not found
DBGHELP: C:\WINDOWS\XP_SP2Symbols\symbols\exe\native.dbg - path not
found
DBGHELP: .\native.dbg - file not found
DBGHELP: .\exe\native.dbg - path not found
DBGHELP: .\symbols\exe\native.dbg - path not found
DBGHELP: native.exe missing debug info. Searching for pdb anyway
DBGHELP: native - private symbols & lines
C:\WINDDK\3790.1830\obj\i386\native.pdb - unmatched


No dbg file is created, only a .pdb file is created using the checked
build.
How do I enable generating the dbg file- or do other issues prevail?

On May 21, 10:05 pm, "Daniel Pravat [MSFT]"
Post by Daniel Pravat [MSFT]
Please use !sym noisy extension command to activate the symbol loading logging. In the following listing it is easy to see what location was probed by debugger and what was the operation result.
0:000> .sympath c:\mySymLocation
DBGHELP: Symbol Search Path: c:\mySymLocation
Symbol search path is: c:\mySymLocation
0:000> !sym noisy
noisy mode - symbol prompts off
0:000> .reload /f notepad.exe
DBGHELP: c:\mySymLocation\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\exe\notepad.pdb - file not found
DBGHELP: c:\mySymLocation\symbols\exe\notepad.pdb - file not found
DBGHELP: C:\Windows\system32\notepad.pdb - file not found
DBGHELP: notepad.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for notepad.exe
DBGHELP: notepad - no symbols loaded
0:000>
Daniel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm
cappy2112
2007-05-22 22:36:59 UTC
Permalink
On May 22, 3:23 pm, "Ivan Brugiolo [MSFT]"
Post by Ivan Brugiolo [MSFT]
On top of Daniel's recomendation, can you explain how you build the binary ?
Certain unsupported compilers, like VC6,
cannot generate by default debug information understandable by dbgeng/dbgehlp.
I'm using the Server 2003 DDK- build utility, using the 32-bit Checked
Build environment
cappy2112
2007-05-22 22:39:20 UTC
Permalink
On May 22, 3:23 pm, "Ivan Brugiolo [MSFT]"
Post by Ivan Brugiolo [MSFT]
On top of Daniel's recomendation, can you explain how you build the binary ?
Certain unsupported compilers, like VC6,
cannot generate by default debug information understandable by dbgeng/dbgehlp.
I'm using the Server 2003 DDK- build utility, using the 32-bit Checked
Build environment

Loading...