From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: brobecker@adacore.com (Joel Brobecker)
Cc: yao@codesourcery.com (Yao Qi), gdb-patches@sourceware.org
Subject: Re: [rfc, arm] Always use correct execution state for single-step breakpoints
Date: Tue, 29 Mar 2011 14:14:00 -0000 [thread overview]
Message-ID: <201103291310.p2TDAiPA022019@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <20110328171116.GC3670@adacore.com> from "Joel Brobecker" at Mar 28, 2011 10:11:16 AM
Joel Brobecker wrote:
> > > > +if ![runto_main] then {
> > > > + gdb_suppress_tests
> > > > +}
>
> We decided a long time ago that gdb_suppress_entire_file,
> gdb_suppress_tests et al should no longer be used...
OK, fine with me.
> > I don't really have a strong opinion on that, except that perror is
> > probably wrong (this is supposed to be uses to signal problems in
> > the test *framework* itself). I'd say that if there is a reasonable
> > expectation that starting up the test may fail on some platforms,
> > a failure of runto_main ought to trigger something like UNTESTED
> > or UNSUPPORTED. Otherwise it should trigger a FAIL.
>
> What we document right now is:
>
> if ![runto_main] {
> return -1
> }
>
> (http://sourceware.org/gdb/wiki/GDBTestcaseCookbook)
Ah, I wasn't even aware we had this :-/ Nice!
> We might have discussed it, but I'm not sure. I see your point
> about posting an UNTESTED OR UNSUPPORTED, which I think
> prepare_for_testing does. In fact, an old message (from
> most likely DanielJ, in 2006):
>
> > I've been using untested followed by return. Why wouldn't that be
> > ideal?
>
> So, if that's agreeable to everyone, I will change the Cookbook
> to follow that.
UNTESTED looks good to me.
Appended below is the current version of the test case I'm using.
Any additional thoughts?
Bye,
Ulrich
--- /dev/null 2011-03-29 13:48:30.897232565 +0200
+++ gdb/testsuite/gdb.arch/thumb-singlestep.exp 2011-03-29 14:54:18.000000000 +0200
@@ -0,0 +1,38 @@
+# Copyright 2011 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/>.
+
+# Test single-stepping into incorrectly marked Thumb routine
+
+if {![istarget arm*-*]} then {
+ verbose "Skipping ARM tests."
+ return
+}
+
+set testfile "thumb-singlestep"
+set srcfile ${testfile}.S
+
+set additional_flags "additional_flags=-mthumb"
+if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} [list debug $additional_flags]] {
+ untested ${testfile}.exp
+ return -1
+}
+
+if ![runto_main] then {
+ untested ${testfile}.exp
+ return -1
+}
+
+gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo"
+
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2011-03-29 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 18:55 Ulrich Weigand
2011-03-25 16:19 ` Tom Tromey
2011-03-25 17:12 ` Ulrich Weigand
2011-03-28 8:11 ` Yao Qi
2011-03-28 14:37 ` Ulrich Weigand
2011-03-28 18:34 ` Joel Brobecker
2011-03-29 14:14 ` Ulrich Weigand [this message]
2011-03-29 16:24 ` Joel Brobecker
2011-03-29 18:40 ` Ulrich Weigand
2011-04-01 11:58 ` Ulrich Weigand
2011-04-01 15:24 ` Fix build (was: Re: [rfc, arm] Always use correct execution state for single-step breakpoints) Pedro Alves
2011-04-01 15:41 ` Ulrich Weigand
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=201103291310.p2TDAiPA022019@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/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