This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: tail call optimization vs. debugging


On Sat, Mar 25, 2000 at 12:18:25PM -0500, Geert Bosch wrote:
> Here are a few yes/no debugging questions that popped up for me:
>   - Will function breakpoints be hit by a tail call or sibcall? 

Yes.

>   - In recursive functions, will printing arguments show the argument values
>     of the last (recursive) call?

On pure tail calls, yes.  The new arguments get put exactly where
they should have been for a normal call.

With tail recursion (which we had before, but will trigger more often
now) I can only say "probably".  It's implemented with a goto internally,
so the optimizer has the chance to not put the new arguments in place.

>   - Do cases where unbounded recursion (due to tail call optimizations)
>     only show a few frames in a trace-back always use bounded stack space?

Eh?  If I understand the question correctly, of course.
How else could it be a tail call optimization?


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]