Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Nick Roberts <nickrob@gnu.org>, Alain Magloire <alain@qnx.com>
Cc: Daniel Jacobowitz <drow@false.org>, gdb@sources.redhat.com
Subject: Re: How does GDB/MI give the current frame
Date: Thu, 08 Jul 2004 22:15:00 -0000	[thread overview]
Message-ID: <40EDC76F.2070809@gnu.org> (raw)
In-Reply-To: <16613.39781.921538.192414@nick.uklinux.net>

>  > > For the CLI, something like this:
>  > > 
>  > > -> -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.

>  > > 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.

``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

grab you?   ``-thread'' and ``-frame'' select the thread/frame for 
_just_ the period of that command.  They would not alter the CLI's 
selected thread/frame (the implementation would for the moment need to 
be a crock but thats a separate problem :-).

This would let the GUI manipulate frames independant of the CLI.

> Second thing:
> Playing with MI, I've notice in between -var-update|-var-delete|etc ..
> operation the frame selection level was reset to 0, failing the other operations
> that was still assuming a certain frame level.
> Now is this an appropriate behaviour? or a bug? if it is appropriate should
> client recall -stack-select-frame XX all the time to make sure things are ok

``bug''.  Actually major screwup in how GDB models threads (as in it 
doesn't really :-)

> How about to put the thread-id part ot the event ?

So the event would be ``selected changed'' and generated when both 
switching threads and frames?  If it is useful, ok.

Andrew



  reply	other threads:[~2004-07-08 22:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 22:54 Nick Roberts
2004-06-24 23:17 ` Daniel Jacobowitz
2004-06-26  9:10   ` Nick Roberts
2004-06-26 14:59     ` Daniel Jacobowitz
2004-06-27  2:12     ` Andrew Cagney
2004-06-30 20:47       ` Alain Magloire
     [not found]       ` <200406302047.QAA29956@smtp.ott.qnx.com>
2004-07-02 17:29         ` Nick Roberts
2004-07-08 22:15           ` Andrew Cagney [this message]
2004-07-08 23:07             ` Alain Magloire
     [not found]             ` <200407082307.TAA09285@smtp.ott.qnx.com>
2004-07-11 22:49               ` Nick Roberts
2004-07-12 18:30                 ` Alain Magloire
     [not found]                 ` <200407121751.NAA24942@smtp.ott.qnx.com>
2004-07-14  4:00                   ` Nick Roberts
2004-07-11 22:49             ` Nick Roberts
2004-07-12 14:24               ` Andrew Cagney
2004-07-12 20:09                 ` Nick Roberts
2004-07-15 14:48                   ` Andrew Cagney
2004-07-15 19:50                     ` Nick Roberts
2004-07-15 20:19                       ` Jason Molenda
2004-07-15 21:08                         ` Jason Molenda
2004-07-16 14:12                           ` Alain Magloire
2004-07-16 14:08                         ` Alain Magloire
     [not found]                         ` <200407161404.KAA02192@smtp.ott.qnx.com>
2004-07-18 21:07                           ` Nick Roberts
2004-07-26 21:31                             ` Andrew Cagney
2004-06-25 15:12 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40EDC76F.2070809@gnu.org \
    --to=cagney@gnu.org \
    --cc=alain@qnx.com \
    --cc=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=nickrob@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox