Hello,
This patch changes the frame creation code so that it can unwind the PC before doing anything else. By unwinding the PC first, it becomes possible to correctly set the frame from the outset. The old code would set the frame's type last (resulting in architecture code having to back patch it). It also (at least in theory) makes it possible to avoid certain frame unwinds.
Since, right now, all architectures currently specify a deprecated init frame pc method, the code isn't used by any architecture. A follow on will be to enable the code on at least one architecture.
I'll commit the attached in a few days,
enjoy,
Andrew
2002-12-10 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_type_from_pc): New function.
(create_new_frame): Use frame_type_from_pc instead of custom code.
(get_prev_frame): When neither DEPRECATED_INIT_FRAME_PC_P nor
DEPRECATED_INIT_FRAME_PC_FIRST_P use frame_type_from_pc and
frame_pc_unwind to set the frame's type at the point of frame
creation.
Hmm, I'm going to put this patch on hold until after the
frame_id_unwind() patch I just posted is committed. That way the switch
to use frame_id_unwind() and frame_pc_unwind() can be done in a single hit.