Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@gnu.org>
To: cagney@gnu.org
Cc: gdb-patches@sources.redhat.com
Subject: Re: [commit] Tighten memory read/write methods
Date: Fri, 28 Jan 2005 08:46:00 -0000	[thread overview]
Message-ID: <200501280845.j0S8jkZx000823@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <41F973EA.6030305@gnu.org> (message from Andrew Cagney on Thu, 27 Jan 2005 18:06:18 -0500)

   Date: Thu, 27 Jan 2005 18:06:18 -0500
   From: Andrew Cagney <cagney@gnu.org>

   Mark Kettenis wrote:
   >    Date: Thu, 27 Jan 2005 15:11:19 -0500
   >    From: Andrew Cagney <cagney@gnu.org>
   > 
   >    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


  reply	other threads:[~2005-01-28  8:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27 20:11 Andrew Cagney
2005-01-27 21:04 ` Mark Kettenis
2005-01-27 23:06   ` Andrew Cagney
2005-01-28  8:46     ` Mark Kettenis [this message]
2005-01-28 11:43       ` Eli Zaretskii
2005-01-28 18:48         ` Andrew Cagney
2005-01-28 20:21           ` Mark Kettenis
2005-01-29 10:33           ` Eli Zaretskii
2005-01-27 21:05 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501280845.j0S8jkZx000823@elgar.sibelius.xs4all.nl \
    --to=kettenis@gnu.org \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox