This is the mail archive of the gdb-patches@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]

Re: [PATCH] Have gdb display float infinity.


> Date: Mon, 22 Aug 2005 14:00:11 -0500 (Central Daylight Time)
> From: Dwayne Grant McConnell <dgm69@us.ibm.com>
> 
> I noticed that gdb does display NaNs in a special way but not infinity. 
> This patch changes that. I'm a bit new here so I have a few questions.

Thanks!  Since you're new, I'll have to ask whether you have a
copyright assignment for gdb?

> 1. Should I submit a testcase to go along with the patch? as a separate 
> patch? (I have no idea were to put it yet but I figured I would ask.)

Yes please!  A seperate patch is fine, but make sure it gets in
shortly before or after the fix gets in.

> 2. I simply duplicated floatformat_is_nan() with one minor change to 
> produce floatformat_is_inf(). I could have done this differently. Should I 
> have changed float_format_is_nan() to float_format_is_nan_or_inf() and 
> given the function a parameter for NaN v Inf? Something else?

Hmm, this indeeds seems to duplicate a fair amount of code.  Having
seperate functions for nan and inf is good I think, but do you see a
way to avoid code duplication?

> I have tested this with both ppc and ppc64 but nothing else.

It'd be great if you also could test this on another platform,
preferably amd64, i386 or m68k since those have extended double
formats.

Mark


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