unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs mode for GDB
@ 2002-05-20 22:36 Nick Roberts
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Roberts @ 2002-05-20 22:36 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Emacs mode for GDB
@ 2002-05-20 22:45 Nick Roberts
  2002-05-20 22:04 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Nick Roberts @ 2002-05-20 22:45 UTC (permalink / raw)


My previous message should have read :

> I have therefore placed a tar file with the lisp code and associated files at
> http://www.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://www.nick.uklinux.net/screenshot.png.

Sorry !

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Emacs mode for GDB
@ 2002-06-13 17:54 Nick Roberts
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Roberts @ 2002-06-13 17:54 UTC (permalink / raw)



I have updated the mode for Emacs, gdb.el (Version 0.3), that I am writing. 
Changes include :

* Display of arrays (formatting and slices : C only) and structures
  improved. To view slices click on appropriate index by the header called 
  `Slice' with the middle mouse button (`gdb-array-slice') and enter values
  in the minibuffer.

* Interaction with watchpoints in breakpoints buffer now working.

* New lisp function : toggle-gdb-windows : Toggle the number of windows gdb uses.

* Removed hypertext help buffer (converted from XEmacs gud.el) until author is
  traced and legal papers obtained. This probably isn't the mailing list to
  ask but does anyone know who wrote this ?

* Numerous minor changes (again).

It can be downloaded from http://www.nick.uklinux.net and the current version
will always be at gdbel.tgz.

It looks half decent now and I would be grateful if people could test it on a
real debugging session of a C program (Emacs ? ;-))

Nick

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-06-13 17:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-20 22:36 Emacs mode for GDB Nick Roberts
  -- strict thread matches above, loose matches on Subject: below --
2002-05-20 22:45 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).