public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@freebsd.org>
To: gdb-patches@sourceware.org
Cc: Christophe Lyon <christophe.lyon@linaro.org>, binutils@sourceware.org
Subject: Re: [PATCH v3 1/6] Add support to readelf for reading FreeBSD ELF core notes.
Date: Tue, 19 Jan 2016 17:10:00 -0000	[thread overview]
Message-ID: <1692580.U9AqKNy0bL@ralph.baldwin.cx> (raw)
In-Reply-To: <CAKdteOYBk5giaUXXUHGsZsJA8-sW28aFwSEKDvJuK1H0k=k3gQ@mail.gmail.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

  reply	other threads:[~2016-01-19 17:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  2:28 [PATCH v3 0/6] Support kernel-backed user threads on FreeBSD John Baldwin
2016-01-18  2:28 ` [PATCH v3 5/6] Add support for LWP-based " John Baldwin
2016-01-18 12:37   ` Pedro Alves
2016-01-18 16:00   ` Eli Zaretskii
2016-01-18 17:06     ` John Baldwin
2016-01-18  2:28 ` [PATCH v3 4/6] Use LWP IDs with ptrace register requests " John Baldwin
2016-01-18 12:32   ` Pedro Alves
2016-01-18  2:28 ` [PATCH v3 2/6] Add a psuedosection for the NT_FREEBSD_THRMISC note John Baldwin
2016-01-18 12:38   ` Pedro Alves
2016-01-18 17:06     ` John Baldwin
2016-01-18  2:28 ` [PATCH v3 6/6] Dump register notes for each thread when generating a FreeBSD core John Baldwin
2016-01-18 12:38   ` Pedro Alves
2016-01-18  2:28 ` [PATCH v3 1/6] Add support to readelf for reading FreeBSD ELF core notes John Baldwin
2016-01-19 16:50   ` Christophe Lyon
2016-01-19 17:10     ` John Baldwin [this message]
2016-01-19 17:12       ` Pedro Alves
2016-01-18  2:28 ` [PATCH v3 3/6] Display per-thread information for threads in FreeBSD cores John Baldwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1692580.U9AqKNy0bL@ralph.baldwin.cx \
    --to=jhb@freebsd.org \
    --cc=binutils@sourceware.org \
    --cc=christophe.lyon@linaro.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).