* scan_prologue/next, misunderstanding
@ 2009-05-19 12:37 Florent DEFAY
2009-05-19 13:33 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Florent DEFAY @ 2009-05-19 12:37 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: scan_prologue/next, misunderstanding
2009-05-19 12:37 scan_prologue/next, misunderstanding Florent DEFAY
@ 2009-05-19 13:33 ` Joel Brobecker
2009-05-19 13:39 ` Tristan Gingold
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2009-05-19 13:33 UTC (permalink / raw)
To: Florent DEFAY; +Cc: gdb
> 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.
Just a first guess:
I haven't looked at the code itself, but there are usually more than one
unwinders; for instance, there is a dwarf unwinder that reads the frame
info data from the dwarf data and use that exclusively to do the unwinding.
This might explain why the AVR unwinder based on prologue analysis doesn't
get called.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: scan_prologue/next, misunderstanding
2009-05-19 13:33 ` Joel Brobecker
@ 2009-05-19 13:39 ` Tristan Gingold
0 siblings, 0 replies; 3+ messages in thread
From: Tristan Gingold @ 2009-05-19 13:39 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Florent DEFAY, gdb
On May 19, 2009, at 3:33 PM, Joel Brobecker wrote:
>> 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.
>
> Just a first guess:
>
> I haven't looked at the code itself, but there are usually more than
> one
> unwinders; for instance, there is a dwarf unwinder that reads the
> frame
> info data from the dwarf data and use that exclusively to do the
> unwinding.
> This might explain why the AVR unwinder based on prologue analysis
> doesn't
> get called.
[ Well the default debug format for avr is stabs... ]
The avr prologue analyzer is somewhat buggy and breaks the next
command. I have a patch to fix that
but didn't yet manage to submit it. Will try next week.
Tristan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-19 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-19 12:37 scan_prologue/next, misunderstanding Florent DEFAY
2009-05-19 13:33 ` Joel Brobecker
2009-05-19 13:39 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox