]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/symbol-without-target_section.exp
update copyright year range in GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / symbol-without-target_section.exp
CommitLineData
61baf725 1# Copyright 2010-2017 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 21standard_testfile start.c .c
b381ea14 22set binlibfile ${testfile}.x
0ab77f5f
TT
23
24if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" \
25 [standard_output_file ${binlibfile}] object {debug}] != "" } {
5b362f04 26 untested "failed to compile"
b381ea14
JK
27 return -1
28}
0ab77f5f 29if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {debug}] == -1} {
b381ea14
JK
30 return -1
31}
32clean_restart ${binlibfile}
33
0ab77f5f 34gdb_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
38gdb_test "list main"
39gdb_test "print symbol_without_target_section"