Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

no symbols have been loaded for dll

380 views
Skip to first unread message

Jeff Kish

unread,
Jul 17, 2007, 11:09:51 AM7/17/07
to
Hi.
I'm sure I had this working last week, but I can't figure out what went south.

I'm writing a dll using visual studio 2005 c++.

The dll is called by non msvc application, loaded dynamically.
After I fire up the application, I go into visual studio 2005 and use:
debug | attach to process and select my application.

When the ide gets going, all the break points go see-through, and
when I put my mouse cursor over them I see a message saying:

"The breakpoint will not currently be hit".
"No symbols have been loaded for this document".

When I right click on the project class view and look at the properties, I see
the active configuration is debug.
The command and working directory for debugging are the exe and directory
where the application exe is.
Under ghe configration properties | general the output directory is the
directory where the application resides.

Is this a known issue, or can someone tell me how to get back to being able to
see/step through breakpoints in a development setup like this, or tell me how
to solve the problem?

Thanks
Jeff Kish

Victor Bazarov

unread,
Jul 17, 2007, 2:34:40 PM7/17/07
to

I believe you need to make DevStudio know where the symbols for
your DLL are (and make sure that they actually correspond to the
module loaded by the application). IOW, tell the debugger _where_
the PDB is, and find and remove all non-current duplicates of the
DLL and PDB.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


David Lowndes

unread,
Jul 17, 2007, 6:48:03 PM7/17/07
to
>I'm sure I had this working last week, but I can't figure out what went south.

Jeff,

Do you use version control - something that you can diff to find out
if you've inadvertently changed something in the project file?

>When I right click on the project class view and look at the properties, I see
>the active configuration is debug.

Even though it's a debug configuration, are the compiler and linker
options still set to supply the debug information?

Dave

Chris Becke

unread,
Jul 18, 2007, 4:00:45 AM7/18/07
to

"Jeff Kish" <jeff...@mro.com> wrote in message
news:hjmp93t0ja7lp914j...@4ax.com...

> Hi.
> I'm sure I had this working last week, but I can't figure out what went
> south.
>
> I'm writing a dll using visual studio 2005 c++.
>
> The dll is called by non msvc application, loaded dynamically.
> After I fire up the application, I go into visual studio 2005 and use:
> debug | attach to process and select my application.

First, you dont have to do this. Inside VS6 and im sure VS 2005 you can set
the
"executable for debugging session" to be the exe of the app you wish to
debug.

This allows you to launch the non-msvc app directly from visual studio with
the debugger attached. As an extra bonus, because the current project is of
the dll it automatically gets loaded by the workspace.

> When the ide gets going, all the break points go see-through, and
> when I put my mouse cursor over them I see a message saying:
>
> "The breakpoint will not currently be hit".
> "No symbols have been loaded for this document".

In order for the debugger to associate source file lines to actual machine
code it needs to find the _correct_ debugging information for the dll
modules you are debugging.

Points of failure are:
1. the debugger finds the incorrect .pdb file.
2. the debugger doesnt find a pdb at all.
3. the debugger finds the correct pdb, but it doesnt contain line number
information.

To resolve point #1, delete all instances of the .pdb and .dll that exist on
your PC. Do a rebuild all and verify the files are being built to where you
expect them.

To resolve point #2, ensure that if you copy the .dll file anywhere, make
sure the .pdb is copied to the same place.

To resolve point #3, check the compiler settings to ensure that debug
information is being generated AND check the linker settings to ensure that
the compiled debug info is being linked in.

> When I right click on the project class view and look at the properties, I
> see
> the active configuration is debug.
> The command and working directory for debugging are the exe and directory
> where the application exe is.
> Under ghe configration properties | general the output directory is the
> directory where the application resides.

As above, if you copy those settings into your DLL project then you will be
able to debug directly from the development IDE.


Jeff Kish

unread,
Jul 19, 2007, 10:35:32 AM7/19/07
to
On Wed, 18 Jul 2007 10:00:45 +0200, "Chris Becke" <chris...@gmail.com>
wrote:

thanks much for the detail. I certainly did not know about the pdb file
importance.

for some reason it had stopped working, and I got it to restart
working by targetting the debug directory for output (I had targeted the
exe directory), and copied the dll over manually.

Then the attach debug procedure was able to get hooked up
correctly and find the symbols.
It almost sounds like an idiosyncratic bug...

I had not copied the pdb file anywhere, and it is very strange that the
procedure I did made things work. Sometimes I just wonder...

Jeff Kish

0 new messages