From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] testsuite: Fix a "continue" outside of a loop error
Date: Thu, 01 Dec 2011 15:34:00 -0000 [thread overview]
Message-ID: <alpine.DEB.1.10.1112011500490.15408@tp.orcam.me.uk> (raw)
Hi,
This change fixes this problem:
FAIL: gdb.cp/breakpoint.exp: running to main in runto (timeout)
ERROR: couldn't run to main when testing C1::Nested::foo
ERROR: tcl error sourcing .../gdb/testsuite/gdb.cp/breakpoint.exp.
ERROR: invoked "continue" outside of a loop
(procedure "test_breakpoint" line 1)
invoked from within
"test_breakpoint "C1::Nested::foo""
(file ".../gdb/testsuite/gdb.cp/breakpoint.exp" line 60)
invoked from within
"source .../gdb/testsuite/gdb.cp/breakpoint.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source .../gdb/testsuite/gdb.cp/breakpoint.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
when runto_main fails for whatever reason. Obviously there's no loop
within test_breakpoint to continue.
The function itself isn't called in a loop within the test script either,
but functions of the same name are in other tests, so in case the test
case is extended in the future I've decided to keep the property
advertised in the comment associated with this piece of code and return
the "continue" rather than the "return" status. As it is they're
equivalent.
2011-12-01 Maciej W. Rozycki <macro@codesourcery.com>
gdb/testsuite/
* gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_main
failure return path.
Maciej
gdb-cp-breakpoint-test.diff
Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.cp/breakpoint.exp
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.cp/breakpoint.exp 2011-12-01 14:10:33.000000000 +0000
+++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.cp/breakpoint.exp 2011-12-01 14:41:28.775561791 +0000
@@ -50,7 +50,7 @@ proc test_breakpoint {name} {
# lead to a cascade.
if ![runto_main] then {
perror "couldn't run to main when testing ${name}"
- continue
+ return -code continue
} else {
gdb_breakpoint "${name}"
gdb_test "continue" "Continuing.\r\n\r\nBreakpoint \[0-9\]*, ${name}.*" "continue to ${name}"
next reply other threads:[~2011-12-01 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 15:34 Maciej W. Rozycki [this message]
2011-12-05 13:50 ` Joel Brobecker
2012-02-27 21:04 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.10.1112011500490.15408@tp.orcam.me.uk \
--to=macro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).