-# Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set NR_THREADS 4
-if $tracelevel then {
- strace $tracelevel
-}
-
-set testfile "interrupted-hand-call"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
return -1
}
continue
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if { ![runto_main] } {
fail "Can't run to main"
# Continuing now should exit the hand-call and pop the dummy frame.
-gdb_test "continue" "" "finish hand-call"
+gdb_test "continue" ".*" "finish hand-call"
gdb_test_multiple "maint print dummy-frames" "dummy frame popped" {
-re ".*stack=.*$gdb_prompt $" {
# Continue one last time, the program should exit normally.
-gdb_test "continue" "Program exited normally." \
- "continue to program exit"
+gdb_continue_to_end "" continue 1
return 0