Re: [PATCH] dwarf2out.c: Pass DWARF type modifiers around as flags argument.

2014-06-20 Thread Mark Wielaard
modifiers and a new test based on the guality.exp testsuite, but tweaked to inspect the type of a variable instead of its value. From b3140b1ee59560b33d08e2583c20be5a615e588b Mon Sep 17 00:00:00 2001 From: Mark Wielaard m...@redhat.com Date: Wed, 18 Jun 2014 22:41:38 +0200 Subject: [PATCH] dwarf2out.c

[PATCH] Emit DW_tag_restrict_type for restrict-qualified pointers.

2014-06-20 Thread Mark Wielaard
files changed, 126 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/guality/restrict.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4dfd9a5..06a8767 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2014-06-20 Mark Wielaard m...@redhat.com + PR debug

[PATCH] DWARFv5 Emit DW_TAG_atomic_type.

2014-06-22 Thread Mark Wielaard
+++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-06-22 Mark Wielaard m...@redhat.com + + * dwarf2out.h (enum dw_mod_flag): Add dw_mod_atomic. + * dwarf2out.c (dw_mod_decl_flags): Handle TYPE_ATOMIC. + (dw_mod_type_flags): Likewise. + (dw_mods_to_quals): Likewise

Re: [PATCH] DWARFv5 Emit DW_TAG_atomic_type.

2014-06-23 Thread Mark Wielaard
On Mon, 2014-06-23 at 10:31 -0600, Tom Tromey wrote: Mark == Mark Wielaard m...@redhat.com writes: Mark The following is just a prototype to try out a new qualifier type tag Mark proposed for DWARFv5. There is not even a draft yet of DWARFv5, so this Mark is just based on a proposal

[PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-02 Thread Mark Wielaard
--git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b364f40..421e006 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-07-02 Mark Wielaard m...@redhat.com + + * gcc.dg/guality/guality.exp: Remove LTO_TORTURE_OPTIONS from + set-torture

[PATCH] Add guality [p]type test.

2014-07-03 Thread Mark Wielaard
/testsuite/gcc.dg/guality/const-volatile.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 421e006..1abc700 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-07-03 Mark Wielaard m...@redhat.com + + * lib/gcc-gdb-test.exp (gdb-test

Re: [PATCH] Add guality [p]type test.

2014-07-03 Thread Mark Wielaard
On Thu, 2014-07-03 at 12:05 +0200, Jakub Jelinek wrote: On Thu, Jul 03, 2014 at 11:53:29AM +0200, Mark Wielaard wrote: I pulled out the guality.exp [p]type test extension from the actual dwarf2out.c changes (which I will repost soon with some tweaks). I think the test extension itself

Re: [PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-03 Thread Mark Wielaard
On Thu, 2014-07-03 at 21:52 +0200, Richard Biener wrote: On July 3, 2014 8:38:14 PM CEST, Jakub Jelinek ja...@redhat.com wrote: On Thu, Jul 03, 2014 at 08:37:07PM +0200, Richard Biener wrote: Well, simply removing the regression testing for LTO is a maintainance nightmare as well. The

Re: [PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-03 Thread Mark Wielaard
On Thu, 2014-07-03 at 22:14 +0200, Jakub Jelinek wrote: On Thu, Jul 03, 2014 at 10:04:35PM +0200, Mark Wielaard wrote: On Thu, 2014-07-03 at 21:52 +0200, Richard Biener wrote: On July 3, 2014 8:38:14 PM CEST, Jakub Jelinek ja...@redhat.com wrote: On Thu, Jul 03, 2014 at 08:37:07PM +0200

[PATCH 2/2] Emit DW_tag_restrict_type for restrict-qualified pointers.

2014-07-08 Thread Mark Wielaard
/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-07-08 Mark Wielaard m...@redhat.com + + PR debug/59051 + * dwarf2out.h (enum dw_mod_flag): Add dw_mod_restrict. + * dwarf2out.c (dw_mod_decl_flags): Handle TYPE_RESTRICT. + (dw_mod_type_flags): Likewise

[PATCH 1/2] dwarf2out.c: Pass one cv_quals argument instead of two for const and volatile.

2014-07-08 Thread Mark Wielaard
..3f63f1b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,31 @@ +2014-07-07 Mark Wielaard m...@redhat.com + + * dwarf2out.c (decl_quals): New function. + (modified_type_die): Take one cv_quals argument instead of two, + one for const and one for volatile

Re: [PATCH 2/2] Emit DW_tag_restrict_type for restrict-qualified pointers.

2014-07-08 Thread Mark Wielaard
(-) create mode 100644 gcc/testsuite/gcc.dg/guality/restrict.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f63f1b..339f368 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-07-08 Mark Wielaard m...@redhat.com + + PR debug/59051 + * dwarf2out.c (modified_type_die

[PATCH] java: Use build_qualified_type instead of build_type_variant.

2014-07-08 Thread Mark Wielaard
/ChangeLog b/gcc/java/ChangeLog index ce90e28..d12b664 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2014-07-08 Mark Wielaard m...@redhat.com + + * builtins.c (putVolatile_builtin): Use build_qualified_type + instead of build_type_variant

Re: [PATCH] java: Use build_qualified_type instead of build_type_variant.

2014-07-09 Thread Mark Wielaard
On Wed, 2014-07-09 at 12:23 +0200, Richard Biener wrote: On Tue, Jul 8, 2014 at 10:12 PM, Mark Wielaard m...@redhat.com wrote: The java frontend is one of the only places where build_type_variant is still used. New code should use build_qualified_type. See gcc/tree.h. Build and tested

Some DWARFv5 proposal prototypes (atomic_type, aligned_type)

2014-07-09 Thread Mark Wielaard
Hi, The following two patches are based on the earlier dwarf2out.c: Pass one cv_quals argument and Emit DW_tag_restrict_type patches I posted earlier. Since there currently is not even an early draft yet for DWARFv5, just a collection of proposals that might or might not be adopted these patches

[PATCH 1/2] DWARFv5 Emit DW_TAG_atomic_type.

2014-07-09 Thread Mark Wielaard
index cb39d7f..7550064 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-07-09 Mark Wielaard m...@redhat.com + + PR debug/60782 + * dwarf2out.c (modified_type_die): Handle TYPE_QUAL_ATOMIC. + * opts.c (common_handle_option): Accept -gdwarf-5. + 2014-07-08 Mark

[PATCH 2/2] DWARF5: Add DW_TAG_aligned_type support.

2014-07-09 Thread Mark Wielaard
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7550064..186fba5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,30 @@ 2014-07-09 Mark Wielaard m...@redhat.com + * dwarf2out.c (decl_user_align): New function. + (type_user_align): Likewise. + (modified_type_die): Add

Re: Some DWARFv5 proposal prototypes (atomic_type, aligned_type)

2014-07-15 Thread Mark Wielaard
On Mon, 2014-07-14 at 13:58 -0600, Tom Tromey wrote: Mark == Mark Wielaard m...@redhat.com writes: Mark The following two patches are based on the earlier dwarf2out.c: Pass Mark one cv_quals argument and Emit DW_tag_restrict_type patches I posted Mark earlier. Since there currently

Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99

2014-11-12 Thread Mark Wielaard
On Mon, 2014-10-13 at 10:33 +0200, Mark Wielaard wrote: On Wed, 2014-10-08 at 12:13 +0200, Mark Wielaard wrote: This patch was written a long time ago by Jakub and has been in Fedora gcc for some time. All I did was rebase it to current gcc trunk and add a testcase. Back when

Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99

2014-11-12 Thread Mark Wielaard
On Wed, 2014-11-12 at 16:33 +0100, Jakub Jelinek wrote: On Wed, Nov 12, 2014 at 04:21:09PM +0100, Richard Biener wrote: On Wed, Nov 12, 2014 at 3:54 PM, Jakub Jelinek ja...@redhat.com wrote: I think we want this (also extended for C11/C++11/C++14 afterwards), even when the early debug

[PATCH 1/2] PR debug/38757 gcc does not emit DW_LANG_C99.

2014-11-20 Thread Mark Wielaard
is set on the compile_unit depending on the -std=c89 or -std=c99 setting. gcc/c-family/ChangeLog 2014-11-20 Mark Wielaard m...@redhat.com PR debug/38757 * c-opts.c (set_std_c89): Set lang_hooks.name. (set_std_c99): Likewise. (set_std_c11): Likewise

[PATCH 2/2] PR debug/38757 continued. Handle C11, C++11 and C++14.

2014-11-20 Thread Mark Wielaard
Mark Wielaard m...@redhat.com + PR debug/38757 * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use strncmp to check lang_hooks.name. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7844f33..c28deec 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4684,7 +4684,8

Re: [PATCH 1/2] PR debug/38757 gcc does not emit DW_LANG_C99.

2014-11-21 Thread Mark Wielaard
On Fri, 2014-11-21 at 12:48 +0100, Richard Biener wrote: On Fri, Nov 21, 2014 at 8:56 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Nov 20, 2014 at 11:30:11PM +0100, Mark Wielaard wrote: --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -386,7 +386,8 @@ avr_cpu_cpp_builtins

Re: [PATCH 2/2] PR debug/38757 continued. Handle C11, C++11 and C++14.

2014-11-21 Thread Mark Wielaard
On Fri, Nov 21, 2014 at 09:28:45AM +0100, Jakub Jelinek wrote: I think best would be to tweak if (value 2 || value 4) error_at (loc, dwarf version %d is not supported, value); else opts-x_dwarf_version = value; so that we accept value 5 too, and for now, until

[PATCH] DWARF add DW_AT_noreturn on noreturn function subprogram.

2014-11-25 Thread Mark Wielaard
This implements the DWARFv5 noreturn proposal: http://dwarfstd.org/ShowIssue.php?issue=140331.1 TREE_THIS_VOLATILE on a FUNCTION_DECL node means the function does not return normally. This catches the traditional noreturn GNU attribute, the C11 _Noreturn keyword and the C++11 [[noreturn]]

Re: [PATCH 2/2] PR debug/38757 continued. Handle C11, C++11 and C++14.

2014-11-26 Thread Mark Wielaard
On Fri, 2014-11-21 at 21:34 +0100, Mark Wielaard wrote: On Fri, Nov 21, 2014 at 09:28:45AM +0100, Jakub Jelinek wrote: I think best would be to tweak if (value 2 || value 4) error_at (loc, dwarf version %d is not supported, value); else opts-x_dwarf_version

[PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

2014-10-03 Thread Mark Wielaard
/gcc/ChangeLog index dc3287b..255b1b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-10-03 Mark Wielaard m...@redhat.com + + PR debug/63240 + * dwarf2out.c (gen_subprogram_die): When a member function is + declared default then add a DW_AT_GNU_defaulted

[PATCH 1/2] PR debug/63239 Add DWARF representation for C++11 deleted member function.

2014-10-03 Thread Mark Wielaard
Currently we output a declaration of the explicitly deleted function in DWARF. That seems wrong. An alternative to adding an attribute would be to just not output the declaration. But that is also confusing since then it looks precisely the same as an class that has that special function

Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

2014-10-03 Thread Mark Wielaard
On Fri, 2014-10-03 at 10:17 -0400, Jason Merrill wrote: On 10/03/2014 09:12 AM, Mark Wielaard wrote: A debugger not knowing whether a special member function was explicitly defaulted, implicitly declared or explicitly defined seems less confusion than not knowing whether it was deleted

Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

2014-10-03 Thread Mark Wielaard
f72525e11d08ad49d208ab75c806326871d881d7 Mon Sep 17 00:00:00 2001 From: Mark Wielaard m...@redhat.com Date: Fri, 3 Oct 2014 14:44:27 +0200 Subject: [PATCH] PR debug/63240 Add DWARF representation for C++11 defaulted member function. gcc/ChangeLog * dwarf2out.c (gen_subprogram_die): When a member function is declared

Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

2014-10-03 Thread Mark Wielaard
On Fri, 2014-10-03 at 11:41 -0700, Cary Coutant wrote: O. Then I was indeed wrong and defaulted does not impact ABI at all. At least that is one worry less for the abi checkers :) As Siva mentioned, it does in fact impact the ABI. A class with a non-trivial destructor is not a POD, and

Re: [PATCH 1/2] PR debug/63239 Add DWARF representation for C++11 deleted member function.

2014-10-06 Thread Mark Wielaard
On Mon, 2014-10-06 at 09:38 +0200, Andreas Schwab wrote: Mark Wielaard m...@redhat.com writes: diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.C b/gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.C new file mode 100644 index 000..4cc77e6 --- /dev

Re: [Java PATCH] Generate declarations in jvgenmain.c

2014-10-06 Thread Mark Wielaard
On Mon, Oct 06, 2014 at 11:54:00AM +0200, Marek Polacek wrote: Java testsuite breaks with -std=gnu11 as a default and/or with -Wimplicit-function-declaration on, since the jvgenmain.c program that generates a C file containing 'main' function which calls either 'JvRunMainName' or 'JvRunMain'

Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

2014-10-07 Thread Mark Wielaard
On Mon, 2014-10-06 at 20:55 -0400, Jason Merrill wrote: On 10/06/2014 08:50 PM, Siva Chandra wrote: On Sat, Oct 4, 2014 at 11:14 AM, Jason Merrill ja...@redhat.com wrote: On 10/03/2014 05:41 PM, Siva Chandra wrote: I understand that knowing whether a copy-ctor or a d-tor has been

[PATCH] PR debug/38757 gcc does not emit DW_LANG_C99

2014-10-08 Thread Mark Wielaard
if DW_LANG_C99 or DW_LANG_C89 should be returned. gcc/c/ChangeLog 2009-03-18 Jakub Jelinek ja...@redhat.com PR debug/38757 * c-lang.c (c_source_language): New function. (LANG_HOOKS_SOURCE_LANGUAGE): Define. gcc/testsuite/ChangeLog 2014-10-08 Mark Wielaard m...@redhat.com

Re: [PATCH 1/2] PR debug/63239 Add DWARF representation for C++11 deleted member function.

2014-10-08 Thread Mark Wielaard
On Wed, 2014-10-08 at 10:56 +0200, Rainer Orth wrote: Steven Bosscher stevenb@gmail.com writes: On Mon, Oct 6, 2014 at 9:54 AM, Mark Wielaard wrote: Just removing the # prefix (but keeping the space) from scan-assembler-times should work for both our cases. I just don't know why our

Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99

2014-10-08 Thread Mark Wielaard
On Wed, 2014-10-08 at 12:17 +0200, Marek Polacek wrote: On Wed, Oct 08, 2014 at 12:13:55PM +0200, Mark Wielaard wrote: This lang hook will be more useful when DWARFv5 gets out, which is supposed to define language identifiers for newer C and C++ versions. It might have been discussed

Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99

2014-10-08 Thread Mark Wielaard
On Wed, 2014-10-08 at 12:35 +0200, Jakub Jelinek wrote: On Wed, Oct 08, 2014 at 12:29:38PM +0200, Mark Wielaard wrote: On Wed, 2014-10-08 at 12:17 +0200, Marek Polacek wrote: On Wed, Oct 08, 2014 at 12:13:55PM +0200, Mark Wielaard wrote: This lang hook will be more useful when DWARFv5

Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99

2014-10-13 Thread Mark Wielaard
On Wed, 2014-10-08 at 12:13 +0200, Mark Wielaard wrote: This patch was written a long time ago by Jakub and has been in Fedora gcc for some time. All I did was rebase it to current gcc trunk and add a testcase. Back when it was originally proposed the issue was that because DWARF was generated

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

2014-03-26 Thread Mark Wielaard
, context_die); } This generates the same DWARF except for generating multiple instances of the same base type DIE in case multiple enums in a CU share the same underlying base type. From 964dcd8a1aefb6bc733372aa42868ed3ad8a46d7 Mon Sep 17 00:00:00 2001 From: Mark Wielaard m...@redhat.com Date: Sun, 23

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

2014-04-11 Thread Mark Wielaard
On Thu, 2014-04-10 at 10:51 -0700, Cary Coutant wrote: However it would be nice to be assured that the gcc change is ok in principle first. The DWARF bits are fine with me. Thanks. Who can approve the other bits? When approved should I wait till stage 1 opens before committing? Thanks,

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

2014-04-14 Thread Mark Wielaard
is an enhancement request, not a regression, so it needs to wait. Since stage one just opened up again this seems a good time to re-ask for approval then :) Rebased patch against current trunk attached. Thanks, Mark commit a5044d478738e2fbd471b8b9d98e1b37e5d8b64b Author: Mark Wielaard m...@redhat.com Date

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Mark Wielaard
On Sun, 2014-03-23 at 12:17 +0100, Mark Wielaard wrote: As the comment in the code already indicated DWARF2 does provide DW_FORM_sdata/DW_FORM_udata to represent signed/unsigned data. Enumeration constants wider than HOST_WIDE_INT are already handled separately. Those constant values that do

Re: [PATCH] dwarf2out: Use normal constant values in bound_info if possible.

2014-04-14 Thread Mark Wielaard
Hi, On Sun, 2014-03-23 at 12:15 +0100, Mark Wielaard wrote: * dwarf2out.c (add_bound_info): If HOST_WIDE_INT is big enough, then represent the bound as normal constant value. Since stage 1 opened up I would like to request approval again to push this. Patch rebased to current

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-15 Thread Mark Wielaard
are out of scope for this patch. Added a clarifying comment to the code and reinstated the TODO for the double case. OK to push? Thanks, Mark commit f7c10a0ae5e99b680335b1a13e082fcad4ad0236 Author: Mark Wielaard m...@redhat.com Date: Fri Mar 7 22:27:15 2014 +0100 Add DW_AT_const_value

Re: [PATCH] dwarf2out: Use normal constant values in bound_info if possible.

2014-04-17 Thread Mark Wielaard
On Tue, 2014-04-15 at 14:24 -0700, Cary Coutant wrote: + /* If HOST_WIDE_INT is big enough then represent the bound as + a constant value. Note that we need to make sure the type + is signed or unsigned. We cannot just add an unsigned + constant if the

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

2014-04-22 Thread Mark Wielaard
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++ front end approval. I'm not really sure who needs to review

Re: Remove obsolete Solaris 9 support

2014-04-22 Thread Mark Wielaard
On Sat, 2014-04-19 at 09:03 +0100, Andrew Haley wrote: On 04/16/2014 12:16 PM, Rainer Orth wrote: * I'm removing the sys/loadavg.h check from classpath. Again, I'm uncertain if this is desirable. In the past, classpath changes were merged upstream by one of the libjava maintainers.

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 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

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

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

2014-05-12 Thread Mark Wielaard
On Mon, 2014-04-28 at 13:17 +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 can

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

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

2014-05-19 Thread Mark Wielaard
https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00922.html If there are any unanswered questions that might help getting this reviewed, please let me know. commit aa9d60cddb82d009055262b98aff97f395d73ba9 Author: Mark Wielaard m...@redhat.com Date: Sun Mar 23 12:05:16 2014 +0100 PR debug/16063

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 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-21 Thread Mark Wielaard
testsuite patch asap). Thanks, Mark From 6b3fbed4b2bfda22c6e55e151fbaef29c8208c39 Mon Sep 17 00:00:00 2001 From: Mark Wielaard m...@redhat.com Date: Wed, 21 May 2014 13:00:30 +0200 Subject: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration. Add a new lang-hook that provides the underlying

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

[PATCH] dwarf2out.c: Pass DWARF type modifiers around as flags argument.

2014-06-18 Thread Mark Wielaard
-06-18 Mark Wielaard m...@redhat.com + + * dwarf2out.h (enum dw_mod_flag): New enum. + * dwarf2out.c (dw_mod_decl_flags): New function. + (dw_mod_type_flags): Likewise. + (modified_type_die): Take one modifiers flag argument instead of + one for const and one

[PATCH] dwarf2out: Represent bound_info with normal constant values if possible.

2014-03-20 Thread Mark Wielaard
Hi, The following patch made it so that 64-bit bounds could be output on 32-bit hosts with DWARF. 2009-07-11 Eric Botcazou ebotca...@adacore.com * dwarf2out.c (enum dw_val_class): Replace dw_val_class_long_long with dw_val_class_const_double. (struct

Re: [PATCH] dwarf2out: Represent bound_info with normal constant values if possible.

2014-03-23 Thread Mark Wielaard
On Fri, Mar 21, 2014 at 12:47:10PM +0100, Eric Botcazou wrote: So the patch below makes it so that if HOST_WIDE_INT is wide enough then, depending on whether the range type is signed or not, add_AT_unsigned or add_AT_int is used. This is more efficient for small ranges. And makes it so

[PATCH] dwarf2out: Use normal constant values in bound_info if possible.

2014-03-23 Thread Mark Wielaard
/ChangeLog b/gcc/ChangeLog index 3ab789a..8a31187 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-03-20 Mark Wielaard m...@redhat.com + + * dwarf2out.c (add_bound_info): If HOST_WIDE_INT is big enough, + then represent the bound as normal constant value. + 2014-03-19

[PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-03-23 Thread Mark Wielaard
(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a31187..f3b4f2d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-03-21 Mark Wielaard m...@redhat.com + + * dwarf2out.c (gen_enumeration_type_die): Add DW_AT_const_value + as unsigned or int

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

2014-03-23 Thread Mark Wielaard
/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2014-03-21 Mark Wielaard m...@redhat.com + PR debug/16063 + * dwarf2out.c (gen_enumeration_type_die): Add DW_AT_type if + enum_underlying_base_type defined and DWARF version 3. + * langhooks.h (struct lang_hooks_for_types

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

2014-03-24 Thread Mark Wielaard
On Mon, 2014-03-24 at 10:26 +0100, Richard Biener wrote: On Sun, Mar 23, 2014 at 12:18 PM, Mark Wielaard m...@redhat.com wrote: Add a new lang-hook that provides the underlying base type of an ENUMERAL_TYPE. Including implementations for C and C++. Use this enum_underlying_base_type lang

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

2014-03-25 Thread Mark Wielaard
and patch. Thanks, Mark From b92c7933ebf8a09a97ca2419d253a0ac1acdca6f Mon Sep 17 00:00:00 2001 From: Mark Wielaard m...@redhat.com Date: Sun, 23 Mar 2014 12:05:16 +0100 Subject: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration. Add a new lang-hook that provides the underlying base type

[PATCH] gcc-gdb-test.exp: Handle old GDB short int and long int types.

2014-09-20 Thread Mark Wielaard
Old GDB might show short and long as short int and long int. This made gcc.dg/guality/const-volatile.c ans restrict.c fail on older GDBs. According to the patch that changed this in newer versions of GDB this was a bug: https://sourceware.org/ml/gdb-patches/2012-09/msg00455.html The patch

[PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-20 Thread Mark Wielaard
When adding DW_TAG_restrict_type I made a mistake when updating the code that handled types with multiple modifiers. This patch fixes it by putting the logic for finding the sub-qualified type in a separate function and fall back to adding the modifiers separately if there is no such existing

[PATCH] Make all gcc.dg/guality/const-volatile.c subtests PASS under LTO.

2014-09-20 Thread Mark Wielaard
Some subtests were reported as UNSUPPORTED when running under LTO. That was just because the relevant variables were optimized out. Mark those variables as used. Now const-volatile reports 192 PASS. gcc/testsuite/ChangeLog * gcc.dg/guality/const-volatile.c (i): Mark as used.

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-23 Thread Mark Wielaard
On Mon, Sep 22, 2014 at 10:59:38AM +0200, Andreas Arnez wrote: + sub_qual = TYPE_QUAL_RESTRICT; + if ((sub_quals ~sub_qual) != TYPE_UNQUALIFIED + get_qualified_type (type, sub_quals ~sub_qual) != NULL_TREE) +return true; + + sub_qual = TYPE_QUAL_CONST

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-23 Thread Mark Wielaard
On Tue, 2014-09-23 at 14:17 +0200, Andreas Arnez wrote: Also note that the logic wouldn't scale too well for yet more qualifiers... Considering this, I've tried a different approach below. What do you think? Having support in tree.c instead of doing it by hand in dwarf2out.c is certainly

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-23 Thread Mark Wielaard
On Tue, Sep 23, 2014 at 05:12:12PM -0400, Jason Merrill wrote: On 09/23/2014 08:17 AM, Andreas Arnez wrote: Without such handling there are cases where more DIEs than necessary are created, e.g. if we have the following types: some_base_t *const some_base_t *volatile restrict some_base_t

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-24 Thread Mark Wielaard
Hi Andreas, On Wed, 2014-09-24 at 14:40 +0200, Andreas Arnez wrote: I changed the patch a bit further, to reduce unnecessary iterations and recursions, and tested it again. Thanks for adding the tests and the testing. I think in general it is a nicer and cleaner fix than I did. I do have a

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-24 Thread Mark Wielaard
On Wed, 2014-09-24 at 10:47 -0400, Jason Merrill wrote: On 09/23/2014 06:53 PM, Mark Wielaard wrote: And for the default case (gcc doesn't create type sections by default) the optimization is useful. I'm skeptical. These DIEs are very small, and I wouldn't expect a hole in the qualifier

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-24 Thread Mark Wielaard
On Wed, 2014-09-24 at 14:11 -0400, Jason Merrill wrote: Anyway. I don't think this should hold up this specific bug fix. The issue with type units vs qualified type DIEs has been there in all previous versions of GCC (and only when using non-default flags). It really comes from DWARF not

Re: [PATCH] PR63300 'const volatile' sometimes stripped in debug info.

2014-09-25 Thread Mark Wielaard
On Wed, 2014-09-24 at 17:09 -0400, Jason Merrill wrote: On 09/24/2014 02:42 PM, Mark Wielaard wrote: As my example shows even with older GCCs depending on whether a const type or volatile type was encountered first a const volatile type comes out either as a DIE chain const_type DIE

[debug] Remove deprecated DW_FORM_sig8 define

2011-03-24 Thread Mark Wielaard
Hi, While reading through the unit type support I noticed some parts were still using the old DW_FORM_sig8 while others used the actual DW_FORM_ref_sig8 as used in the dwarf spec. I missed some things in a first scan because of this, so I thought I just clean it up. 2010-03-24 Mark Wielaard m

[debug] dwarf2out emits unnecessary null byte in empty .debug_abbrev section

2011-03-24 Thread Mark Wielaard
real debuginfo in them. There might not actually be many such projects though. 2011-03-24 Mark Wielaard m...@redhat.com PR debug/48041 * dwarf2out.c (output_abbrev_section): Only terminate table when abbrev_die_table_in_use 1. Bootstraps fine on x86_64-gnu-linux and no regressions

dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.

2012-04-27 Thread Mark Wielaard
is always associated with the DW_AT_low_pc attribute of the DIE. So I just made it a special new class. 2012-04-27 Mark Wielaard m...@redhat.com * dwarf2out.h (enum dw_val_class): Add dw_val_class_high_pc. * dwarf2out.c (dw_val_equal_p): Handle dw_val_class_high_pc

Re: dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.

2012-04-27 Thread Mark Wielaard
On Fri, 2012-04-27 at 15:43 +0200, Jakub Jelinek wrote: On Fri, Apr 27, 2012 at 03:36:56PM +0200, Mark Wielaard wrote: But even without this, I think the patch is worth it just to get rid of all the relocations necessary otherwise. IMHO we should defer applying this by a few months, given

Re: dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.

2012-08-20 Thread Mark Wielaard
On Fri, Apr 27, 2012 at 08:16:04PM +0200, Mark Wielaard wrote: On Fri, 2012-04-27 at 15:43 +0200, Jakub Jelinek wrote: On Fri, Apr 27, 2012 at 03:36:56PM +0200, Mark Wielaard wrote: But even without this, I think the patch is worth it just to get rid of all the relocations necessary

Re: [PATCH] Set correct source location for deallocator calls

2012-09-05 Thread Mark Wielaard
On Tue, 2012-09-04 at 18:17 +0100, Bryce McKinlay wrote: libgcj wouldn't actually use it for unwinding, we already have all that. We'd just use it to read DWARF debug info and give us the source code line numbers. Casey Marshell did also write that part some time ago, but it was never

Re: [Dwarf-Discuss] Vendor extensions in .debug_macinfo

2011-07-21 Thread Mark Wielaard
On Wed, 2011-07-20 at 20:00 +0200, Jakub Jelinek wrote: On Wed, Jul 20, 2011 at 10:16:10AM -0700, Michael Eager wrote: but wait until the DWARF committee has had an opportunity to review the proposal and incorporate it into a future version of DWARF. Should you discover a need for an

[debug] PR42288 emit empty .debug_aranges section

2011-04-26 Thread Mark Wielaard
between an empty table that we omitted and failure to generate a table that would have contained data. We recently discussed this again (see PR), and it still seems like a good thing. So here it a patch to just do that: 2011-04-26 Mark Wielaard m...@redhat.com PR42288 * dwarf2out.c

Re: [debug] PR42288 emit empty .debug_aranges section

2011-04-26 Thread Mark Wielaard
Hi Rainer, On Tue, 2011-04-26 at 11:22 +0200, Rainer Orth wrote: Mark Wielaard m...@redhat.com writes: This PR was put on hold for a while since gdb didn't immediately need it. But the consensus seemed that it was a good idea to always output the address ranges (.debug_arange section

PING: [debug] PR42288 emit empty .debug_aranges section

2011-05-03 Thread Mark Wielaard
On Tue, 2011-04-26 at 11:10 +0200, Mark Wielaard wrote: This PR was put on hold for a while since gdb didn't immediately need it. But the consensus seemed that it was a good idea to always output the address ranges (.debug_arange section) information if a CU (.debug_info section) was emitted

[debug] Remove unused debug_str_hash_forced code

2011-05-03 Thread Mark Wielaard
Hi, While reading through the dwarf2out debug_str support I got confused by some of the code dealing with debug_str_hash_forced. But after PR41404 was fixed nothing actually uses this anymore. So this patch just removes the dead code and simplifies a check. 2011-05-03 Mark Wielaard m

Re: [PATCH] Fix up rv1.C with -gdwarf-4 -fno-debug-types-section

2011-05-30 Thread Mark Wielaard
On Mon, 2011-05-30 at 20:09 +0200, Jakub Jelinek wrote: Whether DW_TAG_rvalue_reference_type or DW_TAG_reference_type should be emitted for rvalue references shouldn't depend on whether .debug_types section is emitted or not, it should depend just on whether emitting DWARF4+ or not. Urgh, I

Re: [www-docs] Add note to gcc-4.8/changes.html that DWARF4 is now the default.

2012-11-21 Thread Mark Wielaard
On Wed, 2012-11-21 at 11:16 +0100, Jakub Jelinek wrote: On Wed, Nov 21, 2012 at 11:13:47AM +0100, Mark Wielaard wrote: + VxWorks is still -g-dwarf2 -gstrict-dwarf. s/-g-dwarf2/-gdwarf-2/ Oops. Fixed. Thanks, Mark

Re: [RFC] Wrong register numbers in .dwarf_frame on Linux/PowerPC

2012-11-27 Thread Mark Wielaard
On Mon, 2012-11-26 at 20:10 +0100, Ulrich Weigand wrote: I noticed what appears to be a long-standing bug in generating .dwarf_frame sections with GCC on Linux on PowerPC. It had been my understanding that .dwarf_frame is supposed to differ from .eh_frame on PowerPC w.r.t. register numbers:

Re: [RFC] Wrong register numbers in .dwarf_frame on Linux/PowerPC

2012-11-28 Thread Mark Wielaard
On Tue, 2012-11-27 at 19:49 +0100, Ulrich Weigand wrote: Mark Wielaard wrote: Which other unwinders are out there, that might rely on the current numbering? Well, runtime unwinders using .eh_frame should be fine, since this uses (and has always used) consistently the GCC numbering. I

Re: [PATCH] Set correct source location for deallocator calls

2012-09-15 Thread Mark Wielaard
On Sun, Sep 16, 2012 at 06:03:24AM +0800, Dehao Chen wrote: The dwarf4 specification says: If the value of the DW_AT_high_pc is of class address, it is the relocated address of the first location past the last instruction associated with the entity; if it is of class constant, the value is

Re: [PATCH] Set correct source location for deallocator calls

2012-09-15 Thread Mark Wielaard
On Sun, Sep 16, 2012 at 12:09:04AM +0800, Dehao Chen wrote: I tried the up-to-date addr2line on any gcc -g generated code, it does not work either. This is because in the new dwarf, the DW_AT_high_pc now actually means the size. e.g. 19b: Abbrev Number: 2 (DW_TAG_subprogram) 9c

Re: [wwwdocs,Java] Replace sources.redhat.com by sourceware.org

2012-10-23 Thread Mark Wielaard
On Tue, Oct 23, 2012 at 10:52:41AM +0100, Andrew Haley wrote: On 10/23/2012 10:47 AM, Andrew Hughes wrote: It's never been obvious to me how the web material gets updated. GCJ regularly misses out on being mentioned in changes too, despite fixes going in. Web material gets updated with

[PATCH] dwarf2out.c (size_of_aranges): Skip DECL_IGNORED_P functions.

2013-03-21 Thread Mark Wielaard
-03-21 Mark Wielaard m...@redhat.com * dwarf2out.c (size_of_aranges): Skip DECL_IGNORED_P functions. Cheers, Mark diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9be7728..b298cd9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7848,6 +7848,8 @@ size_of_aranges (void

[PATCH 2/2] Emit DW_tag_restrict_type for restrict-qualified pointers.

2014-08-12 Thread Mark Wielaard
/guality/restrict.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be9ff58..428a1e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-07-08 Mark Wielaard m...@redhat.com + + PR debug/59051 + * dwarf2out.c (modified_type_die): Handle TYPE_QUAL_RESTRICT. + 2014-07-07

[PATCH 1/2] dwarf2out.c: Pass one cv_quals argument instead of two for const and volatile.

2014-08-12 Thread Mark Wielaard
--git a/gcc/ChangeLog b/gcc/ChangeLog index 23f4327..be9ff58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,31 @@ +2014-07-07 Mark Wielaard m...@redhat.com + + * dwarf2out.c (decl_quals): New function. + (modified_type_die): Take one cv_quals argument instead of two

[PATCH 1/2] DWARFv5 Emit DW_TAG_atomic_type.

2014-08-12 Thread Mark Wielaard
++ 7 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/guality/atomic.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 428a1e1..1adf6a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-07-09 Mark Wielaard m...@redhat.com + + PR

[PATCH 2/2] DWARF5: Add DW_TAG_aligned_type support.

2014-08-12 Thread Mark Wielaard
/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,30 @@ 2014-07-09 Mark Wielaard m...@redhat.com + * dwarf2out.c (decl_user_align): New function. + (type_user_align): Likewise. + (modified_type_die): Add and handle align argument. + (add_bound_info): Likewise

Re: [PATCH] Add guality [p]type test.

2014-08-19 Thread Mark Wielaard
On Mon, 2014-07-07 at 11:57 +0200, Richard Biener wrote: Btw, why doesn't it succeed with LTO? I suspect it's because we drop the unused variables - try adding __attribute__((used)) to them. You are right, this makes the whole new test PASS also with LTO: 2014-08-19 Mark Wielaard m

  1   2   3   4   >