From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17026 invoked by alias); 22 Aug 2006 20:41:33 -0000 Received: (qmail 17017 invoked by uid 22791); 22 Aug 2006 20:41:32 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Aug 2006 20:41:28 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 58F1548CECA; Tue, 22 Aug 2006 16:41:22 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19582-01-7; Tue, 22 Aug 2006 16:41:22 -0400 (EDT) Received: from takamaka.act-europe.fr (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id EA25948CC50; Tue, 22 Aug 2006 16:41:21 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A4F4E47EFA; Tue, 22 Aug 2006 13:41:19 -0700 (PDT) Date: Tue, 22 Aug 2006 20:57:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [commit] Fix flags type initialization bug Message-ID: <20060822204119.GC1060@adacore.com> References: <200608221945.k7MJjJCr013229@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608221945.k7MJjJCr013229@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.4i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00168.txt.bz2 > 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 > > * 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