From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: pedro@codesourcery.com (Pedro Alves)
Cc: gdb-patches@sourceware.org, binutils@sourceware.org
Subject: Re: [rfc][1/3] Remote core file generation: BFD support
Date: Wed, 09 Nov 2011 18:18:00 -0000 [thread overview]
Message-ID: <201111091818.pA9IIQ5F005486@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <201111091600.30812.pedro@codesourcery.com> from "Pedro Alves" at Nov 09, 2011 04:00:30 PM
Pedro Alves wrote:
> On Friday 21 October 2011 19:56:09, Ulrich Weigand wrote:
>
> > Index: bfd/elf32-arm.c
> > ===================================================================
> > RCS file: /cvs/src/src/bfd/elf32-arm.c,v
> > retrieving revision 1.278
> > diff -u -p -r1.278 elf32-arm.c
> > --- bfd/elf32-arm.c 19 Oct 2011 07:17:13 -0000 1.278
> > +++ bfd/elf32-arm.c 21 Oct 2011 16:49:54 -0000
> > @@ -1986,6 +1986,55 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, E
> > return TRUE;
> > }
> >
> > +static char *
> > +elf32_arm_nabi_write_core_note (bfd *abfd, char *buf, int *bufsiz,
> > + int note_type, ...)
> > +{
> > + switch (note_type)
> > + {
> > + default:
> > + return NULL;
> > +
> > + case NT_PRPSINFO:
> > + {
> > + char data[124];
> > + va_list ap;
> > +
> > + va_start (ap, note_type);
> > + memset (data, 0, 28);
> > + strncpy (data + 28, va_arg (ap, const char *), 16);
> > + strncpy (data + 44, va_arg (ap, const char *), 80);
>
> The `data' buffer should be zero initialized, to avoid
> leaving garbage on the core, when the passed in fname and
> psargs are less than 16 and 80 bytes long respectively.
> It's true the caller does that itself today, but
> your patch 2 (rightly) makes it not do so anymore.
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.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2011-11-09 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 18:56 Ulrich Weigand
2011-10-21 19:54 ` Mark Kettenis
2011-10-21 20:53 ` Ulrich Weigand
2011-11-09 16:00 ` Pedro Alves
2011-11-09 18:18 ` Ulrich Weigand [this message]
2012-01-16 22:31 ` Alan Modra
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=201111091818.pA9IIQ5F005486@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).