From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Problems with debug-on-entry in the Lisp debugger. Date: Mon, 07 Mar 2005 14:40:51 +0100 Message-ID: References: <87sm37n2bv.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110204638 10742 80.91.229.2 (7 Mar 2005 14:10:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Mar 2005 14:10:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 07 15:10:37 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D8Ivz-0006cU-HY for ged-emacs-devel@m.gmane.org; Mon, 07 Mar 2005 15:10:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8JFl-0006Os-Ri for ged-emacs-devel@m.gmane.org; Mon, 07 Mar 2005 09:30:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D8JDI-0005jp-I5 for emacs-devel@gnu.org; Mon, 07 Mar 2005 09:28:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D8JD7-0005ge-Sw for emacs-devel@gnu.org; Mon, 07 Mar 2005 09:27:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8JD7-0005XA-1U for emacs-devel@gnu.org; Mon, 07 Mar 2005 09:27:53 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1D8ITV-0000TH-NF for emacs-devel@gnu.org; Mon, 07 Mar 2005 08:40:46 -0500 Original-Received: (qmail 50825 invoked from network); 7 Mar 2005 13:40:43 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 7 Mar 2005 13:40:43 -0000 Original-To: Lute Kamstra In-Reply-To: <87sm37n2bv.fsf@xs4all.nl> (Lute Kamstra's message of "Mon, 07 Mar 2005 12:05:24 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34276 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34276 Lute Kamstra writes: > When I was thinking about these three problems, it seemed to me that > the easiest and simplest thing to do, is to move support for > debug-on-entry into the C implementation of the Lisp interpreter. To > mark a function for debug-on-entry, you could set the debug-on-entry > property of the function's symbol and the Lisp interpreter would then > call the debugger. You could define a bit in the Lisp_Symbol, like this: struct Lisp_Symbol { unsigned gcmarkbit : 1; /* Non-zero means symbol serves as a variable alias. The symbol holding the real value is found in the value slot. */ unsigned indirect_variable : 1; /* Non-zero means call debugger on entry. */ unsigned debug_on_entry; ... }; Then you would define debug-on-entry and cancel-debug-on-entry in C as well, which simply set or clear that bit.