@@ -20,15 +20,15 @@
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "[gdb_get_line_number "ldxr"]" \
"Breakpoint $decimal at $hex" \
"Set the breakpoint at the start of the sequence"
@@ -20,15 +20,15 @@
require is_aarch64_target
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Number of expected SIGTRAP's to get. This needs to be kept in sync
# with the source file.
set expected_traps 3
@@ -20,15 +20,15 @@
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set endianness [get_endianness]
gdb_test "break ${srcfile}:[gdb_get_line_number "return"]" \
@@ -40,17 +40,17 @@ proc check_fpmr_core_file {core_filename} {
require is_aarch64_target
require allow_aarch64_fpmr_tests
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
set binfile [standard_output_file ${testfile}]
if {![runto_main]} {
- return -1
+ return
}
set crash_breakpoint "crash point"
gdb_breakpoint [gdb_get_line_number $crash_breakpoint]
gdb_continue_to_breakpoint $crash_breakpoint
@@ -20,15 +20,15 @@
require is_aarch64_target
require allow_aarch64_fpmr_tests
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set reg_main_value "0x3fff7fc049"
set reg_handler_value "0xff008041"
@@ -18,15 +18,15 @@
require is_aarch64_target
require allow_aarch64_fpmr_tests
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "info register \$fpmr" "Test FPMR SRC1 E5M2" {
-re ".*\r\n.*\[ \
F8S1=E5M2 \
@@ -17,11 +17,11 @@ require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} \
"${srcfile}" {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -20,11 +20,11 @@
require allow_aarch64_mops_tests
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug additional_flags=-march=armv9.3-a]] } {
- return -1
+ return
}
# If the inferior is rescheduled to another CPU while a main or epilogue
# instruction is executed, the OS resets the inferior back to the prologue
# instruction, so we need to allow for that possibility.
@@ -70,11 +70,11 @@ proc step_through_sequence { prefix } {
fail "step through $prefix sequence"
return 0
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint ${srcfile}:[gdb_get_line_number "Break memset"]
gdb_breakpoint ${srcfile}:[gdb_get_line_number "Break memcpy"]
gdb_breakpoint ${srcfile}:[gdb_get_line_number "Break memmove"]
@@ -22,16 +22,16 @@ require allow_hw_watchpoint_tests allow_aarch64_mops_tests
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug additional_flags=-march=armv9.3-a]] } {
- return -1
+ return
}
set linespec ${srcfile}:[gdb_get_line_number "Break here"]
if {![runto ${linespec}]} {
- return -1
+ return
}
gdb_test "watch -location a\[28\]" \
"(Hardware w|W)atchpoint ${decimal}: -location a\\\[28\\\]" \
"set watch on a"
@@ -45,46 +45,46 @@ proc get_ltag_from_ptr { ptr } {
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Targets that don't support memory tagging should not execute the
# runtime memory tagging tests.
if {![supports_memtag]} {
unsupported "memory tagging unsupported"
- return -1
+ return
}
gdb_breakpoint "access_memory"
if {[gdb_continue "access_memory"]} {
- return -1
+ return
}
# Fetch a known pointer to an area mapped with PROT_MTE.
set tagged_ptr_symbol "tagged_ptr"
set tagged_ptr_addr [get_hexadecimal_valueof $tagged_ptr_symbol -1]
if {$tagged_ptr_addr == -1} {
unresolved "unexpected pointer or tag value"
- return -1
+ return
}
# Fetch a known pointer to an area not mapped with PROT_MTE.
set untagged_ptr_symbol "untagged_ptr"
set untagged_ptr_addr [get_hexadecimal_valueof $untagged_ptr_symbol -1]
if {$untagged_ptr_addr == -1} {
unresolved "unexpected pointer or tag value"
- return -1
+ return
}
with_test_prefix "literals" {
# Test inspecting an allocation tag from a pointer to a memory area that
# is not mapped with PROT_MTE.
@@ -21,15 +21,15 @@
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# We need to iterate over two distinct ranges, separated by a single bit.
# This bit is 55 (VA_RANGE_SELECT) which tells us if we have a kernel-space
# address or a user-space address.
@@ -40,15 +40,15 @@ foreach pauth_flag "-mbranch-protection=pac-ret+leaf -msign-return-address=all"
}
}
# If we couldn't compile, just bail out.
if {!$compilation_ok} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [ gdb_get_line_number "break here" ]
gdb_continue_to_breakpoint "break here" ".*break here.*"
@@ -17,11 +17,11 @@
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
return -1
}
@@ -24,11 +24,11 @@ if { ![istarget aarch64-*-* ] } {
standard_testfile aarch64-pseudo-unwind.c aarch64-pseudo-unwind-asm.S
if { [prepare_for_testing "failed to prepare" ${testfile} \
"${srcfile} ${srcfile2}" {debug}] } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
@@ -27,15 +27,15 @@ if { ![allow_aarch64_sve_tests] } {
lappend compile_flags "additional_flags=-DSVE"
}
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${compile_flags}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set endianness [get_endianness]
if {$endianness == "little"} {
@@ -45,15 +45,15 @@ require allow_aarch64_sme_tests
require !gdb_protocol_is_remote
set compile_flags {"debug" "macros" "additional_flags=-march=armv8.5-a+sve"}
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${compile_flags}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Adjust the repeat count for the test.
gdb_test_no_output "set print repeats 1" "adjust repeat count"
@@ -17,15 +17,15 @@
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "breakpoint here"]
gdb_continue_to_breakpoint "breakpoint here"
@@ -20,15 +20,15 @@
require is_aarch64_target
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
proc test_reg_vals {} {
gdb_test "p \$pc - &main" "= 8" "p \$pc"
gdb_test "p/x \$x30" "= 0x1234" "p \$x30"
@@ -18,16 +18,16 @@
require is_aarch64_target
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
untested "could not run to main"
- return -1
+ return
}
array set w_values {
0 0x0
1 0x10
@@ -22,13 +22,13 @@ standard_testfile
# on ARM, causing the PC to acquire a wrong value. That's why we use
# the "-Wl,-Ttext-segment" option compile the binary.
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug text_segment=0xb0000000]] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "next" "${::decimal}\\s+return 0;"
@@ -17,11 +17,11 @@
require {istarget "arm*-*-*"}
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile ]} {
- return -1
+ return
}
if {![runto_main]} {
return -1
}
@@ -20,11 +20,11 @@
require is_aarch32_target
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
#########################################
# Test ldm/stm related to PC.
@@ -405,11 +405,11 @@ proc test_add_rn_pc {} {
# is on, and we type 'run', GDB will first try to single step on _dl_debug_state,
# which is in library might be compiled in Thumb.
gdb_test_no_output "set displaced-stepping off"
if {![runto_main]} {
- return 0
+ return
}
gdb_test_no_output "set displaced-stepping on"
gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
@@ -20,15 +20,15 @@ require {is_any_target "aarch64*-*-*" "arm*-*-*"}
require allow_float_test
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug quiet}] } {
unsupported "ARM NEON is not supported"
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Test passing vectors in function argument in the inferior call.
for {set i 1} {$i <= 18} {incr i} {
@@ -29,11 +29,11 @@ if { ![istarget arm*-*-* ] } {
standard_testfile arm-pseudo-unwind-legacy.c arm-pseudo-unwind-legacy-asm.S
if { [prepare_for_testing "failed to prepare" ${testfile} \
"${srcfile} ${srcfile2}" {debug additional_flags=-marm}] } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
@@ -24,11 +24,11 @@ if { ![istarget arm*-*-* ] } {
standard_testfile arm-pseudo-unwind.c arm-pseudo-unwind-asm.S
if { [prepare_for_testing "failed to prepare" ${testfile} \
"${srcfile} ${srcfile2}" {debug additional_flags=-marm}] } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
@@ -17,15 +17,15 @@ require is_aarch32_target
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug]] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
# Initialize kernel_user_helper_version.
gdb_test "next" "for .*"
@@ -41,11 +41,11 @@ gdb_test_multiple "p kernel_user_helper_version" \
}
}
if { !$kernel_helper_supported } {
unsupported "kernel doesn't have helpers"
- return 0
+ return
}
# Get the instruction branching to kernel helper, they can be
# blx rN or bx rN.
set branch_to_kernel_helper 0
@@ -36,11 +36,11 @@ gdb_load ${binfile}
#
# Run to `main' where we begin our tests.
#
if {![runto_main]} {
- return 0
+ return
}
# Set all the registers to arbitrary values.
for {set i 0} {$i < 16} {incr i 1} {
gdb_test "set \$wR$i.u64 = ((${i}LL << 32) | ${i})" "" "set reg wR$i"
@@ -20,11 +20,11 @@ require is_aarch32_target
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
# Check if the disassemble ouput is correct.
@@ -20,15 +20,15 @@ require is_aarch32_target
set testfile "thumb-bx-pc"
set srcfile ${testfile}.S
set opts {}
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "stepi" "$hex in main \\(\\)" "stepi for bx pc"
gdb_test "x /i \$pc" \
@@ -21,22 +21,22 @@ standard_testfile
# Don't use "debug", so that we don't have line information for the assembly
# fragments.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-mthumb"}] != "" } {
untested "ARM prologue tests"
- return -1
+ return
}
clean_restart $testfile
#
# Run to `main' where we begin our tests.
#
if {![runto_main]} {
- return -1
+ return
}
# Testcase for TPCS prologue.
gdb_breakpoint "* *(int *)tpcs_offset + (int) &tpcs_frame_1"
@@ -20,15 +20,15 @@ require is_aarch32_target
set testfile "thumb-singlestep"
set srcfile ${testfile}.S
set additional_flags "additional_flags=-mthumb"
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} [list debug $additional_flags]]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# GDB doesn't skip prologue for asm files, so do one single step to
# pass instruction "push".
gdb_test "si" "blx foo.*" "single step"
@@ -19,17 +19,17 @@ require {istarget arm*-*eabi*}
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
# Make sure that the compiler options allow Thumb-2.
gdb_test_multiple "list" "list main" {
-re ".*@ No Thumb-2.*$gdb_prompt $" {