2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / type-opaque.exp
index fc533196a76efa63808102d0d66b6fc96a8f8c2e..7caaeb1afe7afc9e6f73ce8231776cb9bb44672e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2004-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
 
 # Test resolving of an opaque type from the loaded shared library.
 
-if $tracelevel then {
-    strace $tracelevel
+if {[skip_shlib_tests]} {
+    return -1
 }
 
-set testfile type-opaque-main
-set libfile type-opaque-lib
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile type-opaque-main.c
 
+set libfile type-opaque-lib
 set libsrc "${srcdir}/${subdir}/${libfile}.c"
-set libobj "${objdir}/${subdir}/${libfile}.so"
+set libobj [standard_output_file ${libfile}.so]
 set execsrc "${srcdir}/${subdir}/${srcfile}"
 
 remote_exec build "rm -f ${binfile}"
 
-# Are we on a target board?  No support for downloading shared libraries
-# to a target yet.
-if ![isnative] then {
-    return 0
-}
-
 # get the value of gcc_compiled
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info] {
     return -1
 }
 
@@ -47,10 +39,8 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
+gdb_load_shlibs ${libobj}
 
 if ![runto_main] then {
     fail "Can't run to main"
This page took 0.025057 seconds and 4 git commands to generate.