Module loaded but symbols could not be loaded 2

When I try to load the 1394 camera driver symbols the debugger tells me:

“ERROR Module loaded but symbols could not be loaded”.

I have used !sym noisy. I know now that it tries to load a .dbg file and
when I build the driver it only creates a .pdb file (I’m building under
Visual Studio 6.0).

I know that the .pdb file contains all the infomation symbols, but I don’t
know how to “say” it to WinDebugger. I get the WinDebugger loads the
symbols (in fact I have set some brakpoints) but I don’t know how to do it
again. Can someone help me?

Tranks.

I don’t think Windbg uses .dbg files; I could be wrong.

As for .pdb files, ordinarily the executable says where the .pdb was created.
If that information hasn’t changed and if the .pdb in fact matches the
executable, you shouldn’t need anything more. Sometimes you do, as in the
present case. Then you can set the symbol path. Read about the .sympath
command.

If things still don’t work, Windbg cannot find a .pdb that matches the
executable, and that probably means there is a mismatch.

Miguel wrote:

I know that the .pdb file contains all the infomation symbols, but I don’t
know how to “say” it to WinDebugger. I get the WinDebugger loads the
symbols (in fact I have set some brakpoints) but I don’t know how to do it
again. Can someone help me?


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP

Windbg can use DBG files. You would have a hard time debugging NT4 or
Win2k if that wasn’t the case. :slight_smile:

Information about the symbols files for a binary are in the debug
directory of the pe image. You can use “link -dump -headers ”
to dump the debug directory. You’ll see what symbol file(s) the binary
is associated with.

As for your particular issues:
If you split the binary after it was made, then a DBG file would
have been produced. If you did that then point windbg to the dbg file

There are some scenerios where the debugger has to guess the
symbol file name(s). A good example is when the image header is paged
out, thus preventing the debugger from reading the debug directory to
get the right name. You can see if this is the case by doing “!lmi
”. If you get a nice printout of image details then the header
is paged in, else it is paged out.

There are a few workarounds for this issue, but since they’ve
gone through a couple of iterations I’m not sure what currently works.

Work around #1: Place the PDB in the symbol path (non symbol
server). The debugger will load it even though it doesn’t match.

Work around #2: Place a copy of the binary in the symbol path.
The debugger will find the binary and use the debug directory from that
image for the symbol searching. NOTE: You will get symbols which match
the binary in the sympath. It is up to you to ensure that the bin in
the sympath matches what is running. Otherwise you will not get any
error message, but symbols will act strange, like point to the middle of
functions and such.

Often sym noisy spits out a lot of stuff. It is possible you
are focusing on some noise in the output, and have overlooked the real
error elsewhere in the output.

Hope that helps.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Antognini
Sent: Monday, October 06, 2003 1:37 PM
To: Kernel Debugging Interest List
Subject: [windbg] Re: Module loaded but symbols could not be loaded 2

I don’t think Windbg uses .dbg files; I could be wrong.

As for .pdb files, ordinarily the executable says where the .pdb was
created.
If that information hasn’t changed and if the .pdb in fact matches the
executable, you shouldn’t need anything more. Sometimes you do, as in
the present case. Then you can set the symbol path. Read about the
.sympath command.

If things still don’t work, Windbg cannot find a .pdb that matches the
executable, and that probably means there is a mismatch.

Miguel wrote:

> I know that the .pdb file contains all the infomation symbols, but I
> don’t know how to “say” it to WinDebugger. I get the WinDebugger loads

> the symbols (in fact I have set some brakpoints) but I don’t know how
> to do it again. Can someone help me?


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Good information. One question, however: Doesn’t workaround 1 have the same
potential problem as workaround 2? Weird results if the symbols don’t match
the executable in use?

Nathan Nesbit wrote:

Windbg can use DBG files.

[snip]

Work around #1: Place the PDB in the symbol path (non symbol
server). The debugger will load it even though it doesn’t match.

Work around #2: Place a copy of the binary in the symbol path.
The debugger will find the binary and use the debug directory from that
image for the symbol searching. NOTE: You will get symbols which match
the binary in the sympath. It is up to you to ensure that the bin in
the sympath matches what is running. Otherwise you will not get any
error message, but symbols will act strange, like point to the middle of
functions and such.


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP

Yes that behavior would be the same.

The difference is in #1 you should get some kind of message from the
debugger indicating that it was unable to verify that the symbols match.
So it is more clear that it is a “proceed at your own risk” situation.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Antognini
Sent: Monday, October 06, 2003 3:56 PM
To: Kernel Debugging Interest List
Subject: [windbg] Re: Module loaded but symbols could not be loaded 2

Good information. One question, however: Doesn’t workaround 1 have the
same potential problem as workaround 2? Weird results if the symbols
don’t match the executable in use?

Nathan Nesbit wrote:

Windbg can use DBG files.

[snip]

Work around #1: Place the PDB in the symbol path (non symbol
server). The debugger will load it even though it doesn’t match.

Work around #2: Place a copy of the binary in the symbol path.
The debugger will find the binary and use the debug directory from
that image for the symbol searching. NOTE: You will get symbols which

match the binary in the sympath. It is up to you to ensure that the
bin in the sympath matches what is running. Otherwise you will not
get any error message, but symbols will act strange, like point to the

middle of functions and such.


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com