]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / wrong_frame_bt_full.exp
CommitLineData
1d506c26 1# Copyright (C) 2015-2024 Free Software Foundation, Inc.
16c3b12f
JB
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
16# Build wrong_frame_bt_full-main using two C files:
17# - wrong_frame_bt_full-opaque.c, which needs to be built without
18# debugging info;
19# - wrong_frame_bt_full-main.c, which needs to be built with
20# debugging info.
21# This is why we use gdb_compile instead of relying on he usual call
22# to prepare_for_testing.
23
24set main_testfile wrong_frame_bt_full-main
25set opaque_testfile wrong_frame_bt_full-opaque
aa480355 26set opaque_objfile [standard_output_file "$opaque_testfile.o"]
16c3b12f
JB
27
28if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
aa480355 29 $opaque_objfile \
16c3b12f 30 object {}] != ""} {
84c93cd5 31 untested "failed to compile"
16c3b12f
JB
32 return -1
33}
34
35if {[gdb_compile \
aa480355 36 [list ${srcdir}/${subdir}/$main_testfile.c $opaque_objfile] \
16c3b12f
JB
37 [standard_output_file ${main_testfile}] \
38 executable {debug}] != ""} {
39 untested "failed to build $main_testfile"
40 return -1
41}
42
43clean_restart ${main_testfile}
44
45if ![runto opaque_routine] {
46 untested "could not run to opaque_routine"
47 return -1
48}
49
50# Make sure that "bt full" command is capable of displaying MY_TABLE
51# correctly when frame #0 (the frame which does not have any debugging
52# info) is the selected frame.
53
e2f62013 54gdb_test "bt full" ".*\[\r\n\]+ *my_table = \\{0, 1, 2\\}"