forked from Imagelibrary/binutils-gdb
Changes in v3: - Adjusted some testcases where the message "failed to compile" was not unique. Changes in v2: - Addressed comments from reviewers. - Fixed spurious whitespaces. - Changed compilation failure messages that included source/binary paths to ones that are short and deterministic. --- Another bit of cleanup to the testsuite. We have a number of tests that are not honoring the rule of not outputting their own name as a test name. I fixed up all the offenders i could find with the following regular expression: "(xfail|kfail|kpass|fail|pass|unsupported|untested) ([A-Za-z0-9]+|\\\$(.)*testfile(.)*)\.exp$" gdb/testsuite/ChangeLog: 2016-12-01 Luis Machado <lgustavo@codesourcery.com> Fix test names and standardize compilation error messages throughout the following files: * gdb.ada/start.exp * gdb.arch/alpha-step.exp * gdb.arch/e500-prologue.exp * gdb.arch/ftrace-insn-reloc.exp * gdb.arch/gdb1291.exp * gdb.arch/gdb1431.exp * gdb.arch/gdb1558.exp * gdb.arch/i386-dr3-watch.exp * gdb.arch/i386-sse-stack-align.exp * gdb.arch/ia64-breakpoint-shadow.exp * gdb.arch/pa-nullify.exp * gdb.arch/powerpc-aix-prologue.exp * gdb.arch/thumb-bx-pc.exp * gdb.base/annota1.exp * gdb.base/annota3.exp * gdb.base/arrayidx.exp * gdb.base/assign.exp * gdb.base/attach.exp * gdb.base/auxv.exp * gdb.base/bang.exp * gdb.base/bfp-test.exp * gdb.base/bigcore.exp * gdb.base/bitfields2.exp * gdb.base/break-fun-addr.exp * gdb.base/break-probes.exp * gdb.base/call-rt-st.exp * gdb.base/callexit.exp * gdb.base/catch-fork-kill.exp * gdb.base/charset.exp * gdb.base/checkpoint.exp * gdb.base/comprdebug.exp * gdb.base/constvars.exp * gdb.base/coredump-filter.exp * gdb.base/cursal.exp * gdb.base/cvexpr.exp * gdb.base/detach.exp * gdb.base/display.exp * gdb.base/dmsym.exp * gdb.base/dprintf-pending.exp * gdb.base/dso2dso.exp * gdb.base/dtrace-probe.exp * gdb.base/dump.exp * gdb.base/enum_cond.exp * gdb.base/exe-lock.exp * gdb.base/exec-invalid-sysroot.exp * gdb.base/execl-update-breakpoints.exp * gdb.base/exprs.exp * gdb.base/fileio.exp * gdb.base/find.exp * gdb.base/finish.exp * gdb.base/fixsection.exp * gdb.base/foll-vfork.exp * gdb.base/frame-args.exp * gdb.base/gcore.exp * gdb.base/gdb1250.exp * gdb.base/global-var-nested-by-dso.exp * gdb.base/gnu-ifunc.exp * gdb.base/hashline1.exp * gdb.base/hashline2.exp * gdb.base/hashline3.exp * gdb.base/hbreak-in-shr-unsupported.exp * gdb.base/huge.exp * gdb.base/infcall-input.exp * gdb.base/info-fun.exp * gdb.base/info-shared.exp * gdb.base/jit-simple.exp * gdb.base/jit-so.exp * gdb.base/jit.exp * gdb.base/jump.exp * gdb.base/label.exp * gdb.base/lineinc.exp * gdb.base/logical.exp * gdb.base/longjmp.exp * gdb.base/macscp.exp * gdb.base/miscexprs.exp * gdb.base/new-ui-echo.exp * gdb.base/new-ui-pending-input.exp * gdb.base/new-ui.exp * gdb.base/nodebug.exp * gdb.base/nofield.exp * gdb.base/offsets.exp * gdb.base/overlays.exp * gdb.base/pending.exp * gdb.base/pointers.exp * gdb.base/pr11022.exp * gdb.base/printcmds.exp * gdb.base/prologue.exp * gdb.base/ptr-typedef.exp * gdb.base/realname-expand.exp * gdb.base/relativedebug.exp * gdb.base/relocate.exp * gdb.base/remote.exp * gdb.base/reread.exp * gdb.base/return2.exp * gdb.base/savedregs.exp * gdb.base/sep.exp * gdb.base/sepdebug.exp * gdb.base/sepsymtab.exp * gdb.base/set-inferior-tty.exp * gdb.base/setshow.exp * gdb.base/shlib-call.exp * gdb.base/sigaltstack.exp * gdb.base/siginfo-addr.exp * gdb.base/signals.exp * gdb.base/signull.exp * gdb.base/sigrepeat.exp * gdb.base/so-impl-ld.exp * gdb.base/solib-display.exp * gdb.base/solib-overlap.exp * gdb.base/solib-search.exp * gdb.base/solib-symbol.exp * gdb.base/structs.exp * gdb.base/structs2.exp * gdb.base/symtab-search-order.exp * gdb.base/twice.exp * gdb.base/unload.exp * gdb.base/varargs.exp * gdb.base/watchpoint-solib.exp * gdb.base/watchpoint.exp * gdb.base/whatis.exp * gdb.base/wrong_frame_bt_full.exp * gdb.btrace/dlopen.exp * gdb.cell/ea-standalone.exp * gdb.cell/ea-test.exp * gdb.cp/dispcxx.exp * gdb.cp/gdb2384.exp * gdb.cp/method2.exp * gdb.cp/nextoverthrow.exp * gdb.cp/pr10728.exp * gdb.disasm/am33.exp * gdb.disasm/h8300s.exp * gdb.disasm/mn10300.exp * gdb.disasm/sh3.exp * gdb.dwarf2/dw2-dir-file-name.exp * gdb.fortran/complex.exp * gdb.fortran/library-module.exp * gdb.guile/scm-pretty-print.exp * gdb.guile/scm-symbol.exp * gdb.guile/scm-type.exp * gdb.guile/scm-value.exp * gdb.linespec/linespec.exp * gdb.mi/gdb701.exp * gdb.mi/gdb792.exp * gdb.mi/mi-breakpoint-changed.exp * gdb.mi/mi-dprintf-pending.exp * gdb.mi/mi-dprintf.exp * gdb.mi/mi-exit-code.exp * gdb.mi/mi-pending.exp * gdb.mi/mi-solib.exp * gdb.mi/new-ui-mi-sync.exp * gdb.mi/pr11022.exp * gdb.mi/user-selected-context-sync.exp * gdb.opt/solib-intra-step.exp * gdb.python/py-events.exp * gdb.python/py-finish-breakpoint.exp * gdb.python/py-mi.exp * gdb.python/py-prettyprint.exp * gdb.python/py-shared.exp * gdb.python/py-symbol.exp * gdb.python/py-template.exp * gdb.python/py-type.exp * gdb.python/py-value.exp * gdb.reverse/solib-precsave.exp * gdb.reverse/solib-reverse.exp * gdb.server/solib-list.exp * gdb.stabs/weird.exp * gdb.threads/reconnect-signal.exp * gdb.threads/stepi-random-signal.exp * gdb.trace/actions.exp * gdb.trace/ax.exp * gdb.trace/backtrace.exp * gdb.trace/change-loc.exp * gdb.trace/deltrace.exp * gdb.trace/ftrace-lock.exp * gdb.trace/ftrace.exp * gdb.trace/infotrace.exp * gdb.trace/mi-tracepoint-changed.exp * gdb.trace/packetlen.exp * gdb.trace/passcount.exp * gdb.trace/pending.exp * gdb.trace/range-stepping.exp * gdb.trace/report.exp * gdb.trace/stap-trace.exp * gdb.trace/tfind.exp * gdb.trace/trace-break.exp * gdb.trace/trace-condition.exp * gdb.trace/trace-enable-disable.exp * gdb.trace/trace-mt.exp * gdb.trace/tracecmd.exp * gdb.trace/tspeed.exp * gdb.trace/tsv.exp * lib/perftest.exp
376 lines
12 KiB
Plaintext
376 lines
12 KiB
Plaintext
# Copyright 2005-2016 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
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
if { [is_remote target] || ![isnative] } then {
|
|
continue
|
|
}
|
|
|
|
# Until "set follow-fork-mode" and "catch fork" are implemented on
|
|
# other targets...
|
|
#
|
|
if {![istarget "*-*-linux*"]} then {
|
|
continue
|
|
}
|
|
|
|
# Must name the source file explicitly, otherwise when driven by
|
|
# checkpoints-ns.exp, we'd try compiling checkpoints-ns.c, which
|
|
# doesn't exist.
|
|
standard_testfile checkpoint.c
|
|
|
|
set pi_txt [gdb_remote_download host ${srcdir}/${subdir}/pi.txt]
|
|
if {[is_remote host]} {
|
|
set copy1_txt copy1.txt
|
|
} else {
|
|
set copy1_txt [standard_output_file copy1.txt]
|
|
}
|
|
|
|
if {[prepare_for_testing ${testfile}.exp $testfile $srcfile \
|
|
[list debug "additional_flags=-DPI_TXT=\"$pi_txt\" -DCOPY1_TXT=\"$copy1_txt\""]]} {
|
|
untested "failed to compile"
|
|
return -1
|
|
}
|
|
|
|
global gdb_prompt
|
|
|
|
#
|
|
# This tests gdb checkpoint and restart.
|
|
#
|
|
|
|
runto_main
|
|
set break1_loc [gdb_get_line_number "breakpoint 1"]
|
|
set break2_loc [gdb_get_line_number "breakpoint 2"]
|
|
set break3_loc [gdb_get_line_number "breakpoint 3"]
|
|
set break4_loc [gdb_get_line_number "breakpoint 4"]
|
|
|
|
gdb_breakpoint $break1_loc
|
|
gdb_test "continue" "breakpoint 1.*" "break1 start"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 two"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 three"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 four"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 five"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 six"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 seven"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 eight"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 nine"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
gdb_test "continue 10" "breakpoint 1.*" "break1 ten"
|
|
|
|
gdb_test "checkpoint" ".*" ""
|
|
|
|
gdb_test "info checkpoints" \
|
|
" 1 .* 2 .* 3 .* 4 .* 5 .* 6 .* 7 .* 8 .* 9 .* 10 .*" \
|
|
"info checkpoints one"
|
|
|
|
delete_breakpoints
|
|
gdb_breakpoint $break2_loc
|
|
gdb_test "continue" "breakpoint 2.*" "break2 one"
|
|
|
|
gdb_test "restart 1" "Switching to .*breakpoint 1.*" "restart 1 one"
|
|
gdb_test "print i" " = 78" "verify i 1 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 1 one"
|
|
gdb_test "print lines" " = 1.*" "verify lines 1 one"
|
|
|
|
gdb_test "restart 2" "Switching to .*breakpoint 1.*" "restart 2 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 2 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 2 one"
|
|
gdb_test "print lines" " = 11.*" "verify lines 2 one"
|
|
|
|
gdb_test "restart 3" "Switching to .*breakpoint 1.*" "restart 3 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 3 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 3 one"
|
|
gdb_test "print lines" " = 21.*" "verify lines 3 one"
|
|
|
|
gdb_test "restart 4" "Switching to .*breakpoint 1.*" "restart 4 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 4 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 4 one"
|
|
gdb_test "print lines" " = 31.*" "verify lines 4 one"
|
|
|
|
gdb_test "restart 5" "Switching to .*breakpoint 1.*" "restart 5 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 5 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 5 one"
|
|
gdb_test "print lines" " = 41.*" "verify lines 5 one"
|
|
|
|
gdb_test "restart 6" "Switching to .*breakpoint 1.*" "restart 6 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 6 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 6 one"
|
|
gdb_test "print lines" " = 51.*" "verify lines 6 one"
|
|
|
|
gdb_test "restart 7" "Switching to .*breakpoint 1.*" "restart 7 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 7 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 7 one"
|
|
gdb_test "print lines" " = 61.*" "verify lines 7 one"
|
|
|
|
gdb_test "restart 8" "Switching to .*breakpoint 1.*" "restart 8 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 8 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 8 one"
|
|
gdb_test "print lines" " = 71.*" "verify lines 8 one"
|
|
|
|
gdb_test "restart 9" "Switching to .*breakpoint 1.*" "restart 9 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 9 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 9 one"
|
|
gdb_test "print lines" " = 81.*" "verify lines 9 one"
|
|
|
|
gdb_test "restart 10" "Switching to .*breakpoint 1.*" "restart 10 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 10 one"
|
|
gdb_test "print i + 1 == lines * 79" " = 1" "verify i 10 one"
|
|
gdb_test "print lines" " = 91.*" "verify lines 10 one"
|
|
|
|
#
|
|
# Now let the files be closed by the original process,
|
|
# and diff them.
|
|
|
|
gdb_test "restart 0" "Switching to .*breakpoint 2.*" "restart 0 one"
|
|
gdb_breakpoint $break3_loc
|
|
gdb_test "continue" "breakpoint 3.*" "break3 one"
|
|
|
|
gdb_test "shell diff -s $pi_txt $copy1_txt" \
|
|
"Files .*pi.txt and .*copy1.txt are identical.*" \
|
|
"diff input and output one"
|
|
|
|
#
|
|
# And now run from various checkpoints, allowing
|
|
# various amounts of input and output.
|
|
#
|
|
|
|
gdb_breakpoint $break1_loc
|
|
|
|
gdb_test "restart 1" "Switching to .*c == EOF.*" "restart 1 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 1 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 1 two"
|
|
gdb_test "print lines" " = 102.*" "verify lines 1 two"
|
|
|
|
gdb_test "restart 2" "Switching to .*c == EOF.*" "restart 2 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 2 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 2 two"
|
|
gdb_test "print lines" " = 112.*" "verify lines 2 two"
|
|
|
|
gdb_test "restart 3" "Switching to .*c == EOF.*" "restart 3 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 3 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 3 two"
|
|
gdb_test "print lines" " = 522.*" "verify lines 3 two"
|
|
|
|
gdb_test "restart 4" "Switching to .*c == EOF.*" "restart 4 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 4 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 4 two"
|
|
gdb_test "print lines" " = 532.*" "verify lines 4 two"
|
|
|
|
gdb_test "restart 5" "Switching to .*c == EOF.*" "restart 5 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 5 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 5 two"
|
|
gdb_test "print lines" " = 1042.*" "verify lines 5 two"
|
|
|
|
gdb_test "restart 6" "Switching to .*c == EOF.*" "restart 6 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 6 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 6 two"
|
|
gdb_test "print lines" " = 1052.*" "verify lines 5 two"
|
|
|
|
gdb_test "restart 7" "Switching to .*c == EOF.*" "restart 7 two"
|
|
gdb_test "continue" ".*" ""
|
|
gdb_test "continue 1100" "breakpoint 1.*" "breakpoint 1 7 one"
|
|
gdb_test "step" "if .c == EOF.*" "step in 7 two"
|
|
gdb_test "print lines" " = 1162.*" "verify lines 7 two"
|
|
|
|
gdb_test "shell diff -s $pi_txt $copy1_txt" \
|
|
"Files .*pi.txt and .*copy1.txt are identical.*" \
|
|
"diff input and output two"
|
|
|
|
#
|
|
# OK, now allow the original program to delete the output file,
|
|
# and verify that the checkpoints can still write to it.
|
|
#
|
|
|
|
gdb_test "restart 0" "Switching to .*breakpoint 3.*" "restart 0 one"
|
|
gdb_breakpoint $break4_loc
|
|
gdb_test "continue" "breakpoint 4.*" "break4 one"
|
|
|
|
gdb_test "shell diff $pi_txt $copy1_txt" \
|
|
"diff: .*copy1.txt: No such file or directory" \
|
|
"delete copy1"
|
|
|
|
delete_breakpoints
|
|
gdb_breakpoint $break2_loc
|
|
|
|
gdb_test "restart 1" "if .c == EOF.*" "restart 1 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 1 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 1"
|
|
|
|
gdb_test "restart 2" "if .c == EOF.*" "restart 2 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 2 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 2"
|
|
|
|
gdb_test "restart 3" "if .c == EOF.*" "restart 3 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 3 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 3"
|
|
|
|
gdb_test "restart 4" "if .c == EOF.*" "restart 4 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 4 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 4"
|
|
|
|
gdb_test "restart 5" "if .c == EOF.*" "restart 5 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 5 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 5"
|
|
|
|
gdb_test "restart 6" "if .c == EOF.*" "restart 6 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 6 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 6"
|
|
|
|
gdb_test "restart 7" "if .c == EOF.*" "restart 7 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 7 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 7"
|
|
|
|
gdb_test "restart 8" "if .c == EOF.*" "restart 8 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 8 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 8"
|
|
|
|
gdb_test "restart 9" "if .c == EOF.*" "restart 9 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 9 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 9"
|
|
|
|
gdb_test "restart 10" "if .c == EOF.*" "restart 10 three"
|
|
gdb_test "continue" "breakpoint 2.*" "break2 10 one"
|
|
gdb_test "print ftell (out) > 100000" " = 1.*" "outfile still open 10"
|
|
|
|
#
|
|
# Now confirm that if one fork exits, we automatically switch to another one.
|
|
#
|
|
|
|
delete_breakpoints
|
|
gdb_test "continue" \
|
|
"Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
|
|
"exit, dropped into next fork one"
|
|
|
|
gdb_test "continue" \
|
|
"Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
|
|
"exit, dropped into next fork two"
|
|
|
|
gdb_test "continue" \
|
|
"Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
|
|
"exit, dropped into next fork three"
|
|
|
|
gdb_test "continue" \
|
|
"Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
|
|
"exit, dropped into next fork four"
|
|
|
|
gdb_test "continue" \
|
|
"Deleting copy.*$inferior_exited_re normally.*Switching to.*" \
|
|
"exit, dropped into next fork five"
|
|
|
|
#
|
|
# There should be still at least five forks left
|
|
#
|
|
|
|
gdb_test "info checkpoints" " 1 .* 2 .* 3 .* 4 .* 5 .*" \
|
|
"info checkpoints two"
|
|
|
|
#
|
|
# Kill should now terminate all of them.
|
|
#
|
|
|
|
gdb_test "kill" "" "kill all one" \
|
|
"Kill the program being debugged.*y or n. $" "y"
|
|
|
|
#
|
|
# and confirm that all are gone
|
|
#
|
|
|
|
gdb_test "restart 0" "Not found.*" "no more checkpoint 0"
|
|
gdb_test "restart 1" "Not found.*" "no more checkpoint 1"
|
|
gdb_test "restart 2" "Not found.*" "no more checkpoint 2"
|
|
gdb_test "restart 3" "Not found.*" "no more checkpoint 3"
|
|
gdb_test "restart 4" "Not found.*" "no more checkpoint 4"
|
|
gdb_test "restart 5" "Not found.*" "no more checkpoint 5"
|
|
gdb_test "restart 6" "Not found.*" "no more checkpoint 6"
|
|
gdb_test "restart 7" "Not found.*" "no more checkpoint 7"
|
|
gdb_test "restart 8" "Not found.*" "no more checkpoint 8"
|
|
gdb_test "restart 9" "Not found.*" "no more checkpoint 9"
|
|
gdb_test "restart 10" "Not found.*" "no more checkpoint 10"
|
|
|
|
#
|
|
# Now let's try setting a large number of checkpoints (>600)
|
|
#
|
|
|
|
gdb_exit
|
|
gdb_start
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
|
gdb_load ${binfile}
|
|
|
|
runto_main
|
|
gdb_breakpoint $break1_loc
|
|
|
|
gdb_test "commands\nsilent\nif (lines % 2)\ncheckpoint\nend\n continue\nend" \
|
|
"" \
|
|
"set checkpoint breakpoint"
|
|
|
|
set prev_timeout $timeout
|
|
set timeout [expr $timeout + 120]
|
|
verbose "Timeout now $timeout sec."
|
|
|
|
gdb_breakpoint $break2_loc
|
|
gdb_test "continue" "breakpoint 2.*" "break2 with many checkpoints"
|
|
|
|
set count 0
|
|
set msg "info checkpoints with at least 600 checkpoints"
|
|
gdb_test_multiple "info checkpoints" $msg {
|
|
-re " $decimal process \[^\r\]*\r\n" {
|
|
incr count
|
|
exp_continue
|
|
}
|
|
-re "$gdb_prompt $" {
|
|
if { $count >= 600 } {
|
|
pass $msg
|
|
} else {
|
|
fail $msg
|
|
}
|
|
}
|
|
}
|
|
|
|
#
|
|
# OK, kill 'em all...
|
|
#
|
|
|
|
gdb_test "kill" "" "kill all one with many checkpoints" \
|
|
"Kill the program being debugged.*y or n. $" "y"
|
|
|
|
# Restore old timeout
|
|
set timeout $prev_timeout
|
|
verbose "Timeout now $timeout sec."
|
|
|
|
#
|
|
# Finished: cleanup
|
|
#
|