From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3677 invoked by alias); 28 Jul 2006 01:11:22 -0000 Received: (qmail 3664 invoked by uid 22791); 28 Jul 2006 01:11:21 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Jul 2006 01:11:18 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 6717C48CEC5 for ; Thu, 27 Jul 2006 21:11:16 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06051-01-2 for ; Thu, 27 Jul 2006 21:11:16 -0400 (EDT) Received: from takamaka.act-europe.fr (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id 2307A48CEC2 for ; Thu, 27 Jul 2006 21:11:16 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 9A4AA47EFA; Thu, 27 Jul 2006 18:11:14 -0700 (PDT) Date: Fri, 28 Jul 2006 01:11:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA/testsuite] check bt problem after 2 steps is gone Message-ID: <20060728011114.GE12362@adacore.com> References: <20060428174035.GF930@adacore.com> <20060727134139.GB15735@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060727134139.GB15735@nevyn.them.org> User-Agent: Mutt/1.4i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00408.txt.bz2 > > 2006-04-28 Joel Brobecker > > > > * gdb.base/step-bt.c: New file. > > * gdb.base/step-bt.exp: New testcase. > > > > Tested on i686-pc-cygwin. on XFAIL on the last test with the current > > sources, all PASSes once the patch in the message mentioned above is > > applied. > > > > OK to apply? > > When the patch goes in, this is fine. Thanks for the test. Ok, will do. > > gdb_test "stepi 2" \ > > "" \ > > "step 2 instructions" > > > > gdb_test "bt" \ > > "#0 +0x\[0-9a-z\]+ in hello .*#1 +0x\[0-9a-z\]* in main.*" \ > > "backtrace after two instruction steps" > > Would it work to test backtrace after each of two stepi's? That might > turn up interesting similar problems on more platforms. > Yes it would. The semi-tricky part is to determine the number of stepi's we can do before we end up inside printf, regardless of the architecture. On sparc, for instance, seting up the frame can be done in one instruction, thanks to the register rotation during calls. I actually tried it on sparc-solaris, and indeed, the call to printf is located at the 4th instruction. My guess is that we should be able to add an extra "stepi 2; bt" and that should work for all other architectures. Another more refined approach would be to conditionalize the extra stepis to the architecture. -- Joel