From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: gdb-patches@sourceware.org
Subject: [commit] Fix flags type initialization bug
Date: Tue, 22 Aug 2006 20:24:00 -0000 [thread overview]
Message-ID: <200608221945.k7MJjJCr013229@elgar.sibelius.xs4all.nl> (raw)
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?
Mark
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;
}
next reply other threads:[~2006-08-22 19:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-22 20:24 Mark Kettenis [this message]
2006-08-22 20:57 ` Joel Brobecker
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=200608221945.k7MJjJCr013229@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--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