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] Ada-valprint.c const tweaks
Date: Fri, 28 Jan 2005 21:00:00 -0000	[thread overview]
Message-ID: <200501282100.j0SL0hPG002192@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <41FA9F7C.4030707@gnu.org> (message from Andrew Cagney on Fri, 28 Jan 2005 15:24:28 -0500)

   Date: Fri, 28 Jan 2005 15:24:28 -0500
   From: Andrew Cagney <cagney@gnu.org>

   Mark Kettenis wrote:
   >    Date: Fri, 28 Jan 2005 14:19:48 -0500
   >    From: Andrew Cagney <cagney@gnu.org>
   > 
   >    FYI,
   >    Andrew
   > 
   > This patch must be wrong!  In C a string has type 'char *' and the
   > type of a single character is 'int'.  If your compiler is warning
   > about incompatible types here, it's got a bug.  This proves that
   > mindless replacement of 'char' with 'bfd_byte' is a stupid thing to
   > do.

   I've attached exibit A, the full patch that I'm merging.

   If you look carefully at printstr, you'll see that it's receiving in raw 
   byte buffer _buffer_ and a _length_; not a null terminated "char *" 
   string.  That language code, such as scheme, print it using %s is well 
   "somebody elses problem".

Ah I see.  The code in c-lang.c:c_printstr() is extracting bytes as
integers.  So sorry, yes you're right.  I still think we should use
'void *' instead of 'bfd_byte *' though.

Mark


      reply	other threads:[~2005-01-28 21:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28 19:20 Andrew Cagney
2005-01-28 20:13 ` Mark Kettenis
2005-01-28 20:25   ` Andrew Cagney
2005-01-28 21:00     ` Mark Kettenis [this message]

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=200501282100.j0SL0hPG002192@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