From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10780 invoked by alias); 3 May 2005 22:01:25 -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 9433 invoked from network); 3 May 2005 22:00:49 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 3 May 2005 22:00:49 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id j43M0mHO005969 for ; Tue, 3 May 2005 15:00:48 -0700 (PDT) Received: from relay3.apple.com (relay3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.17) with ESMTP id ; Tue, 3 May 2005 15:00:48 -0700 Received: from [17.112.106.251] ([17.112.106.251]) by relay3.apple.com (8.12.11/8.12.11) with ESMTP id j43M0lHX002924; Tue, 3 May 2005 15:00:47 -0700 (PDT) Message-ID: <4277F491.4040809@apple.com> Date: Tue, 03 May 2005 22:01:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20040910 MIME-Version: 1.0 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 References: <42710E90.3030300@gnu.org> <200504281919.j3SJJKF1011501@elgar.sibelius.xs4all.nl> <42715EE8.5070704@gnu.org> <01c54c8a$Blat.v2.4$ffbe8140@zahav.net.il> <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> In-Reply-To: <200505032013.j43KD1dD005239@elgar.sibelius.xs4all.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00045.txt.bz2 Mark Kettenis wrote: >Why not use `xxx_byte *' instead of `void *'? >--------------------------------------------- > >* It's nonstandard. Why do we need a nonstandard type if a perfectly > god standard type is available? > My inclination would be for gdb_byte *, as an abstraction of "what people who understand the issue more than I do think is the right type to use". 1/2 :-) Personally I've never been comfortable with using void * because it has its own set of semi-mysterious rules for use - yeah, if I wear my compiler-guy hat, they work that way for a reason, but when I wear my just-wanna-write-code hat, they are more of a distraction. Another downside of void * is it doesn't tell the reader whether it means GDB's byte abstraction, or something else, such as a declaration that has to be void * for consistency with system headers or some such. GDB seems like a big enough program to justify its own byte type. Stan