Re: [RFC] analyzer: Add exit, and _exit replacement, to sm-signal.

2020-05-22 Thread Mark Wielaard
On Thu, May 21, 2020 at 09:05:09AM -0400, David Malcolm wrote: > So the above should read something like: > > + exit(1); /* { dg-warning "call to 'exit' from within signal handler" > "warning" } */ > + /* { dg-message "note: '_exit' is a possible signal-safe alternative for > 'exit'" "replacem

Re: [PATCH] Provide diagnostic hints for missing inttypes.h string constants.

2020-05-22 Thread Mark Wielaard
Hi, On Fri, May 22, 2020 at 09:42:28AM -0400, David Malcolm wrote: > On Fri, 2020-05-22 at 01:30 +0200, Mark Wielaard wrote: > > This is on top of the stdbool.h and stdint.h patches. > > Sorry, I didn't see those patches; I've replied to them now. No worries, there was

Re: [PATCH] Provide diagnostic hints for missing inttypes.h string constants.

2020-05-23 Thread Mark Wielaard
On Sat, May 23, 2020 at 05:01:21AM +0200, Mark Wielaard wrote: > Yes, that is actually better. And much easier to read. And the code > can still be shared between get_c_stdlib_header_for_string_macro_name > and get_stdlib_header_for_name. Changed in the attached patch. > > I al

[PATCH 2/2] Provide diagnostic hints for missing C++ cinttypes string constants.

2020-05-23 Thread Mark Wielaard
When reporting an error in cp_parser and we notice a string literal followed by an unknown name check whether there is a known standard header containing a string macro with the same name, then add a hint to the error message to include that header. gcc/c-family/ChangeLog: * known-headers

[PATCH 1/2] Provide diagnostic hints for missing C inttypes.h string constants.

2020-05-23 Thread Mark Wielaard
This adds a flag to c_parser so we know when we were trying to construct a string literal. If there is a parse error and we were constructing a string literal, and the next token is an unknown identifier name, and we know there is a standard header that defines that name as a string literal, then a

[PATCH] diagnostics: Add function call parens matching to c_parser.

2020-05-24 Thread Mark Wielaard
The C++ parser already tracks function call parens matching, but the C parser doesn't. This adds the same functionality to the C parser and adds a testcase showing the C++ and C parser matching function call parens in an error message. gcc/c/ChangeLog: * c-parser.c (c_parser_postfix_expre

[PATCH] diagnostics: Consistently add fixit hint for implicit builtin declaration

2020-05-28 Thread Mark Wielaard
There are two warnings that might trigger when a builtin function is used but not declared yet. Both called through implicitly_declare in c-decl. The first in implicit_decl_warning does warn for builtins, but does not add a fixit hint for them (only for non-builtins when a header is suggested throu

Re: [PATCH 2/2] Provide diagnostic hints for missing C++ cinttypes string constants.

2020-05-28 Thread Mark Wielaard
Hi, On Mon, May 25, 2020 at 12:26:33PM -0400, Jason Merrill wrote: > On 5/23/20 8:30 PM, Mark Wielaard wrote: > > When reporting an error in cp_parser and we notice a string literal > > followed by an unknown name check whether there is a known standard > > header containin

Re: [PATCH] diagnostics: Consistently add fixit hint for implicit builtin declaration

2020-05-28 Thread Mark Wielaard
0464 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 28 May 2020 02:55:36 +0200 Subject: [PATCH] diagnostics: Consistently add fixit hint for implicit builtin declaration There are two warnings that might trigger when a builtin function is used but not declared yet. Both called through

Re: [PATCH] diagnostics: Add function call parens matching to c_parser.

2020-05-31 Thread Mark Wielaard
On Sun, May 24, 2020 at 11:46:34PM +0200, Mark Wielaard wrote: > The C++ parser already tracks function call parens matching, but the C > parser doesn't. This adds the same functionality to the C parser and adds > a testcase showing the C++ and C parser matching function call parens

Re: [PATCH 1/2] Provide diagnostic hints for missing C inttypes.h string constants.

2020-06-01 Thread Mark Wielaard
On Sun, May 24, 2020 at 02:30:13AM +0200, Mark Wielaard wrote: > This adds a flag to c_parser so we know when we were trying to > construct a string literal. If there is a parse error and we were > constructing a string literal, and the next token is an unknown > identifier name, and w

Re: [PATCH] diagnostics: Consistently add fixit hint for implicit builtin declaration

2020-06-04 Thread Mark Wielaard
Hi, On Fri, 2020-05-29 at 09:13 -0600, Martin Sebor wrote: > On 5/28/20 7:13 PM, Mark Wielaard wrote: > > On Thu, May 28, 2020 at 06:21:39PM -0600, Martin Sebor wrote: > > > Although few tests bother with it, since you add an option for > > > the existing warning wher

Re: [PATCH] aix: Default to DWARF 4

2021-01-18 Thread Mark Wielaard
Hi David, On Sun, Jan 17, 2021 at 06:12:06PM -0500, David Edelsohn wrote: > GCC now defaults to DWARF 5. AIX only supports DWARF 4 (3.5). > > This patch overrides the default DWARF version to 4 unless explicitly > stated. > > gcc/ChangeLog: > > * config/rs6000/aix71

Re: [r11-6755 Regression] FAIL: libstdc++-prettyprinters/libfundts.cc print os on Linux/x86_64

2021-01-18 Thread Mark Wielaard
Hi, On Sun, Jan 17, 2021 at 11:30:59AM -0800, sunil.k.pandey wrote: > On Linux/x86_64, > > 3804e937b0e252a7e42632fe6d9f898f1851a49c is the first bad commit > commit 3804e937b0e252a7e42632fe6d9f898f1851a49c > Author: Mark Wielaard > Date: Tue Sep 29 15:52:44 2020 +0200 &

Re: BoF DWARF5 patches (25% .debug section size reduction)

2021-01-18 Thread Mark Wielaard
> On 15/01/2021 17:16, Jakub Jelinek via Gcc-patches wrote: > > On Sun, Nov 15, 2020 at 11:41:24PM +0100, Mark Wielaard wrote: > >> From: Mark Wielaard > >> Date: Tue, 29 Sep 2020 15:52:44 +0200 > >> Subject: [PATCH] Default to DWARF5 > >> > >

Re: [PATCH] aix: Default to DWARF 4

2021-01-18 Thread Mark Wielaard
Hi David, On Mon, 2021-01-18 at 11:31 -0500, David Edelsohn wrote: > On Mon, Jan 18, 2021 at 6:01 AM Mark Wielaard wrote: > > Thanks, I hadn't tested against AIX. Could you also update > > gcc/doc/invoke.texi (-gdwarf) with the defaults for AIX? > > Other targets

Re: Announcement: Porting the Docs to Sphinx - tomorrow

2022-11-09 Thread Mark Wielaard
Hi, On Wed, Nov 09, 2022 at 08:49:22AM +0100, Richard Biener via Gcc wrote: > On Wed, Nov 9, 2022 at 1:09 AM Sam James via Gcc-patches > wrote: > > > On 9 Nov 2022, at 00:00, Joseph Myers wrote: > > > On Tue, 8 Nov 2022, Sam James via Gcc wrote: > > > > If that's your expectation, that's fine, b

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-21 Thread Mark Wielaard
Hi, On Fri, Nov 18, 2022 at 12:42:10PM -0700, Jeff Law wrote: > > * genmultilib: Add sanity check. > > OK.  It should be interesting to see if it trips. It trips up various buildbot setups: https://builder.sourceware.org/buildbot/#/changes/13720 Error calling ../../gcc/gcc/genmultilib: Numb

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-21 Thread Mark Wielaard
Hi Christophe, On Mon, 2022-11-21 at 13:12 +0100, Christophe Lyon wrote: > On 11/21/22 11:16, Mark Wielaard wrote: > > On Fri, Nov 18, 2022 at 12:42:10PM -0700, Jeff Law wrote: > > > > * genmultilib: Add sanity check. > > > > > > OK. It s

Activate gcc builder problem emails (Was: [PATCH v2] genmultilib: Add sanity check)

2022-11-21 Thread Mark Wielaard
Hi Christophe, On Mon, Nov 21, 2022 at 01:35:34PM +0100, Christophe Lyon wrote: > On 11/21/22 13:32, Mark Wielaard wrote: > > > I've just sent a fix: > > > https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606887.html > > > > > > Hopefully that o

Re: Rust front-end patches v4

2022-12-06 Thread Mark Wielaard
Hi John, On Tue, Dec 06, 2022 at 12:57:17PM +0100, John Paul Adrian Glaubitz wrote: > On 12/6/22 12:40, Arthur Cohen wrote: > > > Can't wait to see this becoming available in the distributions :D. > > > > > > I will make sure we get the frontend enabled in Debian as soon as > > > possible. > >

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2022-01-15 Thread Mark Wielaard
Hi Eddy, On Mon, Dec 20, 2021 at 01:50:52PM +0200, Eduard-Mihai Burtescu wrote: > Apologies for the delay, the email fell through the cracks somehow. And then I went on vacation... Sorry this fairly simple patch takes so long. > The updated patch looks like it would work alright, only needs a co

[PATCHv3] libiberty rust-demangle, ignore .suffix

2022-01-15 Thread Mark Wielaard
Rust symbols can have a .suffix because of compiler transformations. These can be ignored in the demangled name. Which is what this patch implements. By stopping at the first dot for v0 symbols and searching backwards to the ending 'E' for legacy symbols. An alternative implementation could be to

Re: [pushed] wwwdocs: gcc-4.7: Adjust dwarfstd.org links

2023-03-30 Thread Mark Wielaard
On Wed, 2023-03-29 at 15:40 -0700, Andrew Pinski wrote: > On Wed, Mar 29, 2023 at 3:08 PM Gerald Pfeifer wrote: > > > > Business as usual - 301 Moved Permanently. > > Just FYI, dwarfstd is now hosted by sourceware too. So I doubt these > URLs will change after this. Indeed, see https://inbox.so

[PATCH] Fix .debug_rnglists generation with -gdwarf-5 -gsplit-dwarf.

2017-11-23 Thread Mark Wielaard
Early debug broke generation of .debug_rnglists when using both -gdwarf5 and -gsplit-dwarf. It introduces a generation for init_sections_and_labels, but doesn't account for the generation of up to 4 unique ranges labels, two created in init_sections_and_labels and two in output_rnglists. Fix this b

Re: [PATCH] Fix .debug_rnglists generation with -gdwarf-5 -gsplit-dwarf.

2017-11-23 Thread Mark Wielaard
On Thu, 2017-11-23 at 14:33 +0100, Jakub Jelinek wrote: > On Thu, Nov 23, 2017 at 02:13:57PM +0100, Mark Wielaard wrote: > >    * dwarf2out.c (init_sections_and_labels): Use generation to create > >    unique ranges_section_label and ranges_base_label. Re

[PATCH] DWARF5: Don't generate DW_AT_loclists_base for split compile unit DIEs.

2018-05-26 Thread Mark Wielaard
The loclists_base attribute is used to point to the beginning of the loclists index of a DWARF5 loclists table when using DW_FORM_loclistsx. For split compile units the base is not given by the attribute, but is either the first (and only) index in the .debug_loclists section, or (when placed in a

[PATCH] DWARF: Handle expressions containing "-1" in dw2_asm_output_delta_uleb128.

2018-05-27 Thread Mark Wielaard
In dwarf2out.c dwarf2out_var_location () we create loclabels that might contain -1 (for example ".LVL5-1"). Technically those are expressions, not just plain labels. But they work fine everywhere we use them, except when calculating an uleb128 delta between two labels. For example we might create

Re: [PATCH] DWARF5: Don't generate DW_AT_loclists_base for split compile unit DIEs.

2018-06-01 Thread Mark Wielaard
On Sat, 2018-05-26 at 21:31 +0200, Mark Wielaard wrote: > The loclists_base attribute is used to point to the beginning of the > loclists index of a DWARF5 loclists table when using DW_FORM_loclistsx. > For split compile units the base is not given by the attribute, but is > either th

[PATCH] DWARF sort longer dirs before shorter ones in directory table.

2018-04-16 Thread Mark Wielaard
When gcc dwarf2out generates the .debug_line table itself (for example when generating one for a split DWARF .dwo) it uses natural sorting for the directory table. Longer directory paths come before shorter directory paths with the same prefix. This causes the files in the line table to pick the sh

Re: [PATCH] DWARF sort longer dirs before shorter ones in directory table.

2018-04-25 Thread Mark Wielaard
On Mon, 2018-04-16 at 09:41 +0200, Jakub Jelinek wrote: > On Mon, Apr 16, 2018 at 09:34:17AM +0200, Mark Wielaard wrote: > > gcc/ChangeLog: > > > > * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before > > shorter ones. > > Ok, thanks. Pushed n

[PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
GNU DebugFission didn't add table headers for the .debug_addr tables, but DWARF5 does. The table header make it possible for a DWARF consumer to parse the address tables without having to index all .debug_info CUs first. We can keep using the .debug_addr section label as is, because the DW_AT_addr_

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
Hi Eric, On Sat, 2018-04-28 at 18:00 +0200, Eric Botcazou wrote: > > index d3d925d..51d0ca4 100644 > > --- a/gcc/dwarf2out.c > > +++ b/gcc/dwarf2out.c > > @@ -31293,6 +31293,21 @@ dwarf2out_finish (const char *) > >   } > > > >    switch_to_section (debug_addr_section); > > +  /* GNU De

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
On Sat, Apr 28, 2018 at 06:36:02PM +0200, Jakub Jelinek wrote: > On Sat, Apr 28, 2018 at 05:23:12PM +0200, Mark Wielaard wrote: > >switch_to_section (debug_addr_section); > > + /* GNU DebugFission didn't have a header for .debug_addr. */ > > +

