Commit | Line | Data |
---|---|---|
618f726f | 1 | # Copyright 2010-2016 Free Software Foundation, Inc. |
b381ea14 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 | ||
16 | # Exploit formerly failed assertion in scan_dyntag when it got called for | |
17 | # objfile having ".dynamic" section but without having data loaded in target. | |
18 | # Such file is ${binmainfile} through add-symbol-file here. Set context first | |
19 | # by "list main" to have some local BLOCK set in lookup_symbol_global. | |
20 | ||
0ab77f5f | 21 | standard_testfile start.c .c |
b381ea14 | 22 | set binlibfile ${testfile}.x |
0ab77f5f TT |
23 | |
24 | if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" \ | |
25 | [standard_output_file ${binlibfile}] object {debug}] != "" } { | |
b381ea14 JK |
26 | untested ${testfile}.exp |
27 | return -1 | |
28 | } | |
0ab77f5f | 29 | if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {debug}] == -1} { |
b381ea14 JK |
30 | return -1 |
31 | } | |
32 | clean_restart ${binlibfile} | |
33 | ||
0ab77f5f | 34 | gdb_test "add-symbol-file [standard_output_file ${testfile}] 0" \ |
27d3a1a2 MS |
35 | "Reading symbols from .*" \ |
36 | "add-symbol-file" \ | |
37 | "add symbol table from file \".*\" at.*\\(y or n\\) " "y" | |
b381ea14 JK |
38 | gdb_test "list main" |
39 | gdb_test "print symbol_without_target_section" |