This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/214: i386-linux: can not display FP constants in integer registers
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/214: i386-linux: can not display FP constants in integer registers
- From: dan at debian dot org
- Date: 16 Sep 2001 00:59:55 -0000
- Cc: 112324 at bugs dot debian dot org
- Reply-To: dan at debian dot org
>Number: 214
>Category: gdb
>Synopsis: i386-linux: can not display FP constants in integer registers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 15 18:08:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: dan@debian.org
>Release: current
>Organization:
>Environment:
i386-linux
>Description:
Consider:
void tdt(const double x) {
double doubleVal;
doubleVal = x;
}
GCC 3.0 will gladly store a DFmode floating point value
which is only loaded and stored in two integer registers;
for example, in %eax:%edx. The stabs look like this:
.stabs "_Z3tdtd:F(0,21)",36,0,1,_Z3tdtd
.stabs "x:p(0,13)",160,0,1,8
...
.stabs "x:r(0,13)",64,0,1,0
Translation: This function takes a double argument, x,
at %ebp+8. It is then moved into a register. The register
is 0, or %eax - but this is an eight byte value! GDB
should be able to figure out that it is in %eax:%edx. GCC
has (fairly standard, I think) fixed pairings for which
integer registers it will use for such things. THere is talk about using two arbitrary integer registers, however,
where we'll still lose.
Interestingly, we do even worse with DWARF2. We don't have
the parameter stab, so we get x wrong in backtraces as
well as when printing it. With -gstabs, backtraces are
correct.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: