This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
dwarf2cfi.c needs to handle NUM_REGS + NUM_PSEUDO_REGS
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 31 Jan 2002 14:58:03 -0500
- Subject: dwarf2cfi.c needs to handle NUM_REGS + NUM_PSEUDO_REGS
Just noticed this,
The symtab readers (eg stabsread.c) allow REGNUM's in the full range [0
.. NUM_REGS + NUM_PSEUDO_REGS). dwarf2cfi.c restricts things to just
the first NUM_REGS.
Targets with pseudo registers in the debug info (yes this can happen)
will have problems with the code. The m68hc11, for instance, ends up
with the value of a register in the pseudo-register range sitting in memory.
Looking at the actual code, the fix isn't trivial. The code is also
saving and restoring the register buffer (see cfi_pop_frame()). That
operation is very poorly defined - it is limited to the first NUM_REGS :-(
I'll file a bug-report so people are aware of the issue.
Andrew