From: Alan Modra <amodra@gmail.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
gdb-patches@sourceware.org, binutils@sourceware.org
Subject: Re: [rfc][1/3] Remote core file generation: BFD support
Date: Mon, 16 Jan 2012 23:23:00 -0000 [thread overview]
Message-ID: <20120116223030.GN3708@bubble.grove.modra.org> (raw)
In-Reply-To: <201111091818.pA9IIQ5F005486@d06av02.portsmouth.uk.ibm.com>
On Wed, Nov 09, 2011 at 07:18:26PM +0100, Ulrich Weigand wrote:
> OK, good point. I've just copied this from the PowerPC implementation,
> which needs to be fixed as well ... I'll provide an updated patch.
Applied.
* elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
trailing garbage in the note.
* elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.306
diff -u -p -r1.306 elf32-ppc.c
--- bfd/elf32-ppc.c 3 Dec 2011 00:55:49 -0000 1.306
+++ bfd/elf32-ppc.c 16 Jan 2012 22:25:06 -0000
@@ -1920,7 +1920,7 @@ ppc_elf_write_core_note (bfd *abfd, char
va_list ap;
va_start (ap, note_type);
- memset (data, 0, 32);
+ memset (data, 0, sizeof (data));
strncpy (data + 32, va_arg (ap, const char *), 16);
strncpy (data + 48, va_arg (ap, const char *), 80);
va_end (ap);
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.373
diff -u -p -r1.373 elf64-ppc.c
--- bfd/elf64-ppc.c 11 Jan 2012 09:28:44 -0000 1.373
+++ bfd/elf64-ppc.c 16 Jan 2012 22:25:12 -0000
@@ -2721,7 +2721,7 @@ ppc64_elf_write_core_note (bfd *abfd, ch
va_list ap;
va_start (ap, note_type);
- memset (data, 0, 40);
+ memset (data, 0, sizeof (data));
strncpy (data + 40, va_arg (ap, const char *), 16);
strncpy (data + 56, va_arg (ap, const char *), 80);
va_end (ap);
--
Alan Modra
Australia Development Lab, IBM
prev parent reply other threads:[~2012-01-16 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 18:57 Ulrich Weigand
2011-10-21 20:37 ` Mark Kettenis
2011-10-21 20:58 ` Ulrich Weigand
2011-11-09 16:00 ` Pedro Alves
2011-11-09 18:18 ` Ulrich Weigand
2012-01-16 23:23 ` Alan Modra [this message]
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=20120116223030.GN3708@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
--cc=uweigand@de.ibm.com \
/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