blob: 9e5cc07732a92786c1271f0569cd2ac097c39c98 [file] [log] [blame]
# Copyright 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
# This file was written by Jim Ingham (jingham@apple.com)
# An APPLE LOCAL change in infcmd.c was done to print an error message
# correctly when stack returned values are not printed by the 'finish'
# command. Check that we continue to print the type correctly.
if $tracelevel then {
strace $tracelevel
}
set timeout 30
set prms_id 0
set bug_id 0
set testfile "long-long-call"
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
# Start with a fresh gdb
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then {
fail "long-long-call tests suppressed"
return -1
}
# Looks like nowhere in the gdb.base testsuite does it test what we do when we have filled all the
# registers and start to spill arguments onto the stack. This is especially tricky on PPC, because
# the sixth argument gets split between the stack and a register...
gdb_test "call foo (6, 0x8000000000LL, 7, 0xf000000000LL, 8, 0xe000000000LL, 9, 0xe100000000LL, 10, 10.1)" \
{.*first 0x6, second 0x8000000000, third 0x7, fourth 0xf000000000, fifth 0x8, sixth 0xe000000000, seventh 0x9 eighth 0xe100000000, nineth 0xa, tenth 10.10.*} \
"step into f()"
gdb_exit
return 0