From: David Carlton <carlton@kealia.com>
To: gdb <gdb@sources.redhat.com>
Cc: Daniel Jacobowitz <drow@mvista.com>
Subject: gcc 3.4 regression in gdb.cp/namespace.exp
Date: Tue, 16 Mar 2004 00:23:00 -0000 [thread overview]
Message-ID: <yf2brmx3aia.fsf@hawaii.kealia.com> (raw)
I just ran the testsuite with g++ (GCC) 3.5.0 20040119 (experimental)
(which is right after 3.4 branched), and I get a regression on
gdb.cp/namespace.exp, on both mainline and 6.1.
ptype CClass::NestedClass
There is no field named NestedClass
(gdb) FAIL: gdb.cp/namespace.exp: ptype CClass::NestedClass
Just to double-check, I reverted my recent dwarf2read.c patch (I
tested in with that GCC a week ago, but who knows), and it still
fails. Daniel, might it be an issue with a recent patch of yours? (I
have a more specific guess below.)
Here's some more info: the classes in question are defined as follows:
class CClass {
public:
int x;
class NestedClass {
public:
int y;
};
};
The debug info that I'm getting looks like this:
.uleb128 0x17 # (DIE (0x480) DW_TAG_structure_type)
.long 0x505 # DW_AT_sibling
.long .LASF2 # DW_AT_name: "CClass"
.byte 0x1 # DW_AT_declaration
.uleb128 0x18 # (DIE (0x48a) DW_TAG_structure_type)
.long .LASF1 # DW_AT_name: "NestedClass"
.byte 0x4 # DW_AT_byte_size
.byte 0x1 # DW_AT_decl_file
.byte 0x5e # DW_AT_decl_line
.uleb128 0x8 # (DIE (0x492) DW_TAG_member)
.ascii "y\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file
.byte 0x60 # DW_AT_decl_line
.long 0x19e # DW_AT_type
.byte 0x2 # DW_AT_data_member_location
.byte 0x23 # DW_OP_plus_uconst
.uleb128 0x0
(Rest of CClass::NestedClass definition omitted.) Then, later on, we
see:
.uleb128 0x7 # (DIE (0x6ec) DW_TAG_structure_type)
.long 0x75d # DW_AT_sibling
.long 0x480 # DW_AT_specification
.byte 0x4 # DW_AT_byte_size
.byte 0x1 # DW_AT_decl_file
.byte 0x5b # DW_AT_decl_line
.uleb128 0x8 # (DIE (0x6f8) DW_TAG_member)
.ascii "x\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file
.byte 0x5d # DW_AT_decl_line
.long 0x19e # DW_AT_type
.byte 0x2 # DW_AT_data_member_location
.byte 0x23 # DW_OP_plus_uconst
.uleb128 0x0
(Rest of CClass definition omitted.)
So we have a die giving a declaration for CClass which in turn
contains a die giving a definition for CClass::NestedClass. Which in
turn suggests that the loop in process_structure_scope should be run
even if the current DIE is a declaration.
I'll fiddle around with an appropriate patch either later today or
tommorow.
I really hate the way we test our DWARF 2 reader - there's no way to
generate the debug info by hand to give a particular scenario, so
instead we have to hope that we can find the magic version of GCC and
magic way of writing a test case to trigger the bug in question.
Sigh.
David Carlton
carlton@kealia.com
next reply other threads:[~2004-03-16 0:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-16 0:23 David Carlton [this message]
2004-03-16 18:25 ` David Carlton
2004-03-16 2:39 Michael Elizabeth Chastain
2004-03-16 16:00 ` Daniel Jacobowitz
2004-03-16 16:37 ` David Carlton
2004-03-16 16:33 Michael Elizabeth Chastain
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=yf2brmx3aia.fsf@hawaii.kealia.com \
--to=carlton@kealia.com \
--cc=drow@mvista.com \
--cc=gdb@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