all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Roberts <nick@nick.uklinux.net>
Subject: Emacs mode for GDB
Date: Mon, 20 May 2002 23:36:57 +0100	[thread overview]
Message-ID: <15593.31369.271002.495717@nick.uklinux.net> (raw)


I am writing a mode for Emacs that allows it to act as a GUI for gdb. 

It is based on an earlier file called gdba.el which may not be familiar to
some members of this mailing list since, as far as I know, most GNU/Linux
distributions only included it in the source package of gdb and not the binary
one. gdba.el has a stack buffer, breakpoints buffer and separate input/output
buffer for the program being debugged among other features. It uses a feature
of gdb called annotations. Although Emacs uses the gdb option `-annotations=1'
(or `-fullname') in gud.el, this option only generates one annotation (to tell
gud where it has stopped). The option used here, `-annotations=2', has many
more and this makes it more powerful.

The mode I am writing extends gdba.el and uses features of Emacs 21 that
weren't available to it such as the toolbar and breakpoint icons (or
characters for a text-only terminal) in the display margin.

Before I develop this mode further, I would be grateful for some feedback to
help ensure it is a mode that people actually want to use. I have therefore
placed a tar file with the lisp code and associated files at 
http://nick.uklinux.net/gdbel-0.1.tgz for anyone who is able to spend some
time to look at it and give comment.

There is also a screenshot of Emacs using this mode at
http://nick.uklinux.net/screenshot.png.

Thanks

Nick


Brief description of mode
-------------------------

This mode works best in X using the full screen. You can see its features if
you run gdb using a simple C program that calls another procedure and prints
some output :

After a short delay the following layout should appear (key-bindings given in
relevant buffer) :

---------------------------------------------------------------------
                            gdb  toolbar
---------------------------------------------------------------------
GUD buffer (I/O of gdb)           | Locals buffer
                                  |
                                  |
                                  |
---------------------------------------------------------------------
Source buffer                     | Input/Output (of debugee) buffer
                                  | (comint-mode)
                                  |
                                  |
                                  |
                                  |
                                  |
                                  |
---------------------------------------------------------------------
Stack buffer                      | Breakpoints buffer
[mouse-2]   gud-frames-select     | SPC    gud-toggle-bp-this-line
                                  |   g    gud-goto-bp-this-line
                                  |   d    gud-delete-bp-this-line
---------------------------------------------------------------------

All the buffers share the toolbar and source should always display in the same
window e.g after typing g on a breakpoint in the breakpoints buffer. The GUI
interacts with the GUD buffer eg breakpoint icons are displayed not only by
setting a break with gud-break but also by typing break in the GUD buffer.

There are also a couple of interactive lisp functions e.g
gdb-restore-windows - to restore the layout if its lost.
gdb-quit            - to delete (most) of the buffers used by gdb.

             reply	other threads:[~2002-05-20 22:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-20 22:36 Nick Roberts [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-20 22:45 Emacs mode for GDB Nick Roberts
2002-05-20 22:04 ` Eli Zaretskii
2002-05-20 22:15 ` Colin Walters
2002-05-21  6:26 ` Miles Bader
2002-05-21 12:32   ` Nick Roberts
2002-05-21 20:42   ` Richard Stallman
2002-05-21 13:24 ` Andreas Fuchs
2002-05-21 20:37   ` Nick Roberts
2002-06-13 17:54 Nick Roberts

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=15593.31369.271002.495717@nick.uklinux.net \
    --to=nick@nick.uklinux.net \
    /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.