This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Dwarf unwinder problems with store.exp and preserved regs
- From: Richard Henderson <rth at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 2 Jul 2003 12:10:59 -0700
- Subject: Re: Dwarf unwinder problems with store.exp and preserved regs
- References: <20030701214429.GA3913@nevyn.them.org>
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~