[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.base / readnever.exp
blobaad7f7f15533b7d25faea7c07544e958884b793b
1 # Copyright 2016-2019 Free Software Foundation, Inc.
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.
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.
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/>.
16 standard_testfile .c
18 if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } {
19 untested "couldn't compile ${srcfile}"
20 return -1
23 save_vars { GDBFLAGS } {
24 append GDBFLAGS " --readnever"
25 clean_restart ${binfile}
28 if ![runto_main] then {
29 perror "couldn't run to breakpoint"
30 continue
33 gdb_test "break fun_three" \
34 "Breakpoint $decimal at $hex"
36 gdb_test "continue" \
37 "Breakpoint $decimal, $hex in fun_three \\(\\)"
39 gdb_test "backtrace" \
40 [multi_line "#0 $hex in fun_three \\(\\)" \
41 "#1 $hex in fun_two \\(\\)" \
42 "#2 $hex in fun_one \\(\\)" \
43 "#3 $hex in main \\(\\)" ]
45 gdb_test_no_output "maint info symtabs" \
46 "maint info symtabs no output for --readnever"
47 gdb_test_no_output "maint info psymtabs" \
48 "maint info psymtabs no output for --readnever"
50 # Test invalid combination of flags.
51 save_vars { GDBFLAGS } {
52 append GDBFLAGS " --readnever --readnow"
53 gdb_exit
54 gdb_spawn
56 set test "test readnow and readnever at the same time"
57 gdb_test_multiple "" $test {
58 "'--readnow' and '--readnever' cannot be specified simultaneously" {
59 pass $test
60 set test "expect eof after failure"
61 gdb_test_multiple "" $test {
62 eof {
63 pass $test
71 # Test symbol-file's -readnever option.
73 # Restart GDB without the --readnever option.
74 gdb_exit
75 gdb_start
76 gdb_test "symbol-file ${binfile}0.o -readnever" \
77 "Reading symbols from ${binfile}0\.o\.\.\.\r\n\\\(No debugging symbols found in .*\\\)" \
78 "use symbol-file -readnever"
80 gdb_test_no_output "maint info symtabs" \
81 "maint info symtabs no output for symbol-file -readnever"
82 gdb_test_no_output "maint info psymtabs" \
83 "maint info psymtabs no output for symbol-file -readnever"