Copyright year update in most files of the GDB Project.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-pending.exp
1 # Copyright 2007-2012 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 <http://www.gnu.org/licenses/>.
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
27 if {[skip_shlib_tests]} {
28 return 0
29 }
30
31 set testfile "mi-pending"
32 set libfile "mi-pendshr"
33 set srcfile $testfile.c
34 set libsrc $srcdir/$subdir/$libfile.c
35 set binfile $objdir/$subdir/$testfile
36 set lib_sl $objdir/$subdir/$libfile.sl
37
38 set lib_opts debug
39 set exec_opts [list debug shlib=$lib_sl]
40
41 if [get_compiler_info ${binfile}] {
42 return -1
43 }
44
45 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
46 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
47 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
48 return -1
49 }
50
51 # Start with a fresh gdb.
52
53 gdb_exit
54 mi_gdb_start
55 mi_gdb_reinitialize_dir $srcdir/$subdir
56 mi_gdb_load ${binfile}
57 mi_load_shlibs $lib_sl
58
59 # Set pending breakpoint via MI
60 mi_gdb_test "-break-insert -f pendfunc1" \
61 ".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"pendfunc1\",times=\"0\",original-location=\"pendfunc1\"\}"\
62 "MI pending breakpoint on pendfunc1"
63
64 mi_run_cmd
65 mi_expect_stop "breakpoint-hit" "pendfunc1" ".*" ".*" ".*" \
66 { "" "disp=\"keep\"" } \
67 "Run till MI pending breakpoint on pendfunc1"
This page took 0.035358 seconds and 4 git commands to generate.