GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / wrong_frame_bt_full.exp
1 # Copyright (C) 2015-2016 Free Software Foundation, Inc.
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
24 set main_testfile wrong_frame_bt_full-main
25 set opaque_testfile wrong_frame_bt_full-opaque
26
27 if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
28 $opaque_testfile.o \
29 object {}] != ""} {
30 untested "failed to compile $opaque_testfile.c"
31 return -1
32 }
33
34 if {[gdb_compile \
35 [list ${srcdir}/${subdir}/$main_testfile.c $opaque_testfile.o] \
36 [standard_output_file ${main_testfile}] \
37 executable {debug}] != ""} {
38 untested "failed to build $main_testfile"
39 return -1
40 }
41
42 clean_restart ${main_testfile}
43
44 if ![runto opaque_routine] {
45 untested "could not run to opaque_routine"
46 return -1
47 }
48
49 # Make sure that "bt full" command is capable of displaying MY_TABLE
50 # correctly when frame #0 (the frame which does not have any debugging
51 # info) is the selected frame.
52
53 gdb_test "bt full" \
54 ".*\[\r\n\]+ *my_table = \\{0, 1, 2\\}\[\r\n\]+.*"
55
This page took 0.034437 seconds and 4 git commands to generate.