This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v3 1/6] Add support to readelf for reading FreeBSD ELF core notes.
- From: John Baldwin <jhb at freebsd dot org>
- To: gdb-patches at sourceware dot org
- Cc: Christophe Lyon <christophe dot lyon at linaro dot org>, binutils at sourceware dot org
- Date: Tue, 19 Jan 2016 09:08:26 -0800
- Subject: Re: [PATCH v3 1/6] Add support to readelf for reading FreeBSD ELF core notes.
- Authentication-results: sourceware.org; auth=none
- References: <1453084047-16175-1-git-send-email-jhb at FreeBSD dot org> <1453084047-16175-2-git-send-email-jhb at FreeBSD dot org> <CAKdteOYBk5giaUXXUHGsZsJA8-sW28aFwSEKDvJuK1H0k=k3gQ at mail dot gmail dot com>
On Tuesday, January 19, 2016 05:50:30 PM Christophe Lyon wrote:
> On 18 January 2016 at 03:27, John Baldwin <jhb@freebsd.org> 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 <jhb@FreeBSD.org>
> > +
> > + * readelf.c (get_freebsd_elfcore_note_type): New
> > + (process_note): Add support for FreeBSD core notes.
> > +
> > 2016-01-01 Alan Modra <amodra@gmail.com>
> >
> > 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 <jhb@FreeBSD.org>
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 <jhb@FreeBSD.org>
+ * readelf.c (get_freebsd_elfcore_note_type): Remove unused variable.
+
+2016-01-19 John Baldwin <jhb@FreeBSD.org>
+
* 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:
--
John Baldwin