Skip to content

Commit c61ffa8

Browse files
author
jakub
committed
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254010 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent d0b2bca commit c61ffa8

File tree

10 files changed

+28
-14
lines changed

10 files changed

+28
-14
lines changed

gcc/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2017-10-23 Jakub Jelinek <[email protected]>
2+
3+
* common.opt (gcolumn-info): Enable by default.
4+
* doc/invoke.texi (gcolumn-info): Document new default.
5+
16
2017-10-23 Richard Biener <[email protected]>
27

38
PR tree-optimization/82672

gcc/common.opt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2873,7 +2873,7 @@ Common Driver JoinedOrMissing Negative(gdwarf)
28732873
Generate debug information in COFF format.
28742874

28752875
gcolumn-info
2876-
Common Driver Var(debug_column_info,1) Init(0)
2876+
Common Driver Var(debug_column_info,1) Init(1)
28772877
Record DW_AT_decl_column and DW_AT_call_column in DWARF.
28782878

28792879
gdwarf

gcc/doc/invoke.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7065,7 +7065,7 @@ Allow using extensions of later DWARF standard version than selected with
70657065
@opindex gno-column-info
70667066
Emit location column information into DWARF debugging information, rather
70677067
than just file and line.
7068-
This option is disabled by default.
7068+
This option is enabled by default.
70697069

70707070
@item -gz@r{[}=@var{type}@r{]}
70717071
@opindex gz

gcc/testsuite/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2017-10-23 Jakub Jelinek <[email protected]>
2+
3+
* lib/scanasm.exp (dg-function-on-line): Accept optional column info.
4+
* gcc.dg/debug/dwarf2/pr53948.c: Likewise.
5+
* g++.dg/debug/dwarf2/pr77363.C: Likewise.
6+
* gcc.dg/debug/dwarf2/asm-line1.c: Add -gno-column-info to dg-options.
7+
* gcc.dg/debug/dwarf2/discriminator.c: Likewise.
8+
* g++.dg/debug/dwarf2/typedef6.C: Likewise.
9+
110
2017-10-23 Richard Biener <[email protected]>
211

312
PR tree-optimization/82672

gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// PR debug/77363
22
// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" }
3-
// { 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" } }
4-
// { 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" } }
5-
// { 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" } }
6-
// { 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" } }
3+
// { 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" } }
4+
// { 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" } }
5+
// { 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" } }
6+
// { 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" } }
77

88
typedef unsigned short type1;
99
typedef unsigned char type2;

gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Origin PR debug/
2-
// { dg-options "-gdwarf-2 -dA" }
2+
// { dg-options "-gdwarf-2 -dA -gno-column-info" }
33

44
class C {
55
public:

gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* PR debug/50983 */
22
/* { dg-do compile { target *-*-gnu* } } */
3-
/* { dg-options "-O0 -gdwarf" } */
3+
/* { dg-options "-O0 -gdwarf -gno-column-info" } */
44
/* { dg-final { scan-assembler "is_stmt 1" } } */
55

66
int i;

gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest.
22
However, dg cannot access it, so we restrict to GNU targets. */
33
/* { dg-do compile { target *-*-gnu* } } */
4-
/* { dg-options "-O0 -gdwarf" } */
4+
/* { dg-options "-O0 -gdwarf -gno-column-info" } */
55
/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])?\n" } } */
66
/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 2\n" } } */
77
/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */

gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Test that we have line information for the line
22
with local variable initializations. */
33
/* { dg-options "-O0 -gdwarf -dA" } */
4-
/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\]\[ \t\]+line 8" } } */
4+
/* { dg-final { scan-assembler ".loc 1 8 \[0-9\]|\[#/!\]\[ \t\]+line 8" } } */
55

66

77
int f (register int a, register int b) {

gcc/testsuite/lib/scanasm.exp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,16 +484,16 @@ proc dg-function-on-line { args } {
484484
}
485485

486486
if { [istarget hppa*-*-*] } {
487-
set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \
487+
set pattern [format {\t;[^:]+:%d(:[0-9]+)?\n(\t[^\t]+\n)+%s:\n\t.PROC} \
488488
$line $symbol]
489489
} elseif { [istarget mips*-*-*] } {
490-
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} \
490+
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} \
491491
$line $symbol $symbol $symbol]
492492
} elseif { [istarget microblaze*-*-*] } {
493-
set pattern [format {:%d\n\$.*:\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \
493+
set pattern [format {:%d(:[0-9]+)?\n\$.*:\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \
494494
$line $symbol $symbol $symbol]
495495
} else {
496-
set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d\n} \
496+
set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d(:[0-9]+)?\n} \
497497
$symbol $line]
498498
}
499499

0 commit comments

Comments
 (0)