This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/9] bp_location.source_file -> bp_location.symtab
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 18 Jan 2013 16:59:23 +0400
- Subject: Re: [patch 1/9] bp_location.source_file -> bp_location.symtab
- References: <20130117215822.GB16249@host2.jankratochvil.net>
> currently bp_location stored symtab->filename copy. This could get
> for example incorrectly ambiguous during matching, also one could not
> display absolute filename for such breakpoint location as it did not
> store comp_dir etc.
>
> I found it easier to just reference symtab, which already provides all
> the functions.
I am not a specialist of this area, but I like the idea, and I see
that it already deals with the case where an objfile/symtab gets
freed, so we don't end up with a dangling pointer.
> - /* Source file name of this address. */
> + /* Source file name which was used to place this location. */
>
> - char *source_file;
> + struct symtab *symtab;
> };
One thing, though. Why preserve "file name" in the comment, since
this no longer is a filename?
--
Joel