From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9743 invoked by alias); 21 Jul 2006 00:28:06 -0000 Received: (qmail 9735 invoked by uid 22791); 21 Jul 2006 00:28:06 -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; Fri, 21 Jul 2006 00:28:04 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 5DE2E48CE93 for ; Thu, 20 Jul 2006 20:27:58 -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 02541-01-5 for ; Thu, 20 Jul 2006 20:27:58 -0400 (EDT) Received: from takamaka.act-europe.fr (S0106000f3d96cb6d.vc.shawcable.net [24.84.195.170]) by nile.gnat.com (Postfix) with ESMTP id 1B2AD48CE23 for ; Thu, 20 Jul 2006 20:27:58 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 7C50F47EFA; Thu, 20 Jul 2006 17:27:57 -0700 (PDT) Date: Fri, 21 Jul 2006 00:28:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [commit] Fix a C++ segfault Message-ID: <20060721002757.GA3711@adacore.com> References: <20060720225443.GA31345@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060720225443.GA31345@nevyn.them.org> 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-07/txt/msg00280.txt.bz2 Hello Daniel, > 2006-07-20 Daniel Jacobowitz > > * eval.c (evaluate_struct_tuple): Skip static fields. I don't know C++ too much - how often is this likely to occur? Would this be a safe patch for the branch? Thanks! > Index: eval.c > =================================================================== > RCS file: /cvs/src/src/gdb/eval.c,v > retrieving revision 1.61 > diff -u -p -r1.61 eval.c > --- eval.c 18 Feb 2006 20:47:54 -0000 1.61 > +++ eval.c 20 Jul 2006 22:36:01 -0000 > @@ -283,6 +283,10 @@ evaluate_struct_tuple (struct value *str > if (variantno < 0) > { > fieldno++; > + /* Skip static fields. */ > + while (fieldno < TYPE_NFIELDS (struct_type) > + && TYPE_FIELD_STATIC_KIND (struct_type, fieldno)) > + fieldno++; > subfieldno = fieldno; > if (fieldno >= TYPE_NFIELDS (struct_type)) > error (_("too many initializers")); -- Joel