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]
Other format: [Raw text]

Re: [commit] Use bfd_byte in value.h


   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






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