Re: MI: Another -var-update bug? [PATCH]

Vladimir Prus
2007-01-05T09:10:31Z

On Friday 05 January 2007 02:59, Nick Roberts wrote:
> > This patch introduces this for me:
> >
> > FAIL: gdb.mi/mi-var-cp.exp: update RX (3)
> >
> > Do you get this failure to? If yes, can you please fix it?
> > If no, let me know and I'll investigate.
>
> I don't get this failure.

I suppose you've got some different version of gcc. I'll take a look.

> > > /* FIXME: select_frame could fail */
> > > !       if (fi)
> > > !       {
> > > !         CORE_ADDR pc = get_frame_pc (fi);
> > > !         if (pc <  BLOCK_START (var->root->valid_block) ||
> > > !             pc >= BLOCK_END (var->root->valid_block))
> > > !           within_scope = 0;
> > > !         select_frame (fi);
> > > !       }
> >
> > The code later in this function is only executed if "within_scope" is
> > true. Would it be better to call select_frame only if within_scope is
> > set to true, like this:
> >
> > if (pc < BLOCK_START (var->root->valid_block) ||
> > pc >= BLOCK_END (var->root->valid_block))
> > within_scope = 0;
> > else
> > select_frame (fi);
>
> Yes, it looks like the call to select_frame is not needed when the variable is
> out of scope.

Good. Do we have a rule in place that small fixes to one's most recent commit that
seem obvious to you can be just committed? If yes, can you change this?

> Daniel also suggested removing the call to reinit_frame_cache.

I think that would be great as a separate patch.

- Volodya