From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14124 invoked by alias); 9 Apr 2002 21:09:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14117 invoked from network); 9 Apr 2002 21:09:46 -0000 Received: from unknown (HELO tully.CS.Berkeley.EDU) (128.32.46.229) by sources.redhat.com with SMTP; 9 Apr 2002 21:09:46 -0000 Received: from tully.CS.Berkeley.EDU (hilfingr@localhost) by tully.CS.Berkeley.EDU (8.9.1a/8.9.1) with ESMTP id OAA22862; Tue, 9 Apr 2002 14:09:41 -0700 (PDT) From: Paul Hilfinger Message-Id: <200204092109.OAA22862@tully.CS.Berkeley.EDU> To: Daniel Jacobowitz cc: Don Howard , Andreas Schwab , Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [RFA] Avoid recursivly defined user functions. Reply-To: Hilfinger@cs.berkeley.edu In-reply-to: Your message of Tue, 09 Apr 2002 17:04:56 -0400. <20020409170456.A14389@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22857.1018386581.1@tully.CS.Berkeley.EDU> Date: Tue, 09 Apr 2002 14:09:00 -0000 X-SW-Source: 2002-04/txt/msg00375.txt.bz2 > 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