mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
a80e65a9d5
Currently if you diff testsuite/gdb.sum of two builds built from different source trees you see this spurious hunk: -PASS: gdb.arch/arc-tdesc-cpu.exp: set tdesc filename /home/pedro/gdb1/src/gdb/testsuite/gdb.arch/arc-tdesc-cpu.xml +PASS: gdb.arch/arc-tdesc-cpu.exp: set tdesc filename /home/pedro/gdb2/src/gdb/testsuite/gdb.arch/arc-tdesc-cpu.xml After this commit we'll show this instead in gdb.sum: PASS: gdb.arch/arc-tdesc-cpu.exp: set tdesc filename $srcdir/gdb.arch/arc-tdesc-cpu.xml gdb/testsuite/ChangeLog: 2017-10-24 Pedro Alves <palves@redhat.com> * gdb.arch/arc-tdesc-cpu.exp ('set tdesc filename'): Use gdb_test with explicit test name.
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
# Copyright 2017 Free Software Foundation, Inc.
|
|
|
|
# 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
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
if {[gdb_skip_xml_test]} {
|
|
unsupported "arc-tdesc-cpu.exp"
|
|
return -1
|
|
}
|
|
|
|
gdb_start
|
|
|
|
# Test whether it is OK to have `arc:HS` in the target description
|
|
# architecture. `HS` is a valid BFD architecture name, however the
|
|
# disassembler doesn't accept it as a CPU name. This test checks that GDB
|
|
# doesn't pass architecture from the target description directly to the
|
|
# disassembler and instead uses one of the valid CPU names.
|
|
|
|
gdb_test \
|
|
"set tdesc filename $srcdir/$subdir/arc-tdesc-cpu.xml" \
|
|
".*" \
|
|
"set tdesc filename \$srcdir/$subdir/arc-tdesc-cpu.xml"
|
|
|
|
# An error message is emitted by the disassembler, therefore it is not shown
|
|
# unless the disassembler is actually invoked. Address "0" is not invalid,
|
|
# but that doesn't matter for this test case, because it is only the
|
|
# disassembler error message that is interesting.
|
|
set cmd "x /i 0"
|
|
set msg "setting HS architecture"
|
|
gdb_test_multiple $cmd $msg {
|
|
-re "Unrecognised disassembler CPU option: HS.*$gdb_prompt" {
|
|
fail $msg
|
|
}
|
|
-re "^$cmd\r\n\\s*$hex:\\s+Cannot access memory at address $hex\r\n$gdb_prompt"
|
|
{
|
|
pass $msg
|
|
}
|
|
}
|