1 # Copyright
2010-2019 Free Software Foundation
, Inc.
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.
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.
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
/>.
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.
21 standard_testfile start.c .c
22 set binlibfile $
{testfile
}.x
24 if { [gdb_compile
"${srcdir}/${subdir}/${srcfile2}" \
25 [standard_output_file $
{binlibfile
}] object
{debug
}] != "" } {
26 untested
"failed to compile"
29 if {[build_executable $
{testfile
}.exp $
{testfile
} $
{srcfile
} {debug
}] == -1} {
32 clean_restart $
{binlibfile
}
34 gdb_test
"add-symbol-file [standard_output_file ${testfile}] 0" \
35 "Reading symbols from .*" \
37 "add symbol table from file \".*\" at.*\\(y or n\\) " "y"
39 gdb_test
"print symbol_without_target_section"