Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-21 Thread Mark Wielaard
On Tue, 2014-05-20 at 15:46 -0400, Jason Merrill wrote: Rather than define the hook for C, let's have a default version that uses the type_for_size langhook; that should work better for Ada. That also makes the patch simpler. Updated patch attached. Bootstrapped on x86_64-unknown-linux-gnu

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-21 Thread Jason Merrill
On 05/21/2014 09:27 AM, Mark Wielaard wrote: +/* The C++ version of the enum_underlying_base_type langhook. + See also cp/semantics.c (finish_underlying_type). */ +static tree cxx_enum_underlying_base_type (const_tree type) We usually leave a blank line between the comment and the function.

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-21 Thread Mark Wielaard
On Wed, 2014-05-21 at 10:33 -0400, Jason Merrill wrote: On 05/21/2014 09:27 AM, Mark Wielaard wrote: +/* The C++ version of the enum_underlying_base_type langhook. + See also cp/semantics.c (finish_underlying_type). */ +static tree cxx_enum_underlying_base_type (const_tree type) We

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-20 Thread Mark Wielaard
On Mon, May 19, 2014 at 04:50:35PM -0400, Jason Merrill wrote: On 05/13/2014 03:21 AM, Mark Wielaard wrote: So the debugger doesn't have to guess the properties of the enum's underlying base type, like size, encoding and signedness. Well, the enum already has DW_AT_byte_size. It seems to me

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-20 Thread Jason Merrill
On 05/20/2014 02:55 AM, Mark Wielaard wrote: On Mon, May 19, 2014 at 04:50:35PM -0400, Jason Merrill wrote: On 05/13/2014 03:21 AM, Mark Wielaard wrote: So the debugger doesn't have to guess the properties of the enum's underlying base type, like size, encoding and signedness. Well, the enum

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-20 Thread Mark Wielaard
On Tue, May 20, 2014 at 10:43:22AM -0400, Jason Merrill wrote: On 05/20/2014 02:55 AM, Mark Wielaard wrote: On Mon, May 19, 2014 at 04:50:35PM -0400, Jason Merrill wrote: On 05/13/2014 03:21 AM, Mark Wielaard wrote: So the debugger doesn't have to guess the properties of the enum's underlying

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-20 Thread Jason Merrill
On 05/20/2014 01:51 PM, Mark Wielaard wrote: The DWARF part isn't what this patch is blocked on. That has already been discussed on the DWARF standard list, coordinated with the gdb hackers and approved some months ago. Fair enough. The part that hasn't been reviewed and approved yet is the

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-19 Thread Jason Merrill
On 05/13/2014 03:21 AM, Mark Wielaard wrote: So the debugger doesn't have to guess the properties of the enum's underlying base type, like size, encoding and signedness. Well, the enum already has DW_AT_byte_size. It seems to me that it should also have DW_AT_encoding to provide the other

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-13 Thread Mark Wielaard
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

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-12 Thread Jason Merrill
On 04/28/2014 08:37 AM, Mark Wielaard wrote: On Mon, 2014-04-28 at 14:23 +0200, Jakub Jelinek wrote: Do you want to add DW_AT_type to DW_TAG_enumeration only if it has explicit underlying type (enum class foo: char { ... };) or even when the underlying type is computed emplicitly (then you'd

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-05-06 Thread Mark Wielaard
On Mon, 2014-04-28 at 14:37 +0200, Mark Wielaard wrote: On Mon, 2014-04-28 at 14:23 +0200, Jakub Jelinek wrote: On Mon, Apr 28, 2014 at 01:17:32PM +0200, Mark Wielaard wrote: Ping2. Please let me know if I should ping/cc other people to get this reviewed. Do you want to add

Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-04-28 Thread Mark Wielaard
On Tue, 2014-04-22 at 12:31 +0200, Mark Wielaard wrote: On Mon, 2014-04-14 at 23:19 +0200, Mark Wielaard wrote: On Fri, 2014-04-11 at 11:03 -0700, Cary Coutant wrote: The DWARF bits are fine with me. Thanks. Who can approve the other bits? You should probably get C and C++

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-04-28 Thread Jakub Jelinek
On Mon, Apr 28, 2014 at 01:17:32PM +0200, Mark Wielaard wrote: On Tue, 2014-04-22 at 12:31 +0200, Mark Wielaard wrote: On Mon, 2014-04-14 at 23:19 +0200, Mark Wielaard wrote: On Fri, 2014-04-11 at 11:03 -0700, Cary Coutant wrote: The DWARF bits are fine with me. Thanks. Who

Re: Ping2: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-04-28 Thread Mark Wielaard
On Mon, 2014-04-28 at 14:23 +0200, Jakub Jelinek wrote: On Mon, Apr 28, 2014 at 01:17:32PM +0200, Mark Wielaard wrote: Ping2. Please let me know if I should ping/cc other people to get this reviewed. Do you want to add DW_AT_type to DW_TAG_enumeration only if it has explicit underlying