This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog blockframe.c c-exp.y m2-exp. ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	hilfingr@sourceware.org	2012-01-11 10:34:21

Modified files:
	gdb            : ChangeLog blockframe.c c-exp.y m2-exp.y 
	                 objc-exp.y 
	gdb/doc        : ChangeLog gdb.texinfo 

Log message:
	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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13729&r2=1.13730
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/blockframe.c.diff?cvsroot=src&r1=1.135&r2=1.136
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/c-exp.y.diff?cvsroot=src&r1=1.86&r2=1.87
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/m2-exp.y.diff?cvsroot=src&r1=1.36&r2=1.37
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/objc-exp.y.diff?cvsroot=src&r1=1.46&r2=1.47
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1262&r2=1.1263
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.910&r2=1.911


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]