From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31805 invoked by alias); 30 Aug 2009 13:56:41 -0000 Received: (qmail 31797 invoked by uid 22791); 30 Aug 2009 13:56:40 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 30 Aug 2009 13:56:29 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n7UDuPqm023732; Sun, 30 Aug 2009 15:56:25 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n7UDuO4a006136; Sun, 30 Aug 2009 15:56:24 +0200 (CEST) Date: Sun, 30 Aug 2009 14:09:00 -0000 Message-Id: <200908301356.n7UDuO4a006136@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: teawater@gmail.com CC: gdb-patches@sourceware.org, msnyder@vmware.com In-reply-to: (message from Hui Zhu on Sun, 30 Aug 2009 21:15:22 +0800) Subject: Re: [PATCH] Fix cygwin build error with i386-linux-tdep.c References: 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-08/txt/msg00561.txt.bz2 > From: Hui Zhu > Date: Sun, 30 Aug 2009 21:15:22 +0800 > > 2009-08-29 Hui Zhu > > * i386-linux-tdep.c (i386_linux_intx80_sysenter_record): Add > (unsigned) before tmpu32. Ugh! Casts like that are ugly. This made me look at the code again and realize that what you're doing in that function is wrong. You should be using regcache_{raw|cooked}_read_unsigned() instead of regcache_raw_read(). Then the whole issue of printing an uint32_t goes away. When you do change the code like that please use a more meaningful variable name instead of 'tmpu32'. My suggestion would be 'syscall'. Cheers, Mark > Index: gdb/i386-linux-tdep.c > =================================================================== > --- gdb.orig/i386-linux-tdep.c 2009-08-23 21:17:37.000000000 +0800 > +++ gdb/i386-linux-tdep.c 2009-08-30 20:19:53.828125000 +0800 > @@ -374,7 +374,7 @@ > if (tmpu32 > 499) > { > printf_unfiltered (_("Process record and replay target doesn't " > - "support syscall number %u\n"), tmpu32); > + "support syscall number %u\n"), (unsigned) tmpu32); > return -1; > } >