blob: 8419894d83e6ef79c66e88ff616eee2bea7d62cb [file] [log] [blame]
# Copyright 2015-2021 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 {![istarget "powerpc*"] || ![is_lp64_target]} {
verbose "Skipping powerpc64 separate debug file symtab test."
return
}
standard_testfile
set kobz2file ${srcdir}/${subdir}/cordic.ko.bz2
set kofile [standard_output_file cordic.ko]
set kodebugbz2file ${srcdir}/${subdir}/cordic.ko.debug.bz2
set kodebugfile [standard_output_file cordic.ko.debug]
if {[catch "system \"bzip2 -dc ${kobz2file} >${kofile}\""] != 0} {
untested "failed bzip2 for ${kobz2file}"
return -1
}
if {[catch "system \"bzip2 -dc ${kodebugbz2file} >${kodebugfile}\""] != 0} {
untested "failed bzip2 for ${kodebugbz2file}"
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
# This test won't work properly if system debuginfo is installed.
# Test message is suppressed by "" as otherwise we could print PASS+UNTESTED
# result to gdb.sum making a false feeling the issue has been tested.
gdb_test_no_output "set debug-file-directory" ""
gdb_load ${kofile}
set test "show architecture"
gdb_test_multiple $test $test {
-re "\r\nThe target architecture is set to \"auto\" \\(currently \"powerpc:common64\"\\)\.\r\n$gdb_prompt $" {
pass $test
}
-re "\r\nThe target architecture is set to \"auto\" \\(currently \".*\"\\)\.\r\n$gdb_prompt $" {
untested "powerpc:common64 is not supported"
}
}