all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Gud keybindings
Date: Wed, 13 Aug 2014 12:30:54 +0700	[thread overview]
Message-ID: <CAP_d_8VSwQFVsMYpniAMebyQdjgbhg0S5MpqxCZcSaYw9rCG3Q@mail.gmail.com> (raw)

Hello list,

I am trying to debug C++ programs using Emacs, Gud and GDB. This
involves setting breakpoints, stepping through and over function
calls, and examining variables.

By executing (gdb-many-windows) I can see the usual six Gud windows:
GDB interaction, variables, source, in/output, stack, and breakpoints.

I can focus the source buffer and navigate the source. In the source
buffer, I can use such keybindings as C-x C-a C-b to set a breakpoint,
and C-x C-a C-n to run until the next line.

This set of keybindings strikes me as very unintuitive and
inefficient. As a user coming from a different IDE, I would like such
keys as Ctrl+F2 to set a breakpoint, F7/F8 for “step” and “next”, and
Ctrl+F9 for “continue”. Or as a user familiar with console GDB, I
might like to press “b”, “s”, “n” and “c” in the source window to
invoke those same actions, but now they just act as
self-insert-command.

My two questions are:

* Surely I am not the first user who wants easy debugging keys? What
existing solutions are there? Or does everybody just (global-set-key
(kbd "f8") 'gud-next)?

* What would I need to do if I wanted to implement single-letter key
bindings for Gud commands? Define a minor mode with an appropriate
keymap that sets buffer-read-only when enabled and restores it when
disabled? How do I arrange for this mode to be enabled when visiting
any source buffer if and only if Gud is active?



             reply	other threads:[~2014-08-13  5:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  5:30 Yuri Khan [this message]
2014-08-18  9:27 ` Gud keybindings Yuri Khan
2014-08-19  1:49   ` Stefan Monnier
2014-08-19  5:03     ` Yuri Khan
     [not found] ` <mailman.7183.1408354083.1147.help-gnu-emacs@gnu.org>
2014-08-18 22:56   ` Emanuel Berg
     [not found] <mailman.7049.1407907858.1147.help-gnu-emacs@gnu.org>
2014-08-13 19:14 ` Emanuel Berg
2014-08-14  3:48   ` Yuri Khan
     [not found]   ` <mailman.7092.1407988122.1147.help-gnu-emacs@gnu.org>
2014-08-14 21:13     ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP_d_8VSwQFVsMYpniAMebyQdjgbhg0S5MpqxCZcSaYw9rCG3Q@mail.gmail.com \
    --to=yuri.v.khan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.