This is the mail archive of the gdb@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]

Re: -var-update and address changes


On Wed, May 03, 2006 at 10:02:21AM +0400, Vladimir Prus wrote:
> On Tuesday 02 May 2006 21:22, Jim Ingham wrote:
> > Shouldn't the call to var->root->lang->value_of_root down at the
> > bottom of value_of_root take care of fetching the new value?  
> 
> Well, it fetches the new value, I believe.

For the wrong frame.

I've only lightly tested this; could you give it a try?  If it works, I
think we should really get the "@" syntax added to the manual and
testsuite.

The removed reinit_frame_cache is undoubtedly a performance suck.  I
see no reason it should be necessary.  This code is still dubious;
the select_frame call clobbers the selected frame and nothing ever
restores it.

-- 
Daniel Jacobowitz
CodeSourcery

2006-05-04  Daniel Jacobowitz  <dan@codesourcery.com>

	* varobj.c (c_value_of_root): Honor use_selected_frame.
	Remove bogus reinit_frame_cache.

Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.59
diff -u -p -r1.59 varobj.c
--- varobj.c	27 Mar 2006 00:15:22 -0000	1.59
+++ varobj.c	4 May 2006 14:50:03 -0000
@@ -1879,11 +1879,10 @@ c_value_of_root (struct varobj **var_han
 
 
   /* Determine whether the variable is still around. */
-  if (var->root->valid_block == NULL)
+  if (var->root->valid_block == NULL || var->root->use_selected_frame)
     within_scope = 1;
   else
     {
-      reinit_frame_cache ();
       fi = frame_find_by_id (var->root->frame);
       within_scope = fi != NULL;
       /* FIXME: select_frame could fail */


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