This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Avoid recursivly defined user functions.
- From: Paul Hilfinger <hilfingr at EECS dot Berkeley dot EDU>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: Don Howard <dhoward at redhat dot com>, Andreas Schwab <schwab at suse dot de>, Michael Snyder <msnyder at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Tue, 09 Apr 2002 14:09:41 -0700
- Subject: Re: [RFA] Avoid recursivly defined user functions.
- Reply-to: Hilfinger at cs dot berkeley dot edu
> How about something even simpler - track user command depth at runtime?
> Set an absurd limit, like 1024 deep, if we can handle that in a
> normal-sized stack limit. Then complain if we hit it at runtime.
I completely agree with this. After all, if you were willing to
contemplate outlawing recursion altogether, you certainly won't LOSE
anything by Daniel's approach, and you gain everything you wanted in
the first place---to avoid crashing GDB.
Paul