OSDN Git Service

* gdbint.texinfo: Document COERCE_FLOAT_TO_DOUBLE --- the new form.
authorJim Blandy <jimb@codesourcery.com>
Tue, 22 Feb 2000 19:22:25 +0000 (19:22 +0000)
committerJim Blandy <jimb@codesourcery.com>
Tue, 22 Feb 2000 19:22:25 +0000 (19:22 +0000)
gdb/doc/gdbint.texinfo

index e763c73..85ef9d8 100644 (file)
@@ -46,7 +46,7 @@ regarded as a program in the language TeX).
 @page
 @tex
 \def\$#1${{#1}}  % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.1.1.21 $}  % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.2 $}  % For use in headers, footers too
 {\parskip=0pt
 \hfill Cygnus Solutions\par
 \hfill \manvers\par
@@ -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.