From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24131 invoked by alias); 13 Sep 2002 01:02:13 -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 24077 invoked from network); 13 Sep 2002 01:02:13 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 13 Sep 2002 01:02:13 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA15305; Thu, 12 Sep 2002 17:51:02 -0700 (PDT) Message-ID: <3D813913.694DD7F0@redhat.com> Date: Thu, 12 Sep 2002 18:02:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com, jimb@redhat.com Subject: Re: crasher in C++ ABI code References: <3D812FF4.8BA9C266@redhat.com> <20020913003506.GA19479@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00238.txt.bz2 Daniel Jacobowitz wrote: > > 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. Yes, I've found it, I'm about to submit a patch.