Index: gdb/testsuite/gdb.base/shreloc.exp |
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp |
index 206d9d8b1dff32c86063d29390b22be1f6fd7534..8a533593e55aeae9affbe02edfde8f2ed7c6f6e8 100644 |
--- a/gdb/testsuite/gdb.base/shreloc.exp |
+++ b/gdb/testsuite/gdb.base/shreloc.exp |
@@ -1,4 +1,4 @@ |
-# Copyright (C) 2003, 2005, 2007-2012 Free Software Foundation, Inc. |
+# Copyright (C) 2003-2013 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 |
@@ -28,16 +28,14 @@ if {[skip_shlib_tests]} { |
# |
-set workdir ${objdir}/${subdir} |
-set testfile "shreloc" |
-set libfile1 "shreloc1" |
-set libfile2 "shreloc2" |
-set srcfile $srcdir/$subdir/$testfile.c |
-set lib1src $srcdir/$subdir/$libfile1.c |
-set lib2src $srcdir/$subdir/$libfile2.c |
-set binfile $objdir/$subdir/$testfile |
-set lib1_sl $objdir/$subdir/$libfile1.sl |
-set lib2_sl $objdir/$subdir/$libfile2.sl |
+standard_testfile .c shreloc1.c shreloc2.c |
+ |
+set srcfile $srcdir/$subdir/$srcfile |
+set lib1src $srcdir/$subdir/$srcfile2 |
+set lib2src $srcdir/$subdir/$srcfile3 |
+set binfile [standard_output_file $testfile] |
+set lib1_sl [standard_output_file shreloc1.sl] |
+set lib2_sl [standard_output_file shreloc2.sl] |
if [get_compiler_info] { |
return -1 |
@@ -73,10 +71,7 @@ if { [gdb_compile_shlib $lib1src $lib1_sl $lib_opts] != ""} { |
# Start with a fresh gdb. |
-gdb_exit |
-gdb_start |
-gdb_reinitialize_dir $srcdir/$subdir |
-gdb_load ${workdir}/shreloc |
+clean_restart $binfile |
gdb_load_shlibs $lib1_sl $lib2_sl |
# Load up the shared objects |
@@ -226,7 +221,11 @@ proc check_different {var msymfile} { |
return 1 |
} |
-set msymfile "${workdir}/shreloc.txt" |
+if [is_remote host] { |
+ set msymfile shreloc.txt |
+} else { |
+ set msymfile [standard_output_file shreloc.txt] |
+} |
if [send_gdb_discard "maint print msymbols ${msymfile}"] { |
if {[check_different "static_var_\[12\]" "${msymfile}"]} { |