From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3528 invoked by alias); 1 Sep 2009 02:15:56 -0000 Received: (qmail 3520 invoked by uid 22791); 1 Sep 2009 02:15:53 -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-pz0-f185.google.com (HELO mail-pz0-f185.google.com) (209.85.222.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 02:15:45 +0000 Received: by pzk15 with SMTP id 15so3342103pzk.24 for ; Mon, 31 Aug 2009 19:15:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.139.6 with SMTP id r6mr40360wfn.282.1251771344076; Mon, 31 Aug 2009 19:15:44 -0700 (PDT) In-Reply-To: <200908311546.n7VFkB7b012586@brahms.sibelius.xs4all.nl> References: <200908301356.n7UDuO4a006136@brahms.sibelius.xs4all.nl> <7d77a27d0908310145w2bcafc4bq2ed9bbd2ccff3d03@mail.gmail.com> <200908311546.n7VFkB7b012586@brahms.sibelius.xs4all.nl> From: Hui Zhu Date: Tue, 01 Sep 2009 02:15:00 -0000 Message-ID: Subject: Re: [PATCH] Fix cygwin build error with i386-linux-tdep.c To: Mark Kettenis Cc: freephp@gmail.com, gdb-patches@sourceware.org, msnyder@vmware.com 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-09/txt/msg00002.txt.bz2 On Mon, Aug 31, 2009 at 23:46, Mark Kettenis wrote: >> From: Hui Zhu >> Date: Mon, 31 Aug 2009 16:48:33 +0800 >> >> On Mon, Aug 31, 2009 at 16:45, Jiang Jilin wrote: >> > >> > I think it's not very sensible to cast unsigned to signed, think about >> > if the unsigned value is _very_ big. >> > >> >> This is syscall id, it will not _very_ big. > > Jiang has a point here though. =A0The cast is weird, and only there > because it seems you can't make up your mind whether syscall numbers > are signed or unsigned. =A0Some bits of code use signed integers and > some use unsigned integers. =A0Once that inconsistency is fixed, all > these problems will disappear. > > Mark > > regcache_raw_read_unsigned (regcache, I386_EAX_REGNUM, &num); if (num > 499) { printf_unfiltered (_("Process record and replay target doesn't " "support syscall number %d\n"), (int) num); return -1; } ret =3D record_linux_system_call ((int) num, regcache, This num that will send to "record_linux_system_call" is 0 - 499. So it don't have big or small trouble, right? Hui