GNU logs - #18294, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18294: 24.3; gud and/or gdb: Add hooks to detect when a source file is visited during debugging
Resent-From: Yuri Khan <yuri.v.khan@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 19 Aug 2014 05:01:01 +0000
Resent-Message-ID: <handler.18294.B.14084244047619 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 18294
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 18294 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.14084244047619
          (code B ref -1); Tue, 19 Aug 2014 05:01:01 +0000
Received: (at submit) by debbugs.gnu.org; 19 Aug 2014 05:00:04 +0000
Received: from localhost ([127.0.0.1]:46862 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XJbWa-0001yE-0T
	for submit <at> debbugs.gnu.org; Tue, 19 Aug 2014 01:00:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43769)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <yurivkhan@HIDDEN>) id 1XJbWV-0001xw-Hq
 for submit <at> debbugs.gnu.org; Tue, 19 Aug 2014 00:59:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1XJbWO-0006xf-1y
 for submit <at> debbugs.gnu.org; Tue, 19 Aug 2014 00:59:50 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50,
 FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43459)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1XJbWN-0006xU-VH
 for submit <at> debbugs.gnu.org; Tue, 19 Aug 2014 00:59:47 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45444)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1XJbWM-0001SG-4J
 for bug-gnu-emacs@HIDDEN; Tue, 19 Aug 2014 00:59:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1XJbWI-0006w5-Ei
 for bug-gnu-emacs@HIDDEN; Tue, 19 Aug 2014 00:59:46 -0400
Received: from mail-ig0-x230.google.com ([2607:f8b0:4001:c05::230]:50694)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1XJbWI-0006vv-6y
 for bug-gnu-emacs@HIDDEN; Tue, 19 Aug 2014 00:59:42 -0400
Received: by mail-ig0-f176.google.com with SMTP id hn18so9442428igb.9
 for <bug-gnu-emacs@HIDDEN>; Mon, 18 Aug 2014 21:59:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:date:message-id:subject:from:to:content-type
 :content-transfer-encoding;
 bh=u7WRJsKgxlSdgG6lk+ZPBwXd0Iw2IL4q5Rab+z1aOkE=;
 b=GZhJX7xaY+CMKgPhuKpUwJgL/FDAx3mHcZt7zCRZ6flCtgiOtUfGacZBluxW/cV2wb
 620L73repv6FrNdKqmOe0LYwYEwFbPRIoq+f1hsvK+v5EF8gMJMb5eql4QiwHcwsRmsQ
 VidW3qIf0sIPVYdZxkFqwbAinWyVoAdfUNnG8ISAk6wjSA3sGvcVIqDBBJ8odtm7FMI0
 HfINSS8l53EJzlRje1K78WZaCngKI4Tgz5e8EUTb9gcnJFc9QagK9L5Vnk10NOdXwt5+
 923SNLC+toqob05Jcz0wXn7rN35xvt9DpER2B+K9FHba5dgyAB7c+o7K0+MgKCZX7Mf7
 vPMw==
MIME-Version: 1.0
X-Received: by 10.42.68.1 with SMTP id v1mr39652596ici.49.1408424381262; Mon,
 18 Aug 2014 21:59:41 -0700 (PDT)
Received: by 10.107.6.30 with HTTP; Mon, 18 Aug 2014 21:59:41 -0700 (PDT)
Date: Tue, 19 Aug 2014 11:59:41 +0700
X-Google-Sender-Auth: PB0GBjdjhwgcnq5E6nlHcRIF54Y
Message-ID: <CAP_d_8U6xVAzFYkzjz1ZKb_rGkTgdjo52vNACTV=zS2WDQqJ9w@HIDDEN>
From: Yuri Khan <yuri.v.khan@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.0 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.0 (---)

Hello,

I am writing a minor mode to control the debugger from a source buffer
by pressing single-letter keystrokes, e.g. "n" for gud-next, etc. The
mode itself is very simple =E2=80=94 it has a keymap, and it sets the buffe=
r
read-only while it is active so as to free these keys from their usual
'self-insert-command' bindings.

I need to be able to enable this mode for the same buffers where gdb
allows clicking in the fringe to set a breakpoint, and at the same
time as gdb sets up reaction to these clicks. For that purpose, I
currently advise the 'gdb-init-buffer' function.

Additionally, I need to detect when debugging is finished, in order to
disable the mode in all buffers, so that the user would be able to
edit files again. Currently, I advise 'gdb-reset' and loop over all
buffers, disabling the mode.

It would be nice if gdb-mi.el provided hooks that I could add to
instead of advising gdb functions.


Implementation proposal:

