From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26157 invoked by alias); 23 May 2009 13:47:48 -0000 Received: (qmail 26135 invoked by uid 22791); 23 May 2009 13:47:46 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 May 2009 13:47:41 +0000 Received: (qmail 10037 invoked from network); 23 May 2009 13:47:39 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 May 2009 13:47:39 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [Prec/RFA] Remove macros for record size in i386-linux-tdep.c Date: Sat, 23 May 2009 13:47:00 -0000 User-Agent: KMail/1.9.10 Cc: Hui Zhu References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200905231447.45945.pedro@codesourcery.com> 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/msg00511.txt.bz2 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 wro= te: > >> 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): Ch= ange > >>> =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 pa= tch. > >> Why do you need size_char at all? =A0size of char is always 1 by defin= ition. > >> 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 macros= to > > =A0 =A0 =A0 =A0numbers. > > > > =A0 =A0 =A0 =A0* i386-linux-tdep.c (i386_linux_init_abi): Remove size_c= har. > > =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_abi) entries. > About char part. I am not very sure about it. This is from gdb: > /* Number of bits in a char or unsigned char for the target machine. > Just like CHAR_BIT in but describes the target machine. */ > #if !defined (TARGET_CHAR_BIT) > #define TARGET_CHAR_BIT 8 > #endif >=20 > So, maybe we can keep it. No, this is bits in char, while size_char wants bytes per char, which is always 1. Even if we were to make GDB behave for TARGET_CHAR_BIT !=3D 8, linux-record would not be the place to store that info. --=20 Pedro Alves