This is the mail archive of the gdb-cvs@sourceware.org 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]

src/gdb ChangeLog doublest.c testsuite/ChangeL ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2012-10-24 18:11:22

Modified files:
	gdb            : ChangeLog doublest.c 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.base: ldbl_e308.c ldbl_e308.exp 

Log message:
	off-by-one max exponent computation in convert_doublest_to_floatformat
	
	Assuming the following variable definition:
	
	long double inp = 2.0;
	
	On platforms where "long double" is a double precision IEEE flaoting
	point, GDB currently behaves as follow:
	
	(gdb) set variable inp = 1.6e+308l
	(gdb) p inp
	$2 = inf   <<<<---- !!!!
	
	Instead, the value of "inp" should be printed as:
	
	(gdb) p inp
	$1 = 1.6e+308
	
	The problem is due to a small error in the comparison of the exponent
	versus the maximum value this exponent can take, causing us to think
	that the value was too big to fit. But it isn't.
	
	gdb/ChangeLog:
	
	* doublest.c (convert_doublest_to_floatformat): Fix comparison
	against maximum exponent value.
	
	gdb/testsuite/ChangeLog:
	
	* gdb.base/ldbl_e308.c, gdb.base/ldbl_e308.exp: New files.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14755&r2=1.14756
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doublest.c.diff?cvsroot=src&r1=1.51&r2=1.52
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3426&r2=1.3427
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/ldbl_e308.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/ldbl_e308.exp.diff?cvsroot=src&r1=NONE&r2=1.1


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