This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] Only compute realpath when basenames_may_differ is set
- From: Tom Tromey <tromey at adacore dot com>
- To: Tom Tromey <tromey at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 14 Jun 2019 08:30:54 -0600
- Subject: Re: [RFC] Only compute realpath when basenames_may_differ is set
- References: <firstname.lastname@example.org>
>>>>> "Tom" == Tom Tromey <email@example.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> 2019-05-30 Tom Tromey <firstname.lastname@example.org>
Tom> * source.c (find_and_open_source): Respect basenames_may_differ.
I'm checking this in now.