Commit | Line | Data |
---|---|---|
6aba47ca | 1 | # Copyright 2003, 2007 Free Software Foundation, Inc. |
0a8551dd DC |
2 | |
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 | |
e22f8b7c | 5 | # the Free Software Foundation; either version 3 of the License, or |
0a8551dd | 6 | # (at your option) any later version. |
e22f8b7c | 7 | # |
0a8551dd DC |
8 | # This program is distributed in the hope that it will be useful, |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
e22f8b7c | 12 | # |
0a8551dd | 13 | # You should have received a copy of the GNU General Public License |
e22f8b7c | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
0a8551dd DC |
15 | |
16 | # Please email any bugs, comments, and/or additions to this file to: | |
17 | # bug-gdb@prep.ai.mit.edu | |
18 | ||
19 | # This file is part of the gdb testsuite | |
20 | ||
21 | # This is intended to be a repository for tests that partial symbols | |
22 | # are working properly. If multiple tests are added, make sure that | |
23 | # you exit and restart GDB between tests. | |
24 | ||
25 | if $tracelevel then { | |
26 | strace $tracelevel | |
27 | } | |
28 | ||
29 | # | |
30 | # test running programs | |
31 | # | |
32 | ||
33 | set prms_id 0 | |
34 | set bug_id 0 | |
35 | ||
36 | if { [skip_cplus_tests] } { continue } | |
37 | ||
38 | set testfile "psymtab" | |
39 | set binfile ${objdir}/${subdir}/${testfile} | |
40 | ||
41 | if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object {debug}] != "" } { | |
b60f0898 JB |
42 | untested psymtab.exp |
43 | return -1 | |
0a8551dd DC |
44 | } |
45 | ||
46 | if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } { | |
b60f0898 JB |
47 | untested psymtab.exp |
48 | return -1 | |
0a8551dd DC |
49 | } |
50 | ||
51 | if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } { | |
b60f0898 JB |
52 | untested psymtab.exp |
53 | return -1 | |
0a8551dd DC |
54 | } |
55 | ||
56 | # Create and source the file that provides information about the compiler | |
57 | # used to compile the test case. | |
58 | if [get_compiler_info ${binfile}] { | |
59 | return -1; | |
60 | } | |
61 | ||
62 | gdb_exit | |
63 | gdb_start | |
64 | gdb_reinitialize_dir $srcdir/$subdir | |
65 | gdb_load ${binfile} | |
66 | ||
67 | # 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 | |
69 | # 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 | |
71 | # zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE | |
72 | # without a preceding search for 'zzz' in VAR_NAMESPACE. | |
73 | ||
74 | gdb_test "break zzz::dummy" "Can't find member of namespace, class, struct, or union named \"zzz::dummy\"\r\n.*" "Don't search past end of psymtab." |