public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/16063] New: Debuggers need more information about enum types in C++
@ 2004-06-18 16:13 jcownie at etnus dot com
2004-06-18 16:14 ` [Bug debug/16063] " jcownie at etnus dot com
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: jcownie at etnus dot com @ 2004-06-18 16:13 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
2004-06-18 16:13 [Bug debug/16063] New: Debuggers need more information about enum types in C++ jcownie at etnus dot com
@ 2004-06-18 16:14 ` jcownie at etnus dot com
2004-06-18 16:22 ` pinskia at gcc dot gnu dot org
2004-06-18 16:31 ` jcownie at etnus dot com
2 siblings, 0 replies; 8+ messages in thread
From: jcownie at etnus dot com @ 2004-06-18 16:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jcownie at etnus dot com 2004-06-18 16:14 -------
Created an attachment (id=6565)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6565&action=view)
Test case with embedded description.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
2004-06-18 16:13 [Bug debug/16063] New: Debuggers need more information about enum types in C++ jcownie at etnus dot com
2004-06-18 16:14 ` [Bug debug/16063] " jcownie at etnus dot com
@ 2004-06-18 16:22 ` pinskia at gcc dot gnu dot org
2004-06-18 16:31 ` jcownie at etnus dot com
2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-18 16:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-18 16:22 -------
Confirmed, I should note that ICC 6.0 does not do this also.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to work| |3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-06-18 16:22:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
2004-06-18 16:13 [Bug debug/16063] New: Debuggers need more information about enum types in C++ jcownie at etnus dot com
2004-06-18 16:14 ` [Bug debug/16063] " jcownie at etnus dot com
2004-06-18 16:22 ` pinskia at gcc dot gnu dot org
@ 2004-06-18 16:31 ` jcownie at etnus dot com
2 siblings, 0 replies; 8+ messages in thread
From: jcownie at etnus dot com @ 2004-06-18 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jcownie at etnus dot com 2004-06-18 16:31 -------
Subject: Re: Debuggers need more information about enum types in C++
> Confirmed, I should note that ICC 6.0 does not do this also.
Right, it's an extension to the DWARF standard to require this.
I have submitted changes to add this to DWARF to the DWARF2 maliing
lists, but have yet to receive feedback.
I have also submitted it as a bug report to Intel against their latest
compiler ;-)
I imagine their fix may take longer than yours if you're happy with
the (one line of code) patch which I just submitted.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
[not found] <bug-16063-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-06-25 18:55 ` tromey at gcc dot gnu.org
@ 2014-09-12 11:40 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-09-12 11:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
So, is this fixed?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
[not found] <bug-16063-4@http.gcc.gnu.org/bugzilla/>
2012-06-29 13:51 ` tromey at gcc dot gnu.org
2014-03-23 11:22 ` mark at gcc dot gnu.org
@ 2014-06-25 18:55 ` tromey at gcc dot gnu.org
2014-09-12 11:40 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-06-25 18:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
Tom Tromey <tromey at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chihin.ko at oracle dot com
--- Comment #8 from Tom Tromey <tromey at gcc dot gnu.org> ---
*** Bug 54774 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
[not found] <bug-16063-4@http.gcc.gnu.org/bugzilla/>
2012-06-29 13:51 ` tromey at gcc dot gnu.org
@ 2014-03-23 11:22 ` mark at gcc dot gnu.org
2014-06-25 18:55 ` tromey at gcc dot gnu.org
2014-09-12 11:40 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 8+ messages in thread
From: mark at gcc dot gnu.org @ 2014-03-23 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
--- Comment #6 from Mark Wielaard <mark at gcc dot gnu.org> ---
Posted a patch:
http://gcc.gnu.org/ml/gcc-patches/2014-03/msg01198.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/16063] Debuggers need more information about enum types in C++
[not found] <bug-16063-4@http.gcc.gnu.org/bugzilla/>
@ 2012-06-29 13:51 ` tromey at gcc dot gnu.org
2014-03-23 11:22 ` mark at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu.org @ 2012-06-29 13:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16063
Tom Tromey <tromey at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu.org
--- Comment #5 from Tom Tromey <tromey at gcc dot gnu.org> 2012-06-29 13:50:49 UTC ---
DWARF 4 allows this:
The enumeration type entry may have a DW_AT_type attribute which refers to the
underlying
data type used to implement the enumeration.
I think this is definitely needed for "enum class", where the base
type can be specified by the user.
However, emitting it unconditionally wouldn't hurt.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-09-12 11:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-18 16:13 [Bug debug/16063] New: Debuggers need more information about enum types in C++ jcownie at etnus dot com
2004-06-18 16:14 ` [Bug debug/16063] " jcownie at etnus dot com
2004-06-18 16:22 ` pinskia at gcc dot gnu dot org
2004-06-18 16:31 ` jcownie at etnus dot com
[not found] <bug-16063-4@http.gcc.gnu.org/bugzilla/>
2012-06-29 13:51 ` tromey at gcc dot gnu.org
2014-03-23 11:22 ` mark at gcc dot gnu.org
2014-06-25 18:55 ` tromey at gcc dot gnu.org
2014-09-12 11:40 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).