ChrisZim / edb-debugger

Automatically exported from code.google.com/p/edb-debugger
GNU General Public License v2.0
0 stars 0 forks source link

FPU registers stay red for nan value #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Once an FPU register becomes NaN, after stepping it doesn't go back to black 
(as in not modified since the last time) but stays red.

This is because (quoting from Wikipedia here) "a comparison with a NaN always 
returns an unordered result even when comparing with itself".

The workaround would be adding an explicit check for both being NaN:

if((old != new) && !(std::isnan(old) && std::isnan(new)))
{
  red = true;
}

Original issue reported on code.google.com by evan.teran on 3 Oct 2012 at 3:22

GoogleCodeExporter commented 9 years ago
I've applied a fix based on your example. Let me know if it continue to be a 
problem.

Original comment by evan.teran on 3 Oct 2012 at 5:14