|
|
Re: Remote debugging with ntox86-gdb and ddd
|
|
07/09/2008 12:16 PM
post10254
|
Re: Remote debugging with ntox86-gdb and ddd
Radoslaw Dyczek wrote:
> Some facts:
> 1. Cross developing on Linux x86 for QNX x86
> 2. Sourcefiles are symbolic links to the real sources
> 3. Not using Momentics
>
> Working:
> $ ntox86-gdb
> gdb> target qnx <ip>:<port>
> gdb> upload test /tmp/test
> gdb> sym test
> gdb> b main
> gdb> run /tmp/test
> gdb> c
> ..
> Here I can debug and list the sourcecode with binaries built from symbolic links and from real source code files.
Ok, do I understand correctly that the above works as expected?
>
> Not working!:
> $ ddd --debugger ntox86-gdb
> gdb> target qnx <ip>:<port>
> gdb> upload test /tmp/test
> gdb> sym test
>
> Now when I try to set the breakpoint (with the mouse) I've got the message that the source code file can not be found!
>
> When I use the ddd with a binary that is build from real files not Symbolic links, there are now problems! Debugging
remote linux both methods with/without symbolic links works fine..
>
> The problem is a binary which is built from symbolic links files and ddd.
I think that gcc will always resolve symbolic links and store physical paths; (see that by using ntox86-readelf -wl <
your binary>; look foor "The Directory Table" it will point to your physical paths).
gdb, in turn, uses this information to search for source files. I do not fully understand where the problem in your case
is: when using gdb alone (without ddd) you say it works fine.
When you are setting the breakpoint using ddd; can you see what exactly is it sending to gdb? What I would expect is
that it is trying to set breakpoint using full file path (symbolic path) and gdb can not match it with physical paths
stored in the binary.
Unfortunately, I am not familiar with ddd and can not help a lot with it - maybe it can do a path substitution for you
(before setting the breakpoint)?
|
|
|
|
|
|
|
Re: Remote debugging with ntox86-gdb and ddd
|
|
07/09/2008 1:42 PM
post10268
|
Re: Remote debugging with ntox86-gdb and ddd
You posting to Momentics IDE forum about ddd not woring is kind of funny.
Did you try to use IDE debugger?
Radoslaw Dyczek wrote:
> Some facts:
> 1. Cross developing on Linux x86 for QNX x86
> 2. Sourcefiles are symbolic links to the real sources
> 3. Not using Momentics
>
> Working:
> $ ntox86-gdb
> gdb> target qnx <ip>:<port>
> gdb> upload test /tmp/test
> gdb> sym test
> gdb> b main
> gdb> run /tmp/test
> gdb> c
> ..
> Here I can debug and list the sourcecode with binaries built from symbolic links and from real source code files.
>
> Not working!:
> $ ddd --debugger ntox86-gdb
> gdb> target qnx <ip>:<port>
> gdb> upload test /tmp/test
> gdb> sym test
>
> Now when I try to set the breakpoint (with the mouse) I've got the message that the source code file can not be found!
>
> When I use the ddd with a binary that is build from real files not Symbolic links, there are now problems! Debugging
remote linux both methods with/without symbolic links works fine..
>
> The problem is a binary which is built from symbolic links files and ddd.
>
> We have to use the symbolic links to our sourcecode coz we work with a versioning system and its cache..
>
> Any ideas?
>
>
>
>
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post10250
>
>
|
|
|
|
|