]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/psymtab.exp
Automatic Copyright Year update after running gdb/copyright.py
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / psymtab.exp
CommitLineData
4a94e368 1# Copyright 2003-2022 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
0a8551dd
DC
22#
23# test running programs
24#
25
0a8551dd
DC
26
27if { [skip_cplus_tests] } { continue }
28
822bd149 29standard_testfile psymtab1.c psymtab2.c
0a8551dd
DC
30
31# Create and source the file that provides information about the compiler
32# used to compile the test case.
4c93b1db 33if [get_compiler_info] {
ae59b1da 34 return -1
0a8551dd
DC
35}
36
5b362f04 37if {[prepare_for_testing "failed to prepare" $testfile \
822bd149 38 [list $srcfile $srcfile2] debug]} {
822bd149
TT
39 return -1
40}
0a8551dd 41
fe3c8b0d
DE
42# Disable the prompt for whether to set pending breakpoints.
43# We don't want a breakpoint, we just want to verify the symbol
44# isn't found.
27d3a1a2 45gdb_test_no_output "set breakpoint pending off" "psymtab pending setup"
fe3c8b0d 46
0a8551dd
DC
47# This test is looking for a bug that manifested itself when GDB was
48# looking for a partial symbol such that there wasn't such a partial
49# symbol in the psymtab, but such that the last psym in the psymtab
50# had the right name but the wrong namespace. Here, searching for
51# zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE
52# without a preceding search for 'zzz' in VAR_NAMESPACE.
53
dcf9f4ab 54gdb_test "break zzz::dummy" {Function "zzz::dummy" not defined\.} "Don't search past end of psymtab."