> Pretty gross, neh? Well, file vs. func is merely a question of whether we > stop at main or not, so I added "set backtrace-below-main" in order to let > the user choose. Generic vs. not is a question of dummy frames, and the > generic versions work with non-generic dummy frames, so there's no reason > for that distinction earlier. It won't harm those three m68k targets (if > they still work) to use a more comprehensive frame_chain_valid. And the > five more specific ones up above can be retained, since they are only > _additional_ checks. I'm not entirely convinced that the Interix one is > necessary but I left it alone. > > So, after this patch we have FRAME_CHAIN_VALID as a predicated function that > only five architectures define; everything else just uses the new > frame_chain_valid () function, which is a more general version of > generic_func_frame_chain_valid. > > I'm more confident I got the texinfo right this time :) I tested the patch > and the new functionality on i386-linux and arm-elf, to make sure I got the > details of FRAME_CHAIN_VALID_P () right. > > I'll look to commit this in January, if no one has any comments. Andrew, > would you rather this went in frame.c? Since a purpose of that file seems > to be moving things from blockframe.c to it... FYI, Much of this is superseeded by the frame overhaul - in particular the introduction of frame_id_unwind(). The new code doesn't even call frame chain valid! Perhaphs wait for the attached [wip] to be committed and then tweak that to match your proposed policy (we can then just deprecate FRAME_CHAIN_VALID_P :-). However, making the change in parallel wouldn't hurt. Looking at my WIP, I'll need to tweak the code segment: + prev_frame->pc = frame_pc_unwind (next_frame); + if (prev_frame->pc == 0) + /* The allocated PREV_FRAME will be reclaimed when the frame + obstack is next purged. */ + return NULL; + prev_frame->type = frame_type_from_pc (prev_frame->pc); so that it checks for where the PC resides and abort accordingly. The attached is WIP since I still need to see it working once :-) Andrew