From 52d7fb1303dcc15fab68b89cf1dd8d2d719c7bb6 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 10 Jan 2014 15:37:36 +0000 Subject: [PATCH] Since upstream gcc has recently increased the function alignment on S390, the dw2-dir-file-name test case fails in the first gdb_continue_to_breakpoint. Indeed, the breakpoint is now placed into the alignment gap *before* the actual function. This happens because the test case declares the respective "*_start" symbol as a "loose" label before the function definition, and the compiler inserts the alignment between that label and the function itself. The "*_start" symbols were only necessary because FUNC made the function static. The fix makes the functions extern instead, thus making the "*_start" labels unnecessary. testsuite/ 2014-01-10 Andreas Arnez Pedro Alves * gdb.dwarf2/dw2-dir-file-name.c (FUNC): Remove "*_start" symbol. Make "name" extern. * gdb.dwarf2/dw2-dir-file-name.exp (out_cu, out_line): Replace references to ${name}_start by references to ${name}. --- gdb/testsuite/ChangeLog | 8 ++++++++ gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c | 3 +-- gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2bfeec16c2..904cca726a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2014-01-10 Andreas Arnez + Pedro Alves + + * gdb.dwarf2/dw2-dir-file-name.c (FUNC): Remove "*_start" symbol. + Make "name" extern. + * gdb.dwarf2/dw2-dir-file-name.exp (out_cu, out_line): Replace + references to ${name}_start by references to ${name}. + 2014-01-10 Joel Brobecker * gdb.ada/pp-rec-component.exp: Remove path from "source" test. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c index 21a4d2a82f..2b9cc6a857 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c @@ -64,8 +64,7 @@ FUNC (compdir_absolute_ldir_absolute_file_absolute_same) \ FUNC (compdir_absolute_ldir_absolute_file_absolute_different) #define FUNC(name) \ - asm (#name "_start: .globl " #name "_start\n"); \ - static void \ + void \ name (void) \ { \ v++; \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp index 7f29581dcd..e523e89a16 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp @@ -54,7 +54,7 @@ proc out_cu { name cu_dir cu_name line_dir line_name } { .ascii \"GNU C\\0\" /* DW_AT_producer */ .byte 2 /* DW_AT_language (DW_LANG_C) */ .4byte .Lline_${name}_begin /* DW_AT_stmt_list */ - .4byte ${name}_start /* DW_AT_low_pc */ + .4byte ${name} /* DW_AT_low_pc */ .4byte ${name}_end /* DW_AT_high_pc */ " if { $cu_dir != "" } { @@ -65,7 +65,7 @@ proc out_cu { name cu_dir cu_name line_dir line_name } { .uleb128 3 /* Abbrev: DW_TAG_subprogram */ .asciz \"${name}\" /* DW_AT_name */ - .4byte ${name}_start /* DW_AT_low_pc */ + .4byte ${name} /* DW_AT_low_pc */ .4byte ${name}_end /* DW_AT_high_pc */ .byte 0 /* End of children of CU */ @@ -122,7 +122,7 @@ proc out_line { name cu_dir cu_name line_dir line_name } { .byte 0 /* DW_LNE_set_address */ .uleb128 5 .byte 2 - .4byte ${name}_start + .4byte ${name} .byte 1 /* DW_LNS_copy */ .byte 3 /* DW_LNS_advance_line */ .sleb128 1 /* ... to 1000 */ -- 2.34.1