From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18127 invoked by alias); 3 May 2005 22:28:11 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17884 invoked from network); 3 May 2005 22:27:45 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 3 May 2005 22:27:45 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DT5rk-0002lO-Hb; Tue, 03 May 2005 18:27:44 -0400 Date: Tue, 03 May 2005 22:28:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb@sourceware.org, cagney@gnu.org, eliz@gnu.org Subject: Re: A case for `void *' for pointers to arbitrary (byte) buffers Message-ID: <20050503222744.GA10500@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb@sourceware.org, cagney@gnu.org, eliz@gnu.org References: <42753958.70109@gnu.org> <01c54e92$Blat.v2.4$5cf24460@zahav.net.il> <42755FD4.8000009@gnu.org> <01c54f4a$Blat.v2.4$a9fc8500@zahav.net.il> <42778DE6.1080106@gnu.org> <200505032013.j43KD1dD005239@elgar.sibelius.xs4all.nl> <20050503202352.GA6424@nevyn.them.org> <200505032113.j43LDOlL013376@elgar.sibelius.xs4all.nl> <20050503211646.GB8203@nevyn.them.org> <200505032206.j43M6QEN002791@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200505032206.j43M6QEN002791@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00047.txt.bz2 On Wed, May 04, 2005 at 12:06:26AM +0200, Mark Kettenis wrote: > > If you want to use a standard type, play the necessary autoconf games > > to acquire stdint.h. Use uint8_t *. > > > > That's an interesting suggestion. It might take a few iterations to > > get that right though. > > I'm willing to do the work. > > OK great! I really like being able to use those (u)intN_t types, and > especially (u)intptr_t. You can probably steal the autoconf checks > from GNU coreutils. Those will have been pretty well tested I sppose. > But the base sequence should something like: > > #ifdef HAVE_STDINT_H > #include > #else > # ifdef HAVE_INTTYPES_H > # include > # else > typedef unsigned char uint8_t; > # endif > #endif To be honest, my preference is still for gdb_byte * over uint8_t *, for exactly the reason Stan just mentioned: consistency. Whether that's defined as unsigned char or uint8_t is less important to me. Does gdb_byte, defined in terms of uint8_t, work for you? -- Daniel Jacobowitz CodeSourcery, LLC