This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]