From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27665 invoked by alias); 24 May 2005 01:36: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 27628 invoked by uid 22791); 24 May 2005 01:36:11 -0000 Received: from ausmtp02.au.ibm.com (HELO ausmtp02.au.ibm.com) (202.81.18.187) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 24 May 2005 01:36:11 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp02.au.ibm.com (8.12.10/8.12.10) with ESMTP id j4O1Vr2F288672 for ; Tue, 24 May 2005 11:31:53 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.250.242]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4O1ctft099514 for ; Tue, 24 May 2005 11:38:56 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11/8.13.3) with ESMTP id j4O1a3aN006880 for ; Tue, 24 May 2005 11:36:03 +1000 Received: from plinuxt18.cn.ibm.com (plinuxt18.cn.ibm.com [9.181.140.28]) by d23av01.au.ibm.com (8.12.11/8.12.11) with ESMTP id j4O1ZwTZ006796; Tue, 24 May 2005 11:36:00 +1000 Date: Tue, 24 May 2005 04:17:00 -0000 From: Wu Zhou To: Daniel Jacobowitz cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] gdb.server testcases (resend) In-Reply-To: <20050523123820.GB23940@nevyn.them.org> Message-ID: References: <1116490026.428c492a8f3d8@imap.linux.ibm.com> <20050522171520.GA1223@nevyn.them.org> <20050523123820.GB23940@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-05/txt/msg00524.txt.bz2 On Mon, 23 May 2005, Daniel Jacobowitz wrote: > Don't do that. Please go read my proposal on gdb@, paying particular > attention to the description of the MIPS execution environment. The > reason to always provide 64-bit registers if they are available is that > they are physically present; the upper 32 bits can affect the behavior > of the program in some cases. So not displaying them can be very bad! ok, I got it. I will read your proposal more carefully. Thanks. > > That SIGFPE error disappeared after applying your patch to latest > > GDB cvs tree. But I met with another strange problem when debugging > > gdb.base/break, which defines the following function: > > > > int factorial (value) > > int value; > > #endif > > { > > if (value > 1) { /* set breakpoint 7 here */ > > value *= factorial (value - 1); > > } > > return (value); /* set breakpoint 19 here */ > > } > > > > normally factorial(6) will recursively call itself 5 times and return > > 720. However while using 64-bit gdbserver on 64-bit binary, it doesn't > > call factorial(5) at all, return directly 6 as the result. > > > > I am suspecting that "value > 1" doesn't get executed, so I change the > > conditional statement to "if (value - 1)", it worked! So it turn out > > that "value > 1" always return 0 in this running context. That is really > > odd. Any clues you could thought of? Thanks in advance. > > Um... your compiler must be broken, then. Um...can't understand this. If it is like this, how to interpret the fact that it returns 720 correctly to run gdb.base/break standalone. Anyway I will try to find another box or another compiler to verify this. Thanks. Cheers - Wu Zhou