Re: Robustify frame_unwind_address_in_block heuristic?

Frederic RISS
2008-10-01T15:58:29Z

Le mercredi 01 octobre 2008 Ã  08:28 -0700, Joel Brobecker a Ã©crit :
> > But there's rarely anything to handle the special kind of call in your
> > 'returned-to' function, so from what's on the stack, I don't know how
> > we can tell.
>
> Perhaps there is some information either in the ret_stub or the called
> function that would allow get_frame_pc () to detect it, and thus massage
> the returned value by adding 1 so that get_frame_address_in_block
> returns the address at the start of the stub. Seems pretty hacky,
> but might work.

Yeah, I might throw another unwinder in the game that 'proxies' the
dwarf frame and returns ret_stub+1 as PC. Not really nice but it might
work.

> That being said, the backtrace must be strange, because instead of
> seeing the real caller in the backtrace, you see the ret_stub?

Well, when the user sees ret_from_irq_stub in the backtrace, she can
understand something... when she sees frobnicate_with_my_bits (or some
other unrelated stuff with a not-so-funny name) she's totally lost.

Fred