# Copyright 2009, 2011 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 3 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, see <http://www.gnu.org/licenses/>.
load_lib dwarf.exp

# Test DW_OP_call2 and DW_OP_call4, PR gdb/10640.

# This test can only be run on targets which support DWARF-2 and use gas.
if {![dwarf2_support]} {
    return 0   
}

set testfile "dw2-op-call"
if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] } {
    return -1
}

# Additional test to verify the referenced CU is not aged out.
gdb_test_no_output "maintenance set dwarf2 max-cache-age 0"

gdb_test "p array1" " = 1"
gdb_test "p array2" " = 2" "array2 using DW_OP_call2"
gdb_test "p array3" " = 3" "array3 using DW_OP_call4"

# Location lists need PC.
if ![runto_main] {
    return -1
}
gdb_test "p arraynoloc" " = <optimized out>"
gdb_test "p arraycallnoloc" {Asked for position 0 of stack, stack only has 0 elements on it\.}
