This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/2177: Enum support in dwarf reader is inconsistent


>Number:         2177
>Category:       c++
>Synopsis:       Enum support in dwarf reader is inconsistent
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 28 19:28:01 UTC 2006
>Closed-Date:
>Last-Modified:
>Originator:     drow@false.org
>Release:        GDB 6.5
>Organization:
>Environment:

>Description:
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.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]