emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS)


From: Nick Roberts
Subject: Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS)
Date: Sun, 3 Aug 2003 09:43:23 +0100

 > Nick --specifically with respect to gdb-array-slice
 > I tried that command already using M-x before the key binding showed
 > up --found the function by walking through the code as I was
 > understanding it --and here is the problem that I hit-- which
 > motivated my original message:
 > 
 > Write a line of code like this:
 > 
 > int a[10];
 > 
 > Place point on that line and invoke gdb-display --
 > this ends up creating a *display-1* with a[10] (itself a problem (but
 > a different one obvisouly)-- would be nice if that function directly
 > prompted for slice.

The parsing is done by gud-find-c-expr. It is arguable whether it should parse
it as a or a[10]. This function is also used by gud-print and presumably the
user might just want to examine a single element, sometimes.

 > After doing the above I invoked M-x gdb-array-slice --both from the source
 > buffer --and from the *display-1* buffer -- and in case it bombed with an
 > array index error -- for some reason the "string-match "[") call was
 > failing --and as a result the index into the various elisp arrays used by
 > gdb-array-slice --namely gdb-array-start and friends --was getting set to
 > -1.

This failed because the cursor was in the wrong place. gdb-array-slice is bound
in a local-map (set as a text property). The cursor needs to be inside an index
range displayed at the top of the window. This probably isn't very tidy but 
remember
that the array might be multi-dimensional, so Emacs needs to know on which 
index you
want to restrict the range. (There is some description of all this in the Emacs
manual (CVS version, of course) in Building -> Debuggers -> GDB Graphical 
Interface)

Don't spend too much time on this part of gdb-ui.el (display of
variables). Some of it is a bit buggy e.g display of complex structures. More
importantly, though, this part will have to change because the part of GDB
that gdb-ui.el uses (annotations) will lose support for the GDB display
command. This is because the GDB developers are moving to a new interface
called GDB/MI. I plan to re-write this part so that variables are displayed in
a manner similar to the Insight debugger. This should look a bit like the
speedbar.

It looks like there's a backlog at emacs-devel, at the moment, and e-mails
aren't getting out quickly. I won't address your question about gud-key-prefix
as there are others on the list who know more about keybindings than me and
who should be able to give you a better answer.

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]