binutils-gdb/gdb/doc
Paul N. Hilfinger 72384ba31a Have block_innermost_frame start from selected frame and document.
GDB used to search for the frame containing variables in a particular
lexical block starting from the current (top) frame, ignoring any
currently selected frame.  It is not clear why this is desirable for
variables that require a frame; why would a user deliberately select
one frame and then expect to see the value of a variable in a more
recent frame?  This change causes block_innermost_frame to start
looking from the selected frame, if there is one.  It may be
unnecessarily conservative: we use get_selected_frame_if_set rather
than get_selected_frame in order to avoid the side effect of calling
select_frame, which would probably be harmless.

Expression-parsing routines previously made the unwarranted assumption
that all block-qualified variables (written with the GDB extension
<block>::<variable>) are static.  As a result, they failed to update
innermost_block, which confused the watch commands about when
variables in watched expressions went out of scope, and also caused
the wrong variables to be watched.  This patch also modifies these
routines to treat all local variables the same whether or not they are
block-qualified.

Finally, we add a paragraph to the "Program Variables" section of the texinfo
documentation concerning the use of "::" for accessing non-static variables.

2012-01-11  Paul Hilfinger  <hilfingr@adacore.com>

	* gdb/blockframe.c (block_innermost_frame): Start search from selected
	frame, if present, or otherwise the current frame.

	* gdb/c-exp.y (variable): Update innermost_block for
	'block COLONCOLON NAME' clause.
	* gdb/m2-exp.y (variable): Ditto.
	* gdb/objc-exp.y (variable): Ditto.

	* gdb/doc/gdb.texinfo (Variables): Document use of :: for non-static
	variables.
2012-01-11 10:34:21 +00:00
..
a4rc.sed
agentexpr.texi Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
all-cfg.texi Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
annotate.texinfo Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
ChangeLog Have block_innermost_frame start from selected frame and document. 2012-01-11 10:34:21 +00:00
fdl.texi 2010-06-21 Stan Shebs <stan@codesourcery.com> 2010-06-21 16:24:59 +00:00
gdb.texinfo Have block_innermost_frame start from selected frame and document. 2012-01-11 10:34:21 +00:00
gdbint.texinfo Document new procedure for updating copyright years 2012-01-05 09:41:03 +00:00
gpl.texi * gpl.texi: Update to version 3 of the GPL. 2009-12-21 07:30:10 +00:00
lpsrc.sed
LRS
Makefile.in Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
observer.texi Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
psrc.sed
refcard.tex Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
stabs.texinfo Copyright year update in most files of the GDB Project. 2012-01-04 08:17:56 +00:00
stack_frame.eps From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 14:35:04 +00:00
stack_frame.pdf From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00
stack_frame.png From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00
stack_frame.svg From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00
stack_frame.txt From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00