This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [commit] Use bfd_byte in value.h
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: cagney at gnu dot org
- Cc: eliz at gnu dot org, mark dot kettenis at xs4all dot nl, gdb-patches at sources dot redhat dot com
- Date: Sun, 1 May 2005 22:41:15 +0200 (CEST)
- Subject: Re: [commit] Use bfd_byte in value.h
- References: <42710E90.3030300@gnu.org> <200504281919.j3SJJKF1011501@elgar.sibelius.xs4all.nl> <42715EE8.5070704@gnu.org> <01c54c8a$Blat.v2.4$ffbe8140@zahav.net.il> <42753958.70109@gnu.org>
Date: Sun, 01 May 2005 16:17:28 -0400
From: Andrew Cagney <cagney@gnu.org>
Eli,
Last time this came up I recommeded separating out the idea of gdb_byte
and proposed more formally. How is this going?
In the mean time though (then and now) I'll use bfd_byte as that lets me
move this code forward addressing the more immediate problem of not even
compiling with -Werror on GCC 4. With that done, i'm pretty sure that
we'll find the follow-on task of s/bfd_byte/gdb_byte/ trivial.
But why do we need special type at all. ISO C has void * for
arbitrary (byte) buffers. That's the type that should have been used
for the memory_insert_breakpoint/memory_remove_breakpoint interface
changes you just committed. Any implementation of that interface
should do the appropriate cast if it needs to do pointer arithmetic,
or needs to interpret the bytes as signed or unsigned. If we agree on
that, this makes the follow-in task you mention non-trivial. Since
you are alreading spending an effort on this, why not spend a small
amount of extra effort and fix things properly now?
Mark