From: Daniel Jacobowitz <drow@false.org>
To: gdb@sources.redhat.com
Subject: Re: Replace char * with something sensible
Date: Tue, 03 May 2005 19:58:00 -0000 [thread overview]
Message-ID: <20050503195815.GA5300@nevyn.them.org> (raw)
In-Reply-To: <01c55019$Blat.v2.4$95304420@zahav.net.il>
On Tue, May 03, 2005 at 10:51:02PM +0300, Eli Zaretskii wrote:
> Rumor has it that latest versions of GCC whine about mixing "char *"
> and "unsigned char *". To fix that, Andrew committed some patches
> that replace these with a "bfd_byte *", but I think we should not use
> BFD data types in GDB unless they refer to data structures returned by
> functions from the BFD library.
>
> Possible solutions:
>
> . use "void *" (suggested by Mark Kettenis).
>
> . define a new data type gdb_byte and use "gdb_byte *".
>
> I think Mark's suggestion should be considered first, since it avoids
> the pain of introducing yet another custom data type.
I am marginally in favor of gdb_byte. What pain would it cause,
besides a huge sed for the existing bfd_byte cases?
These are byte-oriented buffers, so using a type where we can perform
byte-oriented arithmetic without superfluous casts seems like a good
choice to me. Converting to void * (and not using the GCC extension
which allows arithmetic on void *) would be a painful process.
It's not as if non-8-bit-byte support is anywhere on our horizon.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-05-03 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-03 19:53 Eli Zaretskii
2005-05-03 19:58 ` Daniel Jacobowitz [this message]
2005-05-03 20:28 ` 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=20050503195815.GA5300@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@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