From: Joel Brobecker <brobecker@adacore.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] Fix flags type initialization bug
Date: Tue, 22 Aug 2006 20:57:00 -0000 [thread overview]
Message-ID: <20060822204119.GC1060@adacore.com> (raw)
In-Reply-To: <200608221945.k7MJjJCr013229@elgar.sibelius.xs4all.nl>
> I'm working on printing proper flags for some registers on SPARC when
> I hit this. It makes gdb crash, so perhaps I should put this on the
> release branch too?
Is there a way to cause GDB 6.5 to crash, or is only after you
applied your changes?
Right now, I don't have any plan in making a minor release from
the 6.5 branch, but I don't mind making one if the fixes of this
kind keep piling up.
> Index: ChangeLog
> from Mark Kettenis <kettenis@gnu.org>
>
> * gdbtypes.c (init_flags_type): Set all fields to zero instead of
> just the first one.
>
> Index: gdbtypes.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtypes.c,v
> retrieving revision 1.105
> diff -u -p -r1.105 gdbtypes.c
> --- gdbtypes.c 1 Mar 2006 19:34:46 -0000 1.105
> +++ gdbtypes.c 22 Aug 2006 19:41:50 -0000
> @@ -878,7 +878,7 @@ init_flags_type (char *name, int length)
> type = init_type (TYPE_CODE_FLAGS, length, TYPE_FLAG_UNSIGNED, name, NULL);
> TYPE_NFIELDS (type) = nfields;
> TYPE_FIELDS (type) = TYPE_ALLOC (type, nfields * sizeof (struct field));
> - memset (TYPE_FIELDS (type), 0, sizeof (struct field));
> + memset (TYPE_FIELDS (type), 0, nfields * sizeof (struct field));
>
> return type;
> }
--
Joel
next prev parent reply other threads:[~2006-08-22 20:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-22 20:24 Mark Kettenis
2006-08-22 20:57 ` Joel Brobecker [this message]
2006-08-22 21:31 ` Mark Kettenis
2006-08-23 17:38 ` Joel Brobecker
2006-08-25 2:24 ` Mark Kettenis
2006-09-01 19:02 ` Joel Brobecker
2006-09-01 21:18 ` Mark Kettenis
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=20060822204119.GC1060@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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