1 # Copyright 1997, 1999, 2007, 2008, 2009, 2010
2 # Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 set testfile twice-tmp
25 set srcfile ${testfile}.c
26 set binfile ${objdir}/${subdir}/${testfile}
28 lappend options "additional_flags=-I."
30 set fileid [open ${objdir}/${subdir}/${srcfile} w];
31 puts $fileid "#include \"twice.c\"";
34 remote_download host ${srcdir}/${subdir}/twice.c twice.c
36 if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable $options] != "" } {
41 # Start with a fresh gdb.
45 gdb_reinitialize_dir $srcdir/$subdir
48 if [runto_main] then {
49 # Test that GDB can still detect whether we have line numbers
50 # even if we're executing code in an include file.
52 # The bug was fixed by
53 #Tue Jun 29 11:02:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
55 # * infrun.c (wait_for_inferior): Use find_pc_line not
56 # find_pc_symtab to check whether there is line number
59 gdb_test "step" "nothing \\(\\) at.*"
61 remote_exec build "rm -f twice.c"