From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24853 invoked by alias); 13 Sep 2002 00:34:50 -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 24846 invoked from network); 13 Sep 2002 00:34:50 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 13 Sep 2002 00:34:50 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17pfMD-000124-00; Thu, 12 Sep 2002 20:34:53 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17peQM-000573-00; Thu, 12 Sep 2002 20:35:06 -0400 Date: Thu, 12 Sep 2002 17:34:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: gdb-patches@sources.redhat.com, jimb@redhat.com Subject: Re: crasher in C++ ABI code Message-ID: <20020913003506.GA19479@nevyn.them.org> Mail-Followup-To: Michael Snyder , gdb-patches@sources.redhat.com, jimb@redhat.com References: <3D812FF4.8BA9C266@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D812FF4.8BA9C266@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-09/txt/msg00229.txt.bz2 On Thu, Sep 12, 2002 at 05:23:16PM -0700, Michael Snyder wrote: > Attention, all you c++_abi_savvy folk... > > I found a crasher bug while running the gdb testsuite on a COFF > toolchain. TYPE_VPTR_FIELDNO returned -1; I haven't looked into > this mechanism, but I assume that's a mistake. When it was applied > via value_field, of course it yielded a garbage value. > > So looking at coffread.c, I see that there are no references > to vptr_fieldno nor vptr_basetype -- these fields are never > initialized. They're initialized in alloc_type to -1... and further by stabs and dwarf2. > I'm just wondering where to go from here. Is it possible to > obtain these values from COFF? If not, perhaps their access > methods should check for an invalid value? COFF is not the issue. coffread is just like elfread; it's an object file reader. The question is where your debug information comes from. Mdebug? Stabs? DWARF-2? If it's real mdebug instead of stabs-in-mdebug, you're squat out of luck for C++. Also, TYPE_VPTR_FIELDNO is often -1 by design; see fill_in_vptr_fieldno and the comment above it. - Is fill_in_vptr_fieldno getting called? - If it were called would it succeed? - Probably its return value needs to be checked somewhere. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer