* 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
* Re: Emacs mode for GDB
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
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2002-05-20 22:04 UTC (permalink / raw)
Cc: emacs-devel
> From: Nick Roberts <nick@nick.uklinux.net>
> Date: Mon, 20 May 2002 23:45:09 +0100
>
> > There is also a screenshot of Emacs using this mode at
> > http://www.nick.uklinux.net/screenshot.png.
Very NICE!! Makes you wish to just go out and debug something right
away ;-)
Thanks for working on this.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Emacs mode for GDB
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 13:24 ` Andreas Fuchs
3 siblings, 0 replies; 10+ messages in thread
From: Colin Walters @ 2002-05-20 22:15 UTC (permalink / raw)
On Mon, 2002-05-20 at 18:45, Nick Roberts wrote:
> > There is also a screenshot of Emacs using this mode at
> > http://www.nick.uklinux.net/screenshot.png.
Looks very cool!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Emacs mode for GDB
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
3 siblings, 2 replies; 10+ messages in thread
From: Miles Bader @ 2002-05-21 6:26 UTC (permalink / raw)
Cc: emacs-devel
I tried your mode, and it seems generally like a nice idea.
Some comments:
(1) I get the following error regularly:
error in process filter: gdb-output-burst: Symbol's function definition is void: gdb-display-end
error in process filter: Symbol's function definition is void: gdb-display-end
Indeed there seems to be no such function `gdb-display-end'.
(2) Completion doesn't work on the gdb command line like it does in
the standard gdb-mode.
(3) The file `gdb.el' is apparently constructed in large parts from the
existing `gud.el', with much of the functionality of gud removed (in
particular, support for non-gdb debuggers). Is that necessary?
If emacs were to use your gdb.el unchanged, it would result in a
huge amount of duplicated code between gdb.el and gud.el; it would
be nicer to either continue to use gud.el, with new features added,
or otherwise avoid code duplication.
(4) With all the windows displayed, it requires a lot of space. It
would be nice to have some way of specifying which windows get
used -- for instance, the breakpoint window can be displayed only
if there are breakpoints, and when tested it, I didn't need the
backtrace, or I/O windows either, so I'd like to be able to disable
them.
(5) You should keep the historical author information in the file header
comment.
-Miles
--
`Life is a boundless sea of bitterness'
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Emacs mode for GDB
2002-05-21 6:26 ` Miles Bader
@ 2002-05-21 12:32 ` Nick Roberts
2002-05-21 20:42 ` Richard Stallman
1 sibling, 0 replies; 10+ messages in thread
From: Nick Roberts @ 2002-05-21 12:32 UTC (permalink / raw)
Cc: emacs-devel
Miles Bader writes:
>
> (1) I get the following error regularly:
>
> error in process filter: gdb-output-burst: Symbol's function definition
> is void: gdb-display-end
> error in process filter: Symbol's function definition is void:
> gdb-display-end
>
> Indeed there seems to be no such function `gdb-display-end'.
Thats right there is currently no gdb-display-end (or gdb-display-begin).
Examining data (array slices, diving into structures) is on of the things
that I want to do next. Currently if you comment out the two items :
("display-begin" gdb-display-begin)
("display-end" gdb-display-end)
in the variable gdb-annotation-rules the error above should go away and any
variables or expressions that you display should just appear in the GUD buffer
(or possibly the Input/Output buffer!).
> (2) Completion doesn't work on the gdb command line like it does in
> the standard gdb-mode.
Hmm. No, gdba.el doesn't seem to have it either. I must have lost it in the
merge. I'll try to put it back.
> (3) The file `gdb.el' is apparently constructed in large parts from the
> existing `gud.el', with much of the functionality of gud removed (in
> particular, support for non-gdb debuggers). Is that necessary?
Its just a starting point to help me get something working. At the beginning
I wasn't very familiar with gud.el as lisp code and I hadn't even heard of
gdba.el
> If emacs were to use your gdb.el unchanged, it would result in a
> huge amount of duplicated code between gdb.el and gud.el; it would
> be nicer to either continue to use gud.el, with new features added,
> or otherwise avoid code duplication.
I guess it could either be folded back into gud.el or gdb.el could have the line
`(require 'gud)' in it and the autoloading of the main lisp function gdb could
be suppressed in gud.el. There may be some conflicts in namespace which could
possibly be resolved by changing the prefix gud- to gdb- for some functions
and variables.
> (4) With all the windows displayed, it requires a lot of space. It
> would be nice to have some way of specifying which windows get
> used -- for instance, the breakpoint window can be displayed only
> if there are breakpoints, and when tested it, I didn't need the
> backtrace, or I/O windows either, so I'd like to be able to disable
> them.
There is a variable called gdb-many-windows which if set to nil will suppress
the display of the ancillary buffers. However, you need the breakpoints
buffer for proper display of the breakpoint icons as they are updated by the
relevant annotation from gdb. Incidentally, the toolbar could be inserted
directly in gud.el (I think) without much alteration.
> (5) You should keep the historical author information in the file header
> comment.
The code is in a state of turmoil at the moment. Some author information for
gud.el is included a short way down. However, it doesn't say in gdba.el who
the authors were. When the code is complete, I will try to deal with this matter
properly.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Emacs mode for GDB
2002-05-21 6:26 ` Miles Bader
2002-05-21 12:32 ` Nick Roberts
@ 2002-05-21 20:42 ` Richard Stallman
1 sibling, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2002-05-21 20:42 UTC (permalink / raw)
Cc: nick, emacs-devel
(3) The file `gdb.el' is apparently constructed in large parts from the
existing `gud.el', with much of the functionality of gud removed (in
particular, support for non-gdb debuggers). Is that necessary?
We do not want to desupport the other debuggers, so merging the
missing code for them back in is one of the things that needs to be done
before this can be really "ready".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Emacs mode for GDB
2002-05-20 22:45 Emacs mode for GDB Nick Roberts
` (2 preceding siblings ...)
2002-05-21 6:26 ` Miles Bader
@ 2002-05-21 13:24 ` Andreas Fuchs
2002-05-21 20:37 ` Nick Roberts
3 siblings, 1 reply; 10+ messages in thread
From: Andreas Fuchs @ 2002-05-21 13:24 UTC (permalink / raw)
Cc: emacs-devel
On 2002-05-20, Nick Roberts <nick@nick.uklinux.net> wrote:
>> There is also a screenshot of Emacs using this mode at
>> http://www.nick.uklinux.net/screenshot.png.
This looks really cool! I have one minor nitpick, though:
In the breakpoint display, maybe call the column "What" something like
"Location" or "Where" (although I think Location is better).
Thanks,
--
Andreas Fuchs, <asf@acm.org>, asf@jabber.at, antifuchs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Emacs mode for GDB
2002-05-21 13:24 ` Andreas Fuchs
@ 2002-05-21 20:37 ` Nick Roberts
0 siblings, 0 replies; 10+ messages in thread
From: Nick Roberts @ 2002-05-21 20:37 UTC (permalink / raw)
Cc: emacs-devel
Andreas Fuchs writes:
> In the breakpoint display, maybe call the column "What" something like
> "Location" or "Where" (although I think Location is better).
This is not my terminology, it is the output from the gdb command `info
breakpoints'. Perhaps they didn't want to confuse it with the previous column
`Address' which gives the memory location. `What' might be and abbreviation
for `What line'.
Nick
^ 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
* 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
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: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
-- strict thread matches above, loose matches on Subject: below --
2002-06-13 17:54 Nick Roberts
2002-05-20 22:36 Nick Roberts
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.