all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Roberts <nick@nick.uklinux.net>
Cc: emacs-devel@gnu.org
Subject: Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS)
Date: Sun, 3 Aug 2003 09:43:23 +0100	[thread overview]
Message-ID: <16172.52011.121221.726593@nick.uklinux.net> (raw)
In-Reply-To: <16171.54169.662825.486971@gargle.gargle.HOWL>


 > 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

  parent reply	other threads:[~2003-08-03  8:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <16171.9294.617646.195373@gargle.gargle.HOWL>
2003-08-02 11:22 ` Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS) Nick Roberts
     [not found]   ` <16171.54169.662825.486971@gargle.gargle.HOWL>
2003-08-03  8:43     ` Nick Roberts [this message]
2003-08-05 19:38       ` Fwd: Keyboard Access (T.V.Raman 1) Nick Roberts
2003-08-06 20:28         ` Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS) Kevin Rodgers
2003-08-06 21:28           ` Robert J. Chassell
2003-08-07  6:04         ` Fwd: Keyboard Access (T.V.Raman 1) Richard Stallman
2003-08-05 19:42       ` Fwd: Keyboard Access (T.V.Raman 2) 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=16172.52011.121221.726593@nick.uklinux.net \
    --to=nick@nick.uklinux.net \
    --cc=emacs-devel@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.