-# 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
}
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"