OLD | NEW |
1 # Copyright 2003, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2003, 2007-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 |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # This file is part of the gdb testsuite | 16 # This file is part of the gdb testsuite |
17 | 17 |
18 # This is intended to be a repository for tests that partial symbols | 18 # This is intended to be a repository for tests that partial symbols |
19 # are working properly. If multiple tests are added, make sure that | 19 # are working properly. If multiple tests are added, make sure that |
20 # you exit and restart GDB between tests. | 20 # you exit and restart GDB between tests. |
21 | 21 |
22 if $tracelevel then { | |
23 strace $tracelevel | |
24 } | |
25 | |
26 # | 22 # |
27 # test running programs | 23 # test running programs |
28 # | 24 # |
29 | 25 |
30 | 26 |
31 if { [skip_cplus_tests] } { continue } | 27 if { [skip_cplus_tests] } { continue } |
32 | 28 |
33 set testfile "psymtab" | 29 set testfile "psymtab" |
34 set binfile ${objdir}/${subdir}/${testfile} | 30 set binfile ${objdir}/${subdir}/${testfile} |
35 | 31 |
36 if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object
{debug}] != "" } { | 32 if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object
{debug}] != "" } { |
37 untested psymtab.exp | 33 untested psymtab.exp |
38 return -1 | 34 return -1 |
39 } | 35 } |
40 | 36 |
41 if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object
{debug}] != "" } { | 37 if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object
{debug}] != "" } { |
42 untested psymtab.exp | 38 untested psymtab.exp |
43 return -1 | 39 return -1 |
44 } | 40 } |
45 | 41 |
46 if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}
] != "" } { | 42 if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}
] != "" } { |
47 untested psymtab.exp | 43 untested psymtab.exp |
48 return -1 | 44 return -1 |
49 } | 45 } |
50 | 46 |
51 # Create and source the file that provides information about the compiler | 47 # Create and source the file that provides information about the compiler |
52 # used to compile the test case. | 48 # used to compile the test case. |
53 if [get_compiler_info ${binfile}] { | 49 if [get_compiler_info] { |
54 return -1; | 50 return -1; |
55 } | 51 } |
56 | 52 |
57 gdb_exit | 53 gdb_exit |
58 gdb_start | 54 gdb_start |
59 gdb_reinitialize_dir $srcdir/$subdir | 55 gdb_reinitialize_dir $srcdir/$subdir |
60 gdb_load ${binfile} | 56 gdb_load ${binfile} |
61 | 57 |
62 # Disable the prompt for whether to set pending breakpoints. | 58 # Disable the prompt for whether to set pending breakpoints. |
63 # We don't want a breakpoint, we just want to verify the symbol | 59 # We don't want a breakpoint, we just want to verify the symbol |
64 # isn't found. | 60 # isn't found. |
65 gdb_test_no_output "set breakpoint pending off" "psymtab pending setup" | 61 gdb_test_no_output "set breakpoint pending off" "psymtab pending setup" |
66 | 62 |
67 # This test is looking for a bug that manifested itself when GDB was | 63 # This test is looking for a bug that manifested itself when GDB was |
68 # looking for a partial symbol such that there wasn't such a partial | 64 # looking for a partial symbol such that there wasn't such a partial |
69 # symbol in the psymtab, but such that the last psym in the psymtab | 65 # symbol in the psymtab, but such that the last psym in the psymtab |
70 # had the right name but the wrong namespace. Here, searching for | 66 # had the right name but the wrong namespace. Here, searching for |
71 # zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE | 67 # zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE |
72 # without a preceding search for 'zzz' in VAR_NAMESPACE. | 68 # without a preceding search for 'zzz' in VAR_NAMESPACE. |
73 | 69 |
74 gdb_test "break zzz::dummy" {Function "zzz::dummy" not defined\.} "Don't search
past end of psymtab." | 70 gdb_test "break zzz::dummy" {Function "zzz::dummy" not defined\.} "Don't search
past end of psymtab." |
OLD | NEW |