From patchwork Tue Jan 19 17:08:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 10454 Received: (qmail 128996 invoked by alias); 19 Jan 2016 17:10:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 128912 invoked by uid 89); 19 Jan 2016 17:10:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL, BAYES_20, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=HX-Greylist:succeeded, HX-Greylist:SMTP, HX-Greylist:AUTH, HX-Greylist:sk:milter- X-Spam-User: qpsmtpd, 2 recipients X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 19 Jan 2016 17:10:31 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 62716B946; Tue, 19 Jan 2016 12:10:29 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Cc: Christophe Lyon , binutils@sourceware.org Subject: Re: [PATCH v3 1/6] Add support to readelf for reading FreeBSD ELF core notes. Date: Tue, 19 Jan 2016 09:08:26 -0800 Message-ID: <1692580.U9AqKNy0bL@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <1453084047-16175-1-git-send-email-jhb@FreeBSD.org> <1453084047-16175-2-git-send-email-jhb@FreeBSD.org> MIME-Version: 1.0 X-IsSubscribed: yes On Tuesday, January 19, 2016 05:50:30 PM Christophe Lyon wrote: > On 18 January 2016 at 03:27, John Baldwin wrote: > > binutils/ChangeLog: > > > > * readelf.c (get_freebsd_elfcore_note_type): New > > (process_note): Add support for FreeBSD core notes. > > > > include/ChangeLog: > > > > * elf/common.h (NT_FREEBSD_THRMISC): Define. > > (NT_FREEBSD_PROCSTAT_PROC): Define. > > (NT_FREEBSD_PROCSTAT_FILES): Define. > > (NT_FREEBSD_PROCSTAT_VMMAP): Define. > > (NT_FREEBSD_PROCSTAT_GROUPS): Define. > > (NT_FREEBSD_PROCSTAT_UMASK): Define. > > (NT_FREEBSD_PROCSTAT_RLIMIT): Define. > > (NT_FREEBSD_PROCSTAT_OSREL): Define. > > (NT_FREEBSD_PROCSTAT_PSSTRINGS): Define. > > (NT_FREEBSD_PROCSTAT_AUXV): Define. > > --- > > binutils/ChangeLog | 5 +++++ > > binutils/readelf.c | 35 +++++++++++++++++++++++++++++++++++ > > include/ChangeLog | 13 +++++++++++++ > > include/elf/common.h | 14 ++++++++++++++ > > 4 files changed, 67 insertions(+) > > > > diff --git a/binutils/ChangeLog b/binutils/ChangeLog > > index 21dcb2c..47773c9 100644 > > --- a/binutils/ChangeLog > > +++ b/binutils/ChangeLog > > @@ -1,3 +1,8 @@ > > +2016-01-09 John Baldwin > > + > > + * readelf.c (get_freebsd_elfcore_note_type): New > > + (process_note): Add support for FreeBSD core notes. > > + > > 2016-01-01 Alan Modra > > > > Update year range in copyright notice of all files. > > diff --git a/binutils/readelf.c b/binutils/readelf.c > > index 47ac1ad..fa9cda1 100644 > > --- a/binutils/readelf.c > > +++ b/binutils/readelf.c > > @@ -15388,6 +15388,37 @@ process_netbsd_elf_note (Elf_Internal_Note * pnote) > > } > > > > static const char * > > +get_freebsd_elfcore_note_type (unsigned e_type) > > +{ > > + static char buff[64]; > > Hi, > > This makes the build fail when using -Werror: > > ./../binutils/readelf.c: In function 'get_freebsd_elfcore_note_type': > ../../binutils/readelf.c:15416:15: error: unused variable 'buff' > [-Werror=unused-variable] > static char buff[64]; > > Christophe. My fault. Is this fix ok to push? commit 40068dccc4f9c86cb9e7c425c4ab3e272312affb Author: John Baldwin Date: Tue Jan 19 09:06:33 2016 -0800 Remove an unused variable. binutils/ChangeLog: * readelf.c (get_freebsd_elfcore_note_type): Remove unused variable. diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 1636045..24e2afe 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,9 @@ 2016-01-19 John Baldwin + * readelf.c (get_freebsd_elfcore_note_type): Remove unused variable. + +2016-01-19 John Baldwin + * readelf.c (get_freebsd_elfcore_note_type): New (process_note): Add support for FreeBSD core notes. diff --git a/binutils/readelf.c b/binutils/readelf.c index 01e3923..b4aaf51 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -15413,8 +15413,6 @@ process_netbsd_elf_note (Elf_Internal_Note * pnote) static const char * get_freebsd_elfcore_note_type (unsigned e_type) { - static char buff[64]; - switch (e_type) { case NT_FREEBSD_THRMISC: