Re: [patch/rfc] Add a sentinel frame

Daniel Jacobowitz
2003-02-20T19:32:07Z

On Wed, Feb 19, 2003 at 04:25:52PM -0500, Andrew Cagney wrote:
>
> >Oh, but you're misunderstanding. There's more than one frame in there.
> >The call stack in glibc looks like:
> > _start
> > calls __libc_start_main
> > calls main
>
> Nope, that assumes glibc. Remember, i debugged this using the d10v.

No, it doesn't assume glibc, it uses glibc as an example. That check
would prevent backtraces entering _start; on the d10v, that would
override backtrace-beyond-main, but on a glibc system, it wouldn't.

> >_start is written in assembly; it generally doesn't have a frame worth
> >talking about. Even if we want to show __libc_start_main, we can't
> >safely backtrace into _start. That's what the inside_entry_file
> >(frame_pc_unwind (fi)) is for.
>
> Why not? If someone wants to do that, why should we stand in their way :-)

... uhm, I guess, I don't really find that convincing. The check was
there because it won't work. But now that it's not the default I don't
care if you want to break it.

> >The missing test I mentioned above inside_entry_func, not
> >inside_entry_file. Where'd that go?
>
> Left until something that does need it surfaces.

If you're going to yank code that way please add a comment saying so,
before you yank frame_chain_valid as dead and someone else discovers
all the inside_entry_func support is now dead code and purges it.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer