1# Copyright 2003 Free Software Foundation, Inc. 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 5# the Free Software Foundation; either version 2 of the License, or 6# (at your option) any later version. 7# 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. 12# 13# You should have received a copy of the GNU General Public License 14# along with this program; if not, write to the Free Software 15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 17# Please email any bugs, comments, and/or additions to this file to: 18# bug-gdb@prep.ai.mit.edu 19 20# This file is part of the gdb testsuite 21 22# This is intended to be a repository for tests that partial symbols 23# are working properly. If multiple tests are added, make sure that 24# you exit and restart GDB between tests. 25 26if $tracelevel then { 27 strace $tracelevel 28} 29 30# 31# test running programs 32# 33 34set prms_id 0 35set bug_id 0 36 37if { [skip_cplus_tests] } { continue } 38 39set testfile "psymtab" 40set binfile ${objdir}/${subdir}/${testfile} 41 42if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object {debug}] != "" } { 43 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." 44} 45 46if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } { 47 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." 48} 49 50if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } { 51 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." 52} 53 54# Create and source the file that provides information about the compiler 55# used to compile the test case. 56if [get_compiler_info ${binfile}] { 57 return -1; 58} 59 60gdb_exit 61gdb_start 62gdb_reinitialize_dir $srcdir/$subdir 63gdb_load ${binfile} 64 65# This test is looking for a bug that manifested itself when GDB was 66# looking for a partial symbol such that there wasn't such a partial 67# symbol in the psymtab, but such that the last psym in the psymtab 68# had the right name but the wrong namespace. Here, searching for 69# zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE 70# without a preceding search for 'zzz' in VAR_NAMESPACE. 71 72gdb_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." 73