* $_ 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* Re: $_ and info breakpoint
2007-07-07 23:17 $_ and info breakpoint Nick Roberts
@ 2007-07-09 11:56 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-07-09 11:56 UTC (permalink / raw)
To: gdb
On Sun, Jul 08, 2007 at 11:16:49AM +1200, Nick Roberts wrote:
> The convenience variable `$_' and the default
> examining-address for the `x' command are set to the address of
> the last breakpoint listed
I didn't know this was there, but if it's a documented feature, we
should probably leave it be. But it's not documented for -break-list
and I can't see any reason why it should be.
> 1) That "info breakpoint" doesn't set $_. At least -break-list shouldn't do
> this.
Is changing -break-list enough to fix your problem? If so, I
recommend that; either by separating -break-list and info break into
different functions, or by the old hack of ui_out_is_mi_like_p.
--
Daniel Jacobowitz
CodeSourcery
^ 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