This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [CRIS] dwarf2 frame sniffer problem?
On Tue, Mar 16, 2004 at 05:26:16PM +0100, Orjan Friberg wrote:
> Daniel Jacobowitz wrote:
> >
> >I see that your GCC port uses textual prologues. As it happens, I just
> >implemented dwarf generation for that mechanism (for Thumb), so I know
> >how it's supposed to work. Here's your problem. First you have:
> >
> > /* FIXME: Slightly redundant calculation, as we do the same in
> > pieces below. This offset must be the total adjustment of the
> > stack-pointer. We can then def_cfa call at the end of this
> > function with the current implementation of execute_cfa_insn, but
> > that wouldn't really be clean. */
> >
> > cfa_label = dwarf2out_cfi_label ();
> > dwarf2out_def_cfa (cfa_label, cfa_reg, cfa_offset);
> >
> >but that label is at the beginning of the function, so this is
> >incorrect. That's not what the CFA is at the beginning of the
> >function.
>
> Would emitting that label *after* the prologue be an option (i.e.
> leaving us without dwarf2 information while still in the prologue)?
Nope. Then when you step into the prologue (i.e. "step over") unwind
information will be incorrect.
I recommend taking a look at the patch where I implemented this for
Thumb, or at the m68k implementation.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer