Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* remapping absolute source paths
@ 2002-10-02 23:37 Felix Lee
  2002-10-03  1:07 ` Pierre Muller
  2002-10-03  7:31 ` Daniel Jacobowitz
  0 siblings, 2 replies; 5+ messages in thread
From: Felix Lee @ 2002-10-02 23:37 UTC (permalink / raw)
  To: gdb

Say I have a program that has some absolute path names in
the debugging info, like
    /a/x/foo.c

but /a doesn't exist here.  instead I have the source
in /p.

There's no easy way of making that work right in gdb, is
there?  If I say "dir /p", it's not going to look for
/p/x/foo.c.  If I say "dir /p/x" and for every other subdir
in the tree, then gdb will have problems picking /p/x/foo.c
from /p/y/foo.c

I'm thinking either

  1. there should be a way to tell gdb that "/a" in a
     source path should be remapped to "/p"

  2. gdb should try every sub-path of the sourcefile name,
     so it should try
        /p/a/x/foo.c
        /p/x/foo.c
        etc.

1 is less transparent, but it's easier to control
ambiguities, like if for some reason the executable has both
    /a/x/foo.c
    /b/y/foo.c
which seems unlikely, but I could see it happening when
linking several libraries and packages together.

I'm leaning towards implementing 1.  any thoughts?
--


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-03 17:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02 23:37 remapping absolute source paths Felix Lee
2002-10-03  1:07 ` Pierre Muller
2002-10-03  2:01   ` Felix Lee
2002-10-03  7:31 ` Daniel Jacobowitz
2002-10-03 10:07   ` Earl Chew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox