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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc3/] [gdb/] [testsuite/] [gdb.base/] [source.exp] - Diff between revs 330 and 513

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

Rev 330 Rev 513
# This testcase is part of GDB, the GNU debugger.
# This testcase is part of GDB, the GNU debugger.
# Copyright 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
# Copyright 2005, 2007, 2008, 2009, 2010 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 3 of the License, or
# the Free Software Foundation; either version 3 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, see .
# along with this program.  If not, see .
# Test GDB's "source" command - reads in a GDB script.
# Test GDB's "source" command - reads in a GDB script.
if $tracelevel then {
if $tracelevel then {
        strace $tracelevel
        strace $tracelevel
}
}
set testfile "structs"
set testfile "structs"
set srcfile ${testfile}.c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
set binfile ${objdir}/${subdir}/${testfile}
gdb_start
gdb_start
gdb_test "source ${srcdir}/${subdir}/source-error.gdb" \
gdb_test "source ${srcdir}/${subdir}/source-error.gdb" \
    "source-error.gdb:21: Error in sourced command file:\[\r\n\]*Cannot access memory at address 0x0.*" \
    "source-error.gdb:21: Error in sourced command file:\[\r\n\]*Cannot access memory at address 0x0.*" \
    "script contains error"
    "script contains error"
gdb_test "source -v ${srcdir}/${subdir}/source-test.gdb" \
gdb_test "source -v ${srcdir}/${subdir}/source-test.gdb" \
    "echo test source options.*" \
    "echo test source options.*" \
    "source -v"
    "source -v"
# There was a bug where -v got stuck in the "on" position.
# There was a bug where -v got stuck in the "on" position.
# Verify "source script", without the -v, is not verbose.
# Verify "source script", without the -v, is not verbose.
set test "source after -v"
set test "source after -v"
gdb_test_multiple "source ${srcdir}/${subdir}/source-test.gdb" $test {
gdb_test_multiple "source ${srcdir}/${subdir}/source-test.gdb" $test {
    -re "echo test source options.*$gdb_prompt $" {
    -re "echo test source options.*$gdb_prompt $" {
        fail "$test"
        fail "$test"
    }
    }
    -re "test source options.*$gdb_prompt $" {
    -re "test source options.*$gdb_prompt $" {
        pass "$test"
        pass "$test"
    }
    }
}
}
gdb_test "dir ${srcdir}/${subdir}" "Source directories searched: .*"
gdb_test "dir ${srcdir}/${subdir}" "Source directories searched: .*"
gdb_test "source -s ./source-test.gdb" \
gdb_test "source -s ./source-test.gdb" \
    "test source options" \
    "test source options" \
    "source -s"
    "source -s"
# Test -v and -s in either order.
# Test -v and -s in either order.
gdb_test "source -s -v ./source-test.gdb" \
gdb_test "source -s -v ./source-test.gdb" \
    "echo test source options.*" \
    "echo test source options.*" \
    "source -s -v"
    "source -s -v"
gdb_test "source -v -s ./source-test.gdb" \
gdb_test "source -v -s ./source-test.gdb" \
    "echo test source options.*" \
    "echo test source options.*" \
    "source -v -s"
    "source -v -s"
gdb_exit
gdb_exit
 
 

powered by: WebSVN 2.1.0

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