This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
RE: Can't find source files
- From: "Dave Korn" <dk at artimi dot com>
- To: "'geneSmith'" <gene dot smith at sea dot siemens dot com>,<insight at sources dot redhat dot com>
- Date: Tue, 12 Oct 2004 17:42:49 +0100
- Subject: RE: Can't find source files
> -----Original Message-----
> From: insight-owner On Behalf Of geneSmith
> Sent: 12 October 2004 17:20
> > Ah, but it's not concatenating two items in the source path, it's
> > concatenating the filename stored in the debug info inside
> the file with
> > each of the source path components one by one. Under no
> circumstances would
> > it concatenate two different entries from the source path,
> which is what you
> > seemed to be hoping it would do when you put "/cygdrive/d" and
> > "/usr/home/gene" into the source path and wanted it to look in
> > "/cygdrive/d/usr/home/gene".
>
> Right, I want it to cat /cygdrive/d (set with dir) to /home/gene/source
> (obtain from the runtime file). Maybe I didn't explain this clearly.
You confused me by referring to $cdir, which i didn't think was the same
thing as the path embedded in the runtime file (else what would be the
point in concatenating it to itself?). IIUIC, $cdir is just a user-level
convenience variable that you can set however suits you.
> What I have was built by a 3rd party (macraigor) to support their
> emulator. They tell me the source was not modified in any way. It is
> from gdb 6.1 according to help|about.
Well, the new source path features are only in mainline (CVS), not in
either the 6.1 nor the 6.2 release branch. Seems like they gave you
documentation from a more up-to-date version of gdb than the actual binary
they gave you!
> you have to set dir like this is .gdbinit:
>
> dir
> /cygdrive/f/xfer/4.6.1-rtems/tools/build-rtems/powerpc-rtems/c
/myproj/lib/libbsp/powerpc/cp4431adv/startup
>
> (Plus other dir's for various source levels, quite complex)
>
> But if I move "build-rtems" directory up to root on the linux box and
> build there, I eliminate all the ../'s from the exe and all I
> would need
> to set in .gdbinit is
>
> dir /cygdrive/f
>
> which would be all I need since in exe all source paths rooted at
> /home/gene/... with no complex backtracking. But this simple
> case does not seem to work.
Well, you may _very_ well be able to work around it with a mount point or
symlink or two.
> > So it depends what kind of directory paths are already in
> the executable.
> > Use "objdump -g <executable file name>" to take a look.
>
> When I do this it always says "no recognizable debug
> information." But
> the source paths and debug information and source statements
> can be seen
> in the file with objdump -Sx <exe file> and with vi.
Ummm..... you do have to use the same kind of cross objdump as the cross
compiler and cross debugger, you know..... [guess it is getting late!]
cheers,
DaveK
--
Can't think of a witty .sigline today....