2007-12-28 Thiago Jung Bauermann * gdb.texinfo (Examining Data): Add Decimal Floating Point format subsection. (Decimal Floating Point format): New subsection. Index: src-git/gdb/doc/gdb.texinfo =================================================================== --- src-git.orig/gdb/doc/gdb.texinfo 2007-12-28 01:11:37.000000000 -0200 +++ src-git/gdb/doc/gdb.texinfo 2007-12-28 02:16:56.000000000 -0200 @@ -5494,6 +5494,7 @@ Table}. * Character Sets:: Debugging programs that use a different character set than GDB does * Caching Remote Data:: Data caching for remote targets +* Decimal Floating Point:: Numbers in Decimal Floating Point format @end menu @node Expressions @@ -7473,6 +7474,28 @@ the data cache operation. @end table +@node Decimal Floating Point +@section Decimal Floating Point format +@cindex decimal floating point format + +@value{GDBN} can examine, set and perform computations with numbers in +decimal floating point format, which in the C language correspond to the +@code{_Decimal32}, @code{_Decimal64} and @code{_Decimal128} types as +specified by the extension to support decimal floating-point arithmetic. + +There are two encodings in use, depending on the architecture: BID (Binary +Integer Decimal) for x86 and x86-64, and DPD (Densely Packed Decimal) for +PowerPC. GDB will use the appropriate encoding for the configured target. + +Because of a limitation in libdecnumber, the library used by @value{GDBN} +to manipulate decimal floating point numbers, it is not possible to convert +(using a cast, for example) integers wider than 32-bit to decimal float. + +In addition, in order to imitate @value{GDBN}'s behaviour with binary floating +point computations, error checking in decimal float operations ignore underflow, +overflow and divide by zero exceptions. + + @node Macros @chapter C Preprocessor Macros