Commit 8008dd1c by Jakub Jelinek Committed by Jakub Jelinek

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
parent ee76c2f9
2017-10-23 Jakub Jelinek <jakub@redhat.com>
* common.opt (gcolumn-info): Enable by default.
* doc/invoke.texi (gcolumn-info): Document new default.
2017-10-23 Richard Biener <rguenther@suse.de> 2017-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/82672 PR tree-optimization/82672
...@@ -2873,7 +2873,7 @@ Common Driver JoinedOrMissing Negative(gdwarf) ...@@ -2873,7 +2873,7 @@ Common Driver JoinedOrMissing Negative(gdwarf)
Generate debug information in COFF format. Generate debug information in COFF format.
gcolumn-info 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. Record DW_AT_decl_column and DW_AT_call_column in DWARF.
gdwarf gdwarf
......
...@@ -7065,7 +7065,7 @@ Allow using extensions of later DWARF standard version than selected with ...@@ -7065,7 +7065,7 @@ Allow using extensions of later DWARF standard version than selected with
@opindex gno-column-info @opindex gno-column-info
Emit location column information into DWARF debugging information, rather Emit location column information into DWARF debugging information, rather
than just file and line. than just file and line.
This option is disabled by default. This option is enabled by default.
@item -gz@r{[}=@var{type}@r{]} @item -gz@r{[}=@var{type}@r{]}
@opindex gz @opindex gz
2017-10-23 Jakub Jelinek <jakub@redhat.com>
* 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 <rguenther@suse.de> 2017-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/82672 PR tree-optimization/82672
......
// PR debug/77363 // PR debug/77363
// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { 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\]*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_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_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_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 short type1;
typedef unsigned char type2; typedef unsigned char type2;
......
// Origin PR debug/ // Origin PR debug/
// { dg-options "-gdwarf-2 -dA" } // { dg-options "-gdwarf-2 -dA -gno-column-info" }
class C { class C {
public: public:
......
/* PR debug/50983 */ /* PR debug/50983 */
/* { dg-do compile { target *-*-gnu* } } */ /* { dg-do compile { target *-*-gnu* } } */
/* { dg-options "-O0 -gdwarf" } */ /* { dg-options "-O0 -gdwarf -gno-column-info" } */
/* { dg-final { scan-assembler "is_stmt 1" } } */ /* { dg-final { scan-assembler "is_stmt 1" } } */
int i; int i;
......
/* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest. /* 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. */ However, dg cannot access it, so we restrict to GNU targets. */
/* { dg-do compile { target *-*-gnu* } } */ /* { 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])?\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 2\n" } } */
/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */
......
/* Test that we have line information for the line /* Test that we have line information for the line
with local variable initializations. */ with local variable initializations. */
/* { dg-options "-O0 -gdwarf -dA" } */ /* { 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) { int f (register int a, register int b) {
......
...@@ -484,16 +484,16 @@ proc dg-function-on-line { args } { ...@@ -484,16 +484,16 @@ proc dg-function-on-line { args } {
} }
if { [istarget hppa*-*-*] } { 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] $line $symbol]
} elseif { [istarget mips*-*-*] } { } 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] $line $symbol $symbol $symbol]
} elseif { [istarget microblaze*-*-*] } { } 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] $line $symbol $symbol $symbol]
} else { } 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] $symbol $line]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment