This is the mail archive of the gdb-patches@sourceware.cygnus.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: [rfa] Add a name field to ``struct floatformat''


On May 31,  8:48am, Andrew Cagney wrote:

> Did you like how GDB added floatformat_to_double() to libiberty and then
> replaced that with a local floatformat_to_doublest() ;-/

I noticed it, but did not know how it came about.  Who's responsible
for maintaining libiberty?

The reason I ask is that I've been wondering what to do about the fact
that we now have a number of fixes to floatformat_to_doublest() and
floatformat_from_doublest() (or their helper functions) and that these
have not (to the best of my knowledge) been merged into libiberty.

The ones that I know about are:

	* utils.c (get_field, put_field): Fix buffer underruns and
	overruns.  Also, handle case where total_len is not evenly
	divisible by 8.
	(getfield): Make sure zeroing of unwanted bits occurs even
	when bit field to extract does not straddle two or more
	bytes.

	* utils.c (floatformat_from_doublest): Don't assume that a long
	will be exactly 32 bits in length.  Also...  make sure space
	that we're writing the float to is completely initialized to
	zeroes, even when the number of bits in the float is not
	evenly divisible by FLOATFORMAT_CHAR_BIT.

Kevin

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