This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug debug/16063] New: Debuggers need more information about enum types in C++


The debug information emitted for enumerated types does not allow a debugger
to unambiguously determine the "underlying type" of the enumeration.

A debugger therefore does not have enough information to allow it to perform
overload resolution when asked to evaluate a function call with an enum type
as an actual argument.

One can view this either as a bug (the compiler is emitting an unsigned value
using DW_FORM_sdata), or as requiring an enhancement.

I believe the simplest solution would be to have the compiler be explicit about 
the representation of the enum type by emitting a DW_AT_encoding with the
DW_TAG_enumeration, so that the debugger is explicitly told whether the 
underlying type of the enumeration is signed or unsigned.

See the (about to be attached) test case for detailed information.

-- 
           Summary: Debuggers need more information about enum types in C++
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jcownie at etnus dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063


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