This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 2/3] Use gdb_realpath in gdb_bfd_open
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 3 Sep 2013 15:37:32 -0700
- Subject: Re: [patch 2/3] Use gdb_realpath in gdb_bfd_open
- Authentication-results: sourceware.org; auth=none
- References: <20130828160547 dot GC23977 at host2 dot jankratochvil dot net>
Jan Kratochvil writes:
> Hi,
>
> it seems logical to always call gdb_realpath() in gdb_bfd_open(), IIRC also
> suggested by Doug. Currently all the callers already pass in
> gdb_realpath()-canonicalized filenames but [patch 3/3] will change that.
>
> This patch has no user visible effect (except for lower GDB performance).
>
>
> Jan
>
>
> gdb/
> 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Use gdb_realpath in gdb_bfd_open.
> * gdb_bfd.c (struct gdb_bfd_data): Add field canonical_filename.
> (struct gdb_bfd_cache_search): Rename field filename to
> canonical_filename.
> (hash_bfd): New variable gdata. Use gdata->canonical_filename.
> (eq_bfd): Use gdata->canonical_filename and
> gdb_bfd_cache_search::canonical_filename.
> (gdb_bfd_open): New variables canonical_name, canonical_name_copy and
> gdata. Initialize canonical_name with gdb_realpath and use it.
> Call xfree for it when needed. Store it also to
> gdata->canonical_filename.
> (gdb_bfd_ref): Set gdata->canonical_filename.
> (gdb_bfd_unref): Use gdata->canonical_filename. Rename the use of
> struct gdb_bfd_cache_search.
Thanks.
ok by me.