[Qt-creator] Remote debugging
Francis Rammeloo
francis.rammeloo at gmail.com
Thu Aug 19 16:08:26 CEST 2010
2010/8/19 André Pönitz <andre.poenitz at nokia.com>
> On Thursday 19 August 2010 13:04:34 ext Francis Rammeloo wrote:
> > 2010/8/19 André Pönitz <andre.poenitz at nokia.com<mailto:
> andre.poenitz at nokia.com>>
> > > Does anyone have an idea what's going wrong?
> >
> > The problem is that gdb either cannot access the sources of your project
> > or is not properly instructed where to search for it.
> >
> > I'd need to have a look at the debugger log (right pane of Windows
> > ->Views->Debugger) to make a more educated guess.
> >
> > Andre'
> >
> > PS: Does the "Sources" view look ok?
> >
> > This is probably it. The sources view does list all the source files, but
> they are greyed out.
> >
> > Our project directory looks like this:
> >
> > ./include/
> > ./include/library1/
> > ./include/library2/
> > ./include/...
> > ./src/
> > ./src/library1
> > ./src/library2
> > ./src/...
> > ./src/source1.cpp
> > ./src/source2.cpp
> > ./src/...
> >
> > The Qt project was created in the project root directory. However, the
> debugger "Sources" view contains entries like:
> >
> > ../../../src/observer/observer.h
> >
> > I don't know why, perhaps it has something to do with the way our
> makefile buildsystem works.
>
> The paths stored in the binaries are usually relative to the position from
> where the compiler process was started.
>
>
> > dScriptFile: /home/francis/svn/byteblower/debugging/gdbinit (default: )
> > [...]
> > >&"source /home/francis/svn/byteblower/debugging/gdbinit\n"
> > t12:47:17.024
> > >~"************************** file
> /home/francis/svn/byteblower/debugging/server/src/byteblower \n"
> > t12:47:17.403
> > >~"************************** set annotate 1 \n"
>
> "set annotate 1" ? Why?
>
> Anyway, since you already use a custom initialization you should be
> able to put a "set substitute-path <from> <to>" there to give gdb
> the opportunity to update its idea of the location of the source files.
>
> That should actually fix the original issue.
>
>
Using 'substitute-path' didn't work (I think it was because the file list is
not yet received at that time). However I've been able to make it work by
adding 'dir' statements in my init script:
dir src
dir src/packet
...
It seems to work now.
Thanks for your help!
Francis
> Andre'
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100819/1e6babbe/attachment.html
More information about the Qt-creator-old
mailing list