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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.base/] [step-break.exp] - Blame information for rev 252

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# This testcase is part of GDB, the GNU debugger.
2
 
3
# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
4
 
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with this program.  If not, see .
17
 
18
if $tracelevel then {
19
    strace $tracelevel
20
}
21
 
22
set testfile step-break
23
set srcfile ${testfile}.c
24
set binfile ${objdir}/${subdir}/${testfile}
25
 
26
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
27
     untested step-break.exp
28
     return -1
29
}
30
 
31
gdb_exit
32
gdb_start
33
gdb_reinitialize_dir $srcdir/$subdir
34
gdb_load ${binfile}
35
 
36
if ![runto_main] then {
37
   fail "Can't run to main"
38
   return 0
39
}
40
 
41
set bp_location [gdb_get_line_number "set breakpoint here"]
42
 
43
gdb_test "break $bp_location" \
44
    "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
45
    "breakpoint line number"
46
 
47
gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(\\) at .*$srcfile:$bp_location.*set breakpoint here.*" \
48
    "run until breakpoint set at a line number"
49
 
50
gdb_test "next 2" ".*place2.*" "next 2 (1)"
51
gdb_test "next 2" ".*place3.*" "next 2 (2)"
52
gdb_test "next 2" ".*place2.*" "next 2 (3)"
53
gdb_test "next 2" ".*place3.*" "next 2 (4)"
54
gdb_test "next 2" ".*place2.*" "next 2 (5)"
55
gdb_test "next 2" ".*place3.*" "next 2 (6)"
56
 
57
return 0

powered by: WebSVN 2.1.0

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