| # Copyright 2015-2024 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/>. |
| |
| clean_restart |
| |
| set supported_archs [get_set_option_choices "set architecture"] |
| if { [lsearch -exact $supported_archs "powerpc:common64"] == -1 } { |
| verbose "Skipping powerpc64 separate debug file symtab test." |
| return |
| } |
| |
| standard_testfile |
| |
| set kobz2file ${srcdir}/${subdir}/cordic.ko.bz2 |
| set kodebugbz2file ${srcdir}/${subdir}/cordic.ko.debug.bz2 |
| |
| set kofile [decompress_bz2 $kobz2file] |
| if { $kofile == "" } { |
| untested "failed bzip2 for [file tail $kobz2file]" |
| return -1 |
| } |
| |
| set kodebugfile [decompress_bz2 $kodebugbz2file] |
| if { $kodebugfile == "" } { |
| untested "failed bzip2 for [file tail $kodebugbz2file]" |
| return -1 |
| } |
| |
| # 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 |
| } |
| } |