Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Avoid floatformat_from_doublest() assertion failure
@ 2002-08-08 17:55 Kevin Buettner
  0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2002-08-08 17:55 UTC (permalink / raw)
  To: gdb-patches

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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-09  0:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08 17:55 [PATCH] Avoid floatformat_from_doublest() assertion failure Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox