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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [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 1181 sfurman
# 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
# Create and source the file that provides information about the compiler
31
# used to compile the test case.
32
if [get_compiler_info ${binfile}] {
33
    return -1
34
}
35
 
36
# The testcode is non-conforming and rejected by GCC.  So bypass this
37
# test completely unless we're compiling with HP's compiler.
38
if {!$hp_aCC_compiler && !$hp_cc_compiler} {
39
  return 0
40
}
41
 
42
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
43
    perror "Couldn't compile ${srcfile}"
44
    return -1
45
}
46
 
47
 
48
# Start with a fresh gdb.
49
gdb_exit
50
gdb_start
51
gdb_reinitialize_dir $srcdir/$subdir
52
 
53
#  Load $binfile -- there should be no warnings about "Procedure ... spans
54
#  file or module boundaries", "No symbols in psymtab for file ..." or
55
#  "File ... has ending address after starting address of next file..."
56
 
57
if [istarget "hppa64-hp-hpux*" ] {
58
    gdb_test "file $binfile" \
59
        "Detected 64-bit executable..*Invoking .*gdb64..*Use \"run\" to continue execution." \
60
        "loading $binfile"
61
} else {
62
    gdb_test "file $binfile" \
63
        "Reading symbols from $binfile...done." \
64
        "loading $binfile"
65
}
66
#  Test setting breakpoint on template function
67
#
68
gdb_test "break StringTest::testFunction" \
69
    "Breakpoint $decimal at $hex: file .*bs15503.cc, line 19." \
70
    "break point on function"
71
 
72
gdb_test "run" \
73
    "Starting program:.*Breakpoint $decimal, StringTest::testFunction \\(this=$hex\\).*cout << \"in StringTest\" << endl;.*" \
74
    "run to function breakpoint"
75
 
76
#restart with fresh gdb
77
gdb_exit
78
gdb_start
79
gdb_reinitialize_dir $srcdir/$subdir
80
gdb_load $binfile
81
 
82
gdb_test "break 32" \
83
    "Breakpoint $decimal at $hex: file .*bs15503.cc, line 32." \
84
    "break point on line in function"
85
 
86
gdb_test "run" \
87
    ".*32.*string::size_type spos = s.find\\(\"and\"\\);.*" \
88
    "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.