]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/psymtab.exp
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / psymtab.exp
CommitLineData
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
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}] != "" } {
b60f0898
JB
43 untested psymtab.exp
44 return -1
0a8551dd
DC
45}
46
47if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } {
b60f0898
JB
48 untested psymtab.exp
49 return -1
0a8551dd
DC
50}
51
52if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } {
b60f0898
JB
53 untested psymtab.exp
54 return -1
0a8551dd
DC
55}
56
57# Create and source the file that provides information about the compiler
58# used to compile the test case.
59if [get_compiler_info ${binfile}] {
60 return -1;
61}
62
63gdb_exit
64gdb_start
65gdb_reinitialize_dir $srcdir/$subdir
66gdb_load ${binfile}
67
68# This test is looking for a bug that manifested itself when GDB was
69# looking for a partial symbol such that there wasn't such a partial
70# symbol in the psymtab, but such that the last psym in the psymtab
71# had the right name but the wrong namespace. Here, searching for
72# zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE
73# without a preceding search for 'zzz' in VAR_NAMESPACE.
74
75gdb_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."