[RFC] Unexpected automatic language switch - get_frame_language()

Andrew Cagney cagney@gnu.org
Sat Dec 6 00:28:00 GMT 2003


>> Sounds kinda like a debugging-optimized-code problem.  Your function
>> is tail-return optimized -- doesn't really return.  That's outside
>> the expected API.
> 
> 
> Kind of, yes,  but the code in question was compiled at -O0! It's a
> noreturn function because the compiler could statically determine that
> the exception would be unhandled.
> 
> 
>> I think you have to do "special" things for non-returning functions.
>> I've seen the same sort of thing for eg. _exit.
> 
> 
> Do you remember how these similar problems were approached and solved?
> 
> 
>> >So I think the correct way of doing this is to use a decremented PC
>> >for any frame but the bottom one. 
> 
>> 
>> I think that's fixing the wrong problem.  And it's not really portable.

Looked at frame_addr_in_block?

> Hmm, I thought this was "portable" since I sort of remember that we are
> already using this sort of technique in similar situations. I can't
> remember exactly which changes, but decrementing the PC was something we
> already did in other places. Maybe your objecting to the part that says
> "do the decrement only for the non bottom one"?
> 
> -- Joel 




More information about the Gdb-patches mailing list