From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3748 invoked by alias); 29 Mar 2011 13:10:56 -0000 Received: (qmail 3636 invoked by uid 22791); 29 Mar 2011 13:10:54 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate3.uk.ibm.com (HELO mtagate3.uk.ibm.com) (194.196.100.163) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 13:10:48 +0000 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p2TDAkmJ021504 for ; Tue, 29 Mar 2011 13:10:46 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2TDBJf91675398 for ; Tue, 29 Mar 2011 14:11:19 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2TDAjem022033 for ; Tue, 29 Mar 2011 07:10:45 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p2TDAiPA022019; Tue, 29 Mar 2011 07:10:44 -0600 Message-Id: <201103291310.p2TDAiPA022019@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 29 Mar 2011 15:10:44 +0200 Subject: Re: [rfc, arm] Always use correct execution state for single-step breakpoints To: brobecker@adacore.com (Joel Brobecker) Date: Tue, 29 Mar 2011 14:14:00 -0000 From: "Ulrich Weigand" Cc: yao@codesourcery.com (Yao Qi), gdb-patches@sourceware.org In-Reply-To: <20110328171116.GC3670@adacore.com> from "Joel Brobecker" at Mar 28, 2011 10:11:16 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg01170.txt.bz2 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 . + +# 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