Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* $_ and info breakpoint
@ 2007-07-07 23:17 Nick Roberts
  2007-07-09 11:56 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Roberts @ 2007-07-07 23:17 UTC (permalink / raw)
  To: gdb


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-09 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-07 23:17 $_ and info breakpoint Nick Roberts
2007-07-09 11:56 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox