[osg-users] more on Windows debugging

Thibault Genessay tibogens at gmail.com
Thu Sep 27 02:01:15 PDT 2007


Hi guys

Just my 2 cents: have you tried to put the pdb files along with the DLLs ?
My post-build step copies all the DLLs and the PDBs and stores them in the
same folder (say 'c:\libs\bin' - must be in %PATH%), and I've never
experienced any problems, except when a PDB does not match a DLL - which is
expected. This technique works with all the libraries I've been working with
so far, not only the OSG. The only drawback is that PDBs are huge files and
make the post-build step a bit slow.

Thibault

On 9/26/07, Andy Skinner <Andy.Skinner at mathworks.com> wrote:
>
> Thanks.  I have been looking at strings in these files, too.  I did not
> see the path to the cpp files listed in the pdb file.  I see paths to
> .obj files, a <something>.dll.embed.manifest.res file, some source files
> (f:\sp\public\sdk\inc\pshpack4.h, for example, and I don't even have a
> volume f) but no OSG source files.  There are some .exp files.
>
> Do you actually have the OSG (or in this case OpenThreads) source path
> names, up to the .cpp extension in your pdb file?
>
> In the meantime, I have been trying to debug just looking at stack
> traces.  I should see how far I can get using linux, too, although I'm
> not fond of gdb.
>
> thanks,
> andy
>
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
> Wojciech Lewandowski
> Sent: Wednesday, September 26, 2007 4:24 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] more on Windows debugging
>
> My INSTALL step does copy these DLLs to the different location. They
> were
> compiled in OpenSceneGraph\src\subproject and linked in
> OpenSceneGraph\lib\release or debug directories and INSTALL places them
> in
> OpenSceneGraph\bin directory. Technically its almost the same situation
> as
> yours. I did an extra test and moved DLLs to my sample project
> directory.
> Even if they were loaded from my app dir I was still able to step into
> OSG
> sources.
>
> Out of curiosity I opened OpenThreadsd.dll in hexeditor. Searched for
> OpenThreadsd.pdb string. There is only one line containing this string
> and
> this line contains full absolute path to the place where
> OpenThreadsd.pdb
> was built. In my case this is
> C:\dev\OSG_SVN\OpenSceneGraph\lib\Debug\OpenThreadsd.pdb. I also opened
> PDB
> in hexeditor. PDB seems to keep all the absolute paths to the source cpp
> files. My PDB still resides in this directory where DLL points (ie where
> DLL
> was linked) and my source OSG cpp files are still at the same directory
> where PDB points (ie where they were compiled). DLL may be moved
> wherever I
> want and VS is still able to find the sources. I guess VS first loads
> DLL,
> reads the PDB absolute path, then loads PDB and finds absolute paths to
> sources. I suppose VS may have trouble if PDB or cpp files absolute
> paths
> change. But it looks that DLL can be moved freely.
>
> PS. I use VS 2005 SP1 maybe it matters.
>
> Wojtek
>
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org]On Behalf Of Andy
> Skinner
> Sent: Wednesday, September 26, 2007 7:26 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] more on Windows debugging
>
>
> Thanks.  I have some of the same setup, but I don't get OSG from the
> place where I built it.  I'm afraid that moving the dlls has lost their
> connection with the source.
>
> I've got paths set to specify the source, but it doesn't seem to be
> helping, in the same way it didn't help you to remove them.  :)
>
> thanks,
> andy
>
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
> Wojciech Lewandowski
> Sent: Wednesday, September 26, 2007 11:43 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] more on Windows debugging
>
> Below is my OSG configuration. Apparently it works well with Visual
> Studio
> 2005 Express intellibase as I am able to step down into OSG sources from
> my
> OSG based projects. This may be no solution for you but I hope it may be
>
> helpful somehow if you will be able to find differences and maybe
> finally
> isolate the cause of the problems.
>
> 1. I keep all my projects in C:\DEV directory. All OSG svn related
> projects
> are kept in C:\DEV\OSG_SVN\ directory. And OpenSceneGraph distribution
> is
> located in C:\DEV\OSG_SVN\OpenSceneGraph.
>
> 2. After OpenScenGraph SVN update I run CMake and change OSG INSTALL
> directory variable to '.' (dot - current directory). It has the effect
> that
> install will make bin and lib subdirectories in OpenSceneGraph root
> directory. Ie:  C:\DEV\OSG_SVN\OpenSceneGraph\bin and
> C:\DEV\OSG_SVN\OpenSceneGraph\lib.
>
> DLLs and EXEs land in:
> C:\DEV\OSG_SVN\OpenSceneGraph\bin
>
> Libraries land in:
> C:\DEV\OSG_SVN\OpenSceneGraph\lib
>
> Headers remain in (Cmake is clever and does not copy them over
> themselves):
> C:\DEV\OSG_SVN\OpenSceneGraph\include
>
> 3. My system PATH variable inludes C:\DEV\OSG_SVN\OpenSceneGraph\bin
> directory
>
> 4. With VisualStudio I load Cmake generated sln and run BUILD ALL and
> then
> BUILD INSTALL to copy binaries to above directories. I do it twice -
> once
> for Release and once for Debug build.
>
> 5. At this point I am able to build, run, debug my projects and step
> into
> OSG sources (.cpp).
>
> 6. I don't know if this is relevant, but obviously to compile and link
> my
> projects I had set include and library paths in VisualStudio 2005.
> Menu
> Tools/Options/Projects and Solutions/VC++ Directories:
>
> Path for Include files is set to:
> C:\DEV\OSG_SVN\\OpenSceneGraph\include
>
> Path for Library files is set to:
> C:\DEV\OSG_SVN\\OpenSceneGraph\lib
>
> Path for Sources files has all subdirs of OpenSceneGraph\src listed in
> separate lines:
> C:\DEV\OSG_SVN\OpenSceneGraph\src\OpenThreads
> C:\DEV\OSG_SVN\OpenSceneGraph\src\osg
> C:\DEV\OSG_SVN\OpenSceneGraph\src\osgUtil
> and so on.
> I don't think that source paths are really that important. For some
> testing
> I removed one of  source path lines and Visual Studio was still able to
> find
> sources and step into them. But it may be neccessary during OSG build
> (when
> intellibase is generated) so I propose to set them as well. It won't
> make
> things worse.
>
> Hope this helps,
> Wojtek
>
>
>
> ----- Original Message -----
> From: "Andy Skinner" <Andy.Skinner at mathworks.com>
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Sent: Wednesday, September 26, 2007 2:47 PM
> Subject: Re: [osg-users] more on Windows debugging
>
>
> > Yep, I've got 2.1.12.
> >
> > I copy the bin and lib files elsewhere for installation, but I've
> > pointed visual studio at the pdb files and source files back in the
> > build area, though.
> >
> > I'm wondering whether Visual Studio knows these are related, however.
> I
> > tried starting up visual studio with the OpenSceneGraph.sln, and
> > attaching it to our program running with OSG libraries.  I open a
> source
> > file and try to make a breakpoint, and it says no symbols have been
> > loaded for that document.
> >
> > In the modules window, I can see that dll (osg23-osgUtild.dll), saying
> > that it loaded symbols from the pdb file I expect.
> >
> > So it really does make me wonder if it just doesn't that that this
> > source file is associated with this dll or pdb file.
> >
> > andy
> >
> > -----Original Message-----
> > From: osg-users-bounces at lists.openscenegraph.org
> > [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
> Robert
> > Osfield
> > Sent: Wednesday, September 26, 2007 8:39 AM
> > To: OpenSceneGraph Users
> > Subject: Re: [osg-users] more on Windows debugging
> >
> > Hi Andy,
> >
> > Out of curiosity which version of the OSG are you working with now?
> > Do they include Luigi's modifications for building libs and debug
> > files in the bin directory?
> >
> > Robert.
> >
> > On 9/26/07, Andy Skinner <Andy.Skinner at mathworks.com> wrote:
> >> I am definitely using the dlls associated with the pdb files, which
> > were
> >> generated in debug mode.  I can find where the libraries come from,
> >> where the pdb files come from, etc, and all is in place.  The symbols
> >> are in the stack trace as well.  Before I was using debug
> directories,
> >> it couldn't tell me where it was in OSG.
> >>
> >> One possible issue is that these dlls have been copied to other
> places
> >> since they were built, and they're not in the same place relative to
> > the
> >> pdb files or source code.  But they are the files built with the pdb
> >> files and source code.
> >>
> >> It has been suggested that I try to load the OSG solution and attach
> > to
> >> my program.  This may now make it harder to debug our code, but it
> > would
> >> be something.
> >>
> >> andy
> >>
> >> -----Original Message-----
> >> From: osg-users-bounces at lists.openscenegraph.org
> >> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Eric
> >> Sokolowsky
> >> Sent: Tuesday, September 25, 2007 5:16 PM
> >> To: OpenSceneGraph Users
> >> Subject: Re: [osg-users] more on Windows debugging
> >>
> >> Andy Skinner wrote:
> >> > I can step into header files, but not the source.  I wonder why
> that
> >> is.
> >> >
> >> > It seems I'm pretty close, since it is finding the header file.  If
> >> > anyone could suggest why Visual Studio can find one and not the
> > other,
> >> > I'd be grateful.  I've added both to the list of debug source.
> >>
> >> It sounds like there is no debugging information in the source files,
> >> especially if you're trying to step into the OSG sources which are
> >> located inside a library file. Header files are compiled into your
> >> program's sources so you can step into the functions contained
> > therein.
> >> Are you using a debug version of the library?
> >>
> >> Eric
> >>
> >> _______________________________________________
> >> osg-users mailing list
> >> osg-users at lists.openscenegraph.org
> >>
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> >> g
> >> _______________________________________________
> >> osg-users mailing list
> >> osg-users at lists.openscenegraph.org
> >>
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> > g
> >>
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> > g
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> >
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070927/a4b1b96b/attachment-0003.htm>


More information about the osg-users mailing list