* Add a normal hook 'gdb-init-buffer-hook' that runs at the end of
'gdb-init-buffer' with the buffer being initialized still current.
* Add a normal hook 'gdb-reset-hook' that runs at the end of 'gdb-reset'.


Additional considerations:

The mode I am writing might be useful for Gud backends other than
gdbmi. To generalize to those, I would need the following hooks:

* A hook that can be used to enable the mode. It needs to run at the
start of a debugging session, once for each existing buffer visiting a
source file of the program being debugged, with that buffer being
current. Additionally, it needs to run when a new buffer is opened
while debugging, iff that buffer is visiting a source file of the
program being debugged.

* A hook that can be used to disable the mode. It needs to run once
when a debugging session ends. Alternatively, a hook that runs once
for each buffer in which the above hook has previously ran.


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-08 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:    Ubuntu 14.04.1 LTS

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib'
 '--localstatedir=3D/var/lib' '--infodir=3D/usr/share/info'
 '--mandir=3D/usr/share/man' '--with-pop=3Dyes'
 '--enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/2=
4.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-l=
isp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=3D/usr/lib/x86_64-linux-gnu' '--with-x=3Dyes'
 '--with-x-toolkit=3Dgtk3' '--with-toolkit-scroll-bars'
 'build_alias=3Dx86_64-linux-gnu' 'CFLAGS=3D-g -O2 -fstack-protector
 --param=3Dssp-buffer-size=3D4 -Wformat -Werror=3Dformat-security -Wall'
 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2''

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_DK.utf8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  global-whitespace-mode: t
  global-git-gutter-mode: t
  git-gutter-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  global-hl-line-mode: t
  cua-mode: t
  diff-auto-refine-mode: t
  auto-revert-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-srecode-minor-mode: t
  global-ede-mode: t
  ede-minor-mode: t
  tabbar-mode: t
  desktop-save-mode: t
  server-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <C-down> <C-down> <C-down> <C-down> <C-down>
<C-down> <C-down> <C-down> <C-down> <down> <down> <down>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <down> <down> <down> <down> <down> <up> <up>
<up> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<M-left> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <M-down> <M-right> <M-left> <f1>
f g u d - m i n o r - m o d e <return> C-g <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<up> <up> <up> <up> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <down> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <C-down>
<C-down> <C-down> <C-down> <C-down> <C-down> <C-down>
<C-down> <C-down> <C-down> <C-down> <C-down> <C-down>
<C-down> <C-down> <C-down> <C-down> <f1> v g u d -
m i n o r - m o d e - h <tab> o o k <return> C-g <M-left>
M-x r e p o r <tab> <return>

Recent messages:
Mark saved where search started
Mark set
Mark saved where search started [2 times]
Quit
Type "q" to restore previous buffer, <next> to scroll help.
byte-code: Beginning of buffer [3 times]
mouse-2, RET: find variable's definition
uncompressing gud.el.gz...done
Note: file is write protected
Here is not Git work tree [2 times]
Quit [2 times]

Load-path shadows:
~/.emacs.d/browse-kill-ring/browse-kill-ring hides
/usr/share/emacs24/site-lisp/emacs-goodies-el/browse-kill-ring
/usr/share/emacs/24.3/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/24.3/lisp/textmodes/flyspell

Features:
(pp misearch multi-isearch jka-compr find-func shadow sort mail-extr
emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mail-utils cc-langs cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs gdb-mi
bindat json gud ibuf-ext ibuffer windmove ede/dired persistent-soft
pcache font-utils highlight-beyond-fill-column disp-table whitespace
hi-lock sql-indent sql browse-kill-ring redo git-gutter tramp
tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache
tramp-loaddefs shell pcomplete paren hl-line cua-base unicode-fonts
warnings magit-key-mode magit package iswitchb ido esh-var esh-io
esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell
esh-module esh-mode esh-util ediff-merg ediff-diff ediff-wind ediff-help
ediff-util ediff-mult ediff-init ediff view grep format-spec epa epg
epg-config diff-mode autorevert git-rebase-mode thingatpt
git-commit-mode log-edit pcvs-util add-log yasnippet dropdown-list
semantic/bovine/gcc semantic/dep semantic/ia semantic/analyze/refs
semantic/db-find semantic/db-ref semantic/analyze semantic/sort
semantic/scope semantic/analyze/fcn semantic/db srecode/mode
semantic/senator semantic/format semantic/ctxt semantic/wisent
semantic/wisent/wisent semantic/decorate pulse srecode/insert
srecode/filters srecode/args srecode/find srecode/map srecode/ctxt
semantic/tag-ls semantic/find srecode/compile srecode/dictionary
srecode/table srecode semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local vc-git ede/cpp-root
ede/emacs ede/speedbar ede/files ede ede/base ede/auto ede/source
eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom
wid-edit eieio byte-opt bytecomp byte-compile cconv cedet tabbar
framemove advice help-fns advice-preload windcycle help-mode dired+
dired-x cl-macs gv dired-aux dired easymenu cl cl-lib desktop saveplace
server derived debian-el debian-el-loaddefs pylint compile comint
ansi-color ring haskell-mode-autoloads edmacro kmacro emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el
dpkg-dev-el-loaddefs devhelp time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Yuri Khan <yuri.v.khan@HIDDEN>
Subject: bug#18294: Acknowledgement (24.3; gud and/or gdb: Add hooks to
 detect when a source file is visited during debugging)
