OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.hp/] [gdb.defects/] [bs15503.exp] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
# 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
 
20
if $tracelevel {
21
    strace $tracelevel
22
}
23
 
24
if { [skip_hp_tests] } { continue }
25
 
26
set testfile "bs15503"
27
set srcfile ${testfile}.cc
28
set binfile ${objdir}/${subdir}/${testfile}
29
 
30
if { [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.
37
gdb_exit
38
gdb_start
39
gdb_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
 
45
if [istarget "hppa2.0w-hp-hpux*" ] {
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
#
56
gdb_test "break StringTest::testFunction" \
57
    "Breakpoint $decimal at $hex: file .*bs15503.cc, line 19." \
58
    "break point on function"
59
 
60
gdb_test "run" \
61
    "Starting program:.*Breakpoint $decimal, StringTest::testFunction \\(this=$hex\\).*cout << \"in StringTest\" << endl;.*" \
62
    "run to function breakpoint"
63
 
64
#restart with fresh gdb
65
gdb_exit
66
gdb_start
67
gdb_reinitialize_dir $srcdir/$subdir
68
gdb_load $binfile
69
 
70
gdb_test "break 32" \
71
    "Breakpoint $decimal at $hex: file .*bs15503.cc, line 32." \
72
    "break point on line in function"
73
 
74
gdb_test "run" \
75
    ".*32.*string::size_type spos = s.find\\(\"and\"\\);.*" \
76
    "run to break point on line in function"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.