From: Jakub Jelinek Date: Mon, 23 Oct 2017 14:10:36 +0000 (+0200) Subject: common.opt (gcolumn-info): Enable by default. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8008dd1c93cf12b8f6d8a23612e988d606281fdf;p=gcc.git common.opt (gcolumn-info): Enable by default. * common.opt (gcolumn-info): Enable by default. * doc/invoke.texi (gcolumn-info): Document new default. * lib/scanasm.exp (dg-function-on-line): Accept optional column info. * gcc.dg/debug/dwarf2/pr53948.c: Likewise. * g++.dg/debug/dwarf2/pr77363.C: Likewise. * gcc.dg/debug/dwarf2/asm-line1.c: Add -gno-column-info to dg-options. * gcc.dg/debug/dwarf2/discriminator.c: Likewise. * g++.dg/debug/dwarf2/typedef6.C: Likewise. From-SVN: r254010 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d0b7223fc98..5a458a27cd4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-23 Jakub Jelinek + + * common.opt (gcolumn-info): Enable by default. + * doc/invoke.texi (gcolumn-info): Document new default. + 2017-10-23 Richard Biener PR tree-optimization/82672 diff --git a/gcc/common.opt b/gcc/common.opt index 8d62ec5044d..836f05b95a2 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2873,7 +2873,7 @@ Common Driver JoinedOrMissing Negative(gdwarf) Generate debug information in COFF format. gcolumn-info -Common Driver Var(debug_column_info,1) Init(0) +Common Driver Var(debug_column_info,1) Init(1) Record DW_AT_decl_column and DW_AT_call_column in DWARF. gdwarf diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c3128649f4c..3a879566487 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7065,7 +7065,7 @@ Allow using extensions of later DWARF standard version than selected with @opindex gno-column-info Emit location column information into DWARF debugging information, rather than just file and line. -This option is disabled by default. +This option is enabled by default. @item -gz@r{[}=@var{type}@r{]} @opindex gz diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 75475d7e8ea..3aadb9e8a89 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2017-10-23 Jakub Jelinek + + * lib/scanasm.exp (dg-function-on-line): Accept optional column info. + * gcc.dg/debug/dwarf2/pr53948.c: Likewise. + * g++.dg/debug/dwarf2/pr77363.C: Likewise. + * gcc.dg/debug/dwarf2/asm-line1.c: Add -gno-column-info to dg-options. + * gcc.dg/debug/dwarf2/discriminator.c: Likewise. + * g++.dg/debug/dwarf2/typedef6.C: Likewise. + 2017-10-23 Richard Biener PR tree-optimization/82672 diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C index 47b71433815..cd06c360a98 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C @@ -1,9 +1,9 @@ // PR debug/77363 // { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } -// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type2\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } } -// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type3\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } } -// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type4\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } } -// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type5\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } } +// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type2\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*(\[^\n\r\]* DW_AT_decl_column\[^\n\r\]*\[\n\r]*)?\[^\n\r\]* DW_AT_type" } } +// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type3\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*(\[^\n\r\]* DW_AT_decl_column\[^\n\r\]*\[\n\r]*)?\[^\n\r\]* DW_AT_type" } } +// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type4\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*(\[^\n\r\]* DW_AT_decl_column\[^\n\r\]*\[\n\r]*)?\[^\n\r\]* DW_AT_type" } } +// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type5\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*(\[^\n\r\]* DW_AT_decl_column\[^\n\r\]*\[\n\r]*)?\[^\n\r\]* DW_AT_type" } } typedef unsigned short type1; typedef unsigned char type2; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C index 7945deadaa2..654eba023da 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C @@ -1,5 +1,5 @@ // Origin PR debug/ -// { dg-options "-gdwarf-2 -dA" } +// { dg-options "-gdwarf-2 -dA -gno-column-info" } class C { public: diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c index 3773e1c83c3..aebfcad6008 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c @@ -1,6 +1,6 @@ /* PR debug/50983 */ /* { dg-do compile { target *-*-gnu* } } */ -/* { dg-options "-O0 -gdwarf" } */ +/* { dg-options "-O0 -gdwarf -gno-column-info" } */ /* { dg-final { scan-assembler "is_stmt 1" } } */ int i; diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c index b77f7b1bfff..fa24de8d7d4 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c @@ -1,7 +1,7 @@ /* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest. However, dg cannot access it, so we restrict to GNU targets. */ /* { dg-do compile { target *-*-gnu* } } */ -/* { dg-options "-O0 -gdwarf" } */ +/* { dg-options "-O0 -gdwarf -gno-column-info" } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])?\n" } } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 2\n" } } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c index 0ec3e84d704..4485e19c1cd 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c @@ -1,7 +1,7 @@ /* Test that we have line information for the line with local variable initializations. */ /* { dg-options "-O0 -gdwarf -dA" } */ -/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\]\[ \t\]+line 8" } } */ +/* { dg-final { scan-assembler ".loc 1 8 \[0-9\]|\[#/!\]\[ \t\]+line 8" } } */ int f (register int a, register int b) { diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 32764cb9c4a..a66bb282531 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -484,16 +484,16 @@ proc dg-function-on-line { args } { } if { [istarget hppa*-*-*] } { - set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \ + set pattern [format {\t;[^:]+:%d(:[0-9]+)?\n(\t[^\t]+\n)+%s:\n\t.PROC} \ $line $symbol] } elseif { [istarget mips*-*-*] } { - set pattern [format {\t\.loc [0-9]+ %d 0( [^\n]*)?\n(\t.cfi_startproc[^\t]*\n)*\t\.set\t(no)?mips16\n\t(\.set\t(no)?micromips\n\t)?\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \ + set pattern [format {\t\.loc [0-9]+ %d [0-9]+( [^\n]*)?\n(\t.cfi_startproc[^\t]*\n)*\t\.set\t(no)?mips16\n\t(\.set\t(no)?micromips\n\t)?\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \ $line $symbol $symbol $symbol] } elseif { [istarget microblaze*-*-*] } { - set pattern [format {:%d\n\$.*:\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \ + set pattern [format {:%d(:[0-9]+)?\n\$.*:\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \ $line $symbol $symbol $symbol] } else { - set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d\n} \ + set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d(:[0-9]+)?\n} \ $symbol $line] }