This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Mostly kill FRAME_CHAIN_VALID, add user knob
On Sat, Jan 04, 2003 at 08:42:13PM -0500, Daniel Jacobowitz wrote:
> On Thu, Jan 02, 2003 at 07:34:16PM +0000, Andrew Cagney wrote:
> > >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 :-)
>
> [Small wonder if you haven't pushed the call to FRAME_CHAIN_VALID
> somewhere... that's the same sort of thing that confuses me about all
> of your frame changes...]
>
> I've chosen to commit it instead, since your WIP isn't ready, and since
> you understand better than I do how it'll fit into the New Order.
Oh, by the way:
On i386-*-linux-gnu, this fixes four failures each in mi-stack.exp and
mi1-stack.exp that didn't like the extra frame below main. My default
config is down to ~20 failures.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer