Date: Tue, 11 Apr 2000 13:06:36 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Dieter Buerssner cc: djgpp-workers AT delorie DOT com Subject: Re: One more GDB for DJGPP little oddity In-Reply-To: <200004101801.OAA29968@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 10 Apr 2000, Dieter Buerssner wrote: > > But how is gdb supposed to know that? sizeof(long double) *is* 12, after > > all, and the p /x commands asks for display as single bytes. In that > > special case, I fail to see any error in displaying the two 'fill' bytes, > > additionally. > > Gdb knows already, that floating point registers are 10 bytes. This > can be seen by info float, that displays the 10 bytes, while p /x > $st0 displays 12 bytes. In GDB 4.18, "info float" is handled by a DJGPP-specific code, while "p/x $st0" is handled by the general-purpose GDB code; thus the difference. In GDB 5.0, "info float" was rewritten to work in the same way for all x86 platforms. I think Pierre was talking about this version. > p $st0 really asks to print the floating > point register, and not to dump the memory, where a long double is > stored. What you need to understand is that GDB maintains a register file for the debuggee, where all the registers for each call frame are stored; "p $st0" simply fetches the value from that register file. And in the register file, the FP registers are 12-byte long... > But, actually, I don't care to much about this. Info float is more > useful anyway (but needs more screen space). If you don't need all the info from "info float", try the command "info registers $st0" instead.