This is the mail archive of the gdb-patches@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: [RFC] Only compute realpath when basenames_may_differ is set


>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> A user noted that, when sources are symlinked, gdb annotations will
Tom> print the real path, rather than the name of the symlink.

Tom> It seems to me that it is better to print the name of the file that
Tom> was actually used in the build, unless there is some reason not to.

Tom> This patch implements this, with the caveat that it will not work when
Tom> basenames-may-differ is enabled.  The way this mode is currently
Tom> implemented, returning the symbolic (not real) path is not possible.

Tom> While I think it would be good to redo the source file name cache and
Tom> perhaps integrate it with class source_cache, I haven't done so here.

Tom> Regression tested on x86-64 Fedora 29.

Tom> gdb/ChangeLog
Tom> 2019-05-30  Tom Tromey  <tromey@adacore.com>

Tom> 	* source.c (find_and_open_source): Respect basenames_may_differ.

I'm checking this in now.

Tom


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