This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2] Support .dwp with the name of symlinked binary file
- From: Tom Tromey <tromey at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 09 Sep 2013 11:53:25 -0600
- Subject: Re: [patchv2] Support .dwp with the name of symlinked binary file
- Authentication-results: sourceware.org; auth=none
- References: <20130905131839 dot GA8618 at host2 dot jankratochvil dot net> <CADPb22RKV2hHQXHdy4f0vjxhnfjDVA1AzHUpwNh06xu+NejZWw at mail dot gmail dot com>
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> Also, it may be that not all objfiles have a bfd (I don't remember off
Doug> hand, but whether it's true or not is irrelevant to my point), and if
Doug> not all objfiles have a bfd we can't just remove objfile->name
Doug> (assuming objfiles-without-bfds have a name).
There are objfiles without a BFD. E.g., Java makes one. Maybe the JIT
stuff too. These do still have a name -- objfiles are required to have
a name.
Doug> OTOH, if objfiles-without-bfds have a name, we could store it in a
Doug> different place (objfile->foo_name), and thus still effectively have
Doug> an implementation that only maintains one name, not two
I don't understand this. It doesn't seem any different from the present
situation.
I think it is fine if you want to have different names for printing and
for canonical use. It's also ok to change the BFD cache to work
differently (it realpaths since that is convenient and gets good caching
behavior; but you could store some other form of the path instead and
accept cache misses).
It's worth noting that sometimes it is useful to see the full path.
E.g., it can be a way to notice that gdb or the inferior is doing
something unexpected.
Tom