This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How does GDB/MI give the current frame
- From: Nick Roberts <nickrob at gnu dot org>
- To: "Alain Magloire" <alain at qnx dot com>
- Cc: cagney at gnu dot org (Andrew Cagney),drow at false dot org (Daniel Jacobowitz), gdb at sources dot redhat dot com
- Date: Fri, 2 Jul 2004 18:29:09 +0100
- Subject: Re: How does GDB/MI give the current frame
- References: <40DE2D1B.4070003@gnu.org><200406302047.QAA29956@smtp.ott.qnx.com>
> > 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