OLD | NEW |
1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-2012 Free Software Foundation, Inc. |
2 # This program is free software; you can redistribute it and/or modify | 2 # This program is free software; you can redistribute it and/or modify |
3 # it under the terms of the GNU General Public License as published by | 3 # it under the terms of the GNU General Public License as published by |
4 # the Free Software Foundation; either version 3 of the License, or | 4 # the Free Software Foundation; either version 3 of the License, or |
5 # (at your option) any later version. | 5 # (at your option) any later version. |
6 # | 6 # |
7 # This program is distributed in the hope that it will be useful, | 7 # This program is distributed in the hope that it will be useful, |
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 # GNU General Public License for more details. | 10 # GNU General Public License for more details. |
(...skipping 26 matching lines...) Expand all Loading... |
37 set srcfile_lib ${srcdir}/${subdir}/${libname}.c | 37 set srcfile_lib ${srcdir}/${subdir}/${libname}.c |
38 set binfile_lib ${objdir}/${subdir}/${libname}.so | 38 set binfile_lib ${objdir}/${subdir}/${libname}.so |
39 set lib_flags {} | 39 set lib_flags {} |
40 # Binary file. | 40 # Binary file. |
41 set testfile "solib-display-main" | 41 set testfile "solib-display-main" |
42 set srcfile ${srcdir}/${subdir}/${testfile}.c | 42 set srcfile ${srcdir}/${subdir}/${testfile}.c |
43 set executable ${testfile} | 43 set executable ${testfile} |
44 set binfile ${objdir}/${subdir}/${executable} | 44 set binfile ${objdir}/${subdir}/${executable} |
45 set bin_flags [list debug shlib=${binfile_lib}] | 45 set bin_flags [list debug shlib=${binfile_lib}] |
46 | 46 |
47 if [get_compiler_info ${binfile}] { | 47 if [get_compiler_info] { |
48 return -1 | 48 return -1 |
49 } | 49 } |
50 | 50 |
51 set save_pf_prefix $pf_prefix | |
52 # SEP must be last for the possible `unsupported' error path. | 51 # SEP must be last for the possible `unsupported' error path. |
53 foreach libsepdebug {NO IN SEP} { | 52 foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" { |
54 | |
55 set pf_prefix $save_pf_prefix | |
56 lappend pf_prefix "$libsepdebug:" | |
57 | 53 |
58 set sep_lib_flags $lib_flags | 54 set sep_lib_flags $lib_flags |
59 if {$libsepdebug != "NO"} { | 55 if {$libsepdebug != "NO"} { |
60 lappend sep_lib_flags {debug} | 56 lappend sep_lib_flags {debug} |
61 } | 57 } |
62 if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != "" | 58 if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != "" |
63 || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { | 59 || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { |
64 untested "Could not compile $binfile_lib or $binfile." | 60 untested "Could not compile $binfile_lib or $binfile." |
65 return -1 | 61 return -1 |
66 } | 62 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 124 |
129 if { [gdb_start_cmd] < 0 } { | 125 if { [gdb_start_cmd] < 0 } { |
130 fail "Can't run to main (4)" | 126 fail "Can't run to main (4)" |
131 continue | 127 continue |
132 } | 128 } |
133 | 129 |
134 gdb_test "" "6: a_static = 46\\r\\n4: main_global = 44\\r\\n.*" | 130 gdb_test "" "6: a_static = 46\\r\\n4: main_global = 44\\r\\n.*" |
135 gdb_test "break [gdb_get_line_number "break here" ${testfile}.c]" \ | 131 gdb_test "break [gdb_get_line_number "break here" ${testfile}.c]" \ |
136 ".*Breakpoint.* at .*" | 132 ".*Breakpoint.* at .*" |
137 gdb_test "continue" "6: a_static = 46\\r\\n5: a_local = 45\\r\\n4: main_glob
al = 44\\r\\n.*" | 133 gdb_test "continue" "6: a_static = 46\\r\\n5: a_local = 45\\r\\n4: main_glob
al = 44\\r\\n.*" |
138 } | 134 }} |
139 set pf_prefix $save_pf_prefix | |
OLD | NEW |