Handle CRLF when reading XML on Windows
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw2-op-stack-value.exp
index f731d7ba8e01b1c6c053dcdf703dac49370d8545..eb0f80240a8b0da4374dbf8c9a30ce6b6bfbeabf 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2011-2012 Free Software Foundation, Inc.
+# Copyright 2011-2019 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
@@ -19,15 +19,17 @@ if {![dwarf2_support]} {
     return 0   
 }
 
-set testfile "dw2-op-stack-value"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+# Some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+standard_testfile .S
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+          object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "p/x stack2" " = 0x1"
 gdb_test "p/x stack8" " = 0x1"
@@ -43,7 +45,7 @@ gdb_test_multiple $test $test {
     -re ":\[ \t\]*0xaa551234\r\n$gdb_prompt $" {
        # big endian
        pass $test
-       gdb_test "p/x implicit4to2" " = 0x3344"
+       gdb_test "p/x implicit4to2" " = 0x1122"
        gdb_test "p/x implicit4to4" " = 0x11223344"
     }
     -re ":\[ \t\]*0x\[0-9a-f\]{8}\r\n$gdb_prompt $" {
This page took 0.027636 seconds and 4 git commands to generate.