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: Andrew Cagney <cagney at gnu dot org>
- Cc: Nick Roberts <nickrob at gnu dot org>, Alain Magloire <alain at qnx dot com>,Daniel Jacobowitz <drow at false dot org>, gdb at sources dot redhat dot com
- Date: Sun, 11 Jul 2004 22:49:57 +0100
- Subject: Re: How does GDB/MI give the current frame
- References: <40DE2D1B.4070003@gnu.org><200406302047.QAA29956@smtp.ott.qnx.com><16613.39781.921538.192414@nick.uklinux.net><40EDC76F.2070809@gnu.org>
> > > > -> -interpreter cli "up"
> > > > <- ~"info on new frame..."
> > > > <- *select-frame,<frame-info>...
> > > > <- done
>
> Note that the interpreter case is key, it lets the GUI respond to
> operations on the command line.
On my gdb, -interpreter-exec cli "up" gives:
^error,msg="mi_cmd_interpreter_exec: could not find interpreter \"cli\""
(gdb)
I'm still lost here.
> > 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.
>
> ``bug'' in current MI protocol. How would something like:
>
> -thread 2 -<something else>
> ^done
> -thread 2 -frame 3 -<something else>
> -frame 3 -<something else>
> ^done
Or values could be printed for all threads:
-var-evaluate-expression var1
^done,values=[{thread-id="0",value="0"},{thread-id="1",value="4"},...]
and likewise for other mi commands. This would have the disadvantage of
breaking existing behaviour but I imagine a user might want to see the value
of a variable across all threads and would not wish to create a variable
object for each thread.
Nick