I already did some fiddling in autoexp.dat to ease the inspection of custom string and other simple classes in the Visual Studio debugger (using vs2005). I'd really love to directly see the value (or approximation) of our custom floating point class. The internal representation is a quad-integer (int mantissa[4], 128bit on x86) that will be divided by 10 to the power of our exponent. So it basically looks like this:
class FloatingPoint
{
private:
char exponent;
int mantissa[4]
};
The following statement would convert it to double, given fp is an object of type FloatingPoint:
(mantissa[0] +
* ((double)mantissa[1] * 32 * 2)
* ((double)mantissa[2] * 64 * 2)
* ((double)mantissa[3] * 96 * 2))
/ std::pow(10, fp.exponent)
Is it possible to somehow get the Visual Studio debugger show objects of type FloatingPoint using this calculation? The call to pow is an extra problem, because this function has no external linking and can not be called by the debugger... maybe there's a way around this?