This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should "dir" override the full path encoded in debug info?


> Date: Fri, 23 Jun 2006 23:59:20 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb@sources.redhat.com
> 
> Next step, we debug the binary we copied. Because we know the relevant
> sources are in dup, and not in the original location where they were
> located when we did the built, the user used the "dir" command to
> point GDB to the new location:
> 
>         (gdb) dir dup
>         Source directories searched: /<path>/dup:$cdir:$cwd
> 
> But then, trying to print the contents of foo.c reveals that we display
> the file from the original location. So the "dir" command was not taken
> into account:
> 
>         (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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]