Handle void * conversions in FreeBSD/x86 native code to fix C++ build.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-framefilter-invalidarg.exp
CommitLineData
618f726f 1# Copyright (C) 2014-2016 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 \
43 host ${srcdir}/${subdir}/${testfile}-gdb.py.in \
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.
51gdb_test "info auto-load python-scripts" "Yes.*/${testfile}-gdb.py.*" \
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" \
59 "Set python print-stack to full"
60
61# Load global frame-filters
62set remote_python_file [gdb_remote_download host \
63 ${srcdir}/${subdir}/${testfile}.py]
64gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
65 "Load python file"
66
67gdb_test "bt" " in 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.196179 seconds and 4 git commands to generate.