Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com, jimb@redhat.com
Subject: Re: crasher in C++ ABI code
Date: Thu, 12 Sep 2002 18:02:00 -0000	[thread overview]
Message-ID: <3D813913.694DD7F0@redhat.com> (raw)
In-Reply-To: <20020913003506.GA19479@nevyn.them.org>

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.


      reply	other threads:[~2002-09-13  1:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 17:23 Michael Snyder
2002-09-12 17:34 ` Daniel Jacobowitz
2002-09-12 18:02   ` Michael Snyder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D813913.694DD7F0@redhat.com \
    --to=msnyder@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox