* gdb.hp/gdb.base-hp/hwwatchbus.exp: Allow inferior to get either
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.hp / gdb.defects / bs15503.exp
CommitLineData
7be570e7
JM
1# Copyright (C) 1992 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# Test case for CLLbs15503
18# This file was written by Sue Kimura (sue_kimura@hp.com)
19
20if $tracelevel {
21 strace $tracelevel
22}
23
24if { [skip_hp_tests] } { continue }
25
26set testfile "bs15503"
27set srcfile ${testfile}.cc
28set binfile ${objdir}/${subdir}/${testfile}
29
30if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
31 perror "Couldn't compile ${srcfile}"
32 return -1
33}
34
35
36# Start with a fresh gdb.
37gdb_exit
38gdb_start
39gdb_reinitialize_dir $srcdir/$subdir
40
41# Load $binfile -- there should be no warnings about "Procedure ... spans
42# file or module boundaries", "No symbols in psymtab for file ..." or
43# "File ... has ending address after starting address of next file..."
44
ca344dff 45if [istarget "hppa64-hp-hpux*" ] {
7be570e7
JM
46 gdb_test "file $binfile" \
47 "Detected 64-bit executable..*Invoking .*gdb64..*Use \"run\" to continue execution." \
48 "loading $binfile"
49} else {
50 gdb_test "file $binfile" \
51 "Reading symbols from $binfile...done." \
52 "loading $binfile"
53}
54# Test setting breakpoint on template function
55#
56gdb_test "break StringTest<wchar_t>::testFunction" \
57 "Breakpoint $decimal at $hex: file .*bs15503.cc, line 19." \
58 "break point on function"
59
60gdb_test "run" \
61 "Starting program:.*Breakpoint $decimal, StringTest<wchar_t>::testFunction \\(this=$hex\\).*cout << \"in StringTest\" << endl;.*" \
62 "run to function breakpoint"
63
64#restart with fresh gdb
65gdb_exit
66gdb_start
67gdb_reinitialize_dir $srcdir/$subdir
68gdb_load $binfile
69
70gdb_test "break 32" \
71 "Breakpoint $decimal at $hex: file .*bs15503.cc, line 32." \
72 "break point on line in function"
73
74gdb_test "run" \
75 ".*32.*string::size_type spos = s.find\\(\"and\"\\);.*" \
76 "run to break point on line in function"
This page took 0.156546 seconds and 4 git commands to generate.