This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] breakpoints/19474 [was Re: RFC: branching for GDB 7.11 soon? (possibly Wed)]
- From: Keith Seitz <keiths at redhat dot com>
- To: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Cc: yao dot qui at linaro dot org
- Date: Wed, 3 Feb 2016 17:33:23 -0800
- Subject: Re: [RFC] breakpoints/19474 [was Re: RFC: branching for GDB 7.11 soon? (possibly Wed)]
- Authentication-results: sourceware.org; auth=none
- References: <20160201030638 dot GG4008 at adacore dot com> <56AFB750 dot 3030702 at redhat dot com> <56B29F17 dot 6020603 at redhat dot com>
On 02/03/2016 04:45 PM, Keith Seitz wrote:
> Anyone have a better idea?
Well, same idea, but slightly faster...
> + /* Iterate through the symtabs, searching for matches to FULLNAME. */
> + for (ix = 0; VEC_iterate (symtab_ptr, symtabs, ix, symtab); ++ix)
> + {
> + const char *basename = lbasename (fullname);
> + char *symtab_with_dir;
> +
> + if (SYMTAB_DIRNAME (symtab) == NULL)
> + continue;
> +
> + symtab_with_dir = concat (SYMTAB_DIRNAME (symtab), SLASH_STRING,
> + basename, NULL);
I think that the base name of the default symtab will be the same as the
base name of any collected symtabs, so we need only really compare
directory names here.
Any other ideas?
Keith