From 784667142320ce3cbd8c4542c147451e43fb30d4 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Wed, 22 Jan 2014 15:31:10 +0000 Subject: [PATCH] Prevent appending "-g" after "-g3" to compile options in info-macros.exp. When upstream gcc is given a command line with the "-g" option after "-g3", it doesn't generate a ".debug_macro" section. This is because the last option wins, thus downgrading the debug level again. Without any macro debug information in the executable, info-macros.exp obviously produces many failures. Since the "-g" option is appended by DejaGnu's target_compile whenever the "debug" option is set, the fix just removes that option. gdb/testsuite/ChangeLog: * gdb.base/info-macros.exp: Remove "debug" from the compile options. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/info-macros.exp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 983ff04af1..16d7616e6c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-01-22 Andreas Arnez + + * gdb.base/info-macros.exp: Remove "debug" from the compile + options. + 2014-01-17 Iain Buclaw * gdb.dlang/demangle.exp: New file. diff --git a/gdb/testsuite/gdb.base/info-macros.exp b/gdb/testsuite/gdb.base/info-macros.exp index ff889f4e18..798d9b57e8 100644 --- a/gdb/testsuite/gdb.base/info-macros.exp +++ b/gdb/testsuite/gdb.base/info-macros.exp @@ -27,7 +27,9 @@ if ![test_compiler_info gcc*] { return -1 } -set options "debug additional_flags=-g3" +# Don't use "debug" here. Otherwise "-g" would be appended to the gcc +# command line, possibly overriding "-g3" (depending on gcc version). +set options "additional_flags=-g3" if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $options] } { untested ${testfile}.exp -- 2.34.1