Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-framefilter-invalidarg.exp
CommitLineData
88b9d363 1# Copyright (C) 2014-2022 Free Software Foundation, Inc.
c75bd3a2
JK
2
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.
7#
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.
12#
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/>.
15
16load_lib gdb-python.exp
17
18standard_testfile amd64-py-framefilter-invalidarg.S
19
20if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
21 verbose "Skipping py-framefilter-invalidarg."
22 return
23}
24
25# We cannot use prepare_for_testing as we have to set the safe-patch
26# to check objfile and progspace printers.
27if {[build_executable $testfile.exp $testfile $srcfile {}] == -1} {
28 return -1
29}
30
31# Start with a fresh gdb.
32gdb_exit
33gdb_start
34
35# Skip all tests if Python scripting is not enabled.
36if { [skip_python_tests] } { continue }
37
38# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
39# Care is taken to put it in the same directory as the binary so that
40# gdb will find it.
41set remote_obj_python_file \
42 [remote_download \
5277208d 43 host ${srcdir}/${subdir}/${testfile}-gdb.py \
c75bd3a2
JK
44 [standard_output_file ${testfile}-gdb.py]]
45
46gdb_reinitialize_dir $srcdir/$subdir
47gdb_test_no_output "set auto-load safe-path ${remote_obj_python_file}" \
48 "set auto-load safe-path"
49gdb_load ${binfile}
50# Verify gdb loaded the script.
74c2c1f4 51gdb_test "info auto-load python-scripts" "Yes.*${testfile}-gdb.py.*" \
c75bd3a2
JK
52 "Test auto-load had loaded python scripts"
53
54if ![runto_main] then {
55 perror "couldn't run to breakpoint"
56 return
57}
58gdb_test_no_output "set python print-stack full" \
cd2ddb6c 59 "set python print-stack to full"
c75bd3a2
JK
60
61# Load global frame-filters
62set remote_python_file [gdb_remote_download host \
63 ${srcdir}/${subdir}/${testfile}.py]
72ca0410 64gdb_test_no_output "source ${remote_python_file}" "load python file"
c75bd3a2 65
c7e4c0a6 66gdb_test "bt" "niam \\(argc=<error reading variable: dwarf expression stack underflow>, argv=0x\[0-9a-f\]+\\) at py-framefilter-invalidarg.c:\[0-9\]+" "bt full with filters"
This page took 0.821952 seconds and 4 git commands to generate.