From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21626 invoked by alias); 27 Oct 2003 19:01:36 -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 21613 invoked from network); 27 Oct 2003 19:01:35 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 27 Oct 2003 19:01:35 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id NAA16331 for ; Mon, 27 Oct 2003 13:56:23 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id NAA17788; Mon, 27 Oct 2003 13:48:18 -0500 Message-ID: <0b2801c39cbb$056701c0$0202040a@catdog> From: "Kris Warkentin" To: "Michael Elizabeth Chastain" , , References: <200310241922.h9OJMb5T024347@duracef.shout.net> Subject: Re: [patch] New testcase for PR:1291 Date: Mon, 27 Oct 2003 19:01:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-10/txt/msg00790.txt.bz2 > > A) move it and make it generic. > > B) leave it and write it in assembly. > > I like (B) better. The backtrace code is all about specific > assembly instructions. So I'd like it better in the style of the i386 > prologue tests, with explicit assembly. > > Michael C Okay so this bit of assembly adequately demonstrates the problem. There is a bit of an issue here though that perhaps some sh4 expert can clear up for me. If I run this and go "until sub2", it stops on sub2 and works fine. If, however, I go "until sub1", followed by "until sub2", it stops a couple instructions before sub2 and I have to 'si' into it. I can modify the test case to not bother checking sub1 (since we know it's okay anyway) but I'm still puzzled as to why this is having the problem. cheers, Kris void sub1 (void); void sub2 (void); main() { sub1(); sub2(); } asm(".text\n" " .align 5\n" "sub1:\n" " mov.l r14,@-r15\n" " add #-128,r15\n" " add #-128,r15\n" " mov r15,r14\n" " mov.w .STACK1,r7\n" " add r7,r14\n" " mov r14,r15\n" " mov.l @r15+,r14\n" " rts\n" " nop\n" " .align 1\n" ".STACK1:\n" " .short 256\n"); asm(".text\n" " .align 5\n" "sub2:\n" " mov.l r14,@-r15\n" " mov.w .STACK2,r3\n" " sub r3,r15\n" " mov r15,r14\n" " mov.w .STACK2,r7\n" " add r7,r14\n" " mov r14,r15\n" " mov.l @r15+,r14\n" " rts\n" " nop\n" " .align 1\n" ".STACK2:\n" " .short 260\n");