From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19086 invoked by alias); 3 Dec 2002 15:41:52 -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 19075 invoked from network); 3 Dec 2002 15:41:49 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 3 Dec 2002 15:41:49 -0000 Received: from redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 6175980021C; Tue, 3 Dec 2002 10:41:48 -0500 (EST) Message-ID: <3DECD32C.2050403@redhat.com> Date: Tue, 03 Dec 2002 07:41:00 -0000 From: Fernando Nasser Organization: Red Hat Canada User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com, rearnsha@arm.com, cagney@redhat.com, kevinb@redhat.com, fnasser Subject: Re: [RFA] arm_extract_return_value, big-endian References: <3DC989E0.DCFDC68A@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00062.txt.bz2 Humm..., I am having second thoughts about this. Isn't the problem you are seeing the same problem of not having the values peoperly sign-extended? I guess I will have to look into this closer (and my ARM manuals are not here right now either). Please do not apply the patch yet Michael. Sorry,. :-( Fernando Michael Snyder wrote: > [This doesn't seem to have gone out. Excuse me if it appears twice] > > One of you arm-savvy guys check me out on this: > it seems logical, and it fixes two fails in callfuncs with -mbig-endian. > > Michael > > > ------------------------------------------------------------------------ > > 2002-11-05 Michael Snyder > > * arm-tdep.c (arm_extract_return_value): Handle offset of > small types on big-endian machines. > > Index: arm-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/arm-tdep.c,v > retrieving revision 1.74 > diff -p -r1.74 arm-tdep.c > *** arm-tdep.c 1 Nov 2002 21:21:49 -0000 1.74 > --- arm-tdep.c 6 Nov 2002 01:54:36 -0000 > *************** arm_extract_return_value (struct type *t > *** 2274,2279 **** > --- 2274,2284 ---- > break; > } > } > + else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) > + memcpy (valbuf, > + ®buf[REGISTER_BYTE (ARM_A1_REGNUM)] > + + (REGISTER_RAW_SIZE (ARM_A1_REGNUM) - TYPE_LENGTH (type)), > + TYPE_LENGTH (type)); > else > memcpy (valbuf, ®buf[REGISTER_BYTE (ARM_A1_REGNUM)], > TYPE_LENGTH (type)); -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9