Re: How does GDB/MI give the current frame

Nick Roberts
2004-07-02T17:29:54Z

> > For the CLI, something like this:
> >
> > -> -interpreter cli "up"
> > <- ~"info on new frame..."
> > <- *select-frame,<frame-info>...
> > <- done
> >
> > with similar for -stack-select-frame:
> >
> > -> -stack-select-frame 1
> > <- *select-frame,<frame-info>,....
> > <- done
> >
> > Where, yes, <frame-info> would be constructed by calling frame code.
> >
> > -stack-info-frame would just be just:
> >
> > -> -stack-info-frame
> > <- done,<frame-info>
> >
> > The important thing is that, in both cases, the GUI is being driven by
> > the select-frame event.
> >
>
> Cool !!
>
> One thing:
>
> -thread-select 2
> ^done,...
> -stack-select-frame 3
> ^done
> -thread-select 1
> ^done,..
> -thread-select 2
> ^done,..
>
> If you would do "-stack-info-frame" now, you would notice that current
> stackframe for thread 2 is not longer frame 3 but frame 0 !!
> It this case would not it be appropriate to fire a "*select-frame" event.

There would still be problems with displaying the values of variables.
Neither variable objects or the CLI command, display, seem to take
notice of the thread number.

Nick