From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Gud keybindings Date: Tue, 19 Aug 2014 12:03:36 +0700 Message-ID: References: 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 1408424637 16342 80.91.229.3 (19 Aug 2014 05:03:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2014 05:03:57 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 19 07:03:51 2014 Return-path: Envelope-to: geh-help-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 1XJbaI-0000j1-NJ for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Aug 2014 07:03:50 +0200 Original-Received: from localhost ([::1]:48022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJbaI-00023z-2n for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Aug 2014 01:03:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJba6-00023q-JU for help-gnu-emacs@gnu.org; Tue, 19 Aug 2014 01:03:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJba5-0000eM-GX for help-gnu-emacs@gnu.org; Tue, 19 Aug 2014 01:03:38 -0400 Original-Received: from mail-ig0-x233.google.com ([2607:f8b0:4001:c05::233]:53940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJba5-0000eE-C8 for help-gnu-emacs@gnu.org; Tue, 19 Aug 2014 01:03:37 -0400 Original-Received: by mail-ig0-f179.google.com with SMTP id h18so9062496igc.12 for ; Mon, 18 Aug 2014 22:03:36 -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=yk0JB1CEJJcWLMcRk1jR4DvN7zNYAF9aqdrj+5vKGH8=; b=s/11ymzFTqQ0TsgF5knYE87p0rPRTK8R5Kjn6aa7ZaYqnynG2qap8dxBi+E3BAjBTc /mcFtcXGRIPlXubWbAuK3gegOyI6RaS5QCHnxKZGlCxBA5qAE/moYPg33fHpI1+s2+rm e9T+47pI9z/tmTg5qFNKr7gLNIsDerrp76Ccnv3LHq8DMjmYVm7PaJmStHygI/Mx4CUx fiGanm73m3cwSsbbAsU0vvpGH1Ixz2ySMluI0s1/x7pcx1SqG62U76ZmNFmCCsAh8SFE XGeoKa3Tyj5YToibTq1Z6rL9zMiy7jRaXQIMuE4+KwQi4OEWRDLSEKYYa/8qz7QsowhX uJ1Q== X-Received: by 10.50.43.193 with SMTP id y1mr3312574igl.32.1408424616700; Mon, 18 Aug 2014 22:03:36 -0700 (PDT) Original-Received: by 10.107.6.30 with HTTP; Mon, 18 Aug 2014 22:03:36 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: zJrjB7ZY-_yuRCLZ6oEvG3q-4Nw X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::233 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99296 Archived-At: On Tue, Aug 19, 2014 at 8:49 AM, Stefan Monnier wrote: >> I was unable to solve all issues using only documented APIs and had to >> advise a couple of functions. > > We generally consider this as a bug. So please M-x report-emacs-bug, > explaining the functionality/hook that you failed to find. 18294. > Note that the issue you're trying to solve with Gud key-bindings is an > issue that we also want to solve in Emacs (especially since in > Emacs-24.4, C-x SPC is not bound to gud-break any more). It's just not > easy to solve in general: > - if you use M-x gud-gdb instead of M-x gdb, then gdb-source-file-list > doesn't exist). This turns out unimportant, for two reasons: * Advising =E2=80=9Cgdb-init-buffer=E2=80=9D is sufficient to turn on the m= ode in both existing source buffers and source buffers created during debugging; I don=E2=80=99t even have to hook =E2=80=9Cfind-file-hook=E2=80=9D. * Using =E2=80=9Cgud-gdb=E2=80=9D, =E2=80=9Cgdb-init-buffer=E2=80=9D is nev= er called at all, and clicking in the fringe does not set breakpoints. This is understandable because gud-gdb supports concurrent debugging sessions and it=E2=80=99s kind of hard to decide which debugger instance the breakpo= int goes to. In the same way, pressing a debugger control key while in a source buffer should effect an action in one of the debuggers, but which one? Due to the latter issue being hard, I am inclined to leave gud-gdb unsupported by now. > - I pretty much always have a Gud buffer open (when I'm done debugging, > I generally don't kill the buffer, because I know I'll get back to it > soon for something else). Killing the Gud interaction buffer is not necessary. =E2=80=9Cgdb-reset=E2= =80=9D runs when the =E2=80=9Cquit=E2=80=9D command is executed in gdb. (Not when the p= rogram under debugger finishes: Gud assumes you=E2=80=99re still debugging.) With the default keybindings, it is possible to leave a debugging session open, edit some files, recompile, re-run and continue debugging. In my model, though, an active debugging session prevents source files from being edited (because it hijacks single-letter keystrokes to control the debugger). Anyway, one could manually toggle the mode off if needed.