From: Jim Blandy Date: Tue, 22 Feb 2000 19:22:25 +0000 (+0000) Subject: * gdbint.texinfo: Document COERCE_FLOAT_TO_DOUBLE --- the new form. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef36d45eb9e8614b39014367bfb91329048735ae;p=binutils-gdb.git * gdbint.texinfo: Document COERCE_FLOAT_TO_DOUBLE --- the new form. --- diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index db293ef55c8..7b4a4f4d08f 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -1307,6 +1307,29 @@ and to cancel any deferred stores. Currently only implemented correctly for native Sparc configurations? +@item COERCE_FLOAT_TO_DOUBLE (@var{formal}, @var{actual}) +If we are calling a function by hand, and the function was declared +(according to the debug info) without a prototype, should we +automatically promote floats to doubles? This macro must evaluate to +non-zero if we should, or zero if we should leave the value alone. + +The argument @var{actual} is the type of the value we want to pass to +the function. The argument @var{formal} is the type of this argument, +as it appears in the function's definition. Note that @var{formal} may +be zero if we have no debugging information for the function, or if +we're passing more arguments than are officially declared (for example, +varargs). This macro is never invoked if the function definitely has a +prototype. + +The default behavior is to promote only when we have no type information +for the formal parameter. This is different from the obvious behavior, +which would be to promote whenever we have no prototype, just as the +compiler does. It's annoying, but some older targets rely on this. If +you want GDB to follow the typical compiler behavior --- to always +promote when there is no prototype in scope --- your gdbarch init +function can call @code{set_gdbarch_coerce_float_to_double} and select +the @code{standard_coerce_float_to_double} function. + @item CPLUS_MARKER Define this to expand into the character that G++ uses to distinguish compiler-generated identifiers from programmer-specified identifiers.