Proposal for `info float' layout

Eli Zaretskii eliz@gnu.org
Sun Oct 31 14:37:00 GMT 1999


> I'm using "%+26.20Lg" right now.  That should be enough to print all
> significant digits shouldn't it.

Does "%+26.20Lg" have enough room for the exponent and the decimal?
The exponent prints as 6 characters: "e+NNNN", which makes it 7
characters together with the decimal point.  So it seems like
"%+27.20Lg" is better, no?

Actually, the last digit would be garbled if you print 20 significant
digits, so you might try "%+26.19Lg".  I usually find it instructional
to print some simple constants, like 2 and Pi, and results of simple
calculations, like 2*2, to see if the format is okay.

>    > It has also been suggested that the mnemonic associated with the
>    > opcode should be printed.  While I think this is a good idea it is not
>    > really easy to use libopcodes for this purpose.
> 
>    What are the difficulties with using libopcodes?
> 
> The only entry points are `print_insn_i386_att' and
> `print_insn_i386_intel'.  These functions try to decode a full
> instruction, which is bad since the FPU opcode register only contains
> the opcode bytes, and no information about the operand.  Of course we
> could disassemble the instruction pointed at by the FPU instruction
> pointer, but I'd rather just print the mnemonic based on the contents
> of the FPU opcode register.

Oh, I thought you *were* trying to disassemble at the IP ;-)

Well, how about looking up the opcode in a table that lists the
corresponding mnemonics?  There aren't that many FP instructions, are
there?


More information about the Gdb mailing list