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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.mi/] [mi-pending.exp] - Blame information for rev 25

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 25 jlechner
# Copyright 2007, 2008 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 3 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, see .
15
 
16
load_lib mi-support.exp
17
set MIFLAGS "-i=mi"
18
 
19
if $tracelevel then {
20
    strace $tracelevel
21
}
22
 
23
#
24
# test running programs
25
#
26
set prms_id 0
27
set bug_id 0
28
 
29
if {[skip_shlib_tests]} {
30
    return 0
31
}
32
 
33
set testfile "mi-pending"
34
set libfile "mi-pendshr"
35
set srcfile $testfile.c
36
set libsrc  $srcdir/$subdir/$libfile.c
37
set binfile $objdir/$subdir/$testfile
38
set lib_sl  $objdir/$subdir/$libfile.sl
39
 
40
set lib_opts  debug
41
set exec_opts [list debug shlib=$lib_sl]
42
 
43
if [get_compiler_info ${binfile}] {
44
    return -1
45
}
46
 
47
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
48
     || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
49
    untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
50
    return -1
51
}
52
 
53
# Start with a fresh gdb.
54
 
55
gdb_exit
56
mi_gdb_start
57
mi_gdb_reinitialize_dir $srcdir/$subdir
58
mi_gdb_load ${binfile}
59
gdb_load_shlibs $lib_sl
60
 
61
if [target_info exists gdb_stub] {
62
    gdb_step_for_stub;
63
}
64
 
65
# Set pending breakpoint via MI
66
mi_gdb_test "-break-insert -f pendfunc1" \
67
    ".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",pending=\"pendfunc1\",times=\"0\"\}"\
68
    "MI pending breakpoint on pendfunc1"
69
 
70
mi_run_cmd
71
 
72
# Make sure we hit breakpoint.
73
mi_gdb_test "" \
74
    ".*\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\".*func=\"pendfunc1\".*" \
75
    "Run till MI pending breakpoint on pendfunc1"

powered by: WebSVN 2.1.0

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