From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105205 invoked by alias); 29 Aug 2015 23:37:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 105183 invoked by uid 89); 29 Aug 2015 23:36:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_40,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pa0-f52.google.com Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 29 Aug 2015 23:36:58 +0000 Received: by pacdd16 with SMTP id dd16so98883774pac.2; Sat, 29 Aug 2015 16:36:56 -0700 (PDT) X-Received: by 10.68.95.225 with SMTP id dn1mr25911223pbb.128.1440891416707; Sat, 29 Aug 2015 16:36:56 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by smtp.gmail.com with ESMTPSA id nj9sm9725182pdb.77.2015.08.29.16.36.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Aug 2015 16:36:56 -0700 (PDT) From: Doug Evans To: binutils@sourceware.org Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Include minimal symbol flavour name in LOC_UNRESOLVED error message. References: Date: Sat, 29 Aug 2015 23:37:00 -0000 In-Reply-To: (Doug Evans's message of "Sat, 29 Aug 2015 16:19:07 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00850.txt.bz2 Doug Evans writes: > Hi. > > 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 > > bfd/ > * 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)).