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]

Re: Dwarf unwinder problems with store.exp and preserved regs


On Tue, Jul 01, 2003 at 05:44:30PM -0400, Daniel Jacobowitz wrote:
> However, GCC only emits information about the CFA, not about the default
> saved-ness of registers.  So we get:
> 
> 168       /* Initialize newly allocated registers.  */
> 169       memset (rs->reg + rs->num_regs, 0, (num_regs - rs->num_regs) * size);
> 
> And 0 is UNDEFINED.  So $ebx - a call-saved register on i386 - shows up as
> undefined.

I think this is your bug.

>   - Fix GCC.  I -believe-, from reading the spec, that GCC is to blame for
>     not emiting this information.

No, what GCC doesn't provide is clobber information.  It *does* 
provide save information.  GDB should be assuming the register
is valid in the previous frame unless it sees DW_CFA_undefined.

Leastwise, that's certainly what gcc's frame unwinder assumes,
and I don't see anything that contradicts this in the standard.


r~


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