From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18070 invoked by alias); 23 May 2009 12:13:03 -0000 Received: (qmail 18059 invoked by uid 22791); 23 May 2009 12:13:02 -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 mail-px0-f131.google.com (HELO mail-px0-f131.google.com) (209.85.216.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 May 2009 12:12:57 +0000 Received: by pxi37 with SMTP id 37so2460904pxi.12 for ; Sat, 23 May 2009 05:12:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.95.3 with SMTP id s3mr149690tib.37.1243080774510; Sat, 23 May 2009 05:12:54 -0700 (PDT) In-Reply-To: References: <200905231212.37685.pedro@codesourcery.com> Date: Sat, 23 May 2009 12: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/msg00509.txt.bz2 On Sat, May 23, 2009 at 19:59, Hui Zhu wrote: > On Sat, May 23, 2009 at 19:12, Pedro Alves wrote: >> 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 fr= om 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): Chan= ge >>> =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 patc= h. >> Why do you need size_char at all? =A0size of char is always 1 by definit= ion. >> 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_cha= r. > =A0 =A0 =A0 =A0* linux-record.c (record_linux_system_call): Ditto. > =A0 =A0 =A0 =A0* linux-record.h (linux_record_tdep): Ditto. > 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 So, maybe we can keep it. Of course, it's not from Kernel. :) Thanks, Hui