-# Copyright 2003-2004, 2007-2012 Free Software Foundation, Inc.
+# Copyright 2003-2020 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
set src1 ${srcdir}/${subdir}/${testfile}.c
if { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } {
- untested e500-regs.exp
+ untested "failed to compile"
return -1
}
#
if ![runto_main] then {
- gdb_suppress_tests
+ fail "can't run to main"
+ return 0
}
# set all the registers integer portions to 1
#gdb_test "next" "" ""
-send_gdb "show endian\n"
-gdb_expect {
- -re "(The target endianness is set automatically .currently )(big|little)( endian.*)$gdb_prompt $" {
- pass "endianness"
- set endianness $expect_out(2,string)
- }
- -re ".*$gdb_prompt $" {
- fail "couldn't get endianness"
- }
- timeout { fail "(timeout) endianness" }
-}
+set endianness [get_endianness]
# And then read the E500 registers back, to see that
# a) the register write above worked, and
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then {
- gdb_suppress_tests
+ fail "can't run to main"
+ return 0
}
gdb_test "break vector_fun" \
"Breakpoint 2 at.*e500-regs.c, line \[0-9\]+\\." \
- "Set breakpoint at vector_fun"
+ "set breakpoint at vector_fun"
# Actually it is nuch easier to see these results printed in hex.
# gdb_test "set output-radix 16" \
# "Output radix now set to decimal 16, hex 10, octal 20." \
-# "Set output radix to hex"
+# "set output radix to hex"
gdb_test "continue" \
"Breakpoint 2, vector_fun .a=.-2, -2., b=.1, 1.*e500-regs.c.*ev_create_s32 .2, 2.;" \