summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.asm
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-07-27 09:28:42 +0000
committerNick Clifton <nickc@redhat.com>2004-07-27 09:28:42 +0000
commit4b435828276de07db3ad8dc208cbb188b3413991 (patch)
treecb849c6da9e73957f074f65f85bbd05540f769fa /gdb/testsuite/gdb.asm
parent3f78e874d5e1dd209b32d597d3a5c47a2d91190c (diff)
downloadgdb-4b435828276de07db3ad8dc208cbb188b3413991.tar.gz
Use -gdwarf2 in preference to -gstabs for Sparc64.
Diffstat (limited to 'gdb/testsuite/gdb.asm')
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp39
1 files changed, 29 insertions, 10 deletions
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 8839349522c..b620a1a7844 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."
}