This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Only compute realpath when basenames_may_differ is set
- From: Tom de Vries <tdevries at suse dot de>
- To: Tom Tromey <tromey at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 17 Jun 2019 00:34:20 +0200
- Subject: Re: [RFC] Only compute realpath when basenames_may_differ is set
- References: <20190530170315.9938-1-tromey@adacore.com> <87zhmkme75.fsf@tromey.com>
On 14-06-19 16:30, Tom Tromey wrote:
>>>>>> "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.
>
This caused PR24687 - "FAIL: gdb.base/fullname.exp: set breakpoint by
full path before/after loading symbols - built relative".
Thanks,
- Tom