gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / psymtab.exp
CommitLineData
0fb0cc75 1# Copyright 2003, 2007, 2008, 2009 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 15
0a8551dd
DC
16# This file is part of the gdb testsuite
17
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
20# you exit and restart GDB between tests.
21
22if $tracelevel then {
23 strace $tracelevel
24}
25
26#
27# test running programs
28#
29
30set prms_id 0
31set bug_id 0
32
33if { [skip_cplus_tests] } { continue }
34
35set testfile "psymtab"
36set binfile ${objdir}/${subdir}/${testfile}
37
38if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object {debug}] != "" } {
b60f0898
JB
39 untested psymtab.exp
40 return -1
0a8551dd
DC
41}
42
43if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } {
b60f0898
JB
44 untested psymtab.exp
45 return -1
0a8551dd
DC
46}
47
48if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } {
b60f0898
JB
49 untested psymtab.exp
50 return -1
0a8551dd
DC
51}
52
53# Create and source the file that provides information about the compiler
54# used to compile the test case.
55if [get_compiler_info ${binfile}] {
56 return -1;
57}
58
59gdb_exit
60gdb_start
61gdb_reinitialize_dir $srcdir/$subdir
62gdb_load ${binfile}
63
fe3c8b0d
DE
64# Disable the prompt for whether to set pending breakpoints.
65# We don't want a breakpoint, we just want to verify the symbol
66# isn't found.
67gdb_test "set breakpoint pending off" "" "psymtab pending setup"
68
0a8551dd
DC
69# This test is looking for a bug that manifested itself when GDB was
70# looking for a partial symbol such that there wasn't such a partial
71# symbol in the psymtab, but such that the last psym in the psymtab
72# had the right name but the wrong namespace. Here, searching for
73# zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE
74# without a preceding search for 'zzz' in VAR_NAMESPACE.
75
76gdb_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."
This page took 0.645717 seconds and 4 git commands to generate.