From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3975 invoked by alias); 26 May 2005 03:44:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3953 invoked by uid 22791); 26 May 2005 03:44:20 -0000 Received: from cpe-144-131-103-49.nsw.bigpond.net.au (HELO takamaka.act-europe.fr) (144.131.103.49) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 26 May 2005 03:44:20 +0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 6F89047958; Thu, 26 May 2005 13:44:16 +1000 (EST) Date: Thu, 26 May 2005 05:02:00 -0000 From: Joel Brobecker To: Richard Henderson Cc: gdb-patches@gcc.gnu.org Subject: Re: [testsuite/alpha] Add test for step over fbne instruction Message-ID: <20050526034416.GM1525@adacore.com> References: <20050525064819.GA5406@redhat.com> <20050526023539.GL1525@adacore.com> <20050526031128.GA9264@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050526031128.GA9264@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2005-05/txt/msg00553.txt.bz2 > Hmm, now that I think about it, one potential problem with this form > is that we're not correctly testing for branch taken. The scenerio > is that we expect taken, set the bp on the ret, the branch *isn't* > taken, but we fall through to the ret anyway. I think we do test both possibilities. That's because I verify that we landed on the correct instruction after the stepi: # Step test, followed by the check that we landed on the expected # instruction (the testcase should be written in such a way that # the branch is taken on the first call to this function. gdb_test "stepi" \ "0x\[0-9a-fA-F\]+.*" \ "stepi on fb$function (first call)" gdb_test "x /i \$pc" \ "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+ret\[ \t\]+.*" \ "Check stepi over fb$function stopped on ret" (I think this is what Daniel was suggesting). When the branch is not taken, we do the following test: gdb_test "x /i \$pc" \ "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fneg\[ \t\]+.*" \ "Check stepi over fb$function stopped on fneg instruction" -- Joel