VS2005 - Manually loading debug symbols

2

2b|!2b==?

I am attempting to manually load debug symbols for a module. I am doing
it by carrying out the ff steps:

i). Select the call stack window
ii). right click and select 'Load Symbols' from displayed menu
iii). The Find Symbols: MyModule.pdb dialog box is displayed

However, when I navigate to and select the correct pdb file
(myModule.pdb), an error message is displayed with the message:

"The symbol myModule.pdb does not match the module"

I have rebuilt all modules and relinked without any errors - so I can't
explain whats happening - any ideas ?
 
O

Oleg Starodumov

I am attempting to manually load debug symbols for a module. I am doing
it by carrying out the ff steps:

i). Select the call stack window
ii). right click and select 'Load Symbols' from displayed menu
iii). The Find Symbols: MyModule.pdb dialog box is displayed

However, when I navigate to and select the correct pdb file
(myModule.pdb), an error message is displayed with the message:

"The symbol myModule.pdb does not match the module"

I have rebuilt all modules and relinked without any errors - so I can't
explain whats happening - any ideas ?

In Modules window (Debug | Windows | Modules) check the path
to that module. Is it loaded from the correct location?
 
2

2b|!2b==?

Oleg said:
In Modules window (Debug | Windows | Modules) check the path
to that module. Is it loaded from the correct location?

Hi Oleg,

The location is cotrrect, but the symbols are not loaded - when I look
in the Symbol Load information window, I get the message: #
"PDB does not match image"

this is what I don't understand, since all the modules have been
correctly built and linked to each other - with no errors.

One thing that may be of note however, is that I have defined Post build
events, that copy the binaries (i.e. dll etc) from the ./debug directory
to a %WorkingDirectory% the *.pdb files remain in the ./Debug directory.
This is the same for all the modules, so that only the executable images
are in %WorkingDirectory% - I don't know if this is the reason why VS is
getting confused?
 
O

Oleg Starodumov

The location is cotrrect, but the symbols are not loaded - when I look
in the Symbol Load information window, I get the message: #
"PDB does not match image"

this is what I don't understand, since all the modules have been
correctly built and linked to each other - with no errors.

One thing that may be of note however, is that I have defined Post build
events, that copy the binaries (i.e. dll etc) from the ./debug directory
to a %WorkingDirectory% the *.pdb files remain in the ./Debug directory.
This is the same for all the modules, so that only the executable images
are in %WorkingDirectory% - I don't know if this is the reason why VS is
getting confused?

VS should be able to handle it (path to the .pdb file is stored
in the executable, so it should be possible to find it).

In Modules window, r-click on the module and choose Symbol Load Information -
it should show where VS was looking for symbols. Did it look in the location
where the pdb file is?

Also, check the timestamps of the executable module and of the pdb file.
Are they the same?

Also, does the post build event only copies the executables? Or does it
modify them somehow?

Oleg
 
2

2b|!2b==?

Oleg said:
VS should be able to handle it (path to the .pdb file is stored
in the executable, so it should be possible to find it).

In Modules window, r-click on the module and choose Symbol Load Information -
it should show where VS was looking for symbols. Did it look in the location
where the pdb file is?

Yes. the search paths include the folder containing the required (newly
built) pdb file
Also, check the timestamps of the executable module and of the pdb file.
Are they the same?

I rebuilt all the modules in the solution (i.e. the entire solution).
Rebuilt solution with no errors. No linkage warning either. Regarding
timestamps - they are slightly different, but tahts because the modules
are large, and it takes a while to build each module. In this particular
case, the timestamps of the images (binaries) is a red hering (i.e.
not useful)
Also, does the post build event only copies the executables? Or does it
modify them somehow?

Yes, I only copy the executables to a working directory. I do not modify
them in anyway. Also, all the debug files are left behind in their
original folder.
 
O

Oleg Starodumov

Also, check the timestamps of the executable module and of the pdb file.
I rebuilt all the modules in the solution (i.e. the entire solution).
Rebuilt solution with no errors. No linkage warning either. Regarding
timestamps - they are slightly different, but tahts because the modules
are large, and it takes a while to build each module. In this particular
case, the timestamps of the images (binaries) is a red hering (i.e.
not useful)

Try to use this tool to check if the exe/pdb really match or not:
http://www.debuginfo.com/tools/chkmatch.html

You can also try to use it to enforce the matching if necessary
(it is better to have Edit & Continue disabled in the projects
if you are going to do that).

Oleg
 
2

2b|!2b==?

Oleg said:
Try to use this tool to check if the exe/pdb really match or not:
http://www.debuginfo.com/tools/chkmatch.html

You can also try to use it to enforce the matching if necessary
(it is better to have Edit & Continue disabled in the projects
if you are going to do that).

Oleg

Hi Oleg, I'm still not having any joy on this issue. Additionally, the
link you sent is dead - anyone knows how I can resolve this?. It seems
weird that images from the same build process, appear not to be related
--- what gives ?
 
O

Oleg Starodumov

Hi Oleg, I'm still not having any joy on this issue. Additionally, the
link you sent is dead - anyone knows how I can resolve this?. It seems
weird that images from the same build process, appear not to be related
--- what gives ?

Try again that link, it should work.

Oleg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top