This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Use a distinguishing name for minidebug objfile


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]