This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Include minimal symbol flavour name in LOC_UNRESOLVED error message.
- From: Doug Evans <xdje42 at gmail dot com>
- To: binutils at sourceware dot org
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 29 Aug 2015 16:35:56 -0700
- Subject: Re: [PATCH] Include minimal symbol flavour name in LOC_UNRESOLVED error message.
- Authentication-results: sourceware.org; auth=none
- References: <m3bndpel90 dot fsf at sspiff dot org>
Doug Evans <firstname.lastname@example.org> writes:
> The error message that is printed if a LOC_UNRESOLVED minsym isn't
> found can be a bit confusing. The goal here is to clarify what the
> term "symbol" means in the error message.
> 2015-08-29 Doug Evans <email@example.com>
> * targets.c (enum bfd_flavour): Add comment.
> (bfd_flavour_name): New function.
> * bfd-in2.h: Regenerate.
> +const char *
> +bfd_flavour_name (bfd *abfd)
> + switch (abfd->xvec->flavour)
Btw, a better way to do this would be to take the flavour enum
as the parameter instead of the bfd. Why does the caller
have to have a bfd in order to get the print form of the
enum? I'll do that assuming the patch is otherwise ok.
Callers with a bfd could then just do
bfd_flavour_name (bfd_get_flavour (abfd)).