From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: debug-on-call Date: Tue, 18 Feb 2003 11:15:22 -0700 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E52783A.2070408@ihs.com> References: <3E3E9E3B.5040000@ihs.com> <87adhconnz.fsf@jidanni.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020709090407090400050303" X-Trace: main.gmane.org 1045592057 16593 80.91.224.249 (18 Feb 2003 18:14:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2003 18:14:17 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18lCFw-0004J4-00 for ; Tue, 18 Feb 2003 19:14:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18lCHq-0000CA-04 for gnu-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2003 13:16:10 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18lCHN-0008Fw-00 for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2003 13:15:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18lCH3-0007pb-00 for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2003 13:15:24 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18lCH3-0007n2-00 for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2003 13:15:21 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18lCEg-0004BX-00 for ; Tue, 18 Feb 2003 19:12:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18lCEe-0004BL-00 for ; Tue, 18 Feb 2003 19:12:52 +0100 Original-Lines: 98 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4487 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4487 This is a multi-part message in MIME format. --------------020709090407090400050303 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Dan Jacobson wrote: >>>>>>"K" == Kevin Rodgers writes: >>>>>> > > K> Dan Jacobson wrote: > >>>I wanted to have emacs stop if it ever called a function, but no: >>>debug-on-entry: Function base64-encode-region is a primitive >>> >>>I don't need to debug inside that function. All I wanted was to see a >>>backtrace so I can tell the layers of stuff calling that function. >>> > > K> (defadvice base64-encode-region (before debug activate) > K> "Debug (when called from an Emacs Lisp function)." > K> (debug)) > > OK, maybe this could be the guts of the new debug-on-call function, or > at least documented as what to do when debug-on-entry isn't usable... Please find attached a tentative user (i.e. non-integrated) implementation. > Of course an antidote should also be provided to turn it off. Yep, but I haven't gotten that far yet. > P.S. Kev, your References: > does not give my > original post the fame and glory of its original Message-ID causing > its thread to be broken 'in many newsreaders'. That's odd, google finds it under that Message-ID. I used http://www.google.com/advanced_group_search?hl=en to find From: Dan Jacobson Newsgroups: gnu.emacs.bug Subject: debug-on-call Date: 01 Feb 2003 03:03:22 +0800 Lines: 23 Sender: news Approved: bug-gnu-emacs@gnu.org Message-ID: Reply-To: Dan Jacobson NNTP-Posting-Host: monty-python.gnu.org > Did you try reading > this group via NNTP of gmane.org for maximal comfort? I primarily read gnu.emacs.bug and only check gmane.emacs.bug (both via NNTPSERVER=news.cis.dfn.de) to make sure I don't miss any articles. -- Kevin Rodgers --------------020709090407090400050303 Content-Type: text/plain; name="debug-primitive-on-entry.el" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="debug-primitive-on-entry.el" (defadvice debug-on-entry (around advise-primitive activate) "If an error is signalled because FUNCTION is a primitive, query the user whether to debug Lisp calls via `defadvice'." (condition-case condition-data ad-do-it (error (let ((error-message (format "Function %s is a primitive" (ad-get-arg 0)))) (if (and (equal (car (cdr condition-data)) error-message) (interactive-p) (yes-or-no-p (concat error-message "; debug Lisp calls via defadvice? "))) (eval `(defadvice ,(ad-get-arg 0) (before debug activate) "Debug (when called from an Emacs Lisp function)." (debug))) (signal 'error (cdr condition-data))))))) ;; (defadvice cancel-debug-on-entry (around advise-primitive activate) ;; ...) --------------020709090407090400050303 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Bug-gnu-emacs mailing list Bug-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs --------------020709090407090400050303--