* gdb.base/del.c: New file.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / del.exp
CommitLineData
9b6462d9
JB
1# Copyright 2006 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# The intent of this testcase it to verify that various aliases and
18# shortcuts of the "delete" command never stop working.
19
20if $tracelevel then {
21 strace $tracelevel
22}
23
24set prms_id 0
25set bug_id 0
26
27set testfile del
28set srcfile ${testfile}.c
29set binfile ${objdir}/${subdir}/${testfile}
30if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
31 untested "Couldn't compile test program"
32 return -1
33}
34
35# Get things started.
36
37gdb_exit
38gdb_start
39gdb_reinitialize_dir $srcdir/$subdir
40gdb_load ${binfile}
41
42# Test whether the "del" command works as an alias of "delete".
43# For that, insert a breakpoint at an easy location, remove it,
44# and then check in the output of "info break" that this breakpoint
45# no longer exists.
46
47gdb_test "break main" \
48 "Breakpoint.*at.* file .*$srcfile, line.*" \
49 "breakpoint function"
50
51gdb_test "del \$bpnum" \
52 "" \
53 "Remove last breakpoint"
54
55gdb_test "info break" \
56 "No breakpoints or watchpoints." \
57 "info break after removing break on main"
This page took 0.02573 seconds and 4 git commands to generate.