From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22319 invoked by alias); 4 Dec 2008 23:30:09 -0000 Received: (qmail 22217 invoked by uid 22791); 4 Dec 2008 23:30:07 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Dec 2008 23:29:27 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 77E301089B; Thu, 4 Dec 2008 23:29:25 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 4DA071089A; Thu, 4 Dec 2008 23:29:25 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1L8NdL-0008Q5-G5; Thu, 04 Dec 2008 18:29:23 -0500 Date: Thu, 04 Dec 2008 23:30:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [RFA] change gdbserver's pids to int Message-ID: <20081204232923.GA32253@caradoc.them.org> Mail-Followup-To: Doug Evans , gdb-patches@sourceware.org References: <20081204012417.1413E1C7A0F@localhost> <20081204131535.GC24868@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-12/txt/msg00081.txt.bz2 On Thu, Dec 04, 2008 at 03:02:05PM -0800, Doug Evans wrote: > > Are you sure that every place you touched gets a system PID, not a > > thread ID? They used to be ints, but were changed to unsigned long > > because NPTL's TIDs do not fit in an int. > > Ya, I specifically stuck to pids. A lot of these places used to be thread IDs. At some point we stopped reporting those to GDB, to avoid the same sort of problem. > > Also, do Windows PIDs fit in an int? Win32 pids must, but I expect > > we'll get a Win64 port at some point. > > Good question. I was in part going for consistency with what gdb uses. > Maybe it would be useful to have gdb_pid_t, gdb_tid_t types that both > gdb and gdbserver use. I don't personally think consistency between gdb and gdbserver is all that big of a goal. There's lots of similar code between gdb and gdbserver, but even if we fixed up common interfaces I think we'd have to add a lot of gunk to gdbserver to be able to entirely share anything; we already have some such gunk for signals.c. Switching them to some typedef to int sounds OK to me. I admit I don't see the point, but I wouldn't reject the patch. Dumping them all back to int just makes them less opaque than they are now though. -- Daniel Jacobowitz CodeSourcery