1 # Copyright 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
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.
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.
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/>.
20 set testfile "frame-args"
21 set srcfile ${testfile}.c
22 set binfile ${objdir}/${subdir}/${testfile}
23 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
24 untested "Couldn't compile ${srcfile}"
30 gdb_reinitialize_dir $srcdir/$subdir
33 if ![runto break_me] then {
34 perror "Couldn't run ${testfile}"
38 # Test with "print frame-arguments" set to "all"
40 gdb_test_no_output "set print frame-arguments all" \
41 "set print frame-arguments all"
43 ".*in call_me \\(i=3, f=5, s=({a = 3, b = 5}|<optimized out>), ss=0x\[0-9a-f\]\+, u=({.*}|<optimized out>), e=green\\) at .*frame-args\\.c:.*" \
44 "frame 1 with print frame-arguments set to all"
46 # Test with "print frame-arguments" set to "scalars"
48 gdb_test_no_output "set print frame-arguments scalars" \
49 "set print frame-arguments scalars"
51 ".*in call_me \\(i=3, f=5, s=\\.\\.\\., ss=0x\[0-9a-f\]\+, u=\\.\\.\\., e=green\\) at .*frame-args\\.c:.*" \
52 "frame 1 with print frame-arguments set to scalars"
54 # Test with "print frame-arguments" set to "none"
56 gdb_test_no_output "set print frame-arguments none" \
57 "set print frame-arguments none"
59 ".*in call_me \\(i=\\.\\.\\., f=\\.\\.\\., s=\\.\\.\\., ss=\\.\\.\\., u=\\.\\.\\., e=\\.\\.\\.\\) at .*frame-args\\.c:.*" \
60 "frame 1 with print frame-arguments set to none"