[PATCH 5/57][Arm][GAS] Add support for MVE instructions: vmull{b,t}
[binutils-gdb.git] / gdb / testsuite / gdb.base / load-command.exp
blob4263e4bddf82d8ec721bd639ddba3145d90d58bd
1 # Copyright 2018-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 # Test the "load" command.
18 standard_testfile
20 # Disable generation of position independent executable (PIE).  Otherwise, we
21 # would have to manually specify an offset to load.
23 set opts {debug ldflags=-no-pie}
25 if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
26     return -1
29 if ![runto_main] {
30     fail "can't run to main"
31     return -1
34 # The native target does not support the load command.
35 if [gdb_is_target_native] {
36     unsupported "the native target does not support the load command"
37     return
40 # Manually change the value of the_variable.
41 gdb_test "print/x the_variable" " = 0x1234" "check initial value of the_variable"
42 gdb_test_no_output "set the_variable = 0x5555" "manually change the_variable"
43 gdb_test "print/x the_variable" " = 0x5555" "check manually changed value of the_variable"
45 # Re-load the binary using the load command.
46 gdb_test "load ${binfile}" ".*Loading section .data.*Transfer rate:.*" "re-load binary"
48 # Re-loading the binary should have reset the variable value.
49 gdb_test "print/x the_variable" " = 0x1234" "check initial value of the_variable"