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] Restructure doublest.c a bit


Yes fine.

> +
> +  /* FIXME: kettenis/2001-10-06: It is debatable whether we should
> +     zero out any remaining bytes in the target buffer when TYPE is
> +     longer than the actual underlying floating-point format.  Perhaps
> +     we should store a fixed bitpattern in those remaining bytes,
> +     instead of zero, or perhaps we shouldn't touch those remaining
> +     bytes at all.  */
> 

Can you add this:

/* NOTE: cagney/2001-10-28: With the way things currently work, it isn't 
a good idea to leave the end bits undefined.  This is because GDB writes 
out the entire sizeof(<float>) bits of the floating point type even 
though the value might only be stored in, and the target processor may 
only refer to, the first N<LENGTH bits.  If the end of the buffer wasn't 
initialized, GDB would write undefined data to the target.  An errant 
program, refering to that undefined data, would would become 
non-deterministic.  */

enjoy,
	Andrew



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