This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use a distinguishing name for minidebug objfile
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 16 May 2018 17:35:41 +0100
- Subject: Re: [RFA] Use a distinguishing name for minidebug objfile
- References: <20180512155132.1335-1-tom@tromey.com>
On 05/12/2018 04:51 PM, Tom Tromey wrote:
> This patch was formerly submitted as part of a series to fix PR
> cli/19951. I never made the requested changes to that series, but
> this patch is useful independently, so I thought I would resubmit it.
I guess you may not be including this paragraph in the final
commit log, but just in case, note that it's cli/19551, not cli/19951.
> One part of PR cli/19951 is that the mini debug info objfile reuses the
Here too.
> name of the main objfile from which it comes. This can be seen because
> gdb claims to be reading symbols from the same file two times, like:
> --- a/gdb/minidebug.c
> +++ b/gdb/minidebug.c
> @@ -269,7 +269,10 @@ find_separate_debug_file_in_section (struct objfile *objfile)
> return NULL;
>
> #ifdef HAVE_LIBLZMA
> - abfd = gdb_bfd_openr_iovec (objfile_name (objfile), gnutarget, lzma_open,
> + std::string filename = (std::string (".gnu_debugdata for ")
> + + objfile_name (objfile));
I guess the "for" should be translatable. And since a language may need
to swap word order, I think that calls for using string_printf:
string_printf (_(".gnu_debugdata for %s"), objfile_name (objfile));
OK with that change.
Thanks,
Pedro Alves