OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.base/] [scope.exp] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
# Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc.
# Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
# bug-gdb@prep.ai.mit.edu
# This file was written by Fred Fish. (fnf@cygnus.com)
# This file was written by Fred Fish. (fnf@cygnus.com)
if $tracelevel then {
if $tracelevel then {
        strace $tracelevel
        strace $tracelevel
}
}
set prms_id 0
set prms_id 0
set bug_id 0
set bug_id 0
set testfile "scope"
set testfile "scope"
set binfile ${objdir}/${subdir}/${testfile}
set binfile ${objdir}/${subdir}/${testfile}
if  { [gdb_compile "${srcdir}/${subdir}/scope0.c" "${binfile}0.o" object {debug}] != "" } {
if  { [gdb_compile "${srcdir}/${subdir}/scope0.c" "${binfile}0.o" object {debug}] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
if  { [gdb_compile "${srcdir}/${subdir}/scope1.c" "${binfile}1.o" object {debug}] != "" } {
if  { [gdb_compile "${srcdir}/${subdir}/scope1.c" "${binfile}1.o" object {debug}] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
if  { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
if  { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
# Create and source the file that provides information about the compiler
# Create and source the file that provides information about the compiler
# used to compile the test case.
# used to compile the test case.
if [get_compiler_info ${binfile}] {
if [get_compiler_info ${binfile}] {
    return -1;
    return -1;
}
}
# Test locating various things when stopped just inside main, after
# Test locating various things when stopped just inside main, after
# running init0().  To prevent cascading of errors, we report the
# running init0().  To prevent cascading of errors, we report the
# first one and quit.  If all pass, then we print the pass results.
# first one and quit.  If all pass, then we print the pass results.
proc test_at_main {} {
proc test_at_main {} {
    global gdb_prompt
    global gdb_prompt
    global decimal
    global decimal
    global det_file
    global det_file
    global srcdir
    global srcdir
    global subdir
    global subdir
    global gcc_compiled
    global gcc_compiled
    global hp_cc_compiler
    global hp_cc_compiler
    # skip past init.  There may be a call to __main at the start of
    # skip past init.  There may be a call to __main at the start of
    # main, so the first next may only get us to the init0 call.
    # main, so the first next may only get us to the init0 call.
    if [gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main"  "$decimal.*init0 \\(\\);" "next"] {
    if [gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main"  "$decimal.*init0 \\(\\);" "next"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal, which is 1
    # Print scope0.c::filelocal, which is 1
    if [gdb_test "print filelocal" "\\\$$decimal = 1" "print filelocal" ] {
    if [gdb_test "print filelocal" "\\\$$decimal = 1" "print filelocal" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at main"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
    if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at main"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal_bss, which is 101
    # Print scope0.c::filelocal_bss, which is 101
    if [gdb_test "print filelocal_bss" "\\\$$decimal = 101" "print filelocal_bss" ] {
    if [gdb_test "print filelocal_bss" "\\\$$decimal = 101" "print filelocal_bss" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_main"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
    if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_main"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal_ro, which is 201
    # Print scope0.c::filelocal_ro, which is 201
    # No clue why the powerpc fails this test.
    # No clue why the powerpc fails this test.
    setup_xfail "powerpc-*-*"
    setup_xfail "powerpc-*-*"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main" ] {
    if [gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    setup_xfail "powerpc-*-*"
    setup_xfail "powerpc-*-*"
    if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
    if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::filelocal, which is 2
    # Print scope1.c::filelocal, which is 2
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
    if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
    if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::filelocal_bss, which is 102
    # Print scope1.c::filelocal_bss, which is 102
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
    if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
    if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::filelocal_ro, which is 202
    # Print scope1.c::filelocal_ro, which is 202
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
    if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
    if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
    if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::foo::funclocal, which is 3
    # Print scope1.c::foo::funclocal, which is 3
    if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal" ] {
    if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
    if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::foo::funclocal_ro, which is 203
    # Print scope1.c::foo::funclocal_ro, which is 203
    if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro" ] {
    if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
    if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::bar::funclocal, which is 4
    # Print scope1.c::bar::funclocal, which is 4
    if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal" ] {
    if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
    if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    gdb_stop_suppressing_tests;
    gdb_stop_suppressing_tests;
}
}
proc test_at_foo {} {
proc test_at_foo {} {
    global gdb_prompt
    global gdb_prompt
    global decimal
    global decimal
    global det_file
    global det_file
    global srcdir
    global srcdir
    global subdir
    global subdir
    global gcc_compiled
    global gcc_compiled
    if [gdb_test "next" ".*bar \\(\\);" "" ] {
    if [gdb_test "next" ".*bar \\(\\);" "" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal, which is 1
    # Print scope0.c::filelocal, which is 1
    if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at foo"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
    if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at foo"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal_bss, which is 101
    # Print scope0.c::filelocal_bss, which is 101
    if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_foo"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
    if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_foo"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal_ro, which is 201
    # Print scope0.c::filelocal_ro, which is 201
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    setup_xfail "powerpc-*-*"
    setup_xfail "powerpc-*-*"
    if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
    if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at foo"
    gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at foo"
    # Print scope1.c::filelocal, which is 2
    # Print scope1.c::filelocal, which is 2
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
    if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
    gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
        "print filelocal_bss at foo"
        "print filelocal_bss at foo"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"
    gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"
    gdb_test "print filelocal_ro" "\\\$$decimal = 202" \
    gdb_test "print filelocal_ro" "\\\$$decimal = 202" \
        "print filelocal_ro at foo"
        "print filelocal_ro at foo"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"
    gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"
    # Print scope1.c::foo::funclocal, which is 3
    # Print scope1.c::foo::funclocal, which is 3
    gdb_test "print funclocal" "\\\$$decimal = 3" "print funclocal at foo"
    gdb_test "print funclocal" "\\\$$decimal = 3" "print funclocal at foo"
    gdb_test "print foo::funclocal" "\\\$$decimal = 3" \
    gdb_test "print foo::funclocal" "\\\$$decimal = 3" \
        "print foo::funclocal at foo"
        "print foo::funclocal at foo"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"
    gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"
    # Print scope1.c::foo::funclocal_bss, which is 103
    # Print scope1.c::foo::funclocal_bss, which is 103
    gdb_test "print funclocal_bss" "\\\$$decimal = 103" \
    gdb_test "print funclocal_bss" "\\\$$decimal = 103" \
        "print funclocal_bss at foo"
        "print funclocal_bss at foo"
    gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \
    gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \
        "print foo::funclocal_bss at foo"
        "print foo::funclocal_bss at foo"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"
    gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"
    # Print scope1.c::foo::funclocal_ro, which is 203
    # Print scope1.c::foo::funclocal_ro, which is 203
    gdb_test "print funclocal_ro" "\\\$$decimal = 203" \
    gdb_test "print funclocal_ro" "\\\$$decimal = 203" \
        "print funclocal_ro at foo"
        "print funclocal_ro at foo"
    gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \
    gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \
        "print foo::funclocal_ro at foo"
        "print foo::funclocal_ro at foo"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"
    gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"
    # Print scope1.c::bar::funclocal, which is 4
    # Print scope1.c::bar::funclocal, which is 4
    gdb_test "print bar::funclocal" "\\\$$decimal = 4" \
    gdb_test "print bar::funclocal" "\\\$$decimal = 4" \
        "print bar::funclocal at foo"
        "print bar::funclocal at foo"
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
    gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
    gdb_stop_suppressing_tests;
    gdb_stop_suppressing_tests;
}
}
proc test_at_bar {} {
proc test_at_bar {} {
    global gdb_prompt
    global gdb_prompt
    global decimal
    global decimal
    global det_file
    global det_file
    global srcdir
    global srcdir
    global subdir
    global subdir
    global gcc_compiled
    global gcc_compiled
    if [gdb_test "next" ".*" "" ] {
    if [gdb_test "next" ".*" "" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope0.c::filelocal, which is 1
    # Print scope0.c::filelocal, which is 1
    if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at bar"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
    if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at bar"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
   # Print scope0.c::filelocal_bss, which is 101
   # Print scope0.c::filelocal_bss, which is 101
    if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_bar"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
    if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_bar"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
   # Print scope0.c::filelocal_ro, which is 201
   # Print scope0.c::filelocal_ro, which is 201
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    setup_xfail "powerpc-*-*"
    setup_xfail "powerpc-*-*"
    if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
    if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar"  "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::filelocal, which is 2
    # Print scope1.c::filelocal, which is 2
    if [gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at bar" ] {
    if [gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
    if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::filelocal_bss, which is 102
    # Print scope1.c::filelocal_bss, which is 102
    if [gdb_test "print filelocal_bss" "\\\$$decimal = 102" "print filelocal_bss at bar" ] {
    if [gdb_test "print filelocal_bss" "\\\$$decimal = 102" "print filelocal_bss at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
    if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::filelocal_ro, which is 202
    # Print scope1.c::filelocal_ro, which is 202
    if [gdb_test "print filelocal_ro" "\\\$$decimal = 202" "print filelocal_ro in test_at_bar" ] {
    if [gdb_test "print filelocal_ro" "\\\$$decimal = 202" "print filelocal_ro in test_at_bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
    if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::foo::funclocal, which is 3
    # Print scope1.c::foo::funclocal, which is 3
    if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal at bar" ] {
    if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
    if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::foo::funclocal_bss, which is 103
    # Print scope1.c::foo::funclocal_bss, which is 103
    if [gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" "print foo::funclocal_bss at bar" ] {
    if [gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" "print foo::funclocal_bss at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"] {
    if [gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::foo::funclocal_ro, which is 203
    # Print scope1.c::foo::funclocal_ro, which is 203
    if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro at bar" ] {
    if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
    if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::bar::funclocal, which is 4
    # Print scope1.c::bar::funclocal, which is 4
    if [gdb_test "print funclocal" "\\\$$decimal = 4" "print funclocal at bar" ] {
    if [gdb_test "print funclocal" "\\\$$decimal = 4" "print funclocal at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal at bar" ] {
    if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
    if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    # Print scope1.c::bar::funclocal_bss, which is 104
    # Print scope1.c::bar::funclocal_bss, which is 104
    if [gdb_test "print funclocal_bss" "\\\$$decimal = 104" "print funclocal_bss at bar" ] {
    if [gdb_test "print funclocal_bss" "\\\$$decimal = 104" "print funclocal_bss at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if [gdb_test "print bar::funclocal_bss" "\\\$$decimal = 104" "print bar::funclocal_bss at bar" ] {
    if [gdb_test "print bar::funclocal_bss" "\\\$$decimal = 104" "print bar::funclocal_bss at bar" ] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
    if [gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"] {
    if [gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar"  "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"] {
      gdb_suppress_tests ;
      gdb_suppress_tests ;
    }
    }
    gdb_stop_suppressing_tests;
    gdb_stop_suppressing_tests;
}
}
# This test has little to do with local scopes, but it is in scope.exp anyway.
# This test has little to do with local scopes, but it is in scope.exp anyway.
# That's life.
# That's life.
proc test_at_autovars {} {
proc test_at_autovars {} {
    global gdb_prompt
    global gdb_prompt
    global decimal
    global decimal
    global hex
    global hex
    global srcfile
    global srcfile
    # Test symbol table lookup with 100 local (auto) variables.
    # Test symbol table lookup with 100 local (auto) variables.
    gdb_breakpoint marker1
    gdb_breakpoint marker1
    if [gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" "continue to marker1"] {
    if [gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" "continue to marker1"] {
        gdb_suppress_tests;
        gdb_suppress_tests;
    }
    }
    if [gdb_test "up" ".*" "" ] {
    if [gdb_test "up" ".*" "" ] {
        gdb_suppress_tests ;
        gdb_suppress_tests ;
    }
    }
    set count 0
    set count 0
    while {$count < 100} {
    while {$count < 100} {
        if [gdb_test "print i$count" ".* = $count" "" ] {
        if [gdb_test "print i$count" ".* = $count" "" ] {
          gdb_suppress_tests ;
          gdb_suppress_tests ;
        }
        }
        set count [expr $count+1]
        set count [expr $count+1]
    }
    }
    clear_xfail "*-*-*"
    clear_xfail "*-*-*"
    pass "$count auto variables correctly initialized"
    pass "$count auto variables correctly initialized"
    # Test that block variable sorting is not screwing us.
    # Test that block variable sorting is not screwing us.
    gdb_test "frame" "#.*autovars \\(bcd=5, abc=6\\).*" "args in correct order"
    gdb_test "frame" "#.*autovars \\(bcd=5, abc=6\\).*" "args in correct order"
}
}
proc test_at_localscopes {} {
proc test_at_localscopes {} {
    global gdb_prompt
    global gdb_prompt
    global decimal
    global decimal
    global hex
    global hex
    global srcfile
    global srcfile
    gdb_breakpoint marker2
    gdb_breakpoint marker2
    gdb_breakpoint marker3
    gdb_breakpoint marker3
    gdb_breakpoint marker4
    gdb_breakpoint marker4
    if [gdb_test "cont" "Break.* marker2 \\(\\) at .*:$decimal.*" "continue to marker2"] {
    if [gdb_test "cont" "Break.* marker2 \\(\\) at .*:$decimal.*" "continue to marker2"] {
        gdb_suppress_tests;
        gdb_suppress_tests;
    }
    }
    if [gdb_test "up" ".*" "" ] {
    if [gdb_test "up" ".*" "" ] {
        gdb_suppress_tests ;
        gdb_suppress_tests ;
    }
    }
    # Should be at first (outermost) scope.  Check values.
    # Should be at first (outermost) scope.  Check values.
    gdb_test "print localval" " = 10" "print localval, outer scope"
    gdb_test "print localval" " = 10" "print localval, outer scope"
    gdb_test "print localval1" " = 11" "print localval1, outer scope"
    gdb_test "print localval1" " = 11" "print localval1, outer scope"
    gdb_test "print localval2" "No symbol \"localval2\" in current context." \
    gdb_test "print localval2" "No symbol \"localval2\" in current context." \
        "print localval2, outer scope"
        "print localval2, outer scope"
    gdb_test "print localval3" "No symbol \"localval3\" in current context." \
    gdb_test "print localval3" "No symbol \"localval3\" in current context." \
        "print localval3, outer scope"
        "print localval3, outer scope"
    if [gdb_test "cont" "Break.* marker3 \\(\\) at .*:$decimal.*" \
    if [gdb_test "cont" "Break.* marker3 \\(\\) at .*:$decimal.*" \
        "continue to marker3 in scope.exp"] then { gdb_suppress_tests }
        "continue to marker3 in scope.exp"] then { gdb_suppress_tests }
    if [gdb_test "up" "" "up from marker3 in scope.exp"] then { gdb_suppress_tests }
    if [gdb_test "up" "" "up from marker3 in scope.exp"] then { gdb_suppress_tests }
    # Should be at next (first nested) scope.  Check values.
    # Should be at next (first nested) scope.  Check values.
    gdb_test "print localval" " = 20" \
    gdb_test "print localval" " = 20" \
        "print localval, first nested scope"
        "print localval, first nested scope"
    gdb_test "print localval1" " = 11" "print localval1, first nested scope"
    gdb_test "print localval1" " = 11" "print localval1, first nested scope"
    gdb_test "print localval2" " = 12" "print localval2, first nested scope"
    gdb_test "print localval2" " = 12" "print localval2, first nested scope"
    gdb_test "print localval3" "No symbol \"localval3\" in current context." \
    gdb_test "print localval3" "No symbol \"localval3\" in current context." \
        "print localval3, first nested scope"
        "print localval3, first nested scope"
    # This test will only fail if the file was compiled by gcc, but
    # This test will only fail if the file was compiled by gcc, but
    # there's no way to check that.
    # there's no way to check that.
    setup_xfail "a29k-*-udi" 2423
    setup_xfail "a29k-*-udi" 2423
    if [gdb_test "cont" "Break.* marker4.*at .*:$decimal.*" \
    if [gdb_test "cont" "Break.* marker4.*at .*:$decimal.*" \
        "continue to marker4 in scope.exp"] then { gdb_suppress_tests }
        "continue to marker4 in scope.exp"] then { gdb_suppress_tests }
    if [gdb_test "up" "" "up from marker4 in scope.exp"] then { gdb_suppress_tests }
    if [gdb_test "up" "" "up from marker4 in scope.exp"] then { gdb_suppress_tests }
    gdb_test "print localval" " = 30" "print localval, innermost scope"
    gdb_test "print localval" " = 30" "print localval, innermost scope"
    gdb_test "print localval1" " = 11" "print localval1, innermost scope"
    gdb_test "print localval1" " = 11" "print localval1, innermost scope"
    gdb_test "print localval2" " = 12" "print localval2, innermost scope"
    gdb_test "print localval2" " = 12" "print localval2, innermost scope"
    gdb_test "print localval3" " = 13" "print localval3, innermost scope"
    gdb_test "print localval3" " = 13" "print localval3, innermost scope"
    gdb_stop_suppressing_tests;
    gdb_stop_suppressing_tests;
}
}
# Start with a fresh gdb.
# Start with a fresh gdb.
gdb_exit
gdb_exit
gdb_start
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_load ${binfile}
if [istarget "*-*-vxworks*"] {
if [istarget "*-*-vxworks*"] {
    set timeout 120
    set timeout 120
    verbose "Timeout is now $timeout seconds" 2
    verbose "Timeout is now $timeout seconds" 2
}
}
# Test that variables in various segments print out correctly before
# Test that variables in various segments print out correctly before
# the program is run.
# the program is run.
# AIX--sections get mapped to the same address so we can't get the right one.
# AIX--sections get mapped to the same address so we can't get the right one.
setup_xfail "rs6000-*-*"
setup_xfail "rs6000-*-*"
setup_xfail "powerpc-*-*"
setup_xfail "powerpc-*-*"
gdb_test "print 'scope0.c'::filelocal_ro" "= 201"
gdb_test "print 'scope0.c'::filelocal_ro" "= 201"
# gdb currently cannot access bss memory on some targets if the inferior
# gdb currently cannot access bss memory on some targets if the inferior
# is not running.
# is not running.
#
#
# For PA boards using monitor/remote-pa.c, the bss test is going to
# For PA boards using monitor/remote-pa.c, the bss test is going to
# randomly fail.  We've already put remote-pa on the target stack,
# randomly fail.  We've already put remote-pa on the target stack,
# so we actually read memory from the board.  Problem is crt0.o
# so we actually read memory from the board.  Problem is crt0.o
# is responsible for clearing bss and that hasnt' happened yet.
# is responsible for clearing bss and that hasnt' happened yet.
#
#
# This is a problem for all non-native targets. -- manson
# This is a problem for all non-native targets. -- manson
if ![isnative] {
if ![isnative] {
    unsupported "print 'scope0.c'::filelocal_bss before run"
    unsupported "print 'scope0.c'::filelocal_bss before run"
} else {
} else {
    gdb_test "print 'scope0.c'::filelocal_bss" "= 0" \
    gdb_test "print 'scope0.c'::filelocal_bss" "= 0" \
        "print 'scope0.c'::filelocal_bss before run"
        "print 'scope0.c'::filelocal_bss before run"
}
}
gdb_test "print 'scope0.c'::filelocal" "= 1" \
gdb_test "print 'scope0.c'::filelocal" "= 1" \
    "print 'scope0.c'::filelocal before run"
    "print 'scope0.c'::filelocal before run"
if [runto_main] then { test_at_main }
if [runto_main] then { test_at_main }
if [istarget "mips-idt-*"] then {
if [istarget "mips-idt-*"] then {
    # Restart because IDT/SIM runs out of file descriptors.
    # Restart because IDT/SIM runs out of file descriptors.
    gdb_exit
    gdb_exit
    gdb_start
    gdb_start
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_load ${binfile}
    gdb_load ${binfile}
}
}
if [runto foo] then { test_at_foo }
if [runto foo] then { test_at_foo }
if [istarget "mips-idt-*"] then {
if [istarget "mips-idt-*"] then {
    # Restart because IDT/SIM runs out of file descriptors.
    # Restart because IDT/SIM runs out of file descriptors.
    gdb_exit
    gdb_exit
    gdb_start
    gdb_start
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_load ${binfile}
    gdb_load ${binfile}
}
}
if [runto bar] then { test_at_bar }
if [runto bar] then { test_at_bar }
if [istarget "mips-idt-*"] then {
if [istarget "mips-idt-*"] then {
    # Restart because IDT/SIM runs out of file descriptors.
    # Restart because IDT/SIM runs out of file descriptors.
    gdb_exit
    gdb_exit
    gdb_start
    gdb_start
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_load ${binfile}
    gdb_load ${binfile}
}
}
if [runto localscopes] then { test_at_localscopes }
if [runto localscopes] then { test_at_localscopes }
if [istarget "mips-idt-*"] then {
if [istarget "mips-idt-*"] then {
    # Restart because IDT/SIM runs out of file descriptors.
    # Restart because IDT/SIM runs out of file descriptors.
    gdb_exit
    gdb_exit
    gdb_start
    gdb_start
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_reinitialize_dir $srcdir/$subdir
    gdb_load ${binfile}
    gdb_load ${binfile}
}
}
if [runto autovars] then { test_at_autovars }
if [runto autovars] then { test_at_autovars }
if [istarget "*-*-vxworks*"] {
if [istarget "*-*-vxworks*"] {
    set timeout 120
    set timeout 120
    verbose "Timeout is now $timeout seconds" 2
    verbose "Timeout is now $timeout seconds" 2
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.