Bug 9282 - Enum support in dwarf reader is inconsistent
Summary: Enum support in dwarf reader is inconsistent
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: 6.5
: P3 enhancement
Target Milestone: 7.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-28 19:28 UTC by drow@false.org
Modified: 2010-01-19 02:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description drow@false.org 2006-09-28 19:28:01 UTC
[Converted from Gnats 2177]

Compile this:

struct A {
  enum X { Y };
};

enum A::X z = A::Y;

GDB will print out the type of z as "enum X".

Compile this:
namespace NS
{
  struct B { int q; };
  B qq;
  int f() { return 0; }
};

struct A {
  enum X { Y };
};

enum A::X z = A::Y;

Now GDB will print out the type of z as 'enum A::X'.  If your headers happen to trigger this, it causes a failure in classes.exp.

This has to do with handling of processing_has_namespace_info.  I think we need to approach whether to trust scope information differently.  I don't have time to debug it further right now.

Release:
GDB 6.5
Comment 1 Tom Tromey 2010-01-19 02:29:49 UTC
I tried today with cvs head gdb and a recent-ish (Fedora 11 system) gcc.
In both cases I get:

(gdb) ptype z
type = enum A::X {A::Y}

So, I think this has been fixed at some point.