Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: gcc 3.4 regression in gdb.cp/namespace.exp
@ 2004-03-16  2:39 Michael Elizabeth Chastain
  2004-03-16 16:00 ` Daniel Jacobowitz
  2004-03-16 16:37 ` David Carlton
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2004-03-16  2:39 UTC (permalink / raw)
  To: carlton, gdb; +Cc: drow

David Carlton writes:

  ptype CClass::NestedClass
  There is no field named NestedClass
  (gdb) FAIL: gdb.cp/namespace.exp: ptype CClass::NestedClass

This has been working fine for me with gdb HEAD, suite HEAD, gcc HEAD,
-gdwarf-2 since 2004-01-23.  I got some FAILs on 2004-01-18 and
2004-01-19.

Do you really need gcc 3.5.0 20040119?
Can you try gcc 3.5.0 20040315 for example?

> 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.

Can we write a gdb.dwarf-2 that looks like gdb.stabs,
with assembly language input in it?

Michael C


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: gcc 3.4 regression in gdb.cp/namespace.exp
@ 2004-03-16 16:33 Michael Elizabeth Chastain
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2004-03-16 16:33 UTC (permalink / raw)
  To: drow, mec.gnu; +Cc: carlton, gdb

> Have you run it since I committed the process_structure_scope patch on
> Saturday?  I won't have time to really parse David's explanation for a
> couple of days but it sounds like I broke this.

No, my last spin was for Monday, 2004-03-08.

I have another spin in progress for Sunday, 2004-03-14 15:04:08 UTC, but
you committed that patch on 2004-03-14 21:08:24 UTC so it's not in my
current spin.  Rats.

Michael C


^ permalink raw reply	[flat|nested] 6+ messages in thread
* gcc 3.4 regression in gdb.cp/namespace.exp
@ 2004-03-16  0:23 David Carlton
  2004-03-16 18:25 ` David Carlton
  0 siblings, 1 reply; 6+ messages in thread
From: David Carlton @ 2004-03-16  0:23 UTC (permalink / raw)
  To: gdb; +Cc: Daniel Jacobowitz

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-03-16 18:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-16  2:39 gcc 3.4 regression in gdb.cp/namespace.exp Michael Elizabeth Chastain
2004-03-16 16:00 ` Daniel Jacobowitz
2004-03-16 16:37 ` David Carlton
  -- strict thread matches above, loose matches on Subject: below --
2004-03-16 16:33 Michael Elizabeth Chastain
2004-03-16  0:23 David Carlton
2004-03-16 18:25 ` David Carlton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox