From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8875 invoked by alias); 23 May 2009 17:13:50 -0000 Received: (qmail 8851 invoked by uid 22791); 23 May 2009 17:13:49 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.249) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 May 2009 17:13:37 +0000 Received: by rv-out-0708.google.com with SMTP id b17so385631rvf.0 for ; Sat, 23 May 2009 10:13:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.92.8 with SMTP id p8mr153745tib.56.1243098814401; Sat, 23 May 2009 10:13:34 -0700 (PDT) In-Reply-To: <200905231447.45945.pedro@codesourcery.com> References: <200905231447.45945.pedro@codesourcery.com> Date: Sat, 23 May 2009 17:13:00 -0000 Message-ID: Subject: Re: [Prec/RFA] Remove macros for record size in i386-linux-tdep.c From: Hui Zhu To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2009-05/txt/msg00519.txt.bz2 On Sat, May 23, 2009 at 21:47, Pedro Alves wrote: > A Saturday 23 May 2009 13:12:54, Hui Zhu escreveu: >> On Sat, May 23, 2009 at 19:59, Hui Zhu wrote: >> > On Sat, May 23, 2009 at 19:12, Pedro Alves wr= ote: >> >> On Saturday 23 May 2009 05:00:22, Hui Zhu wrote: >> >>> 2009-05-23 =A0Hui Zhu =A0 >> >>> >> >>> =A0=A0=A0=A0=A0=A0=A0=A0* i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_= *, >> >>> =A0=A0=A0=A0=A0=A0=A0=A0I386_LINUX_RECORD_IOCTL_*, >> >>> =A0=A0=A0=A0=A0=A0=A0=A0I386_LINUX_RECORD_FCNTL_*) Removed. >> >>> =A0=A0=A0=A0=A0=A0=A0=A0(i386_linux_init_abi): Change size of record= from macros to >> >>> =A0=A0=A0=A0=A0=A0=A0=A0numbers. >> >> >> >> Okay. >> >> >> >>> =A0=A0=A0=A0=A0=A0=A0=A0* i386-linux-tdep.c (i386_linux_init_abi): C= hange >> >>> =A0=A0=A0=A0=A0=A0=A0=A0i386_linux_record_tdep.size_char from 8 to 1. >> >> >> >> You didn't mention this, so I take it it was going to be a separate p= atch. >> >> Why do you need size_char at all? =A0size of char is always 1 by defi= nition. >> >> Does the kernel define this as variable somewhere also? >> > >> > OK. =A0I make a new patch remove it. >> > Please help me review it. >> > >> > Thanks, >> > Hui >> > >> > 2009-05-23 =A0Hui Zhu =A0 >> > >> > =A0 =A0 =A0 =A0* i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*, >> > =A0 =A0 =A0 =A0I386_LINUX_RECORD_IOCTL_*, >> > =A0 =A0 =A0 =A0I386_LINUX_RECORD_FCNTL_*) Removed. >> > =A0 =A0 =A0 =A0(i386_linux_init_abi): Change size of record from macro= s to >> > =A0 =A0 =A0 =A0numbers. >> > >> > =A0 =A0 =A0 =A0* i386-linux-tdep.c (i386_linux_init_abi): Remove size_= char. >> > =A0 =A0 =A0 =A0* linux-record.c (record_linux_system_call): Ditto. >> > =A0 =A0 =A0 =A0* linux-record.h (linux_record_tdep): Ditto. > > This is OK, although the changelog wants to record different unrelated > changes: either commit this in two parts, or merge the (i386_linux_init_a= bi) > entries. > >> About char part. =A0I am not very sure about it. =A0This is from gdb: >> /* Number of bits in a char or unsigned char for the target machine. >> =A0 =A0Just like CHAR_BIT in but describes the target machine= . =A0*/ >> #if !defined (TARGET_CHAR_BIT) >> #define TARGET_CHAR_BIT 8 >> #endif >> >> So, maybe we can keep it. > > No, this is bits in char, while size_char wants bytes per char, > which is always 1. =A0Even if we were to make GDB behave > for TARGET_CHAR_BIT !=3D 8, linux-record would not be the place to > store that info. > OK. I got it. Thanks. What about the last patch? It remove char_size. Hui