From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#21365: Edebug always stops when execution enters an instrumented function Date: 20 Sep 2015 22:31:47 -0000 Organization: muc.de e.V. Message-ID: <20150920223147.1664.qmail@mail.muc.de> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1442788349 18568 80.91.229.3 (20 Sep 2015 22:32:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2015 22:32:29 +0000 (UTC) Cc: Paul Pogonyshev To: 21365@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 21 00:32:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zdn9W-0003y5-UX for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Sep 2015 00:32:11 +0200 Original-Received: from localhost ([::1]:53996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdn9W-000406-71 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Sep 2015 18:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdn9T-0003zp-0c for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 18:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zdn9O-0002Ko-4c for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 18:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdn9O-0002Kf-1l for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 18:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zdn9N-00068d-MR for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 18:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Sep 2015 22:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21365 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21365-submit@debbugs.gnu.org id=B21365.144278831223580 (code B ref 21365); Sun, 20 Sep 2015 22:32:01 +0000 Original-Received: (at 21365) by debbugs.gnu.org; 20 Sep 2015 22:31:52 +0000 Original-Received: from localhost ([127.0.0.1]:39300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zdn9E-00068G-AE for submit@debbugs.gnu.org; Sun, 20 Sep 2015 18:31:52 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:28124) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zdn9B-000686-2E for 21365@debbugs.gnu.org; Sun, 20 Sep 2015 18:31:50 -0400 Original-Received: (qmail 1665 invoked by uid 3782); 20 Sep 2015 22:31:47 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.1-RELEASE-p16 (amd64)) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106752 Archived-At: Hello, Paul. In article you wrote: > [-- text/plain, encoding 7bit, charset: UTF-8, 20 lines --] > This more of a feature request: make edebug stop when entering such a > function _optionally_. > Usecase: I want to debug certain function, but only when it takes specific > execution route. I instrument the function, set a breakpoint where I want > to debug it. But in addition to the breakpoint, edebug also pauses each > time the function is entered and I see no way to disable it. > In some cases this is a mere annoyance, in others it makes debugging > impossible. For example, currently I want to debug 'auto-revert-handler' > which somehow reverts buffer where both Auto Revert and Auto Revert Tail > modes are disabled. However, I can never make Edebug stop on > (message "Reverting buffer `%s'." (buffer-name))) > line (though I see it _is_ executed, if only from the *Messages* buffer). > It always stops at the beginning of the function instead. Yes, I sometimes feel this annoyance too. Looking at the source code in edebug.el, it seems this problem was sensed by Eric Raymond, and he was working on it in May 1992. (!!!!) The function `edebug-set-initial-mode' was commented out by edebug's original author Daniel LaLiberte on 24th March 1994. 21 years later, the reasons for this commenting out have probably been lost. (Takes hat off to git blame.) I don't see any overwhelming reasons why ESR's idea and code couldn't be resurrected. > Paul -- Alan Mackenzie (Nuremberg, Germany).