From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6576 invoked by alias); 28 Jan 2005 08:46:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5706 invoked from network); 28 Jan 2005 08:45:54 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 28 Jan 2005 08:45:54 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j0S8joPN026169; Fri, 28 Jan 2005 09:45:51 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id j0S8jojM000828; Fri, 28 Jan 2005 09:45:50 +0100 (CET) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id j0S8jkZx000823; Fri, 28 Jan 2005 09:45:46 +0100 (CET) Date: Fri, 28 Jan 2005 08:46:00 -0000 Message-Id: <200501280845.j0S8jkZx000823@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: cagney@gnu.org CC: gdb-patches@sources.redhat.com In-reply-to: <41F973EA.6030305@gnu.org> (message from Andrew Cagney on Thu, 27 Jan 2005 18:06:18 -0500) Subject: Re: [commit] Tighten memory read/write methods References: <41F94AE7.4020405@gnu.org> <200501272103.j0RL3TWS001805@elgar.sibelius.xs4all.nl> <41F973EA.6030305@gnu.org> X-SW-Source: 2005-01/txt/msg00275.txt.bz2 Date: Thu, 27 Jan 2005 18:06:18 -0500 From: Andrew Cagney Mark Kettenis wrote: > Date: Thu, 27 Jan 2005 15:11:19 -0500 > From: Andrew Cagney > > Hello, > > This cleans up the {target_,}{read,write}_memory methods making the > buffer parameter a bfd_byte (instead of "is it signed?" char) In constant propogating I'm making the following mind numbing transformations: char -> const bfd_byte unsigned char -> const bfd_byte void -> const void The first two are important. Some compilers [rightly] complain about incompatibility between signed/unsigned char; and on ppc with it's unsigned char, results just get weird. We can certainly debate the merits of ISO vs BFD and bfd_byte vs void, however lets keep that debate separate to my current task - getting constants sufficiently propogated for me to do my next value.h commit which in turn finishes DW_OP_piece. OK, I can understand your rationale for seperating const-correctness from other transformations; but then why don't you seperate the (unsigned) char -> bfd_byte transformation too? I'm all for consistent use of 'bfd_byte *' as the canonical way to point to a buffer interpreted as seperate bytes. However, I think that pointers to generic bits of memory should be 'void *' (which specific bits of code might want to cast to 'bfd_byte *' if they're going to interpret the bytes individually). Doing the mind-numbing conversion means that we'll have to re-evaluate all occurances of 'bfd_byte' again later. Mark