diff options
Diffstat (limited to 'gdb/testsuite/gdb.asm/asm-source.exp')
-rw-r--r-- | gdb/testsuite/gdb.asm/asm-source.exp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index 471b31a..298ba2e 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -1,4 +1,4 @@ -# Copyright 1998, 2000 Free Software Foundation, Inc. +# Copyright 1998, 2000, 2002 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -53,9 +53,16 @@ if [istarget "i\[3456\]86-*-*"] then { if [istarget "m32r*-*"] then { set asm-arch m32r } +if [istarget "powerpc*-*"] then { + set asm-arch powerpc +} if [istarget "sparc-*-*"] then { set asm-arch sparc } +if [istarget "sparc64-*-*"] then { + set asm-arch sparc64 + set asm-flags "-xarch=v9 -gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}" +} if [istarget "xstormy16-*-*"] then { set asm-arch xstormy16 set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" @@ -64,11 +71,29 @@ if { "${asm-arch}" == "" } { gdb_suppress_entire_file "Assembly source test -- not implemented for this target." } +# Watch out, we are invoking the assembler, but the testsuite sets multilib +# switches according to compiler syntax. If we pass these options straight +# to the assembler, they won't always make sense. If we don't pass them to +# the assembler, the final link will complain that the object files were +# built with different defaults. So no matter what we do, we lose. We may as +# well get out of this test sooner rather than later. +set dest [target_info name] +if [board_info $dest exists multilib_flags] { + set multilib_flags [board_info $dest multilib_flags] + if { "${multilib_flags}" != "" } { + gdb_suppress_entire_file "Assembly source test -- multilibs not supported by this test." + return; + } +} + set testfile "asm-source" set binfile ${objdir}/${subdir}/${testfile} set src1 ${srcdir}/${subdir}/asmsrc1.s set src2 ${srcdir}/${subdir}/asmsrc2.s +remote_exec build "rm -f ${subdir}/arch.inc" +remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc + if { "${asm-flags}" == "" } { #set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}" set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}" @@ -256,3 +281,4 @@ gdb_test "print staticvar" ".* = 5" "look at static variable" gdb_test "disassem foostatic" ".*<foostatic>:.*End of assembler dump." \ "look at static function" +remote_exec build "rm -f ${subdir}/arch.inc" |