This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.
- From: Mark Wielaard <mjw at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Cary Coutant <ccoutant at google dot com>, Tom Tromey <tromey at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 13 May 2014 09:21:09 +0200
- Subject: Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.
- Authentication-results: sourceware.org; auth=none
- References: <87ha61qiug dot fsf at fleche dot redhat dot com> <CAHACq4rxfktMVOmocuGNB3z8uQWo-igMe25Eaakfew=y7bq9bQ at mail dot gmail dot com> <1397202952 dot 8924 dot 1 dot camel at bordewijk dot wildebeest dot org> <CAHACq4oQXU1SvLKKZJoJLzSy5xJX7PnSsKjO_duW90HwHu975Q at mail dot gmail dot com> <1397510343 dot 5633 dot 44 dot camel at bordewijk dot wildebeest dot org> <1398162670 dot 29199 dot 127 dot camel at bordewijk dot wildebeest dot org> <1398683852 dot 4016 dot 30 dot camel at bordewijk dot wildebeest dot org> <20140428122313 dot GE1817 at tucnak dot redhat dot com> <1398688641 dot 4016 dot 35 dot camel at bordewijk dot wildebeest dot org> <53718FE3 dot 9090108 at redhat dot com>
On Mon, May 12, 2014 at 11:22:11PM -0400, Jason Merrill wrote:
> On 04/28/2014 08:37 AM, Mark Wielaard wrote:
> >The debugger cares about the actual underlying type used if the language
> >can use multiple. Either explicitly assigned by the user or implicitly
> >as derived by the language/compile flags used. So the lang hook should
> >provide one in both cases, if appropriate.
>
> Why do you want to do this for C? It seems to me that this is only
> interesting in C++ because of overload resolution.
So the debugger doesn't have to guess the properties of the enum's
underlying base type, like size, encoding and signedness. Which are
implementation defined and might differ between enums even in C depending
on whether -fshort-enums was used (which is the default on some arches).
Cheers,
Mark