This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: Patch to allow compilation by Sun cc


Paul Hilfinger wrote:
> 
> > I didn't mean that sizeof (char) is never used -- just that it isn't used
> > in connection with MAX_REGISTER_RAW_SIZE or REGISTER_BYTES.  The situation
> > is not beautiful now -- I just don't want to make it any uglier.
> 
> I have no objection.  I don't suppose type 'char' is likely to grow
> any time soon, Unicode or not.

Well, since REGISTER_BYTES and MAX_REGISTER_RAW_SIZE are 
both in units of 'bytes', and alloca / malloc both accept
input in units of 'bytes', I suppose the only issue is 
whether it's host bytes or target bytes, and whether the
two might be a different size.  It's extremely unlikely 
that this will ever be an issue, I think.  To really stretch
the point, you could argue that these two constants are 
defined per-target and not per-host, therefore should be
thought of as being target-bytes.  But they're always used
to allocate memory on the host.  So the real correction
factor, if one were to be used, would probably be
TARGET_CHAR_BIT / HOST_CHAR_BIT (or something like that).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]