This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch 0/4] [RFC] decimal floating point support


Hi folks,

I am re-submitting for review Wu Zhou's patch to add DFP (Decimal Floating
Point) support to GDB (see [1] for details). The version I'm posting
here is based on [2], only refreshed to apply to CVS HEAD from a few
days ago and broken up into logical pieces to facilitate review. The
testcases are taken from [3].

The code uses libdecnumber from the gcc svn repository. It can be fetched
from svn://gcc.gnu.org/svn/gcc/trunk/libdecnumber. It is expected to be
found by the Makefile in src/libdecnumber/.

This is not complete yet because I'd like to add a way to have GDB
correctly display floating point registers containing DFP values (in
Power6, DFP and binary FP logic will share registers).

Looking from the archives, the biggest concern regarding this patch has
been on how to deal with endianness (see [4] and [5]). Here's how it's
currently dealt with in the patch:

Inside GDB the DFP value is always stored in target byte order. This
is done by the exchange_dfp() function in dfp.c. Since libdecnumber
currently uses big-endian regardless of the native byte order, the
decimal_from_string() and decimal_to_string() functions use exchange_dfp()
before or after calling libdecnumber functions. A later version of
libdecnumber will use native byte order.

I tested remotely debugging a big-endian target (ppc32) from a little
endian host (i386) and it worked fine.


[1] http://sourceware.org/ml/gdb-patches/2005-09/msg00268.html
[2] http://sourceware.org/ml/gdb-patches/2006-08/msg00008.html
[3] http://sourceware.org/ml/gdb-patches/2006-07/msg00090.html
[4] http://sourceware.org/ml/gdb-patches/2006-07/msg00318.html
[5] http://sourceware.org/ml/gdb-patches/2006-08/msg00049.html
-- 
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]