@@ -71,17 +71,17 @@ Dwarf::assemble $asm_file {
}
}
if {[build_executable ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
set cmd "print i64_var"
if { [is_64_target] } {
gdb_test $cmd \
@@ -80,11 +80,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_test "print value" \
[string_to_regexp " = (disc => 3, nums => (7, 11, 13))"]
@@ -57,11 +57,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_breakpoint "pck.xtra.function" message
gdb_breakpoint "pck.xtra.function\[cold\]" message
@@ -61,11 +61,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
with_test_prefix "first first" {
gdb_test_no_output "set language ada"
gdb_breakpoint "<__gnat_namefirst>" message
@@ -84,10 +84,10 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_test "ptype array_type" "type = array \\(1 \\.\\. 7\\) of integer"
@@ -26,11 +26,11 @@ standard_testfile .c -dw.S
# Any program would do, but since we already have ada-valprint-error.c
# specifically for this testcase, might as well use that.
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
untested "failed to compile"
- return -1
+ return
}
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
@@ -102,11 +102,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# Note: This test may fail with certain clang + linker combinations
# Specifically, clang + ld.lld can fail to apply relocations when linking
# nodebug .o with separate DWARF .o, leaving fd__global as NULL instead
@@ -16,11 +16,11 @@
require allow_cplus_tests
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
set cmd "ptype main"
set re \
@@ -79,11 +79,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_test "print the_table" " = <optimized out>"
@@ -109,11 +109,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_test "ptype pck.table" \
@@ -74,11 +74,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_test "ptype pck.table" \
@@ -79,9 +79,9 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "ptype f" "int \\(const _Atomic char \\\* volatile _Atomic\\)"
@@ -73,11 +73,11 @@ Dwarf::assemble $asm_file {
}
}
if {[build_executable "failed to build executable" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
set eol "\r\n"
set ws "\[ \t\]"
@@ -60,15 +60,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "info addr foo1" \
"Symbol \"foo1\" is a variable in \\\$bad_register_number."
@@ -68,15 +68,15 @@ Dwarf::assemble $asm_file {
}
}
}
if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p var" " = <optimized out>"
gdb_test "p var.bitfield" " = <optimized out>"
gdb_test "p var.intfield" " = <optimized out>"
@@ -15,20 +15,20 @@
standard_testfile .c -2.c
set sources [list $srcfile $srcfile2]
if { [prepare_for_testing "failed to prepare" ${testfile} $sources] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
get_debug_format
if { [skip_inline_frame_tests] } {
- return -1
+ return
}
# Set a break-point in inline function bar, in a CU for which the partial
# symtab has not been expanded.
gdb_breakpoint "bar" message
@@ -22,15 +22,15 @@ require dwarf2_support is_x86_like_target
standard_testfile .S
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
[list {additional_flags=-nostdlib}]]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break *func" "Breakpoint 2.*" "set breakpoint for call-frame-cfa"
gdb_continue_to_breakpoint "continue to breakpoint for call-frame-cfa"
gdb_test "display arg" "arg = 77" "set display for call-frame-cfa"
@@ -32,11 +32,11 @@ require dwarf2_support
standard_testfile .c .S
# First compile the .c file so we can ask GDB what is sizeof(int).
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
untested "failed to compile"
- return -1
+ return
}
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
@@ -67,15 +67,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "call foo ()" \
"Cannot call the function 'foo' which does not follow the target calling convention."
gdb_breakpoint "foo"
@@ -24,15 +24,15 @@ require dwarf2_support
# This test can only be run on x86-64 targets.
require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S \
{nodebug nopie additional_flags=-nostdlib}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Initialize tests to be an empty array.
unset -nocomplain tests
array set tests {}
@@ -67,9 +67,9 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
gdb_test "print 1" "= 1" "recover from corrupt DWARF"
@@ -125,15 +125,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "ptype array" "type = char \\\[5\\\]"
gdb_test "whatis array" "type = char \\\[5\\\]"
gdb_test "print array" " = \"hello\""
@@ -80,10 +80,10 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_assert [runto_main] "run to main"
gdb_test "p global_var" " = {x = 0, y = 0}"
@@ -36,13 +36,13 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
gdb_continue_to_end
@@ -51,10 +51,10 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
gdb_test "break *$main_start" ".*Breakpoint $decimal at $hex" \
"set breakpoint at main address"
@@ -25,11 +25,11 @@ standard_testfile .c -dw.S
# For that, we ask GDB by debugging our data-loc.c program.
# Any program would do, but since we already have data-loc.c
# specifically for this testcase, might as well use that.
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
@@ -119,15 +119,15 @@ Dwarf::assemble $asm_file {
# program using our debug info instead of the info generated by
# the compiler.
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set language ada"
# foo.three
@@ -80,11 +80,11 @@ Dwarf::assemble {
}
}
if {[build_executable ${testfile}.exp $testfile "${asm_file} ${srcfile}" \
[list ldflags=-nostartfiles]] == -1} {
- return -1
+ return
}
clean_restart
with_complaints 1 {
@@ -60,11 +60,11 @@ Dwarf::assemble {
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
[list ldflags=-nostartfiles]]} {
- return -1
+ return
}
# Check for warning.
set re \
[list \
@@ -67,11 +67,11 @@ Dwarf::assemble {
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
[list ldflags=-nostartfiles]]} {
- return -1
+ return
}
# Verify that .debug_names section is not ignored.
set index [have_index $binfile]
gdb_assert { [string equal $index ""] } ".debug_names not used"
@@ -88,11 +88,11 @@ Dwarf::assemble {
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
[list ldflags=-nostartfiles]]} {
- return -1
+ return
}
# Verify that .debug_names section is not ignored.
set index [have_index $binfile]
gdb_assert { [string equal $index "debug_names"] } ".debug_names used"
@@ -63,11 +63,11 @@ Dwarf::assemble {
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
[list ldflags=-nostartfiles]]} {
- return -1
+ return
}
# Verify that .debug_names section is not ignored.
set index [have_index $binfile]
gdb_assert { [string equal $index "debug_names"] } ".debug_names used"
@@ -21,11 +21,11 @@ require dwarf2_support
standard_testfile .S
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile {debug} main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
set test "info sources should contain only one reference to file1.txt"
gdb_test_multiple "info sources" "$test" {
-re "file1\\.txt.*file1\\.txt.*$gdb_prompt $" {
@@ -98,11 +98,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# Without the corresponding fix, we get an internal error:
#
# gdb/dwarf2/read.c:3940: internal-error: load_full_comp_unit: Assertion `! this_cu->is_debug_types' failed.
@@ -48,11 +48,11 @@ lappend flags additional_flags=[quote_for_host -DWORLD_START=$world_start]
lappend flags additional_flags=[quote_for_host -DWORLD_END=$world_start \
+ $world_len]
set executable ${testfile}
if {[build_executable ${testfile}.exp ${executable} $sources $flags] == -1} {
- return -1
+ return
}
clean_restart $executable
gdb_test "break hello" \
@@ -19,11 +19,11 @@ require dwarf2_support
standard_testfile .S
set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $executable
# -1 was produced, it is now caught with the complaint:
@@ -66,15 +66,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set lang c++"
gdb_test "print alignof(int_4096)" " = 4096"
gdb_test "print alignof(ptr_4096)" " = 4096"
@@ -23,11 +23,11 @@ require allow_cplus_tests
standard_testfile .S
if {[gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
object {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
# Be sure to set cp-abi before $binfile gets loaded
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
# Force the debugger to create the file1.txt symtab, to make sure that
@@ -34,10 +34,10 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" $testfile \
[list $asm_file $srcfile ]] } {
- return -1
+ return
}
# Failed gdb_load would abort the testcase execution earlier.
pass "file loaded"
@@ -34,11 +34,11 @@ require dwarf2_support
standard_testfile main.c -other.S -dwarf.S
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
untested "failed to compile"
- return -1
+ return
}
set int_size [get_sizeof "int" 4]
# Make some DWARF for the test.
@@ -158,11 +158,11 @@ Dwarf::assemble $asm_file {
}
}
if { [build_executable ${testfile}.exp ${testfile} \
[list $srcfile $srcfile2 $asm_file] {nodebug}] } {
- return -1
+ return
}
# Attempt to place a breakpoint on 'some_func', then check GDB is
# still alive. This test can optionally set a breakpoint on 'main'
# first (based on GOTO_MAIN), the original bug behaved differently
@@ -53,11 +53,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# A successful run will have two PASSes. A GDB that's lacking
# attribute type checking will segfault at some point. It doesn't
# much matter what we test here, so long as we do something to make
@@ -20,11 +20,11 @@ require dwarf2_support
standard_testfile .S
set executable ${testfile}
# First try referencing DW_AT_frame_base which is not defined.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $executable
# The first access (as we do not use -readnow) prints some:
@@ -50,10 +50,10 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "ptype var" "type = bool"
gdb_test "print var" "Missing .* symbol \"var\"."
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
gdb_test_no_output "set listsize 1"
@@ -66,15 +66,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Make sure we can print both types correctly.
gdb_test "print bf16_1" " = 3.141"
gdb_test "print fp16_1" " = 3.1406"
@@ -23,10 +23,10 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
standard_testfile .S
set executable ${testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
[list nodebug $additional_flags]]} {
- return -1
+ return
}
# The correct new[] and delete[] syntax is probably unsupported by GDB.
gdb_test "ptype f" {type = void \(typename<sizeof \(int\)>, C::operator new\(int\), C::operator delete\(void\*\), C::operator new\[\]\(int\), C::operator delete\[\]\(void\*\)\)}
@@ -26,11 +26,11 @@ require allow_fortran_tests
standard_testfile .S
if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile \
{nodebug nopie f90}] } {
- return -1
+ return
}
if {![runto MAIN__]} {
return
}
@@ -21,11 +21,11 @@ require dwarf2_support
set additional_flags [gdb_target_symbol_prefix_flags_asm]
standard_testfile .S
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
$additional_flags]} {
- return -1
+ return
}
# Here should be GDB-computed "Compilation directory is".
gdb_test "list gcc42" ".*"
gdb_test "info source" "\r\nCurrent source file is dw2-compdir-oldgcc42.S\r\nCompilation directory is /dir/d\r\n.*" \
@@ -31,11 +31,11 @@ require dwarf2_support
standard_testfile main.c -debug.S
if {[prepare_for_testing "failed to prepare" $testfile \
"${srcfile}" {}]} {
- return -1
+ return
}
set float_size [get_sizeof float 0]
set double_size [get_sizeof double 0]
set long_double_size [get_sizeof "long double" 0]
@@ -157,15 +157,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" $testfile \
"${asm_file} ${srcfile}" {}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
proc do_test { type {clang 0}} {
with_test_prefix $type {
with_test_prefix clang=$clang {
@@ -24,11 +24,11 @@ set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile \
{debug additional_flags=-static additional_flags=-nostdlib} \
main.c -g0 $srcfile nodebug]]} {
- return -1
+ return
}
gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
gdb_test_no_output "set listsize 1"
@@ -19,11 +19,11 @@ require dwarf2_support
standard_testfile .S
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_test "print twelve" "= 12"
gdb_test "print/x val8" " = 0xffffffff00000000"
@@ -25,15 +25,15 @@ require dwarf2_support
standard_testfile .S -main.c
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile2 $srcfile] {}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# main is not provided by DWARF.
gdb_test_no_output "set language c++"
@@ -24,9 +24,9 @@ require dwarf2_support
standard_testfile .S
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_test "ptype noloc" "type = const int"
@@ -80,11 +80,11 @@ set srcabsdir [standard_output_file ${testfile}.d]
set srctmpfile tmp-${testfile}.c
# $srcdir may be relative.
if {[file pathtype $srcabsdir] != "absolute"} {
untested "objdir pathtype is not absolute"
- return -1
+ return
}
set f [open $asmsrcfile "w"]
puts $f "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */"
@@ -412,11 +412,11 @@ if { [test_compiler_info clang*] } {
lappend opts "additional_flags=-fno-integrated-as"
}
if { [gdb_compile "${asmsrcfile} ${srcdir}/${subdir}/$srcfile" "${binfile}" executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
set dirs {}
foreach r {"" /rdir} {
foreach x {"" /xdir} {
@@ -448,11 +448,11 @@ remote_exec host "sh -c \"mkdir $dircreatelist\""
remote_exec host "sh -c \"for d in $dircreatelist; do cp ${srcdir}/${subdir}/${srcfile} \\\$d/${srctmpfile}; done\""
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "cd ${srcabsdir}/rdir" "Working directory [string_to_regexp ${srcabsdir}]/rdir\\." "cd .../rdir"
proc test { func compdir filename } {
@@ -92,15 +92,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug} ] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Global lines array, maps lines numbers to the list of addresses
# associated with that line in the debug output.
array set lines {}
@@ -18,11 +18,11 @@ require dwarf2_support
standard_testfile .S
set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $executable
gdb_test_no_output "set breakpoint pending off"
@@ -22,10 +22,10 @@ require dwarf2_support
standard_testfile .S
if { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
object {nodebug}] != "" } {
- return -1
+ return
}
clean_restart $testfile
gdb_test "ptype a" "type = class .*"
@@ -20,11 +20,11 @@ require dwarf2_support
standard_testfile .S
set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $executable
gdb_test_no_output "maint expand-symtab"
@@ -21,16 +21,16 @@ require dwarf2_support
require is_x86_64_m64_target
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie}] } {
- return -1
+ return
}
if {![runto stop_frame]} {
perror "Failed to stop in stop_frame"
- return -1
+ return
}
gdb_test "bt" \
"#0 stop_frame \[^\r\n\]*\r\nBacktrace stopped: previous frame identical to this frame \\(corrupt stack\\?\\)" \
"backtrace from stop_frame"
@@ -50,11 +50,11 @@ Dwarf::assemble $asm_file {
}
}
if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
clean_restart
# If there's an ERROR during gdb_load, the assert will produce an UNRESOLVED
@@ -58,11 +58,11 @@ get_func_info main
#
# Use `nopie` to ensure that addresses are the same across runs, in case ASLR
# can't be disabled.
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list ${srcfile}] {debug nopie}] } {
- return -1
+ return
}
# Some addresses that we need when generating the DWARF.
for { set i 0 } { $i < 9 } { incr i } {
set main_$i [get_hexadecimal_valueof "&main_$i" "UNKNOWN" \
@@ -21,11 +21,11 @@ require dwarf2_support
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
- return -1
+ return
}
clean_restart $testfile
# `p var' below can work without identified DWARF DIE just based on its ELF symbol.
@@ -19,11 +19,11 @@ require dwarf2_support
standard_testfile .S
set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $executable
gdb_test "ptype emptyrange" {No symbol "emptyrange" in current context\.} \
"empty range before CU load"
@@ -27,11 +27,11 @@ standard_testfile
# before calling prepare_for_testing otherwise GDB will have exited.
get_func_info foo
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list ${srcfile}] {debug nopie}]} {
- return -1
+ return
}
# Address for the middle of foo. This is used as our entry point when
# the entry_pc is defined as an address.
set foo_middle_addr [get_hexadecimal_valueof "&foo_middle" "UNKNOWN" \
@@ -189,15 +189,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Try whether we can set and hit breakpoints at the entry_points.
gdb_breakpoint "*foo"
gdb_breakpoint "*foobar"
@@ -218,11 +218,11 @@ gdb_test "bt" [multi_line \
# Now try whether we can also set breakpoints on entry_points from other CUs.
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "*fooso"
gdb_continue_to_breakpoint "foo_so"
@@ -92,11 +92,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if { ![runto *main] } {
return
}
@@ -16,15 +16,15 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
- return -1
+ return
}
if {![runto f]} {
- return -1
+ return
}
# FAIL was printing:
# param=Unhandled dwarf expression opcode 0xf3
gdb_test "frame" "param=<optimized out>.*" "<optimized out> is printed"
@@ -164,15 +164,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Moving to the scope with a local variable.
gdb_breakpoint $srcfile:$watch_start_line
@@ -23,11 +23,11 @@ standard_testfile .S
require is_x86_64_m64_target
# We can't use prepare_for_testing here because we need to check the
# 'file' command's output.
if {[build_executable $testfile.exp $testfile $srcfile {nodebug quiet}]} {
- return -1
+ return
}
clean_restart
gdb_test_no_output "set breakpoint pending off"
@@ -21,11 +21,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
- return -1
+ return
}
gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
clean_restart ${testfile}
@@ -112,15 +112,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Do the testing in Ada mode, since this is the language for which
# this feature has been implemented, and where we know the language
# has the concept of fixed-point types.
@@ -88,11 +88,11 @@ proc create_dwarf_assembly {source_file one_diridx} {
}
set asm_file [create_dwarf_assembly $srcfile2 false]
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set debug symtab-create 1"
gdb_test_multiple "ptype bar" "" {
-re -wrap "name_for_id = $objdir/$srcfile\r\n.*" {
@@ -106,9 +106,9 @@ gdb_test_multiple "ptype bar" "" {
# Test whether gdb crashes in the case where the number of
# directory indexes is only one.
set asm_file [create_dwarf_assembly $srcfile3 true]
if {[prepare_for_testing "failed to prepare" ${testfile}-one-diridx \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "ptype bar" ".*" "do not crash with only one directory table entry"
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S main.c
if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {nodebug}] } {
- return -1
+ return
}
# We are trying to verify that the partial symtab to symtab expansion
# for the debugging info hand-coded in our assembly file does not cause
# the debugger to crash (infinite recursion). To facilitate the test,
@@ -57,13 +57,13 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto func]} {
- return -1
+ return
}
gdb_test "p/x param" " = 0xdeadf00d"
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
- return -1
+ return
}
clean_restart $testfile
gdb_test "ptype inherited" "type = class inherited .*"
@@ -27,11 +27,11 @@ require is_x86_64_m64_target
set basename "inline-break"
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
- return -1
+ return
}
#
# func1 is a static inlined function that is called once.
# The result should be a single-location breakpoint.
@@ -140,15 +140,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] $build_options] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
# the output of "info breakpoints" below will only contain a single breakpoint.
delete_breakpoints
@@ -129,15 +129,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] $build_options] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
# the output of "info breakpoints" below will only contain a single breakpoint.
delete_breakpoints
@@ -284,15 +284,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# First we step through all of the functions until we get the 'kkk'.
set patterns [list "main call aaa" \
"aaa return" \
@@ -21,11 +21,11 @@ standard_testfile .S -main.c
set binfile_stripped ${binfile}-stripped
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list $srcfile2 $srcfile] {nodebug nopie}] } {
- return -1
+ return
}
set break_at ""
set test "info addr break_at"
gdb_test_multiple $test $test {
@@ -50,11 +50,11 @@ if {$result != 0} {
}
gdb_load ${binfile_stripped}
if {![runto "*${break_at}"]} {
- return -1
+ return
}
set index [have_index $binfile_stripped]
if {$index == "debug_names"} {
# This test doesn't include .debug_aranges, so it doesn't cause CU
@@ -118,15 +118,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug optimize=-O1}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
# the output of "info breakpoints" below will only contain a single breakpoint.
delete_breakpoints
@@ -121,15 +121,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set patterns [list "main call foo" \
"foo call bar" \
"bar return global_var"]
@@ -130,11 +130,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
runto breakpoint_label
# When using cc-with-debug-names, nothing will force the CU to be
@@ -43,11 +43,11 @@ Dwarf::assemble $asm_file {
}
}
if {[build_executable "failed to prepare" $testfile \
[list $asm_file $srcfile] {nodebug}]} {
- return -1
+ return
}
clean_restart
gdb_test_no_output "maint set dwarf synchronous on"
@@ -45,11 +45,11 @@ Dwarf::assemble $asm_file {
}
}
if {[build_executable "failed to prepare" $testfile \
[list $asm_file $srcfile] {nodebug}]} {
- return -1
+ return
}
clean_restart
gdb_test_no_output "maint set dwarf synchronous on"
@@ -55,10 +55,10 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" $testfile \
[list $asm_file $srcfile] {nodebug}]} {
- return -1
+ return
}
# Regression test for PR32081.
gdb_assert { ![regexp -nocase "error:" $gdb_file_cmd_msg] } "No Error message"
@@ -72,15 +72,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto main]} {
- return -1
+ return
}
gdb_test "p var1" " = 1"
set re \
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
set remote_dwarf_srcfile [gdb_remote_download host \
${srcdir}/${subdir}/${dwarf_srcfile}]
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_remote_download host \
${srcdir}/${subdir}/${dwarf_srcfile}
@@ -143,15 +143,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Check stepping through the out of order lines gives the experience
# we expect; lines in the correct order, and stop at the correct
# labels.Q
@@ -94,15 +94,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# First, break by address at a location we know is marked as not a
# statement. GDB should still correctly report the file and line
# number.
@@ -54,11 +54,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
runto_main
# FAILing GDB did print: No symbol "testvar" in current context.
@@ -108,15 +108,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$srcfile:27"
gdb_continue_to_breakpoint "bar1" "\[^\r\n\]*:27\r\n.*"
@@ -128,11 +128,11 @@ gdb_continue_to_breakpoint "bar2" "\[^\r\n\]*:41\r\n.*"
gdb_test "n" "foo \\(2\\);" "bar2, 1st next"
gdb_test "n" "foo \\(4\\);" "bar2, 2nd next"
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "bar1_label_3"
setup_kfail "gdb/nnnnn" *-*-*
gdb_continue_to_breakpoint "bar1_label_3" "bar1 \\(\\)"
@@ -27,15 +27,15 @@ standard_testfile .S
set executable ${testfile}
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile c++ $testfile-main.cc {c++ nodebug} \
$srcfile {}]]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# main is not provided by DWARF.
gdb_test_no_output "set language c++"
@@ -44,14 +44,14 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set breakpoint_at_missing_lineno_set [gdb_breakpoint "1" no-message]
gdb_assert { !$breakpoint_at_missing_lineno_set }
@@ -24,11 +24,11 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
standard_testfile .S
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
${additional_flags}]} {
- return -1
+ return
}
# The "info func" code tries to expand the corresponding symtab when a
# minsym is found; and if this works, it omits the minsym from the
# results. However, this test also does not include .debug_aranges,
@@ -39,11 +39,11 @@ Dwarf::assemble $asm_file {
# Don't use prepare_for_testing here as we want to manually run the
# file command (so we can check its output).
if {[build_executable "failed to build executable" $testfile \
[list $srcfile $asm_file] {nodebug quiet}]} {
- return -1
+ return
}
set host_binfile [gdb_remote_download host $binfile]
# Restart with no executable.
@@ -19,11 +19,11 @@ require dwarf2_support
standard_testfile .S
# First try referencing DW_AT_frame_base which is not defined.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $testfile
# C language would just naively print:
@@ -26,11 +26,11 @@ lappend opts dwarf5
lappend opts c++
lappend opts additional_flags=-fdebug-types-section
if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" object \
$opts] != "" } {
- return -1
+ return
}
clean_restart $::testfile
gdb_test "ptype a" "type = class sp1::A .*"
@@ -53,10 +53,10 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "ptype '(anonymous namespace)::v'" "type = myint"
gdb_test "p/d '(anonymous namespace)::v'" " = 1"
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c main.c
if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"]} {
- return -1
+ return
}
set cmd "p var"
set re \
@@ -209,11 +209,11 @@ Dwarf::assemble $asm_file {
}
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# Symbols have the form: {file,main}_loc{addr,empty,no}_{,un}resolvable
# file: Symbol DIE is placed in DW_TAG_compile_unit.
# main: Symbol DIE is placed in DW_TAG_subprogram.
@@ -271,11 +271,11 @@ proc file_symbols {type} {
}
file_symbols no-run
if {![runto_main]} {
- return -1
+ return
}
file_symbols in-main
@@ -27,11 +27,11 @@ set binfile_inner ${binfile}-inner.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \
object {}] != ""
|| [gdb_compile "${srcdir}/${subdir}/${srcfile_inner}" "${binfile_inner}" \
object {}] != "" } {
- return -1
+ return
}
clean_restart $executable_outer
set host_binfile_inner [gdb_remote_download host $binfile_inner]
@@ -21,11 +21,11 @@ require dwarf2_support
standard_testfile .S main.c
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {nodebug}] } {
- return -1
+ return
}
# Additional test to verify the referenced CU is not aged out.
gdb_test_no_output "maintenance set dwarf max-cache-age 0"
@@ -33,9 +33,9 @@ gdb_test "p array1" " = 1"
gdb_test "p array2" " = 2" "array2 using DW_OP_call2"
gdb_test "p array3" " = 3" "array3 using DW_OP_call4"
# Location lists need PC.
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p arraynoloc" " = <optimized out>"
gdb_test "p arraycallnoloc" {Asked for position 0 of stack, stack only has 0 elements on it\.}
@@ -22,15 +22,15 @@ require dwarf2_support
# This test can only be run on x86-64 targets.
require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "breakpt"
# Change the radix, making it easier to spot 0xdeadbeef in output.
@@ -22,11 +22,11 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
- return -1
+ return
}
clean_restart $testfile
gdb_test "p/x stack2" " = 0x1"
@@ -241,10 +241,10 @@ proc do_mi_test {} {
"throw error, dereference ptr to access pointer member "
}
}
if { [build_test_program] == -1 } {
- return -1
+ return
}
do_console_test
do_mi_test
@@ -74,15 +74,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set test "END with address 1 eliminated"
gdb_test_multiple "maint info line-table \\b$srcfile$" $test {
-re -wrap "END *0x0*1 *$hex *Y *\r\n.*" {
@@ -19,15 +19,15 @@ require dwarf2_support
standard_testfile .S -main.c
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list $srcfile2 $srcfile] {nodebug}] } {
- return -1
+ return
}
if {![runto f]} {
- return -1
+ return
}
# FAIL was printing:
# [...] in f (bad=)
gdb_test "frame" { f \(bad=<error reading variable: Asked for position 0 of stack, stack only has 0 elements on it\.>, good=23\)}
@@ -20,11 +20,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
gdb_test_no_output "set listsize 1"
@@ -71,11 +71,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# Don't runto main here, otherwise the following doesn't
# function as regression test for PR30369.
@@ -78,15 +78,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set prologue_end_line [gdb_get_line_number "main assign o"]
gdb_test "frame" ".*main \\\(\\\) at \[^\r\n\]*:$prologue_end_line\r\n.*"
@@ -116,15 +116,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Make use of the line numbers we faked in the .debug_line table above.
gdb_test "info line main" \
"Line 11 of .* starts at address .* and ends at .*"
@@ -65,14 +65,14 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto foo]} {
- return -1
+ return
}
gdb_test "show language" \
"The current source language is \"auto; currently c\"\."
@@ -29,11 +29,11 @@ standard_testfile -main.c .c -dw.S
# would do, but since we already have it specifically for this
# testcase, might as well use that.
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list ${srcfile} ${srcfile2}]] } {
- return -1
+ return
}
set asm_file [standard_output_file $srcfile3]
Dwarf::assemble $asm_file {
global srcdir subdir srcfile srcfile2
@@ -100,19 +100,19 @@ Dwarf::assemble $asm_file {
}
}
if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile $srcfile2 $asm_file] {nodebug}] } {
- return -1
+ return
}
clean_restart
gdb_load_no_complaints $binfile
if {![runto_main]} {
- return -1
+ return
}
# Generate backtrace from baz, that visits the hole in the addrmap. If
# the hole is there in the symbol table, but not the partial symbol table,
# we run into:
@@ -31,11 +31,11 @@ standard_testfile main.c .c -dw.S
# would do, but since we already have it specifically for this
# testcase, might as well use that.
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list ${srcfile} ${srcfile2}]] } {
- return -1
+ return
}
set asm_file [standard_output_file $srcfile3]
Dwarf::assemble $asm_file {
global srcdir subdir srcfile srcfile2
@@ -111,18 +111,18 @@ Dwarf::assemble $asm_file {
}
}
if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile $srcfile2 $asm_file] {nodebug}] } {
- return -1
+ return
}
clean_restart
gdb_load_no_complaints $binfile
if {![runto_main]} {
- return -1
+ return
}
# "someothername" should be put into the partial symbol table, but
# there was a bug causing functions using DW_AT_ranges not to be.
# Note we use a name that is very different from the linkage name, in
@@ -42,11 +42,11 @@ set executable ${testfile}
if { [prepare_for_testing_full "failed to prepare" \
[list $testfile {} \
$srcfile [concat $flags {nodebug}] \
$srcfile2 {nodebug} \
$srcfile3 {debug}]] == -1 } {
- return -1
+ return
}
# First try referencing DW_AT_frame_base which is not defined.
if {[runto func_nofb]} {
gdb_test "p func_nofb_var" {Could not find the frame base for "func_nofb".} "func_nofb print"
@@ -21,16 +21,16 @@ require dwarf2_support
require is_x86_64_m64_target
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie}] } {
- return -1
+ return
}
if {![runto stop_frame]} {
perror "Failed to stop in stop_frame"
- return -1
+ return
}
gdb_test "bt" "#0 (${::hex} in )?stop_frame \[^\r\n\]*\r\n#1 \[^\r\n\]*first_frame \[^\r\n\]*\r\n#2 \[^\r\n\]*main\[^\r\n\]*" \
"backtrace from stop_frame"
@@ -54,11 +54,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
runto_main
# Variable 'bregx' needs to be inside main as for global symbols GDB does not
@@ -26,13 +26,13 @@ if { [test_compiler_info clang*] } {
lappend opts [list {additional_flags=-fno-integrated-as}]
}
if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile] \
$opts]} {
- return -1
+ return
}
if {![runto foo]} {
- return 0
+ return
}
gdb_test "continue" "$hex in foo \\(\\)"
gdb_test "where" "#0 +$hex in foo \\(\\)\r\n#1 +$hex in _start \\(\\)"
@@ -23,9 +23,9 @@ require is_x86_64_m64_target
standard_testfile .S
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{nodebug nopie}]} {
- return -1
+ return
}
gdb_test "ptype f" "int \\(char \\\* restrict\\)"
@@ -18,11 +18,11 @@ load_lib dwarf.exp
require dwarf2_support
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart $testfile
# Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
@@ -26,11 +26,11 @@ require is_x86_64_m64_target
standard_testfile .S
set csrcfile ${testfile}.c
if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {nodebug nopie}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -45,11 +45,11 @@ if {[is_ilp32_target]} {
if { [build_executable ${testfile}.exp ${executable} \
"${testfile}.c ${testfile}.S" \
[list additional_flags=-DINLINED \
additional_flags=-DPTRBITS=$ptrbits]] == -1 } {
- return -1
+ return
}
# We need those symbols global to access them from the .S file.
set test "strip stub symbols"
set objcopy_program [gdb_find_objcopy]
@@ -66,11 +66,11 @@ if {$result != 0} {
pass $test
clean_restart $executable
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "func"
gdb_continue_to_breakpoint "func"
@@ -150,15 +150,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
# Check the END markers using 'maint info line-table'.
# EXPECTED_SYMTAB is the basename of the source file being checked.
# TEST_SPEC is a list of lists. Each inner list if a pair made of a
@@ -18,11 +18,11 @@ load_lib dwarf.exp
require dwarf2_support
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
clean_restart
gdb_test_no_output "maint set dwarf synchronous on"
@@ -178,15 +178,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" "${::testfile}" \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint bar
gdb_continue_to_breakpoint "continue to bar line 1" \
".*bar line 1\[^\r\n\]+"
@@ -161,15 +161,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" "${::testfile}" \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint bar
gdb_continue_to_breakpoint "continue to bar line 1" \
".*bar line 1\[^\r\n\]+"
@@ -97,15 +97,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Step into bar.
gdb_breakpoint "bar"
gdb_continue_to_breakpoint "bar"
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile .S
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_test "p a_string" " = \"hello world!\\\\n\""
gdb_test "ptype a_string" "type = const char \\\[14\\\]"
@@ -89,11 +89,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" $testfile \
"${asm_file} ${srcfile}" {}] } {
- return -1
+ return
}
# Check that no symtabs are expanded.
set test "no symtabs expanded"
if { [readnow] } {
@@ -61,18 +61,18 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" $testfile \
"${asm_file} ${srcfile}" {}] } {
- return -1
+ return
}
# Check that no symtabs are expanded.
set test "no symtabs expanded"
if { [readnow] } {
unsupported $test
- return -1
+ return
}
gdb_test_no_output "maint info symtabs" $test
# Expand dw2-symtab-includes.h symtab
gdb_test "maint expand-symtab dw2-symtab-includes.h"
@@ -41,11 +41,11 @@ lappend lopts additional_flags=-nostdlib
if { [prepare_for_testing_full "failed to prepare" \
[list $testfile $lopts \
$srcfile $opts \
$srcfile2 $opts2]] } {
- return -1
+ return
}
gdb_test_no_output \
[join \
[list \
@@ -21,15 +21,15 @@ require dwarf2_support
# This test can only be run on x86-64 targets.
require is_x86_64_m64_target
if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie}]} {
- return -1
+ return
}
if {![runto "stop_frame"]} {
- return -1
+ return
}
# If test is compiled with clang, GDB would display absolute path.
# This command keeps output consistent across toolchains.
@@ -21,15 +21,15 @@ require dwarf2_support
set additional_flags [gdb_target_symbol_prefix_flags_asm]
if { [prepare_for_testing "failed to prepare" "dw2-unresolved" \
{dw2-unresolved-main.c dw2-unresolved.S} \
[list nodebug $additional_flags]] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# This testcase tests LOC_UNRESOLVED works right.
gdb_breakpoint "*extern_block_start"
@@ -91,15 +91,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" $testfile \
"${asm_file} ${srcfile} ${srcfile2}" {}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
foreach f {foo bar foo2} {
# Print the function type. Return type should be stub type, which is printed
# as void.
@@ -40,11 +40,11 @@ set asm_file [standard_output_file $srcfile2]
#
# For that, we ask GDB by debugging our test program. Any program
# would do, but since we already have one specifically for this
# testcase, might as well use that.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
set int_size [get_sizeof "int" -1]
# Rebuild the test binary with the single field within the structure
# renamed to FIELD_NAME, then test that we can access the field
@@ -23,11 +23,11 @@ load_lib dwarf.exp
require dwarf2_support
standard_testfile .c -dw.S
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
global srcfile
@@ -84,15 +84,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Print the type of global_var. This type information is entirely
# fictional, it only exists in the DWARF, but it contains lots of nice
# field names, all of which are stored in the .debug_str section.
@@ -120,22 +120,22 @@ set debug_str_section "${host_binfile}-debug-str"
set args "--dump-section .debug_str=${debug_str_section} $host_binfile"
set result [remote_exec host "[gdb_find_objcopy] $args"]
set status [lindex $result 0]
set output [lindex $result 1]
if { $status == 0 && ![string equal $output ""] } {
- return -1
+ return
}
# Now copy the executable, and remove the .debug_str section. This
# creates an executable with an invalid DWARF configuration. GDB
# should give an error when trying to read the debug information from
# this executable.
set binfile_no_debug_str "${host_binfile}-no-debug-str"
set args "--remove-section .debug_str $host_binfile ${binfile_no_debug_str}"
if {[run_on_host "objcopy" [gdb_find_objcopy] "$args"]} {
perror "failed to run objcopy"
- return -1
+ return
}
# Restart GDB, but don't load an executable. When we do load the
# executable we're going to get an error, which we check for below.
clean_restart
@@ -19,11 +19,11 @@ require dwarf2_support
standard_testfile .S main.c
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {nodebug}]} {
- return -1
+ return
}
proc test { } {
# FAIL was: = (int *) 0x0
# Such DIE record can be produced using: gcc -fdata-sections -Wl,-gc-sections
@@ -62,13 +62,13 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$srcfile:27" message
@@ -86,15 +86,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# At one point this would trigger a divide by zero inside GDB. Now we
# just get an error message.
gdb_test "print get_bar ()" "could not determine alignment of type"
@@ -52,15 +52,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "func_demangled_test"
gdb_continue_to_breakpoint "func_demangled_test"
@@ -19,11 +19,11 @@ require dwarf2_support
standard_testfile .S
set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS --readnow"
clean_restart $executable
@@ -24,18 +24,18 @@ include_file dw4-sig-types.h
# we let that be the test of whether the target supports it.
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list $srcfile $srcfile2] \
{debug c++ additional_flags=-gdwarf-4 additional_flags=-fdebug-types-section}] } {
- return -1
+ return
}
# Stress test gdb's handling of cached comp units, disable the cache.
gdb_test_no_output "maint set dwarf max-cache-age 0"
if {![runto_main]} {
- return -1
+ return
}
# Bring symtab for myset into gdb.
gdb_test "p myset" ".*"
@@ -22,15 +22,15 @@ standard_testfile .cc
# we let that be the test of whether the target supports it.
if { [prepare_for_testing "failed to prepare" "${testfile}" \
$srcfile {debug c++ additional_flags=-gdwarf-4 \
additional_flags=-fdebug-types-section}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "ptype X" "type = struct X {.*"
gdb_test "ptype Y" "type = struct Y {.*"
gdb_test "ptype Z" "type = struct Z {.*"
@@ -23,15 +23,15 @@ standard_testfile .cc
# Since we pass an explicit -gdwarf-5 to the compiler,
# we let that be the test of whether the target supports it.
if { [prepare_for_testing "failed to prepare" "${testfile}" \
$srcfile {debug c++ dwarf5 additional_flags=-O0}] } {
- 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 .*"
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
- return -1
+ return
}
if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} {
unsupported "testsuite run does not produce dwp files"
- return 0
+ return
}
# Note: the procedure gdb_gnu_strip_debug will produce an executable called
# ${binfile}, which is just like the executable ($binfile) but without
# the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
@@ -30,11 +30,11 @@ if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} {
# gdb.base/ subdirectory.
if {[gdb_gnu_strip_debug $binfile$EXEEXT]} {
# check that you have a recent version of strip and objcopy installed
unsupported "cannot produce separate debug info files"
- return -1
+ return
}
clean_restart "$testfile"
gdb_test "ptype main" {type = int \(int, char \*\*\)}
@@ -16,33 +16,33 @@
standard_testfile
remote_file host delete [standard_output_file ${testfile}.dwp]
if {[remote_file host exists [standard_output_file ${testfile}.dwp]]} {
unsupported "dwp file cannot be deleted"
- return 0
+ return
}
if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
- return -1
+ return
}
if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} {
unsupported "testsuite run does not produce dwp files"
- return 0
+ return
}
set thelink "${testfile}-thelink"
remote_file host delete [standard_output_file ${thelink}]
remote_file host delete [standard_output_file ${thelink}.dwp]
# file link is only Tcl 8.4+.
remote_exec host "ln -sf ${testfile} [standard_output_file $thelink]"
if {![remote_file host exists [standard_output_file $thelink]]} {
unsupported "host does not support symbolic links (binary symlink is missing)"
- return 0
+ return
}
if {[remote_file host exists [standard_output_file $thelink.dwp]]} {
unsupported "host does not support symbolic links (we tried to delete a file and it is still there)"
- return 0
+ return
}
clean_restart "$testfile"
set main_type_re [string_to_regexp "type = int (int, char **)"]
@@ -55,15 +55,15 @@ gdb_test "ptype main" $main_type_re "binary symlink, dwp default"
gdb_exit
remote_exec host "mv -f [standard_output_file ${testfile}.dwp] [standard_output_file ${thelink}.dwp]"
if {[remote_file host exists [standard_output_file ${testfile}.dwp]]} {
unsupported "host does not support symbolic links (binary symlink exists)"
- return 0
+ return
}
if {![remote_file host exists [standard_output_file ${thelink}.dwp]]} {
unsupported "host does not support symbolic links (dwp symlink is missing)"
- return 0
+ return
}
clean_restart "$testfile"
gdb_test "ptype main" \
@@ -124,10 +124,10 @@ remote_exec host "ln -sf ${dwp_bin_dir}/${dwp_real_binary} ${dwp_symlink_dir}/${
remote_exec host "ln -sf ${dwp_dwp_dir}/${dwp_real_dwp} ${dwp_symlink_dir}/${dwp_symlink_dwp}"
clean_restart "${dwp_symlink_dir}/${dwp_symlink_binary}"
if {![runto_main]} {
- return -1
+ return
}
gdb_test {print argv[0]} "/${dwp_symlink_binary}\"" \
"separate executable/dwp symlinks"
@@ -40,11 +40,11 @@ if {[prepare_for_testing_full "failed to prepare" \
[list \
$testfile {debug} \
$srcfile {nodebug} \
$asm_file {nodebug} \
$srcfile3 {debug}]]} {
- return -1
+ return
}
set linenr [gdb_get_line_number "return 0" $srcfile3]
for {set i 0} {$i < 100} {incr i} {
@@ -54,11 +54,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" $testfile \
[list $asm_file $srcfile] {nodebug}] } {
- return -1
+ return
}
set cmd "p the_int"
set re \
[string_to_regexp \
@@ -79,14 +79,14 @@ Dwarf::assemble $asm_file {
}
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p other_int" " = 99"
gdb_test "p the_int" " = 23"
@@ -44,11 +44,11 @@ Dwarf::assemble $asm_file {
# We can't use prepare_for_testing here because we need to check the
# 'file' command's output.
if {[build_executable $testfile.exp $testfile \
[list $srcfile $asm_file] {nodebug quiet}]} {
- return -1
+ return
}
clean_restart
gdb_test "file -readnow $binfile" \
"could not find supplementary DWARF file" \
@@ -41,11 +41,11 @@ standard_testfile .c -dw.S
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/attributes.h
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $flags] } {
- return -1
+ return
}
with_shared_gdb {
set func_info_vars [get_func_info main $flags]
@@ -124,15 +124,15 @@ set flags {}
lappend flags {nodebug}
lappend_include_file flags $srcdir/lib/attributes.h
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list $srcfile $asm_file] $flags] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "marker_label"
gdb_continue_to_breakpoint "stop at marker_label"
gdb_test "ptype dyn_object" "type = integer, allocatable \\(:\\)"
@@ -86,11 +86,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
gdb_test_no_output "set language ada"
gdb_test "print value" \
[string_to_regexp " = (disc => 3, nums => (7, 11, 13))"]
@@ -25,11 +25,11 @@ standard_testfile .c -dw.S
# For that, we ask GDB by debugging our dynarr-ptr.c program.
# Any program would do, but since we already have dynarr-ptr.c
# specifically for this testcase, might as well use that.
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
@@ -119,15 +119,15 @@ Dwarf::assemble $asm_file {
# program using our debug info instead of the info generated by
# the compiler.
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set language ada"
# foo.three_ptr.all
@@ -70,11 +70,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# Expand cu1. This will enqueue cu2.
set cu1_expanded 0
gdb_test_multiple "ptype foo" "" {
@@ -22,11 +22,11 @@ require dwarf2_support
standard_testfile main.c .cc
if { [prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug c++}] } {
- return -1
+ return
}
require {string equal [have_index $binfile] ""}
set lines [gdb_get_lines "maint print objfiles"]
@@ -102,11 +102,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "print sizeof(enum E)" " = 4"
gdb_test "ptype enum EU" \
@@ -108,18 +108,18 @@ Dwarf::assemble $asm_file {
# ASM_FILE we split out the debug information into the dwo file.
set object_file [standard_output_file ${testfile}.o]
if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
[list $asm_file {nodebug split-dwo} ${object_file}] \
[list $srcfile {nodebug}]] } {
- return -1
+ return
}
# Now we can start GDB.
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
# Print the type of global_var. This type information is entirely
# fictional, it only exists in the DWARF. If we don't have the DWARF
# information then there's no way we can print this.
@@ -30,17 +30,17 @@ set obj [standard_output_file "${testfile}.o"]
set dwo [standard_output_file "${testfile}.dwo"]
if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
[list $srcfile \
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
$obj]]} {
- return -1
+ return
}
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
# Do a few basic things to verify we're finding the DWO debug info.
gdb_test "ptype main" "type = int \\(\\)"
@@ -36,17 +36,17 @@ set dwo [standard_output_file "${testfile}.dwo"]
if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
{nodebug pie} \
[list $srcfile \
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
$obj]]} {
- return -1
+ return
}
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
# Verify gdb can find argc.
gdb_test "p argc" " = 1"
@@ -30,17 +30,17 @@ set obj [standard_output_file "${testfile}.o"]
set dwo [standard_output_file "${testfile}.dwo"]
if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
[list $srcfile \
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
$obj]]} {
- return -1
+ return
}
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
# Verify gdb can find argc.
gdb_test "p argc" " = 1"
@@ -24,17 +24,17 @@ include_file fission-mix.h
set objfile [standard_output_file ${testfile}.o]
set objfile2 [standard_output_file ${testfile}2.o]
# Compile fission-mix.c without Fission and fission-mix-2.c with Fission.
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} $objfile object {debug}] != "" } {
- return -1
+ return
}
if { [gdb_compile ${srcdir}/${subdir}/${srcfile2} $objfile2 object {debug additional_flags=-gsplit-dwarf}] != "" } {
- return -1
+ return
}
if {[gdb_compile "$objfile $objfile2" $binfile executable {debug}] != "" } {
- return -1
+ return
}
clean_restart $::testfile
gdb_test "break -q main" "Breakpoint .*"
@@ -198,17 +198,17 @@ set obj1 [standard_output_file "${testfile}-1-dw.o"]
set obj2 [standard_output_file "${testfile}-2-dw.o"]
if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
[list $asm_file_1 [list nodebug split-dwo] $obj1] \
[list $asm_file_2 [list nodebug split-dwo] $obj2] \
[list $srcfile [list nodebug]]]} {
- return -1
+ return
}
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
# Do a few basic things to verify we're finding the DWO debug info.
gdb_test "ptype main" "type = int \\(\\)"
@@ -105,18 +105,18 @@ Dwarf::assemble $asm_file {
# ASM_FILE we split out the debug information into the dwo file.
set object_file [standard_output_file ${testfile}.o]
if { [build_executable_and_dwo_files "${testfile}.exp" ${testfile} {nodebug} \
[list $asm_file {nodebug split-dwo} ${object_file}] \
[list $srcfile {nodebug}]] } {
- return -1
+ return
}
# Now we can start GDB.
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
# Print the type of global_var. This type information is entirely
# fictional, it only exists in the DWARF. If we don't have the DWARF
# information then there's no way we can print this.
@@ -38,11 +38,11 @@ set dwo_options $options
lappend dwo_options split-dwo
lappend dwo_options additional_flags=-DDWO=\"$dwo\"
if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
[list $srcfile $dwo_options $obj]]} {
- return -1
+ return
}
# Load FILENAME, perform some basic tests to confirm that the debug
# information has been found, then unload FILENAME.
proc run_test { filename } {
@@ -145,11 +145,11 @@ Dwarf::assemble $asm_file {
set object_file [standard_output_file ${testfile}.o]
if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
[list $asm_file {nodebug split-dwo} ${object_file}] \
[list $srcfile {nodebug}]] } {
- return -1
+ return
}
proc run_test { testfile } {
clean_restart ${testfile}
@@ -21,11 +21,11 @@ require dwarf2_support
standard_testfile main.c -dw.S
# We need to know the endianess in order
# to write some of the debugging info we'd like to generate.
if {[prepare_for_testing "failed to prepare for endianness test" ${testfile} ${srcfile}]} {
- return -1
+ return
}
set endianness [get_endianness]
set high "0x123456789abcdef0"
@@ -82,11 +82,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "p/x xxx" " = 0x123456789abcdef00fedcba987654321"
gdb_test "p xxx" "= 24197857203266734864629346612071973665"
gdb_test "p/x yyy" " = 0xfedcba987654321"
@@ -25,11 +25,11 @@ standard_testfile .c -dw.S
# For that, we ask GDB by debugging our dynarr-ptr.c program.
# Any program would do, but since we already have dynarr-ptr.c
# specifically for this testcase, might as well use that.
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
@@ -136,15 +136,15 @@ Dwarf::assemble $asm_file {
# program using our debug info instead of the info generated by
# the compiler.
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set language fortran"
gdb_test "info functions test_1_func" \
@@ -73,11 +73,11 @@ Dwarf::assemble $asm_file {
}
}
if {[build_executable "failed to build executable" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
set eol "\r\n"
set ws "\[ \t\]"
@@ -69,11 +69,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
require {string equal [have_index $binfile] ""}
set re_ws "\[ \t\]"
@@ -37,22 +37,22 @@ with_test_prefix non-symlink {
}
# Regenerate exec without index.
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list ${srcfile}]] } {
- return -1
+ return
}
set symlink [file dirname $binfile]/symlink
if { ![file exists $symlink] } {
file link -symbolic $symlink $binfile
}
if { [ensure_gdb_index $symlink] == -1 } {
fail "Unable to call gdb-add-index with a symlink to a symfile"
- return -1
+ return
}
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
@@ -20,16 +20,16 @@ require dwarf2_support
standard_testfile main.c
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list ${srcfile}]] } {
- return -1
+ return
}
if { [ensure_gdb_index $binfile] == -1 } {
untested "error adding gdb index"
- return -1
+ return
}
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
@@ -22,11 +22,11 @@ lappend opts debug
lappend opts c++
lappend opts additional_flags=-std=c++11
if {[prepare_for_testing "failed to prepare" "${testfile}" \
[list ${srcfile}] $opts]} {
- return -1
+ return
}
# The bug was that gdb would crash when saving.
set output_dir [host_standard_output_file ""]
set cmd "save gdb-index"
@@ -17,11 +17,11 @@ load_lib dwarf.exp
standard_testfile main.c
if {[prepare_for_testing "failed to prepare" "${testfile}" \
[list ${srcfile}] {nodebug}]} {
- return -1
+ return
}
set have_index [have_index $binfile]
set have_index_re \
[list \
@@ -33,19 +33,19 @@ set home $::env(HOME)
# Check that FULL_DIR is within the $HOME directory. If it's not, then
# that's fine, but we can't test tilde expansion in this case.
if { [string compare -length [string length $home] $full_dir $home] != 0 } {
unsupported "test not run within home directory"
- return -1
+ return
}
# Convert the $HOME prefix in to ~.
set dir "~[string range $full_dir [string length $home] end]"
# Build the test executable.
if { [prepare_for_testing "failed to prepare" "${testfile}" ${srcfile}] } {
- return -1
+ return
}
# Start GDB and load in the executable.
clean_restart ${::testfile}
@@ -71,16 +71,16 @@ gdb_test_multiple "maint print objfile $binfile" "check we can generate an index
}
}
if { $has_index } {
unsupported "already have an index"
- return -1
+ return
}
if { !$can_dump_index } {
unsupported "lacks debug information needed to dump index"
- return -1
+ return
}
# Generate an index file.
gdb_test_no_output "save gdb-index $dir" \
"save gdb-index to tilde based directory"
@@ -23,16 +23,16 @@ set flags {}
lappend flags {additional_flags=-fdebug-types-section}
lappend flags {dwarf5}
if { [prepare_for_testing "failed to prepare" ${testfile} \
$srcfile $flags] } {
- return -1
+ return
}
if { [ensure_gdb_index $binfile] != 1 } {
untested "error adding gdb index"
- return -1
+ return
}
clean_restart ${::testfile}
# Verify that .gdb_index section is not ignored.
@@ -23,11 +23,11 @@ require !readnow
standard_testfile main.c
if { [prepare_for_testing "failed to prepare" "${testfile}" \
[list ${srcfile}]] } {
- return -1
+ return
}
# Add a .gdb_index section to PROGRAM.
# PROGRAM is assumed to be the output of standard_output_file.
# Returns the path of the program or "" if there is a failure.
@@ -139,14 +139,14 @@ gdb_test "mt print objfiles ${testfile}" \
# There is gdb_touch_execfile, but it doesn't handle remote hosts.
# Is touch portable enough?
# First make sure enough time has passed, file mtime resolution is seconds.
gdb_test_no_output "shell sleep 1"
if {[run_on_host "touch binary" touch $host_binfile_with_index]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "mt print objfiles ${testfile}" \
"(gdb_index|debug_names).*" \
"index used after symbol reloading"
@@ -75,14 +75,14 @@ Dwarf::assemble $asm_file {
}
}
}
if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}]} {
- return -1
+ return
}
# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p p->f" " = <optimized out>"
@@ -33,18 +33,18 @@ if {[info exists COMPILE]} {
set srcfile ${csrcfile}
lappend opts debug optimize=-O2
}
if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} {
- return -1
+ return
}
# Additional test to verify the referenced CU is not aged out.
gdb_test_no_output "maintenance set dwarf max-cache-age 0"
if {![runto_main]} {
- return -1
+ return
}
# Test various pointer depths in bar.
proc implptr_test_bar {} {
global csrcfile
@@ -83,14 +83,14 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "print *c" " = 114 'r'"
gdb_test "print d\[-2\]" " = 114 'r'"
@@ -101,15 +101,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Determine byte order.
set endian [get_endianness]
@@ -35,11 +35,11 @@ set asm_file [standard_output_file ${srcfile2}]
#
# For that, we ask GDB by debugging our implref-array program.
# Any program would do, but since we already have implref-array
# specifically for this testcase, might as well use that.
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set array_length [get_valueof "/u" "sizeof(array) / sizeof(array\[0\])" -1]
# Create the DWARF. We need a regular variable which represents the array, and
@@ -112,16 +112,16 @@ Dwarf::assemble ${asm_file} {
}
}
}
if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
- return -1
+ return
}
# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
# This matches e.g. '(int (&)[5])'
set ref_type [format {\(int \(&\)\[%d\]\)} ${array_length}]
@@ -35,11 +35,11 @@ set asm_file [standard_output_file ${srcfile2}]
#
# For that, we ask GDB by debugging our implref-const program.
# Any program would do, but since we already have implref-const
# specifically for this testcase, might as well use that.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
# Create the DWARF. We need a regular variable and a reference to it that'll
# be marked with DW_OP_GNU_implicit_pointer.
Dwarf::assemble ${asm_file} {
@@ -91,16 +91,16 @@ Dwarf::assemble ${asm_file} {
}
}
}
if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
- return -1
+ return
}
# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
# Doing 'print ref' should show us e.g. '(int &) <synthetic pointer>: 42'.
gdb_test "print ref" " = \\(int &\\) <synthetic pointer>: \\\d+"
@@ -35,11 +35,11 @@ set asm_file [standard_output_file ${srcfile2}]
#
# For that, we ask GDB by debugging our implref-global program.
# Any program would do, but since we already have implref-global
# specifically for this testcase, might as well use that.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
# Create the DWARF. We need a regular variable and a reference to it that'll
# be marked with DW_OP_GNU_implicit_pointer. The variable must be global so
# that its name is an exported symbol that we can reference from the DWARF
@@ -91,16 +91,16 @@ Dwarf::assemble ${asm_file} {
}
}
}
if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
- return -1
+ return
}
# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
# Address of the referenced value.
set address [get_hexadecimal_valueof "&global_var" ""]
@@ -35,11 +35,11 @@ set asm_file [standard_output_file ${srcfile2}]
#
# For that, we ask GDB by debugging our implref-struct program.
# Any program would do, but since we already have implref-struct
# specifically for this testcase, might as well use that.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}]} {
- return -1
+ return
}
# Create the DWARF. We need a regular variable for the struct and a reference
# to it that'll be marked with DW_OP_GNU_implicit_pointer. The variable must be
# global so that its name is an exported symbol that can we can reference from
@@ -128,16 +128,16 @@ Dwarf::assemble ${asm_file} {
}
}
}
if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
- return -1
+ return
}
# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
# Returns the struct members, e.g. '{a = 0, b = 1, c = 2}'.
proc get_members {var} {
set members [get_valueof "" ${var} ""]
@@ -27,11 +27,11 @@ set executable ${testfile}
set asm_file [standard_output_file ${srcfile2}]
# We need to know the size of integer type in order
# to write some of the debugging info we'd like to generate.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
# Create the DWARF.
Dwarf::assemble $asm_file {
declare_labels cu_label main_label int_label
@@ -79,9 +79,9 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "p aaa" "= 1"
@@ -112,11 +112,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file $srcfile3] $build_options] } {
- return -1
+ return
}
gdb_reinitialize_dir /tmp
# Compilation on remote host downloads the source files to remote host, but
@@ -10,11 +10,11 @@ set executable ${testfile}
set asm_file [standard_output_file ${srcfile2}]
# We need to know the size of integer and address types in order
# to write some of the debugging info we'd like to generate.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
# Create the DWARF.
Dwarf::assemble $asm_file {
declare_labels cu_label cu2_label int_label int2_label
@@ -132,11 +132,11 @@ Dwarf::assemble $asm_file {
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# If Python testing is enabled then try printing the global and static
# blocks for the current frame, which is in function FUNC.
proc test_python_block_printing { func } {
@@ -151,11 +151,11 @@ proc test_python_block_printing { func } {
[string_to_regexp "<gdb.Block <anonymous> {$func}>"] \
"print global block in $func"
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "ptype inty" "type = int" "ptype in main"
test_python_block_printing main
@@ -24,11 +24,11 @@ set executable ${testfile}
set asm_file [standard_output_file ${srcfile2}]
# We need to know the size of integer types in order to write some of the
# debugging info we'd like to generate.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
# Create the DWARF.
Dwarf::assemble $asm_file {
declare_labels cu_label main_label int_label
@@ -67,16 +67,16 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if { [ensure_gdb_index $binfile] == -1 } {
untested "error adding gdb index"
- return -1
+ return
}
clean_restart ${::testfile}
runto main
@@ -36,11 +36,11 @@ set executable ${testfile}
set asm_file [standard_output_file ${srcfile2}]
# We need to know the size of integer and address types in order
# to write some of the debugging info we'd like to generate.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}]} {
- return -1
+ return
}
# Create the DWARF.
Dwarf::assemble $asm_file {
declare_labels cu_label main_label doit_label int_label
@@ -123,11 +123,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language c++"
gdb_test "l imported_unit.c:1" \
@@ -63,15 +63,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set lines [gdb_get_lines "info locals"]
# Make sure "info locals" shows optimized out variables.
@@ -15,11 +15,11 @@
standard_testfile .c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug nowarnings}]} {
- return -1
+ return
}
set cmd "ptype main"
set re \
@@ -200,11 +200,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" $testfile \
"${asm_file} ${srcfile}" {}]} {
- return -1
+ return
}
# All we need to do is set a breakpoint, which causes the DWARF
# info to be read, to demonstrate the problem.
@@ -24,11 +24,11 @@ standard_testfile .c .S
set executable ${testfile}
set asm_file [standard_output_file ${srcfile2}]
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
# Create the DWARF.
Dwarf::assemble ${asm_file} {
cu {} {
@@ -194,15 +194,15 @@ Dwarf::assemble ${asm_file} {
}
}
if {[prepare_for_testing "failed to prepare" ${executable} \
[list ${asm_file} ${srcfile}] {}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "print v_i16_m1" "= -1"
gdb_test "print v_u16_1" "= true"
gdb_test "print v_u32_m2" "= -2"
@@ -16,11 +16,11 @@
# Check that local variables do not occur in the cooked index.
standard_testfile .f90
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {debug f90}] } {
- return -1
+ return
}
# Regression test for PR32276.
gdb_test_lines "maint print objfiles" "local var not in index" "" -re-not "local_var"
@@ -89,11 +89,11 @@ if {[gdb_compile_shlib $libsrc $lib_so \
# Value returned is $1 = (B *) $hex <g_>
# Note that this compilation is used for all GDB sessions.
set exec_options [list debug shlib=$lib_so]
if {[prepare_for_testing "failed to prepare" ${testfile} \
${::srcfile} $exec_options]} {
- return -1
+ return
}
### First GDB session.
with_test_prefix "first session" {
@@ -23,11 +23,11 @@ require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug main.c debug $srcfile nodebug]]} {
- return -1
+ return
}
gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
gdb_test_no_output "set listsize 1"
@@ -53,22 +53,22 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
set have_index [exec_has_index_section $binfile]
# Test that the "start" command stops in the "mymain" function.
# This should happen because we used DW_AT_main_subprogram to tell gdb
# that this was the real "main".
if {[gdb_start_cmd] < 0} {
fail "could not start ${testfile}"
- return -1
+ return
}
gdb_test_multiple "" "stopped at mymain" {
-re -wrap "Temporary breakpoint .* mymain.*" {
pass $gdb_test_name
@@ -46,11 +46,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "info line 1" \
[string cat \
"malformed line number program header," \
@@ -57,11 +57,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
# The largest known Fermat prime.
gdb_test "print/d DEI_65537" " = 65537"
gdb_test "print (enum mega_enum) 65537" " = DEI_65537"
@@ -21,11 +21,11 @@ require allow_cplus_tests
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
# Be sure to set cp-abi before ${binfile} gets loaded
@@ -77,11 +77,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug c++}] } {
- return -1
+ return
}
gdb_test_no_output "set language c++"
gdb_test "ptype the_typedef" \
"type = int \\(S::\\*\\)\\(S \\* const, float\\)"
@@ -78,11 +78,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# Place a breakpoint on FUNC. Check that the address at which the
# breakpoint is placed lies within FUNC which is starts at address
# START, and address END is the first address after FUNC.
@@ -47,9 +47,9 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "ptype foo" "type = <unknown type .*>"
@@ -152,15 +152,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] $nodebug_flags] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "ptype var1" [multi_line \
"type = struct template_var1<int, float> \\\[with <unnamed0> = int, second = float\\\] {" \
" <unnamed0> me;" \
@@ -95,15 +95,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Use 'ptype' on two variables that are using DW_TAG_base_type types
# with missing DW_AT_name attributes.
gdb_test "ptype var_ptr" "type = <invalid type code $decimal> \\*" \
@@ -139,11 +139,11 @@ Dwarf::assemble $asm_file {
}
# Build the test executable.
if {[build_executable $testfile.exp $testfile [list $asm_file $srcfile] {}] \
== -1} {
- return -1
+ return
}
# We force the DIEs above to be read in via "-readnow".
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -readnow"
@@ -52,11 +52,11 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
# The bug was a crash, so just do anything here to verify gdb is still
# alive.
gdb_test "print 23" " = 23"
@@ -30,11 +30,11 @@ set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
gnu_debugaltlink "file-not-here" "0000000000000000000000000000000000000000"
}
if { [build_executable $testfile.exp $testfile [list $srcfile $asm_file]] } {
- return -1
+ return
}
clean_restart
gdb_test_no_output "maint set dwarf synchronous on"
@@ -196,15 +196,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Determine byte order.
set endian [get_endianness]
@@ -33,11 +33,11 @@ Dwarf::assemble $asm_file {
}
}
if { [build_executable ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS --readnow"
clean_restart $testfile
@@ -21,11 +21,11 @@ set opts {}
lappend opts debug
lappend opts c++
lappend opts additional_flags=-std=c++11
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
- return -1
+ return
}
set cmd "info types -q std::nullptr_t"
set re \
@@ -182,14 +182,14 @@ Dwarf::assemble $asm_file {
}
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p variable_a" " = {xyz = 97 'a'}"
gdb_test "p variable_b" " = {xyz = 98 'b'}"
@@ -86,17 +86,17 @@ Dwarf::assemble $asm_file {
}
}
if {[build_executable ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
set cmd "print i64_noptr"
if { [is_64_target] } {
gdb_test $cmd \
@@ -25,15 +25,15 @@ set csrcfile ${testfile}.c
set opts {}
lappend opts debug
lappend opts nopie
if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} {
- return -1
+ return
}
if {![runto foo]} {
- return -1
+ return
}
# Move back up to main.
gdb_test "up" "#1 $hex in main.*" "move up a frame"
@@ -21,15 +21,15 @@ require dwarf2_support is_x86_like_target
standard_testfile .S
set csrcfile ${testfile}.c
if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Function f1 tests a particular gdb bug involving DW_OP_piece.
proc pieces_test_f1 {} {
global csrcfile
@@ -16,21 +16,21 @@
# Test DW_OP_call_frame_cfa.
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return 0
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# This test also requires DWARF.
get_debug_format
if {![test_debug_format "DWARF \[0-9\]"]} {
- return -1
+ return
}
gdb_test "break force_unwind" "Breakpoint .*" "set breakpoint for pr10770"
gdb_test "cont" "Breakpoint ., force_unwind .*"
# If we have the bug, this will hang.
@@ -25,11 +25,11 @@ if {[is_ilp32_target]} {
set ptrbits 64
}
if { [gdb_compile [file join $srcdir $subdir $srcfile] \
$binfile object [list additional_flags=-DPTRBITS=$ptrbits]] != "" } {
- return -1
+ return
}
clean_restart $testfile
# Test delayed physname computations
@@ -25,11 +25,11 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
standard_testfile .S
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
${additional_flags}] == -1 } {
- return -1
+ return
}
gdb_test "break -q main" "Breakpoint.*at.*"
# If we get this far gdb didn't crash.
@@ -109,11 +109,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test_no_output "set language rust"
gdb_test "print constant_variable" [string_to_regexp "One(65)"]
@@ -51,11 +51,11 @@ Dwarf::assemble $asm_file {
}
}
}
if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}]} {
- return -1
+ return
}
set index [have_index $binfile]
require {string eq $index ""}
@@ -119,11 +119,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "p s1" " = {a = 1, b = 0}"
gdb_test "p s2" \
"access outside bounds of object referenced via synthetic pointer"
@@ -46,11 +46,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "print var" " = <optimized out>"
# Expand all symbol tables.
@@ -47,11 +47,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# gdb/18021: The test below would cause GDB to crash.
# Depending on whether the target maps memory at address 0x1000,
# on success this may either print something like
@@ -64,9 +64,9 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
gdb_breakpoint "the_type::method" message
@@ -74,11 +74,11 @@ Dwarf::assemble $asm_file {
# We're using an object instead of executable here to keep cc-with-tweaks.sh
# from modifying it. It also means we can set the build-id, rather than
# having to extract it.
if { [gdb_compile $asm_file $binfile.dwz object {nodebug}] != "" } {
- return -1
+ return
}
set host_dwz_file [gdb_remote_download host $binfile.dwz]
# Make some DWARF for the executable.
@@ -97,11 +97,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
set struct_s_i_re \
[multi_line \
"type = struct s {" \
@@ -112,11 +112,11 @@ set struct_s_j_re \
"type = struct s {" \
" int j;" \
"}"]
if {![runto_main]} {
- return -1
+ return
}
gdb_test "ptype struct s" $struct_s_i_re \
"struct s with int i"
@@ -70,9 +70,9 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
gdb_test "print rangeval" " = TWO"
@@ -103,11 +103,11 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug c++}] } {
- return -1
+ return
}
gdb_test_no_output "set language pascal"
gdb_test "ptype TByteArray" \
@@ -98,19 +98,19 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
# The variable's location expression requires a frame,
# so an error should be reported.
gdb_test "print/d a" "No frame selected." "variable a can't be printed"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set var \$$regname = 2" "init reg to 2"
gdb_test "print/d a" " = 2" "a == 2"
@@ -120,15 +120,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set var \$$regname = 2" "init reg to 2"
gdb_test_no_output "set var exec_mask = 0" "init exec_mask to 0"
@@ -71,14 +71,14 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Just a sanity check to make sure GDB slurped the symbols correctly.
gdb_test "print apply<int>" " = {void \\(void\\)} $hex <apply<int>\\(\\)>"
@@ -24,11 +24,11 @@ require is_x86_64_m64_target
standard_testfile .S
if {[prepare_for_testing "failed to prepare" "${testfile}" ${testfile}.S \
nodebug]} {
- return -1
+ return
}
gdb_test "trace ${testfile}.c:3" "Tracepoint $decimal .*" \
"set tracepoint"
@@ -24,23 +24,23 @@ require dwarf2_support
if { [is_x86_like_target] } {
set sfile ${test}.S
} elseif { [is_x86_64_m64_target] } {
set sfile ${test}-amd64.S
} else {
- return 0
+ return
}
set opts {}
lappend opts nodebug
lappend opts nopie
if { [prepare_for_testing "failed to prepare" "${test}" ${sfile} $opts] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Initialize tests to be an empty array.
unset -nocomplain tests
array set tests {}
@@ -59,15 +59,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break func" "Breakpoint .*" \
"set breakpoint in func"
gdb_continue_to_breakpoint "continue to func"
@@ -52,15 +52,15 @@ Dwarf::assemble $asm_file {
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] debug]} {
- return -1
+ return
}
if {![runto main]} {
- return -1
+ return
}
gdb_test "set language rust" \
"Warning: the current language does not match this frame."
# Get the values into history so we can use it from Rust.
@@ -22,15 +22,15 @@ require dwarf2_support is_x86_like_target
standard_testfile .S
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile] [list {additional_flags=-nostdlib}]]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break valop.c:19" "Breakpoint 2.*" "set breakpoint for valop"
gdb_continue_to_breakpoint "continue to breakpoint for valop"
@@ -248,15 +248,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Determine byte order.
set endian [get_endianness]
@@ -200,15 +200,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] debug] } {
- return -1
+ return
}
if {![runto func]} {
- return -1
+ return
}
# Get the values into history so we can use it from Rust.
gdb_test "print (void *) buffer" "\\\$1 = .void .. $hex .buffer."
gdb_test "print (void *) buffer2" "\\\$2 = .void .. $hex .buffer2."
@@ -32,11 +32,11 @@ set asm_file [standard_output_file ${srcfile2}]
#
# For that, we ask GDB by debugging our varval program.
# Any program would do, but since we already have varval
# specifically for this testcase, might as well use that.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
set int_size [get_sizeof "int" -1]
# gdb always assumes references are implemented as pointers.
set addr_size [get_sizeof "void *" -1]
@@ -318,20 +318,20 @@ proc setup_exec { arg_bad } {
return -1
}
}
if { [setup_exec 0] == -1 } {
- return -1
+ return
}
with_test_prefix "pre-main" {
gdb_test "print varval3" "= \\{8\\}" ""
}
# DW_OP_GNU_variable_value implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
gdb_test "print varval" "= 8"
gdb_test "print varval2" "= 8"
gdb_test "print varval3" "= \\{8\\}"
@@ -351,16 +351,16 @@ gdb_test "print structval" \
gdb_test "print untypedval" \
"Type of DW_OP_GNU_variable_value DIE must be an integer or pointer\\."
if { [setup_exec 1] == -1 } {
- return -1
+ return
}
# DW_OP_GNU_variable_value implementation requires a valid frame.
if {![runto_main]} {
- return -1
+ return
}
gdb_test "print badval" "value has been optimized out"
gdb_test "print bad_die_val1" \
{DWARF Error: could not find unit containing offset 0xabcdef11 \[in module .*/varval\]}
gdb_test "print bad_die_val2" \
@@ -91,15 +91,15 @@ Dwarf::assemble $asm_file {
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Place a breakpoint in 'func' and continue to there.
gdb_breakpoint func
gdb_continue_to_breakpoint "func"
@@ -20,11 +20,11 @@ set test "watch-notconst"
# This test can only be run on x86 targets.
require dwarf2_support is_x86_like_target
if { [prepare_for_testing "failed to prepare" "${test}" \
{watch-notconst.c watch-notconst2.S} {nodebug}] } {
- return -1
+ return
}
if { ![runto f] } {
perror "Could not run to breakpoint `f'."
return