From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.bugs Subject: bug#18294: 24.3; gud and/or gdb: Add hooks to detect when a source file is visited during debugging Date: Sun, 24 Aug 2014 17:32:58 +0700 Message-ID: References: <53F5BACB.3060804@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1408876463 15420 80.91.229.3 (24 Aug 2014 10:34:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Aug 2014 10:34:23 +0000 (UTC) Cc: 18294@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 24 12:34:16 2014 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 1XLV7n-00080P-VH for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Aug 2014 12:34:16 +0200 Original-Received: from localhost ([::1]:43631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLV7n-0004EE-Dz for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Aug 2014 06:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLV7f-0004E6-Vi for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 06:34:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLV7b-0005FF-3O for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 06:34:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLV7a-0005F9-V0 for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 06:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XLV7a-0004gS-D0 for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 06:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuri Khan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Aug 2014 10:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18294 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18294-submit@debbugs.gnu.org id=B18294.140887638717943 (code B ref 18294); Sun, 24 Aug 2014 10:34:02 +0000 Original-Received: (at 18294) by debbugs.gnu.org; 24 Aug 2014 10:33:07 +0000 Original-Received: from localhost ([127.0.0.1]:50722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLV6g-0004fL-UL for submit@debbugs.gnu.org; Sun, 24 Aug 2014 06:33:07 -0400 Original-Received: from mail-ie0-f175.google.com ([209.85.223.175]:44623) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLV6e-0004ep-9Z for 18294@debbugs.gnu.org; Sun, 24 Aug 2014 06:33:05 -0400 Original-Received: by mail-ie0-f175.google.com with SMTP id x19so8202900ier.6 for <18294@debbugs.gnu.org>; Sun, 24 Aug 2014 03:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Gxu/XuJsnQKM4vfaKJQuGlB/PgdPewIsXdsf1wrd0QU=; b=btAxW1gKfTtE/USQLTzupvhblqofbu2LwXN8ynYHVW7br1eHtRDadm7jXhKvleZBqp z0thBiVn9raktT+M6RKyWdSYG28V5LIusYVSa4qfBlnA9gwRsGwUDeHo0D4uxXDHf6el tG2M0P2PL9gDq3D1dAsOVvjevThWLNNQWhtbGvCe0TBu01WtXGFVkX6ud9/UrgEKc0J8 cHEYbMuss+F5rm5ZRTbCtTpU7p2nCGIyc7Qj8R91xctBJKh1uK2d2m8iCfuI4iA5RBFB E31avq1cSTJ30uvaLidrcWE23lRJ1/xDHB480i72SMTq+YVyMmO9vCswxwpXX0TJm1gG 8FUw== X-Received: by 10.50.79.132 with SMTP id j4mr9040429igx.9.1408876378359; Sun, 24 Aug 2014 03:32:58 -0700 (PDT) Original-Received: by 10.107.130.3 with HTTP; Sun, 24 Aug 2014 03:32:58 -0700 (PDT) In-Reply-To: <53F5BACB.3060804@gmx.at> X-Google-Sender-Auth: jgTxOgGBCpFc0NYYVd2vH1EesQY 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: 140.186.70.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:92635 Archived-At: On Thu, Aug 21, 2014 at 4:24 PM, martin rudalics wrote: > > I'd like such a thing. But wouldn't it be easier to do this right in > gdb-mi.el? All I'd need is a simple key combination to toggle this > behavior off whenever I want to modify code on the fly. The next "run" > would then turn the behavior on again. =E2=80=9CThis behavior=E2=80=9D consists of two changes to the current stat= e (which allows editing while debugging): * binding additional keys, and * locking source files to be read-only, and these changes need to be done simultaneously. This may be achieved several ways, one of them being a minor mode, which I am suggesting here. Other ways include: * Binding keys directly in the gud-minor-mode-map, along with fringe clicks. This way, each such binding will have to check for a flag (which may or may not be the read-only flag), and invoke either the appropriate debugger command or self-insert-command. * Binding keys globally, then checking if the debugger is active, in addition to the above. In my opinion, a separate minor mode is much cleaner than any of the latter options.