Message-ID: <handler.18294.B.14084244047619.ack <at> debbugs.gnu.org>
References: <CAP_d_8U6xVAzFYkzjz1ZKb_rGkTgdjo52vNACTV=zS2WDQqJ9w@HIDDEN>
X-Gnu-PR-Message: ack 18294
X-Gnu-PR-Package: emacs
Reply-To: 18294 <at> debbugs.gnu.org
Date: Tue, 19 Aug 2014 05:01:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 18294 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
18294: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18294
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18294: 24.3; gud and/or gdb: Add hooks to detect when a source file is visited during debugging
Resent-From: martin rudalics <rudalics@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 21 Aug 2014 09:25:02 +0000
Resent-Message-ID: <handler.18294.B18294.140861308313086 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18294
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Yuri Khan <yuri.v.khan@HIDDEN>, 18294 <at> debbugs.gnu.org
Received: via spool by 18294-submit <at> debbugs.gnu.org id=B18294.140861308313086
          (code B ref 18294); Thu, 21 Aug 2014 09:25:02 +0000
Received: (at 18294) by debbugs.gnu.org; 21 Aug 2014 09:24:43 +0000
Received: from localhost ([127.0.0.1]:48745 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XKObr-0003P0-8h
	for submit <at> debbugs.gnu.org; Thu, 21 Aug 2014 05:24:43 -0400
Received: from mout.gmx.net ([212.227.17.20]:57470)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XKObp-0003Od-OI
 for 18294 <at> debbugs.gnu.org; Thu, 21 Aug 2014 05:24:42 -0400
Received: from [62.46.215.64] ([62.46.215.64]) by mail.gmx.com (mrgmx103) with
 ESMTPSA (Nemesis) id 0MGzwE-1X7h213LjG-00DnOA;
 Thu, 21 Aug 2014 11:24:35 +0200
Message-ID: <53F5BACB.3060804@HIDDEN>
Date: Thu, 21 Aug 2014 11:24:27 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
References: <CAP_d_8U6xVAzFYkzjz1ZKb_rGkTgdjo52vNACTV=zS2WDQqJ9w@HIDDEN>
In-Reply-To: <CAP_d_8U6xVAzFYkzjz1ZKb_rGkTgdjo52vNACTV=zS2WDQqJ9w@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K0:wHefW2nglaN1O3l2wb4LoZNaDSHxv3pf/4NECI+k7C+bb4ape1A
 9hTbs5kWqSivO6pI3magUN4wKAdqoQfLnRXJB0PXE0H7fjmWAlQeOuELTEN3BrySb0+HecB
 JPe29kHxpsS6Tm8GiIkrKxfQLNo8xOcE6Jwqqw54gBHDiSJANi5/pmRdQm3dvc5UXr6s6ux
 KmqfuSy+FpY7rUpAPlwQQ==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > I am writing a minor mode to control the debugger from a source buffer=

 > by pressing single-letter keystrokes, e.g. "n" for gud-next, etc. The
 > mode itself is very simple =E2=80=94 it has a keymap, and it sets the =
buffer
 > read-only while it is active so as to free these keys from their usual=

 > 'self-insert-command' bindings.
[...]
 > It would be nice if gdb-mi.el provided hooks that I could add to
 > instead of advising gdb functions.

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.

martin





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18294: 24.3; gud and/or gdb: Add hooks to detect when a source file is visited during debugging
Resent-From: Yuri Khan <yuri.v.khan@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 24 Aug 2014 10:34:02 +0000
Resent-Message-ID: <handler.18294.B18294.140887638717943 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18294
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: martin rudalics <rudalics@HIDDEN>
Cc: 18294 <at> debbugs.gnu.org
Received: via spool by 18294-submit <at> debbugs.gnu.org id=B18294.140887638717943
          (code B ref 18294); Sun, 24 Aug 2014 10:34:02 +0000
Received: (at 18294) by debbugs.gnu.org; 24 Aug 2014 10:33:07 +0000
Received: from localhost ([127.0.0.1]:50722 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XLV6g-0004fL-UL
	for submit <at> debbugs.gnu.org; Sun, 24 Aug 2014 06:33:07 -0400
Received: from mail-ie0-f175.google.com ([209.85.223.175]:44623)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <yurivkhan@HIDDEN>) id 1XLV6e-0004ep-9Z
 for 18294 <at> debbugs.gnu.org; Sun, 24 Aug 2014 06:33:05 -0400
Received: by mail-ie0-f175.google.com with SMTP id x19so8202900ier.6
 for <18294 <at> 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==
MIME-Version: 1.0
X-Received: by 10.50.79.132 with SMTP id j4mr9040429igx.9.1408876378359; Sun,
 24 Aug 2014 03:32:58 -0700 (PDT)
Received: by 10.107.130.3 with HTTP; Sun, 24 Aug 2014 03:32:58 -0700 (PDT)
In-Reply-To: <53F5BACB.3060804@HIDDEN>
References: <CAP_d_8U6xVAzFYkzjz1ZKb_rGkTgdjo52vNACTV=zS2WDQqJ9w@HIDDEN>
 <53F5BACB.3060804@HIDDEN>
Date: Sun, 24 Aug 2014 17:32:58 +0700
X-Google-Sender-Auth: jgTxOgGBCpFc0NYYVd2vH1EesQY
Message-ID: <CAP_d_8W6S2836tH2drp_Qy-=vqWK9=vLx6ZMbr=N3v7GN_TiRA@HIDDEN>
From: Yuri Khan <yuri.v.khan@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Thu, Aug 21, 2014 at 4:24 PM, martin rudalics <rudalics@HIDDEN> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18294: 24.3; gud and/or gdb: Add hooks to detect when a source file is visited during debugging
Resent-From: martin rudalics <rudalics@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 29 Aug 2014 09:01:02 +0000
Resent-Message-ID: <handler.18294.B18294.14093028075731 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18294
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Yuri Khan <yuri.v.khan@HIDDEN>
Cc: 18294 <at> debbugs.gnu.org
Received: via spool by 18294-submit <at> debbugs.gnu.org id=B18294.14093028075731
          (code B ref 18294); Fri, 29 Aug 2014 09:01:02 +0000
Received: (at 18294) by debbugs.gnu.org; 29 Aug 2014 09:00:07 +0000
Received: from localhost ([127.0.0.1]:53115 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XNI2Q-0001UN-LZ
	for submit <at> debbugs.gnu.org; Fri, 29 Aug 2014 05:00:07 -0400
Received: from mout.gmx.net ([212.227.17.22]:65184)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XNI2N-0001TE-4r
 for 18294 <at> debbugs.gnu.org; Fri, 29 Aug 2014 05:00:05 -0400
Received: from [188.22.46.255] ([188.22.46.255]) by mail.gmx.com (mrgmx101)
 with ESMTPSA (Nemesis) id 0MPYqL-1XRyrz2z0j-004lvL; Fri, 29 Aug 2014 10:59:54
 +0200
Message-ID: <54004101.5060404@HIDDEN>
Date: Fri, 29 Aug 2014 10:59:45 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
References: <CAP_d_8U6xVAzFYkzjz1ZKb_rGkTgdjo52vNACTV=zS2WDQqJ9w@HIDDEN>	<53F5BACB.3060804@HIDDEN>
 <CAP_d_8W6S2836tH2drp_Qy-=vqWK9=vLx6ZMbr=N3v7GN_TiRA@HIDDEN>
In-Reply-To: <CAP_d_8W6S2836tH2drp_Qy-=vqWK9=vLx6ZMbr=N3v7GN_TiRA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K0:9FIze65d/v84Aepd4m+mHXkWvpTk9vSJw3eXFGbrcyMy497hykL
 at7R+9Yhew3ZtQHewEG0uXYvkaNeX2TWmwDuI1tJ6HW9OVb5vfKYrpEYnJt5jjVMIUpcxXM
 SGoLqi/PtwweRQ4xLZSewfbzxFt9juRRWm0JAdTxtxqDb5Q7lOGRb/1wDWEdbmHbBDBLTtp
 YCNSeq20Trdiw5HGTzQVQ==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > =E2=80=9CThis behavior=E2=80=9D consists of two changes to the current=
 state (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.
[...]
 > In my opinion, a separate minor mode is much cleaner than any of the
 > latter options.

Agreed.  I was only objecting to the idea that one could turn that mode
off only by quitting the debugger, that is by typing `quit' in gud-mode.

martin






Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.