1*1424dfb3Schristos# Copyright 2019-2020 Free Software Foundation, Inc. 2*1424dfb3Schristos 3*1424dfb3Schristos# This program is free software; you can redistribute it and/or modify 4*1424dfb3Schristos# it under the terms of the GNU General Public License as published by 5*1424dfb3Schristos# the Free Software Foundation; either version 3 of the License, or 6*1424dfb3Schristos# (at your option) any later version. 7*1424dfb3Schristos# 8*1424dfb3Schristos# This program is distributed in the hope that it will be useful, 9*1424dfb3Schristos# but WITHOUT ANY WARRANTY; without even the implied warranty of 10*1424dfb3Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11*1424dfb3Schristos# GNU General Public License for more details. 12*1424dfb3Schristos# 13*1424dfb3Schristos# You should have received a copy of the GNU General Public License 14*1424dfb3Schristos# along with this program. If not, see <http://www.gnu.org/licenses/>. 15*1424dfb3Schristos 16*1424dfb3Schristos# This tests GDB's ability to call an inferior function passing many 17*1424dfb3Schristos# structures by value. Other tests that call inferior functions with 18*1424dfb3Schristos# structures only pass one or two structures, and these are often 19*1424dfb3Schristos# passed in registers. This test passes so many structures it is 20*1424dfb3Schristos# hoped that some will need to be placed onto the stack. 21*1424dfb3Schristos 22*1424dfb3Schristosif { [skip_cplus_tests] } { continue } 23*1424dfb3Schristos 24*1424dfb3Schristosstandard_testfile .cc 25*1424dfb3Schristos 26*1424dfb3Schristosif {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { 27*1424dfb3Schristos return -1 28*1424dfb3Schristos} 29*1424dfb3Schristos 30*1424dfb3Schristosif ![runto_main] { 31*1424dfb3Schristos perror "couldn't run to breakpoint" 32*1424dfb3Schristos continue 33*1424dfb3Schristos} 34*1424dfb3Schristos 35*1424dfb3Schristosgdb_breakpoint [gdb_get_line_number "break-here"] 36*1424dfb3Schristosgdb_continue_to_breakpoint "break-here" 37*1424dfb3Schristos 38*1424dfb3Schristosgdb_test "p check_val (ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val, ref_val)" \ 39*1424dfb3Schristos "= true" \ 40*1424dfb3Schristos "check passing many structures" 41