Commit | Line | Data |
---|---|---|
adde2bff DE |
1 | # Copyright 2014 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 | # This test exercises PR 16581. | |
17 | ||
18 | load_lib dwarf.exp | |
19 | ||
20 | # This test can only be run on targets which support DWARF-2 and use gas. | |
21 | if {![dwarf2_support]} { | |
22 | return 0 | |
23 | } | |
24 | ||
25 | standard_testfile .S .c | |
26 | ||
27 | if { [prepare_for_testing ${testfile}.exp ${testfile} \ | |
28 | [list $srcfile $srcfile2] {nodebug}] } { | |
29 | return -1 | |
30 | } | |
31 | ||
32 | # We are trying to verify that the partial symtab to symtab expansion | |
33 | # for the debugging info hand-coded in our assembly file does not cause | |
34 | # the debugger to crash (infinite recursion). To facilitate the test, | |
35 | # start the debugger with -readnow. This force expansion as soon as | |
36 | # the objfile is loaded. | |
37 | ||
38 | set saved_gdbflags $GDBFLAGS | |
39 | set GDBFLAGS "$GDBFLAGS -readnow" | |
40 | clean_restart ${testfile} | |
41 | set GDBFLAGS $saved_gdbflags | |
42 | ||
43 | # And just to be sure that the debugger did not crash after having | |
44 | # expanded our symbols, do a life-check. | |
45 | ||
46 | gdb_test "echo life check\\n" "life check" |