From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12761 invoked by alias); 7 Jul 2007 23:17:09 -0000 Received: (qmail 12753 invoked by uid 22791); 7 Jul 2007 23:17:08 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 07 Jul 2007 23:17:06 +0000 Received: from kahikatea.snap.net.nz (213.61.255.123.dynamic.snap.net.nz [123.255.61.213]) by viper.snap.net.nz (Postfix) with ESMTP id A47F93D9CD8 for ; Sun, 8 Jul 2007 11:17:02 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id B36BE8FBF6; Sun, 8 Jul 2007 11:16:50 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18064.7905.924535.720690@kahikatea.snap.net.nz> Date: Sat, 07 Jul 2007 23:17:00 -0000 To: gdb@sources.redhat.com Subject: $_ and info breakpoint X-Mailer: VM 7.19 under Emacs 22.1.50.11 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00057.txt.bz2 Andreas Schwab has pointed out that when running GDB from Emacs 22.1: gdb-ui clobbers the value of $_ and $__ after every command, which makes it impossible to continue a x command, for example. This is because after every user command the breakpoints buffer is updated by sending "info breakpoint" to GDB behind the users back and, as the manual says: The convenience variable `$_' and the default examining-address for the `x' command are set to the address of the last breakpoint listed It seems to me that the main use for resetting $_ is so that by repeating the `x' command you can scan through memory. Presumably, this problem isn't specific to Emacs, so I suggest the following possible solutions: 1) That "info breakpoint" doesn't set $_. At least -break-list shouldn't do this. or 2) An option is added to the command, "info breakpoint noaddress", say, but seems like overkill. So that the user doesn't see the commands that Emacs issues, it always uses the server command. Maybe it would be easy to make "server info breakpoint" not set $_ and this would seem a more natural step too. -- Nick http://www.inet.net.nz/~nickrob