Commit | Line | Data |
---|---|---|
618f726f | 1 | # Copyright 2015-2016 Free Software Foundation, Inc. |
80c57053 JK |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
61a934ca SL |
16 | if {![istarget "powerpc*"] || ![is_lp64_target]} { |
17 | verbose "Skipping powerpc64 separate debug file symtab test." | |
18 | return | |
19 | } | |
20 | ||
80c57053 JK |
21 | standard_testfile |
22 | ||
23 | set kobz2file ${srcdir}/${subdir}/cordic.ko.bz2 | |
24 | set kofile ${objdir}/${subdir}/cordic.ko | |
25 | set kodebugbz2file ${srcdir}/${subdir}/cordic.ko.debug.bz2 | |
26 | set kodebugfile ${objdir}/${subdir}/cordic.ko.debug | |
27 | ||
28 | if {[catch "system \"bzip2 -dc ${kobz2file} >${kofile}\""] != 0} { | |
29 | untested "failed bzip2 for ${kobz2file}" | |
30 | return -1 | |
31 | } | |
32 | if {[catch "system \"bzip2 -dc ${kodebugbz2file} >${kodebugfile}\""] != 0} { | |
33 | untested "failed bzip2 for ${kodebugbz2file}" | |
34 | return -1 | |
35 | } | |
36 | ||
37 | gdb_exit | |
38 | gdb_start | |
39 | gdb_reinitialize_dir $srcdir/$subdir | |
40 | ||
41 | # This test won't work properly if system debuginfo is installed. | |
42 | # Test message is suppressed by "" as otherwise we could print PASS+UNTESTED | |
43 | # result to gdb.sum making a false feeling the issue has been tested. | |
44 | gdb_test_no_output "set debug-file-directory" "" | |
45 | ||
46 | gdb_load ${kofile} | |
47 | ||
48 | set test "show architecture" | |
49 | gdb_test_multiple $test $test { | |
50 | -re "\r\nThe target architecture is set automatically \\(currently powerpc:common64\\)\r\n$gdb_prompt $" { | |
51 | pass $test | |
52 | } | |
53 | -re "\r\nThe target architecture is set automatically \\(currently .*\\)\r\n$gdb_prompt $" { | |
54 | untested "powerpc:common64 is not supported" | |
55 | } | |
56 | } |