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]

Re: Printing decimal128 types out of registers


On Mon, Jan 21, 2008 at 12:54:34PM -0200, Thiago Jung Bauermann wrote:
> Yes, even for software decimal float implementations the calling
> convention for PowerPC. is to put _Decimal128 in a pair of float
> registers

This, by itself, does not mean we need to be able to display two
registers as a _Decimal128.  We will still be able to display a named
argument in two registers as _Decimal128, because the debug
information will (presumably) show it as two pieces in two registers
using DW_OP_piece.

There's no way to do math on a _Decimal128 value in two FP registers
without the hardware support.  So I suggest we not have $dl0 except on
hardware where the GDB user might look at the next instruction, see
that it operates on register dl0, and want to check the value of that
register.

> I was talking to Luis about this, and he suggested an approach other
> than using pseudo registers: create a way to make GDB consider two
> consecutive registers as contiguous data. Since there are other types
> that are also passed in consecutive registers (e.g., long long,
> soft-float, IBM lon double), this mechanism would be more useful. I
> think this is a good idea.

This is like stepping backwards in time.  We used to treat consecutive
registers as a big data blob and it was a terrible mess ... if you
want to examine typed multi-register values, I suggest leaving any
"consecutive" requirement out of the picture.

On Mon, Jan 21, 2008 at 06:30:16PM +0100, Mark Kettenis wrote:
> > Perhaps some syntax could be created, like:
> > 
> > (gdb) print {_Decimal128} $f2,$f3
> > $1 = 1.2
> > 
> > What do you think?
> 
> I'm not sure how this would fit into the expression parser.  t might
> get really ugly.

Definitely agreed.  Maybe an explicit command to create a name for a
group of registers in order, using the same underlying mechanism we
use for DWARF.

-- 
Daniel Jacobowitz
CodeSourcery


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