scan_prologue/next, misunderstanding

Florent DEFAY
2009-05-19T12:37:08Z

Hi,

I am still working on a new GDB port.

I got inspiration from avr-tdep.c. I still have problems with 'next'.
I set a 'printf' in the function skip_prologue and I can tell it is never used.

I read the function avr_scan_prologue and avr_frame_unwind_cache.
It seems like avr_frame_unwind_cache should be called by GDB after the
prologue has been executed. I think that because
once avr_scan_prologue has been processed, there is:
_________________________________________________________________________
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
this_base = get_frame_register_unsigned (this_frame, AVR_FP_REGNUM);
high_base = get_frame_register_unsigned (this_frame,
AVR_FP_REGNUM+1);
this_base += (high_base << 8);
_________________________________________________________________________
I think this_base would not have the right value if it was processed
before the end of
execution of the prologue.

But I set 'printf' in these functions and in my case they are used at
each 'step'.
Moreover, I think these functions are necessary to find the end of the prologue,
so the end of the prologue cannot be known inside.

Please set me straight about that.

Regards.

Florent