From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9626 invoked by alias); 19 Apr 2004 18:08:14 -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 9619 invoked from network); 19 Apr 2004 18:08:13 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 19 Apr 2004 18:08:13 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3JI8DJW007767 for ; Mon, 19 Apr 2004 14:08:13 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3JI8Bj31991; Mon, 19 Apr 2004 14:08:11 -0400 To: Joel Brobecker CC: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix small problems in rs6000-tdep.c:skip_prologue() References: <20040402183637.GC871@gnat.com> <20040417051545.GO22414@gnat.com> <20040417143940.GA7428@nevyn.them.org> <20040419175339.GA22414@gnat.com> From: Jim Blandy Date: Mon, 19 Apr 2004 18:08:00 -0000 In-Reply-To: <20040419175339.GA22414@gnat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-04/txt/msg00438.txt.bz2 Joel Brobecker writes: > > I'd prefer that you add them to gdb.asm, unless it's likely to produce > > strange prologues on other architectures. > > I looked at the gdb.asm subdirectory, and found only one test there: > asm-source.exp. It doesn't look like this testcase would be the correct > location where to add a test for this prologue. > > So should I add a new testcase? This testcase would only be activated > for powerpc*-*-* targets. > > In terms of the code, I would just dump the assembly code for the > function in question into an .s file. To perform the link, I'm tempted > between do it all in asm (just as we do in asm-source.exp), or see > if it is simpler if I use a C main... > > All the testcase would do is: Build the executable, load it, and then > insert a breakpoint in my function. > > Am I on the right track? Well, that's what I had in mind. One file for each architecture, packed full of functions with interesting prologues. The tests would just set breakpoints on each of them and check that they get set at the right distance from the entry point. My test case uses E500-specific instructions. I could rewrite it so it didn't, but the prologue analyzer does have E500-specific code, so it needs to be tested anyway. So I'd probably need a separate test file. > BTW: I can't find the collection of SH prologues that Daniel was > refering to... Me neither.