1788b2d3be
* dwarf2expr.c (execute_stack_op): Support DW_OP_GNU_parameter_ref. * dwarf2loc.c (call_site_parameter_matches): Support CALL_SITE_PARAMETER_PARAM_OFFSET. (needs_dwarf_reg_entry_value): Push stub value. * dwarf2read.c (read_call_site_scope): New variable origin. Support CALL_SITE_PARAMETER_PARAM_OFFSET and its DW_AT_abstract_origin. * gdbtypes.h (enum call_site_parameter_kind): New item CALL_SITE_PARAMETER_PARAM_OFFSET. (struct call_site.parameter.u): New field param_offset. gdb/testsuite/ * gdb.arch/amd64-entry-value-param.S: New file. * gdb.arch/amd64-entry-value-param.c: New file. * gdb.arch/amd64-entry-value-param.exp: New file.
51 lines
1.6 KiB
Text
51 lines
1.6 KiB
Text
# Copyright (C) 2012 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/>.
|
|
|
|
set testfile amd64-entry-value-param
|
|
set srcfile ${testfile}.S
|
|
set csrcfile ${testfile}.c
|
|
set opts {}
|
|
|
|
if [info exists COMPILE] {
|
|
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1"
|
|
set srcfile ${csrcfile}
|
|
lappend opts debug optimize=-O2
|
|
} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
|
verbose "Skipping amd64-entry-value-param."
|
|
return
|
|
}
|
|
|
|
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
|
|
return -1
|
|
}
|
|
|
|
if ![runto_main] {
|
|
return -1
|
|
}
|
|
|
|
set srcfile $csrcfile
|
|
gdb_breakpoint [gdb_get_line_number "break-here"]
|
|
|
|
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
|
gdb_test "p y" " = 2"
|
|
gdb_test "p b" " = 4"
|
|
|
|
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
|
gdb_test "p y" " = 4"
|
|
gdb_test "p b" " = 8"
|
|
|
|
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
|
gdb_test "p y" " = 10"
|
|
gdb_test "p b" " = 20"
|