OLD | NEW |
1 # Copyright 2010-2012 Free Software Foundation, Inc. | 1 # Copyright 2010-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 13 matching lines...) Expand all Loading... |
24 # Arbitrary file containing main. | 24 # Arbitrary file containing main. |
25 set srcfile start.c | 25 set srcfile start.c |
26 set binlibfilebase ${testfile}.so | 26 set binlibfilebase ${testfile}.so |
27 set binlibfiledir ${objdir}/${subdir} | 27 set binlibfiledir ${objdir}/${subdir} |
28 set binlibfile ${binlibfiledir}/${binlibfilebase} | 28 set binlibfile ${binlibfiledir}/${binlibfilebase} |
29 set executable ${testfile} | 29 set executable ${testfile} |
30 set objfile ${objdir}/${subdir}/${executable}.o | 30 set objfile ${objdir}/${subdir}/${executable}.o |
31 set binfile ${objdir}/${subdir}/${executable} | 31 set binfile ${objdir}/${subdir}/${executable} |
32 | 32 |
33 # build the first test case | 33 # build the first test case |
34 if { [get_compiler_info unused] | 34 if { [get_compiler_info] |
35 || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [
list debug ldflags=-Wl,-soname,${binlibfilebase}]] != "" | 35 || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [
list debug ldflags=-Wl,-soname,${binlibfilebase}]] != "" |
36 || [gdb_gnu_strip_debug $binlibfile] | 36 || [gdb_gnu_strip_debug $binlibfile] |
37 || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug
}] != "" | 37 || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug
}] != "" |
38 || [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "
" } { | 38 || [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "
" } { |
39 untested ${testfile}.exp | 39 untested ${testfile}.exp |
40 return -1 | 40 return -1 |
41 } | 41 } |
42 | 42 |
43 clean_restart $executable | 43 clean_restart $executable |
44 gdb_load_shlibs ${binlibfile} | 44 gdb_load_shlibs ${binlibfile} |
45 | 45 |
46 gdb_test_no_output "set env LD_LIBRARY_PATH=:" | 46 gdb_test_no_output "set env LD_LIBRARY_PATH=:" |
47 gdb_test "cd ${binlibfiledir}" "Working directory [string_to_regexp ${binlibfile
dir}]\\." "cd OBJDIR/${subdir}" | 47 gdb_test "cd ${binlibfiledir}" "Working directory [string_to_regexp ${binlibfile
dir}]\\." "cd OBJDIR/${subdir}" |
48 | 48 |
49 set test "library loaded" | 49 set test "library loaded" |
50 if [runto_main] { | 50 if [runto_main] { |
51 pass $test | 51 pass $test |
52 } else { | 52 } else { |
53 fail $test | 53 fail $test |
54 } | 54 } |
OLD | NEW |