Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: carlton@kealia.com, mec.gnu@mindspring.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc/testsuite/c++] c2.exp, new script for class lookup
Date: Tue, 25 Nov 2003 04:22:00 -0000	[thread overview]
Message-ID: <20031125042239.F29A34B409@berman.michael-chastain.com> (raw)

dc> What else are you going to add?  How about cast-classes or subclasses
dc> or something like that?

Well, I started out by picking up PR gdb/186, because it was in my
big directory of incomplete gdb stuff that I'm working on.

The issue with gdb/186 is:

  . program has base class "A", derived class "B"
  . program has an object of type "B"
  . program has "A *" and "B *" pointers to the "B" object
  . user puts breakpoint on closing "}" of function
    . this is after the destructors are called!
  . "print *b_p" does bad things after the destructor happens
     . because, as we figured out, B::~B changes the vptr

This PR is several years old so it's not something you broke.  :)

So I reproduced the PR and I was writing a test case, gdb186.exp.
I figured that I should put in some simple tests before the
destructor happens to show that gdb is working fine in that instance.

And, well, the simple tests revealed a simpler problem,
without any of the destructor-changes-vptr issues.

So once the immediate problem gets fixed, I can get back to worrying
about "print *b_p" after B::~B is called.

Also virtfunc.exp has another regression since 6.0 (PR gdb/1405, virtual
baseclass botch).  I wish it was related, but the dates don't match up
-- it manifested on 2003-10-02.  When I crack open gdb/1405 I might find
that class2.exp is a good place for an explicit test.

And I'll probably throw in any other class-related stuff that I come
across because it's easier to work with gdb_test_multiple, kfail,
test_compiler_info, and all that good stuff.

Michael C


             reply	other threads:[~2003-11-25  4:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25  4:22 Michael Elizabeth Chastain [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-25 15:03 Michael Elizabeth Chastain
2003-11-24 21:02 Michael Elizabeth Chastain
2003-11-24 21:04 ` Daniel Jacobowitz
2003-11-25  1:26 ` David Carlton
2003-11-24 20:31 Michael Elizabeth Chastain
2003-11-24 20:42 ` David Carlton

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=20031125042239.F29A34B409@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=carlton@kealia.com \
    --cc=gdb-patches@sources.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