From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29691 invoked by alias); 16 Aug 2002 03:26:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29643 invoked from network); 16 Aug 2002 03:26:19 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 16 Aug 2002 03:26:19 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17fXkl-0003vN-00 for ; Thu, 15 Aug 2002 22:26:23 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17fXlB-0007zi-00 for ; Thu, 15 Aug 2002 23:26:49 -0400 Date: Thu, 15 Aug 2002 20:26:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: patch for PR gdb/574 Message-ID: <20020816032649.GA30528@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <15676.21042.125481.349851@jackfruit.Stanford.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15676.21042.125481.349851@jackfruit.Stanford.EDU> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-08/txt/msg00409.txt.bz2 On Mon, Jul 22, 2002 at 11:42:58AM -0700, david carlton wrote: > For various reasons, I decided to delve into GDB recently, so I picked > bug 574 somewhat at random and decided to try to fix it. Here's a > patch. > > The problem: GDB tries to access an improper memory location while > trying to find run time type info on certain code compiled with G++ > 2.something. In the situation in question, GDB is trying to find the > vptr of an object that is a subclass of a class with virtual functions > and static member data. It looks for the information about the vptr > at a place where information about the static member data is actually > stored. This is a data structure with a useless (and very large) > bitpos field; adding this bitpos to a pointer causes that pointer to > point to the middle of nowhere. Oops. > > The solution: Get rid of the check for > > if (VALUE_ENCLOSING_TYPE(v) != VALUE_TYPE(v)) > > and the surrounding code in gnu-v2-abi.c(gnuv2_value_rtti_type). > 2002-07-22 david carlton > > * gnu-v2-abi.c (gnuv2_value_rtti_type): Eliminate test for being > enclosed. Fix PR gdb/574. This patch is approved. When your FSF papers have been processed, I would like to see you get write-after-approval access and commit it yourself; Andrew, does this count as "one good patch"? Also, I'd appreciate it if you would submit a testsuite patch to run the reduced testcase you wrote. More tests are always good. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer