From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS) Date: Sun, 3 Aug 2003 09:43:23 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <16172.52011.121221.726593@nick.uklinux.net> References: <16171.9294.617646.195373@gargle.gargle.HOWL> <16171.40665.169763.660763@nick.uklinux.net> <16171.54169.662825.486971@gargle.gargle.HOWL> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1059905106 7550 80.91.224.253 (3 Aug 2003 10:05:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 3 Aug 2003 10:05:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Aug 03 12:05:20 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19jFjs-0005WB-00 for ; Sun, 03 Aug 2003 12:05:20 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19jFnS-0005er-00 for ; Sun, 03 Aug 2003 12:09:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19jFZf-0000u3-Ub for emacs-devel@quimby.gnus.org; Sun, 03 Aug 2003 05:54:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19jFTd-0006ph-T6 for emacs-devel@gnu.org; Sun, 03 Aug 2003 05:48:33 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19jEaz-0000Bv-VT for emacs-devel@gnu.org; Sun, 03 Aug 2003 04:52:37 -0400 Original-Received: from [194.247.50.238] (helo=nick.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.20) id 19jEXs-0007ry-1f for emacs-devel@gnu.org; Sun, 03 Aug 2003 04:48:52 -0400 Original-Received: by nick.uklinux.net (Postfix, from userid 501) id 1111A75FDE; Sun, 3 Aug 2003 09:43:23 +0100 (BST) Original-To: raman@cs.cornell.edu In-Reply-To: <16171.54169.662825.486971@gargle.gargle.HOWL> X-Mailer: VM 6.97 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15791 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15791 > 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