This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Should "dir" override the full path encoded in debug info?
> Date: Sat, 24 Jun 2006 00:10:58 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb@sources.redhat.com
>
> > > (gdb) list foo.c:1
> > > warning: Source file is more recent than executable.
> >
> > What happens if you remove or rename the file foo.c in the original
> > location?
>
> GDB finds the file in dup/.
Then I think this is by design: GDB gives preference to existing files
in the default places.
> So basically, at this time, it appears that we're stuck.
You could try duping GDB into not finding the original file with some
symlink trick.