From: Nick Clifton Date: Tue, 27 Jul 2004 09:28:42 +0000 (+0000) Subject: Use -gdwarf2 in preference to -gstabs for Sparc64. X-Git-Tag: csl-arm-2004-q3~763 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=575eebb19f60c85a0e4973dfa9e2f8b1a197005a;p=platform%2Fupstream%2Fbinutils.git Use -gdwarf2 in preference to -gstabs for Sparc64. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 67e0809..b11ec2b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2004-07-26 Nick Clifton + + * gdb.asm/asm-source.exp (debug-flags): New variable. If a known + good default value for a specific architecture is available then + set it to that value. Otherwise default to the -gstabs switch. + Remove the -g... switches from the asm-flags variable. Allow the + target board info to override the value if it wants to. Pass the + switch on the assembler command line. + 2004-07-23 Mark Kettenis * gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1718. diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index 8839349..b620a1a 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -35,13 +35,15 @@ set asm-arch "" set asm-note "empty" set asm-flags "" set link-flags "--entry _start" +set debug-flags "" switch -glob -- [istarget] { "alpha*-*-*" { set asm-arch alpha # ??? Won't work with ecoff systems like Tru64, but then we also # don't have any other -g flag that creates mdebug output. - set asm-flags "-gdwarf2 -no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } "*arm-*-*" { set asm-arch arm @@ -63,7 +65,8 @@ switch -glob -- [istarget] { } "x86_64-*-*" { set asm-arch x86_64 - set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } "i\[3456\]86-*-*" { set asm-arch i386 @@ -88,18 +91,21 @@ switch -glob -- [istarget] { } "sh*-*-*" { set asm-arch sh - set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } "sparc-*-*" { set asm-arch sparc } "sparc64-*-*" { set asm-arch sparc64 - set asm-flags "-xarch=v9 -gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-xarch=v9 -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } "xstormy16-*-*" { set asm-arch xstormy16 - set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } "v850-*-*" { set asm-arch v850 @@ -110,11 +116,13 @@ switch -glob -- [istarget] { } "ia64-*-*" { set asm-arch ia64 - set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } "hppa*-linux-*" { set asm-arch pa - set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gdwarf-2" } } @@ -161,13 +169,24 @@ remote_exec build "rm -f ${subdir}/note.inc" remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc if { "${asm-flags}" == "" } { - set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}" + set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" + set debug-flags "-gstabs" } -if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags}"] != ""} then { +# Allow the target board to override the debug flags +if { [board_info $dest exists debug_flags] } then { + set debug-flags "[board_info $dest debug_flags]" +} + +# The GNU assembler does not support STABS+ +if { ${debug-flags} == "-gstabs+" } then { + set debug-flags "-gstabs" +} + +if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags} ${debug-flags}"] != ""} then { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } -if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags}"] != ""} then { +if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags} ${debug-flags}"] != ""} then { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." }