From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13682 invoked by alias); 6 Oct 2007 16:12:39 -0000 Received: (qmail 13669 invoked by uid 22791); 6 Oct 2007 16:12:38 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 06 Oct 2007 16:12:35 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 61259980E0; Sat, 6 Oct 2007 16:12:33 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 1A1A998001; Sat, 6 Oct 2007 16:12:31 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IeCGU-0002nI-AX; Sat, 06 Oct 2007 12:12:30 -0400 Date: Sat, 06 Oct 2007 16:12:00 -0000 From: Daniel Jacobowitz To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] PPC Call-clobbered registers testcase Message-ID: <20071006161230.GA10179@caradoc.them.org> Mail-Followup-To: Luis Machado , gdb-patches@sourceware.org References: <1190644886.4375.2.camel@localhost> <1190726512.4376.0.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1190726512.4376.0.camel@localhost> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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: 2007-10/txt/msg00091.txt.bz2 Thanks for doing this. On Tue, Sep 25, 2007 at 10:21:51AM -0300, Luis Machado wrote: > 2007-09-24 Luis Machado > > * ppc-clobbered-registers-O2.c: New testcase source file. > * ppc-clobbered-registers-O2.exp: New testcase expect file. The directory name should be included here. Also, gdb.trace doesn't mean what you think it does :-) It's for tracepoint tests; so instead you probably want gdb.base. Alternatively, a new gdb.opt for optimized code tests. CodeSourcery has a project I hope we will be contributing by the beginning of next year that puts a few testcases in gdb.opt; if no one thinks that's a bad idea, then let's start the directory now. There's nothing PowerPC specific about these tests. So I would recommend not putting ppc in their names or skipping them for non-PowerPC targets. It will turn up the same bug on other platforms that passed arguments in registers, hopefully. > Index: gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.c > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.c 2007-09-24 07:26:39.000000000 -0700 > @@ -0,0 +1,21 @@ > + > +unsigned * __attribute__((noinline)) New test cases should have a copyright header, please. And let's use #ifndef __GNUC__ #define __attribute__(x) #endif so that non-GNU compilers can have a chance to run the test too. At least in theory. > +set compile_flags "debug additional_flags=-O2" "debug optimize=-O2" > +gdb_test backtrace ".*operand0=.*operand1=.*" \ > + "Check value of call clobbered registers" May as well let the test pass if it sees the correct values, too. -- Daniel Jacobowitz CodeSourcery