News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Can not find symbols

Started by Magnum, December 28, 2012, 11:17:16 AM

Previous topic - Next topic

Magnum

I can't figure out why it can't find the symbol file.

Does anyone know how to fix this problem in Windbg ?

\\*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -

Thanks.

CommandLine: C:\masm32\SOURCE\excep.exe
Symbol search path is: srv*C:\WINDOWS\Symbols*
Executable search path is:
ModLoad: 00400000 00403000 image00400000
0:000> .reload
Reloading current modules
.
0:000> .reload
Reloading current modules

*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

japheth

The MS debug engine ( which is used by WinDbg ) stops very early in NTDLL.DLL ( before any dll initialization routines have been called ). It wants to load the symbols of NTDLL.DLL - which usually aren't there and, more importantly, are only needed in very few cases.

The symbol file ( which is MS debug engine terminology for the linker-generated .PDB file ) for your application most likely is not the problem here. Enter "lm" in the WinDbg command line and it will tell you if the .PDB file for your application has been found:


*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll!DbgBreakPoint:
7c90120e cc              int     3
0:000> lm
start    end        module name
00400000 00407000   win32tls C (private pdb symbols)  win32tls.pdb
77c10000 77c68000   MSVCRT     (deferred)             
7c800000 7c8f6000   kernel32   (deferred)             
7c900000 7c9b2000   ntdll      (export symbols)       D:\WINDOWS\system32\ntdll.dll


As you can - perhaps - see, I also get this error msg, but the win32tls.pdb file has been found and everything is ok.

Magnum

This is what I got.
I compiled the open program with debug info.

Andy

0:000> lm
start    end        module name
00400000 00404000   image00400000   (deferred)             
77f10000 77f59000   GDI32      (deferred)             
7c800000 7c8f6000   kernel32   (deferred)             
7c900000 7c9b2000   ntdll      (pdb symbols)          c:\symbols\ntdll.pdb\CEFC0863B1F84130A11E0F54180CD21A2\ntdll.pdb
7e410000 7e4a1000   user32     (deferred)             
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

japheth

Quote from: Magnum on December 30, 2012, 03:54:38 AM
I compiled the open program with debug info.

Good. If you did everything right ( that is: not just told the assembler, but also the linker to generate debug info ), then your linker will have created a symbol file image00400000.pdb ( which is kinda strange name - do you always give your self-written apps such names? ).

If you have located it, just enter "ld image00400000" and WinDbg will load your symbol file.

If you cannot find the symbol file for your application, you either forgot to tell the linker to create one or the assembler and the linker you're using are not quite compatible as far as debug info is concerned.

Magnum

0:000> ld image00400000
*** WARNING: Unable to verify checksum for image00400000
*** ERROR: Module load completed but symbols could not be loaded for image00400000
Symbols loaded for image00400000

I assembled program with debug info from both ml and link.


Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

japheth