This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2 6/11] New option 'set filename-display'
- 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, 29 Jan 2013 13:35:39 -0800
- Subject: Re: [patchv2 6/11] New option 'set filename-display'
- References: <20130127223430.GG15252@host2.jankratochvil.net>
Jan Kratochvil writes:
> +/* See commentary in source.h. */
> +
> +const char *
> +symtab_to_filename (struct symtab *symtab)
> +{
> + if (filename_display_string == filename_display_basename)
> + return lbasename (symtab->filename);
> + else if (filename_display_string == filename_display_absolute)
> + return symtab_to_fullname (symtab);
> + else if (filename_display_string == filename_display_relative)
> + return symtab->filename;
> + else
> + internal_error (__FILE__, __LINE__, _("invalid filename_display_string"));
> +}
nit:
IWBN if this function were named symtab_to_filename_for_display or symtab_to_display_filename or some such.