How does GDB/MI give the current frame
Nick Roberts
nickrob@gnu.org
Sun Jul 11 22:49:00 GMT 2004
> > > > -> -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
More information about the Gdb
mailing list