Re: [PATCH] DWARF: Add .debug_addr table header for dwarf_version >= 5.

2018-04-28 Thread Mark Wielaard
On Sat, Apr 28, 2018 at 08:54:00PM +0200, Eric Botcazou wrote: > > For GCC -gsplit-dwarf generates GNU DebugFission output > > (including .debug_addr) for older DWARF versions. > > It is described here: https://gcc.gnu.org/wiki/DebugFission > > Yes, that's what I was referring to. DebugFission is

[PATCH] DWARF: Add header for .debug_str_offsets table for dwarf_version 5.

2018-04-30 Thread Mark Wielaard
DWARF5 defines a small header for .debug_str_offsets. Since we only use it for split dwarf .dwo files we don't need to keep track of the actual index offset in an attribute. gcc/ChangeLog: * dwarf2out.c (count_index_strings): New function. (output_indirect_strings): Call count_in

[PATCH] DWARF: Emit DWARF5 forms for indirect addresses and string offsets.

2018-04-30 Thread Mark Wielaard
We already emit DWARF5 attributes and tables for indirect addresses and string offsets, but still use GNU forms. Add a new helper function dwarf_FORM () for emitting the right form. Currently we only use the uleb128 forms. But DWARF5 also allows 1, 2, 3 and 4 byte forms (DW_FORM_strx[1234] and DW_

[PATCH] DWARF: Use DW_OP_addrx and DW_OP_constx for DWARF5.

2018-05-14 Thread Mark Wielaard
. --- gcc/ChangeLog | 11 +++ gcc/dwarf2out.c | 33 + 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8589065..6bc342d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2018-05-13 Mark Wielaard

[PATCH] DWARF calculate the number of indexed addresses.

2018-05-14 Thread Mark Wielaard
The length in the .debug_addr unit header was calculated using the number of elements in the addr_index_table. This is wrong because the entries in the table are refcounted and only those with a refcount > 0 are actually put in the index. Add a helper function count_index_addrs to get the correct n

Re: [PATCH] DWARF: Add header for .debug_str_offsets table for dwarf_version 5.

2018-05-14 Thread Mark Wielaard
On Mon, 2018-04-30 at 14:34 +0200, Mark Wielaard wrote: > DWARF5 defines a small header for .debug_str_offsets.  Since we only use > it for split dwarf .dwo files we don't need to keep track of the actual > index offset in an attribute. Ping. gcc/ChangeLog:    

Re: [PATCH] DWARF: Emit DWARF5 forms for indirect addresses and string offsets.

2018-05-14 Thread Mark Wielaard
On Mon, 2018-04-30 at 14:35 +0200, Mark Wielaard wrote: > We already emit DWARF5 attributes and tables for indirect addresses > and string offsets, but still use GNU forms. Add a new helper function > dwarf_FORM () for emitting the right form. > > Currently we only use the ule

[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 + + PR debug/59051 + * dwarf2out.c (modified_type_die): Handle TYPE_QUAL_RESTRICT. + 2014-07-07 Mark Wielaard

[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 + + * dwarf2out.c (decl_quals): New function. + (modified_type_die): Take one cv_quals argument instead of two, + one for const

[PATCH 1/2] DWARFv5 Emit DW_TAG_atomic_type.

2014-08-12 Thread Mark Wielaard
| 2 ++ 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 + + PR d

[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 + * dwarf2out.c (decl_user_align): New function. + (type_user_align): Likewise. + (modified_type_die): Add and handle align argument. + (add_bound_info): Likewise. + (base_type_for_mode): Call

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

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

2014-08-19 Thread Mark Wielaard
On Tue, 2014-08-19 at 13:22 +0200, Richard Biener wrote: > On Tue, Aug 19, 2014 at 1:05 PM, Mark Wielaard wrote: > > 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 d

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

2014-08-19 Thread Mark Wielaard
On Tue, 2014-08-19 at 14:16 +0200, Richard Biener wrote: > On Tue, Aug 19, 2014 at 2:10 PM, Mark Wielaard wrote: > > gcc/testsuite/ChangeLog > > 2014-08-19 Mark Wielaard > > > > * gcc.dg/guality/restrict.c: Add `used' attribute to all variables. > >

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

2014-08-20 Thread Mark Wielaard
On Wed, 2014-08-20 at 10:49 +0200, Richard Biener wrote: > On Tue, Aug 19, 2014 at 7:52 PM, Mark Wielaard wrote: > > Filed as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62190 "LTO DWARF > > produces __unknown__ type for unsigned int function argument type". > > &g

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

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

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

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

2014-10-08 Thread Mark Wielaard
should be returned. gcc/c/ChangeLog 2009-03-18 Jakub Jelinek PR debug/38757 * c-lang.c (c_source_language): New function. (LANG_HOOKS_SOURCE_LANGUAGE): Define. gcc/testsuite/ChangeLog 2014-10-08 Mark Wielaard PR debug/38757 * gcc.dg/debug/dwarf2

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

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. > &g

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

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 becau

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

2014-06-18 Thread Mark Wielaard
-06-18 Mark Wielaard + + * 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 for volatile

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 Date: Wed, 18 Jun 2014 22:41:38 +0200 Subject: [PATCH] dwarf2out.c: Pass t

[PATCH] Emit DW_tag_restrict_type for restrict-qualified pointers.

2014-06-20 Thread Mark Wielaard
+++ 5 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 + PR d

[PATCH] DWARFv5 Emit DW_TAG_atomic_type.

2014-06-22 Thread Mark Wielaard
se. + (modified_type_die): Likewise. + opts.c (common_handle_option): Accept -gdwarf-5. + 2014-06-20 Mark Wielaard PR debug/59051 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b99d1b9..2b8a4bd 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10507,7 +10507,8 @@

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

[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 + + * gcc.dg/guality/guality.exp: Remove LTO_TORTURE_OPTIONS from + set-torture-options. Only

[PATCH] Add guality [p]type test.

2014-07-03 Thread Mark Wielaard
Hi, 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 is useful on its own (and will use it to add tests for my new patches). All new tests PASS, except when using -flto, so you'll

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

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

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 wrote: > > > >On Thu, Ju

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

2014-11-20 Thread Mark Wielaard
estcases to dwarf2.exp to check the right DWARF DW_AT_language is set on the compile_unit depending on the -std=c89 or -std=c99 setting. gcc/c-family/ChangeLog 2014-11-20 Mark Wielaard PR debug/38757 * c-opts.c (set_std_c89): Set lang_hooks.name. (set_std_

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

2014-11-20 Thread Mark Wielaard
Wielaard + * dwarf2out.c (is_cxx): Add DW_LANG_C_plus_plus_11 and + DW_LANG_C_plus_plus_14. + (lower_bound_default): Likewise. Plus DW_LANG_C11. + (gen_compile_unit_die): Output DW_LANG_C_plus_plus_11, + DW_LANG_C_plus_plus_14 or DW_LANG_C11. + +2014-11-20 Mark Wielaard

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

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 no

[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]] attribut

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", va

Re: [PATCH] DWARF add DW_AT_noreturn on noreturn function subprogram.

2014-12-02 Thread Mark Wielaard
On Mon, 2014-12-01 at 14:31 -0700, Jeff Law wrote: > On 11/25/14 15:57, Mark Wielaard wrote: > > 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 d

Re: [patch+7.9] compile: Filter out -fpreprocessed

2015-02-03 Thread Mark Wielaard
On Tue, 2015-02-03 at 19:59 +0100, Jan Kratochvil wrote: > On Tue, 03 Feb 2015 19:50:40 +0100, Doug Evans wrote: > > On Fri, Jan 16, 2015 at 2:42 PM, Jan Kratochvil > > wrote: > > > [...] > > > It is wrong that gcc puts -fpreprocessed into DW_AT_producer - I may post > > > a gcc > > > patch for i

Re: [RFC PATCH] Emit DW_LANG_Fortran{03,08}

2015-02-09 Thread Mark Wielaard
On Wed, 2015-02-04 at 23:19 +0100, Jakub Jelinek wrote: > On Wed, Feb 04, 2015@01:58:32PM -0800, Cary Coutant wrote: > > > DW_LANG_Fortran03 and DW_LANG_Fortran08 DW_AT_language values were > > > recently > > > accepted into DWARF5. This patch changes GCC to handle those similarly to > > > how e.

Re: ping #3: [RFA] Add --with-libz-prefix option in config/zlib.m4

2015-02-18 Thread Mark Wielaard
On Wed, 2015-02-18 at 11:52 -0800, H.J. Lu wrote: > On Wed, Feb 18, 2015 at 11:44 AM, Mike Frysinger wrote: > > On 18 Feb 2015 08:58, H.J. Lu wrote: > >> On Wed, Feb 18, 2015 at 8:54 AM, Mike Frysinger wrote: > >> >> Why do you want to turn off zlib? On Linux/x86, zlib is required > >> >> for ass

Re: ping #3: [RFA] Add --with-libz-prefix option in config/zlib.m4

2015-02-18 Thread Mark Wielaard
On Wed, 2015-02-18 at 12:53 -0800, H.J. Lu wrote: > On Wed, Feb 18, 2015 at 12:32 PM, Mark Wielaard wrote: > > That doesn't seem like a smart default. And why is is Linux/x86 only? > > Shouldn't that be something that is done explicitly by a distro > > configurin

Re: ping #3: [RFA] Add --with-libz-prefix option in config/zlib.m4

2015-02-18 Thread Mark Wielaard
On Wed, Feb 18, 2015 at 01:54:17PM -0800, H.J. Lu wrote: > On Wed, Feb 18, 2015 at 1:40 PM, Mark Wielaard wrote: > > On Wed, 2015-02-18 at 12:53 -0800, H.J. Lu wrote: > >> On Wed, Feb 18, 2015 at 12:32 PM, Mark Wielaard wrote: > >> > That doesn't seem like a

Re: ping #3: [RFA] Add --with-libz-prefix option in config/zlib.m4

2015-02-20 Thread Mark Wielaard
On Thu, Feb 19, 2015 at 05:52:26AM -0800, H.J. Lu wrote: > On Wed, Feb 18, 2015 at 11:17 PM, Mark Wielaard wrote: > >> >> Now it becomes a monthly topic: > >> >> > >> >> https://sourceware.org/ml/binutils/2015-01/msg00089.html > >> > >

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 testc

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 wrote: > > > I think we want this (also extended for C11/C++11/C++14 afterwards), even > > > when the early debug bits won't

Re: [PATCH] Move rust_{is_mangled,demangle_sym} to a private libiberty header.

2019-06-04 Thread Mark Wielaard
On Sat, 2019-06-01 at 17:14 +0300, Eduard-Mihai Burtescu wrote: > When libiberty/rust-demangle.c was initially added, its two exports, > rust_is_mangled and rust_demangle_sym, made it to include/demangle.h. > However, these two functions are merely implementation details of > cplus_demangle and rus

[PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.

2018-11-26 Thread Mark Wielaard
With -Wtrampolines a warning is produced whenever gcc generates executable code on the stack at runtime to support taking a nested function address that is used to call the nested function indirectly when it needs to access any variables in its lexical scope. As a result the stack has to be marked

Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.

2018-11-26 Thread Mark Wielaard
On Mon, 2018-11-26 at 08:19 -0500, Paul Koning wrote: > > On Nov 26, 2018, at 4:13 AM, Mark Wielaard wrote: > > > > With -Wtrampolines a warning is produced whenever gcc generates > > executable > > code on the stack at runtime to support taking a nested function &

Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.

2018-11-26 Thread Mark Wielaard
On Mon, 2018-11-26 at 18:29 +, Joseph Myers wrote: > On Mon, 26 Nov 2018, Mark Wielaard wrote: > > > Define a new target macro TARGET_HAS_DEFAULT_NOEXEC_STACK for those > > targets > > that have a non-executable default stack based on when they call > > file_end_

Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.

2018-11-27 Thread Mark Wielaard
Hi, On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > Define a new target macro TARGET_HAS_DEFAULT_NOEXEC_STACK for those > > targets > > that have a non-executable default stack based on when they call > > file_end_indicate_exec_stack. > > As Paul says, that name isn't so good. >

Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.

2018-11-29 Thread Mark Wielaard
Hi Segher, On Wed, 2018-11-28 at 15:00 -0600, Segher Boessenkool wrote: > On Tue, Nov 27, 2018 at 08:54:07PM +0100, Mark Wielaard wrote: > > On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > > > Define a new target macro TARGET_HAS_DEFAULT_NOEXEC_ST

[PATCH] PR debug/90981 Empty .debug_addr crashes -gdwarf-5 -gsplit-dwarf

2019-06-26 Thread Mark Wielaard
Even if there was no, or an empty address list we would try to generate and index for the .debug_addr section with -gdwarf-5 and -gsplit-dwarf. The skeleton DIE would also get a (dangling) DW_AT_addr_base in that case. PR debug/90981 * dwarf2out.c (add_top_level_skeleton_die_attrs)

Re: Make max_align_t respect _Float128 [version 2]

2016-09-07 Thread Mark Wielaard
On Wed, Sep 07, 2016 at 11:15:34AM +0200, Florian Weimer wrote: > On 09/06/2016 11:31 PM, Paul Eggert wrote: > >On 09/06/2016 01:40 PM, Joseph Myers wrote: > >>Sounds like a defect in C11 to me - none of the examples of flexible > >>array > >>members anticipate needing to add to the size to allow f

Re: [PATCH] Remove padding from DWARF5 headers

2017-01-04 Thread Mark Wielaard
On Wed, Jan 04, 2017 at 12:09:43AM +0100, Jakub Jelinek wrote: > http://dwarfstd.org/ShowIssue.php?issue=161031.2 > got approved today, so DWARF5 is changing and the various DW_UT_* kinds > will no longer have the same size of the headers. So, > DW_UT_compile/DW_UT_partial shrinks by 12/16 bytes (

Re: [PATCH] libiberty: Don't update and remove did_subs field from demangler structs.

2017-04-18 Thread Mark Wielaard
Hi, On Sat, Dec 03, 2016 at 10:54:58PM +0100, Mark Wielaard wrote: > The d_info field did_subs was used for estimating the string output > size. It was no longer used when the malloc-less callback interface > was introduced in 2007 (svn r121305). But the field was still update

[PATCH] libiberty: Always return NULL if d_add_substitution fails.

2017-04-18 Thread Mark Wielaard
d_add_substitution can fail for various reasons, like when the subs array is full. If d_add_substitution fails d_substitution should return NULL early and not try to continue. Every other call of d_add_substitution is handled in the same way. libiberty/ChangeLog: * cp-demangle.c (d_substi

[PATCH] libiberty: Limit demangler maximum d_print_comp recursion call depth.

2017-04-18 Thread Mark Wielaard
The fix for PR demangler/70909 and 67264 (endless demangler recursion) catches when a demangle_component is printed in a cycle. But that doesn't protect the call stack blowing up from non-cyclic nested types printed recursively through d_print_comp. This can happen by a (very) long mangled string t

Re: [PATCH] libiberty: Limit demangler maximum d_print_comp recursion call depth.

2017-04-18 Thread Mark Wielaard
On Tue, Apr 18, 2017 at 03:40:05PM -0700, Ian Lance Taylor wrote: > On Tue, Apr 18, 2017 at 3:23 PM, Mark Wielaard wrote: > > The fix for PR demangler/70909 and 67264 (endless demangler recursion) > > catches when a demangle_component is printed in a cycle. But that doesn't

Re: [RFC PATCH libiberty] Fix infinite recursion in demangler

2017-03-02 Thread Mark Wielaard
Hi, On Thu, 2017-03-02 at 10:36 +0100, Markus Trippelsdorf wrote: > The following patch from Mark Wielaard fixes many (all?) open demangler > bugs that happen because we overflow the stack due to infinite > recursion. > > I'm not sure why Mark didn't post the patch him

Re: [RFC PATCH libiberty] Fix infinite recursion in demangler

2017-03-08 Thread Mark Wielaard
On Wed, 2017-03-08 at 08:22 -0500, Nathan Sidwell wrote: > https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00089.html? > > Patch looks good to me (not a libiberty maintainer) > > One question: > + if (dc == NULL || dc->d_printing > 1) > > Can dc ever be null here, or is this just extra defensiven

Re: [RFC PATCH libiberty] Fix infinite recursion in demangler

2017-03-12 Thread Mark Wielaard
On Wed, 2017-03-08 at 09:05 -0500, Nathan Sidwell wrote: > thanks. in case you'd not noticed Ian T's okayed my review. so this is > good to go Thanks. Markus pushed it including the testcases. But there are still two testcase (not added, but attached below) that are still failing (but now just

[PATCH] libiberty: Initialize d_printing in all cplus_demangle_* functions.

2017-03-12 Thread Mark Wielaard
--- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,11 @@ +2017-03-12 Mark Wielaard + + * cp-demangle.c (cplus_demangle_fill_name): Initialize + demangle_component d_printing. + (cplus_demangle_fill_extended_operator): Likewise. + (cplus_demangle_fill_ctor

Re: [PATCH] libiberty: Initialize d_printing in all cplus_demangle_* functions.

2017-03-13 Thread Mark Wielaard
On Mon, Mar 13, 2017 at 07:11:50PM +0100, Markus Trippelsdorf wrote: > On 2017.03.12 at 23:05 +0100, Mark Wielaard wrote: > > While integrating the d_printing recursion guard change into gdb I > > noticed we forgot to initialize the demangle_component d_printing > > field in

<    1   2   3   4   >