1 # Copyright (C) 1992 Free Software Foundation, Inc.
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.
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.
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. */
17 # Test case for CLLbs15503
18 # This file was written by Sue Kimura (sue_kimura@hp.com)
24 if { [skip_hp_tests] } { continue }
26 set testfile "bs15503"
27 set srcfile ${testfile}.cc
28 set binfile ${objdir}/${subdir}/${testfile}
30 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
31 perror "Couldn't compile ${srcfile}"
36 # Start with a fresh gdb.
39 gdb_reinitialize_dir $srcdir/$subdir
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..."
45 if [istarget "hppa2.0w-hp-hpux*" ] {
46 gdb_test "file $binfile" \
47 "Detected 64-bit executable..*Invoking .*gdb64..*Use \"run\" to continue execution." \
50 gdb_test "file $binfile" \
51 "Reading symbols from $binfile...done." \
54 # Test setting breakpoint on template function
56 gdb_test "break StringTest<wchar_t>::testFunction" \
57 "Breakpoint $decimal at $hex: file .*bs15503.cc, line 19." \
58 "break point on function"
61 "Starting program:.*Breakpoint $decimal, StringTest<wchar_t>::testFunction \\(this=$hex\\).*cout << \"in StringTest\" << endl;.*" \
62 "run to function breakpoint"
64 #restart with fresh gdb
67 gdb_reinitialize_dir $srcdir/$subdir
71 "Breakpoint $decimal at $hex: file .*bs15503.cc, line 32." \
72 "break point on line in function"
75 ".*32.*string::size_type spos = s.find\\(\"and\"\\);.*" \
76 "run to break point on line in function"