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]

[PATCH] Avoid floatformat_from_doublest() assertion failure


I've just committed the change below.

On Irix, I was running into an assertion failure in
floatformat_from_doublest() due to fmt being NULL.  (gdb can't handle
16 byte long doubles.)  The caller was store_floating() and, prior to
the call, had determined that fmt was NULL and had printed a suitable
warning.  Moreover, the return value had been filled in with a
suitable value.  (Well, as suitable as possible for something that
gdb says it can't do.)

	* doublest.c (store_floating): Avoid floatformat_from_doublest()
	assertion failure by returning early after a warning.

Index: doublest.c
===================================================================
RCS file: /cvs/src/src/gdb/doublest.c,v
retrieving revision 1.9
diff -u -p -r1.9 doublest.c
--- doublest.c	9 Feb 2002 17:25:57 -0000	1.9
+++ doublest.c	9 Aug 2002 00:37:23 -0000
@@ -681,6 +681,7 @@ store_floating (void *addr, int len, DOU
     {
       warning ("Can't store a floating-point number of %d bytes.", len);
       memset (addr, 0, len);
+      return;
     }
 
   floatformat_from_doublest (fmt, &val, addr);


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