From: Daniel Jacobowitz <drow@mvista.com>
To: Benjamin Kosnik <bkoz@redhat.com>
Cc: Michael Elizabeth Chastain <mec@shout.net>,
gdb-patches@sources.redhat.com
Subject: Re: gdb.c++ testsuite 1.3: member_data_static.exp (resend)
Date: Tue, 28 May 2002 09:47:00 -0000 [thread overview]
Message-ID: <20020528162254.GA13157@branoic.them.org> (raw)
In-Reply-To: <20020528090331.5b74b2ae.bkoz@redhat.com>
On Tue, May 28, 2002 at 09:03:31AM -0700, Benjamin Kosnik wrote:
>
> > This test script has 6 FAILs in each configuration tested.
> >
> > FAIL: gdb.c++/m-static.exp: derived template object, static enum
> > FAIL: gdb.c++/m-static.exp: template object, static const bool
> > FAIL: gdb.c++/m-static.exp: template object, static const int
> > FAIL: gdb.c++/m-static.exp: template object, static long
> > FAIL: gdb.c++/m-static.exp: template object, static enum
> > FAIL: gdb.c++/m-static.exp: template object, static enum
>
> That is what I get too.
>
> > Something in the toolchain is optimizing away unused static objects.
>
> Right. I need this to work as the testsuite is written please.
>
> > static value_derived = <optimized out>}
> >
> > (gdb) print test3
> > $2 = {static data = <optimized out>}
>
> ... which makes debugging C++ a pain in the ass, and the reason I sat
> down and wrote this file. I consider gdb to be broken. Hopefully this
> test case will facilitate a fix to the problem noted above.
>
> > This happens with both -gdwarf-2 and -gstabs+ on all gcc's and
> > binutil's in my test bed.
>
> Me too.
>
> > I fixed this by adding references to the data fields, like this:
> >
> > refer(&test2.value_derived);
> > refer(&test3.data);
> > refer(&test3.data.value_derived);
>
> Errr. No, unless you expect everybody using gdb and C++ do to this as
> well. In which case, you should put this in the FAQ.
>
> Is there something I am missing?
Is the data truly optimized out of the file? If it is, then
considering GDB to be broken doesn't help anything; the information
isn't there to work with. On the other hand, if it isn't and GDB is
not finding it, then that is a different problem and something worth
testing.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-05-28 16:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-27 16:02 Michael Elizabeth Chastain
2002-05-28 9:17 ` Benjamin Kosnik
2002-05-28 9:47 ` Daniel Jacobowitz [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-05-30 12:29 Michael Elizabeth Chastain
2002-05-30 12:12 Michael Elizabeth Chastain
2002-05-29 8:34 Michael Elizabeth Chastain
2002-05-28 15:26 Michael Elizabeth Chastain
2002-05-29 8:09 ` Benjamin Kosnik
2002-05-29 8:19 ` Daniel Jacobowitz
2002-05-29 8:34 ` B. Kosnik
2002-05-29 9:39 ` Daniel Jacobowitz
2002-05-30 7:56 ` Benjamin Kosnik
2002-05-27 6:28 Benjamin Kosnik
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=20020528162254.GA13157@branoic.them.org \
--to=drow@mvista.com \
--cc=bkoz@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
/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