8-byte register values on a 32-bit machine

Michael Elizabeth Chastain
2003-02-24T02:36:00Z

I saw a regression in gdb.base/store.exp this week:

gdb.base/store.exp: new check struct 4
PASS -> FAIL

This happens with gcc 2.95.3 -gdwarf-2.

This happens because gcc 2.95.3 puts an 8-byte variable into a pair of
4-byte registers. (gcc 3.2.2 puts the variable into memory so the
problem never arises -- but I bet it will come back for things like
FORTRAN complex numbers, which are very natural for register pairs).

It happened this particular week because the old dwarf-2 code had some
code to handle multi-register variables, although the code doesn't
appear to work for me. The new dwarf-2 code just completely spaces
in the case of multi-register variables.

We need to figure out what the right symbol table information is for
multi-register variables. If gcc is emitting good symbol table
information, gdb can do its job, and I can write a test case for it.

But I suspect that gcc 2.95.3 tells us about just one register and that
we can't win. But gdb can at least say "hmmm, you are trying to print 8
bytes from reg0, I can't do that", rather than print 4 bytes of correct
information and 4 bytes of rat poison. I think that would be acceptable
support for 2.95.3.

I filed a PR and I'll attach some executables to it.

Michael C