A number of tests end with "return". However, this is unnecessary.
This patch removes all of these.
mi_expect_stop "exited-normally" "" "" "" "" "" "exit normally"
mi_gdb_exit
-return 0
test_command_line_attach_run
-
-return 0
gdb_assert { [array size bfd_error_count] >= 2 } "print all unique bfd errors"
gdb_exit
-return 0
}
set timeout $oldtimeout
-return
-
".*Contents of int_char_combo_t:\[ \r\n\]+13\[ \t\]+!\[ \r\n\]+" \
".\[0-9\]+ = \\{int1 = 13, ch1 = 33 '!'\\}"
}
-
-return
# Approx size: 4, 8, ...
test te
-
-return 0
gdb_test "continue" "$inferior_exited_re normally." \
"continue to program exit"
-
-return 0
gdb_test "call callexit()" \
"The program being debugged exited.*" \
"inferior function call terminated program"
-
-return 0
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
-return 0
gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0i\}" \
"print complex value in C"
}
-
-return 0
gdb_test "list" \
"func1 \\(\\);" \
"list size 3"
-
-return 0
gdb_test "do-printit" "here" "invoke do-printit"
gdb_exit
-return 0
set pass "two"
do_detach_tests
-
-return 0
# Restore the preserved old timeout value.
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
-
-return 0
test_ena_dis_br "enable"
gdb_exit
-return 0
set timeout $old_timeout
#remote_exec build "rm -f ${binfile}"
-return 0
+
"show paths works properly"
gdb_exit
-return 0
gdb_exit
-return 0
-
-
-
-
-
-
-
}
set timeout $oldtimeout
-return 0
clean_restart $binfile
do_exec_tests
-
-return 0
}
set timeout $oldtimeout
-return 0
gdb_assert { $saw_end_of_file && $saw_inferior_exit } $msg
}
}
-return 0
}
set timeout $oldtimeout
-return 0
gdb_test "" "0x00.*0x00" "repeat x command"
gdb_exit
-return 0
gdb_test_no_output "maint print psymbols"
gdb_exit
-return 0
# or main -> middle.
gdb_test "backtrace" "#0.*middle.*#\[12\].*main.*"
}
-return 0
gdb_test_no_output "kill inferior $i" "kill $i"
gdb_test "info inferior $i" "<null>.*" "did kill $i"
}
-
-return 0
gdb_test "watch \$pc" ".*" "set watchpoint"
gdb_test "step" "soft-watch.*" "step still in same line"
}
-
-return 0
}
# End of tests.
-
-return 0
"get signal TERM"
gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM"
gdb_continue_to_end "continue to sigall exit"
-
-return 0
"#0 handler .*#1 .signal handler called.*\#2 .*main.*" \
"backtrace for SIGUSR1"
}
-
-return 0
gdb_step_until ".*main .. at.*return 0;.*" "step out of solib call"
gdb_exit
-return 0
-
-
-
-
-
-
"foo2 in mdlib"
gdb_exit
-
-return 0
-
-
gdb_test "next 2" ".*place3.*" "next 2 (4)"
gdb_test "next 2" ".*place2.*" "next 2 (5)"
gdb_test "next 2" ".*place3.*" "next 2 (6)"
-
-return 0
gdb_test "next" \
".*RETURN \\(j\\);.*" \
"next over dummy 10"
-
-return 0
}
gdb_continue_to_end
-
-return 0
# Approx size: (4+4)+8=16, 32, ...
test { tf td } {2} {2}
}
-return 0
gdb_test "step" "nothing \\(\\) at.*"
}
remote_exec build "rm -f twice.c"
-return 0
pass "unwindonsignal, dummy frame removed"
}
}
-
-return 0
gdb_test "whatis x--" "type = int" "whatis value of x--"
gdb_exit
-return 0
"type = namespace \\\(anonymous namespace\\\)"
gdb_exit
-return 0
gdb_test "print ::shadow" "\\$\[0-9]\* = 0" "shadowed global variable"
gdb_exit
-return 0
gdb_test "print svar" " = true"
gdb_exit
-return 0
test_namespace
gdb_exit
-return 0
test_class A::B::inner
gdb_exit
-return 0
"Breakpoint $decimal at $hex: file .*$srcfile, line 10.*"
gdb_exit
-return 0
gdb_test "print *theB" "\\$\[0-9\]* = {<A> = {\[^}\]*}, static b = <optimized out>}" "PR gdb/574"
gdb_exit
-return 0
gdb_test "print x->y2 - x->y1" "warning: Type size unknown, assuming 1\. Try casting to a known type, or void \*\.\[^=\]*= 1"
gdb_exit
-return 0
-
-
"print nonvirtual method."
gdb_exit
-return 0
gdb_test "print (\$u xor_eq 0xaaaa) == (\$v ^= 0xaaaa)" "= true"
gdb_exit
-return 0
gdb_test "print *obj3" "\\$\[0-9\]* = {<n2::C2> = .*}"
gdb_exit
-return 0
gdb_test "p test" "= true"
gdb_exit
-return 0
gdb_test "print operator== (mem1, mem1)" " = true"
gdb_exit
-return 0
gdb_test "print o" " = {<interface> = {.*_vptr.interface = $hex <vtable for Obj.*>}, <No data fields>}"
gdb_exit
-return 0
-
register_tests
mi_gdb_exit
-return 0
do_test $i
mi_gdb_exit
-return 0
} "list children of class C"
mi_gdb_exit
-return 0
mi_gdb_exit
set GDBFLAGS $saved_gdbflags
-
-return 0
"-interpreter-exec console \"\""
mi_gdb_exit
-return 0
}
test_command_param_changed
-
-return 0
"finished step over hello"
mi_gdb_exit
-return 0
test_disassembly_opcode_format
mi_gdb_exit
-return 0
test_list_thread_groups
mi_gdb_exit
-return 0
test_file_list_exec_source_files
mi_gdb_exit
-return 0
"47show architecture"
mi_gdb_exit
-return 0
"-data-evaluate-expression $path"
mi_gdb_exit
-return 0
mi_gdb_test "set var *(unsigned int *) 0x${main_addr} = ${main_insn}" \
".*=memory-changed,thread-group=\"i${decimal}\".addr=\"0x0*${main_addr}\",len=\"0x4\",type=\"code\".*\\^done"
mi_gdb_exit
-return 0
mi_gdb_test "target record" \
".*=record-started,thread-group=\"i${decimal}\",method=\"full\".*\\^done" \
"target record"
-
-return 0
sparc_register_tests
mi_gdb_exit
-return 0
test_return_simple
mi_gdb_exit
-return 0
test_controlled_execution_reverse
mi_gdb_exit
-return 0
test_program_termination
mi_gdb_exit
-return 0
test_stepi_nexti
mi_gdb_exit
-return 0
mi_gdb_test "411-stack-list-frames" "411\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"}.*\\\]" "backtrace from inferior function at exception"
mi_gdb_exit
-
-return 0
test_until
mi_gdb_exit
-return 0
"delete var cb"
mi_gdb_exit
-return 0
"in-and-out-of-scope: in scope now, not changed"
mi_gdb_exit
-return 0
mi_walk_varobj_tree c++ $tree verify_everything
mi_gdb_exit
-return 0
"no type for invalid variable global_simple"
mi_gdb_exit
-return 0
"get children of vla"
mi_gdb_exit
-return 0
"600\\^done,value=\"<not associated>\"" "evaluate vla pointer set to null"
mi_gdb_exit
-return 0
mi_walk_varobj_tree c $tree verify_everything
mi_gdb_exit
-return 0
# Now run to the breakpoint. This should cross the exec, and stop at
# the breakpoint before the crash.
gdb_test "run" "${srcfile2}:${bp_location}.*set breakpoint here.*"
-
-return 0
set GDBFLAGS $saved_gdbflags
kill_wait_spawned_process $test_spawn_id
-return 0
}
corefunc threaded
-
-return 0
#gdb_test "thread 1" ".*" "set thread to 1, prepare to resume"
#
#gdb_continue_to_end "hand-call-in-threads"
-
-return 0
# Continue one last time, the program should exit normally.
gdb_continue_to_end "" continue 1
-
-return 0
set timeout [expr $oldtimeout + 120]
test_all_threads "slow with kill breakpoint" 1
set timeout $oldtimeout
-
-return 0
} else {
untested "thread var at break"
}
-
-return 0
# Continue one last time, the program should exit normally.
gdb_continue_to_end "" continue 1
-
-return 0
gdb_test "continue" \
".*set exit breakpoint here.*" \
"get past the thread specific breakpoint"
-
-return 0
# Done!
#
gdb_exit
-
-return 0
# Done!
#
gdb_exit
-
-return 0
}
test_actions_changed
-
-return 0
}
test_tfind_remote
-
-return 0
test_reconnect
test_pending_resolved
-
-return 0
gdb_exit
test_upload_tsv
-
-return 0