Re: [patch/rfc] Add a sentinel frame

Andrew Cagney
2003-02-19T18:36:12Z

> On Wed, Feb 19, 2003 at 12:51:18PM -0500, Andrew Cagney wrote:
>
>>
>
>> >>When you first committed that stuff, I warned you that would happen :-)
>> >>The above test handled differently.
>
>> >
>> >
>> >Hey, you can't blame me for this bit. I didn't add that check for
>> >DEPRECATED_PC_IN_CALL_DUMMY, it was already there in
>> >generic_frame_chain_valid.
>
>>
>> I'm refering to frame_chain_valid(), a small part of which you changed.
>> The useful bits (your changes) were copied to the rewritten
>> get_prev_frame. When frame_chain_valid() is deleted, that duplication
>> will go away. To see what's wrong with frame_chain_valid() see
>> legacy_get_prev_frame.
>
>
> I'm slow. Could you explain the problem? There's a comment about
> things being deduced there which is no longer true, and a comment about
> leaves of main that I can't make heads nor tails of but I don't think
> it applies.

Where does one start? it calls pc_unwind; it calls get_frame_pc; it
calls get_frame_base yet we passed in the frame base; it does tests in
the wrong order, carefully compare it to get_prev_frame; the lack of
frame-id; the fact that, on the sparc, the fp that is passed in was
bogus; knowing that all the function was ment to the general confusion
over unwinding the pc or fp first; knowing that frame_chain_valid()
started out as an equivalent to frame_id_p().

Contrast that to the new get_prev_frame() were everything is handled at
the one level.

As I said, to understand this, you're really going to have to study the
code.

Andrew