This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Queries in MI


On Thu, Jul 07, 2005 at 12:34:29PM +1200, Nick Roberts wrote:
>  > > If MI becomes properly asynchronous then I'm not sure how to do it.
>  > > Perhaps the the frontend could prepend a token on the input, just as MI
>  > > already uses tokens for output.
>  > 
>  > Is it possible that FE's would want to automate the response to a query?
>  > If so, does it make sense to put the query in the MI protocol?
>  > 
>  > For instance, a FE could implement a way to allow users to set a
>  > breakpoint in the source window by class name/function. Then, when the
>  > FE tries to automate the command, GDB could respond with a query,
>  > the FE could present the user with choices (in dialog) and then send the 
>  > response back. 
>  > 
>  > With the current response, the FE has no way of doing this.
> 
> I'm not sure what you're suggesting, but Emacs will always want to allow CLI
> input through the GUD buffer which, for example, will be forwarded to GDB as:
> 
> -interpreter-exec console "b asdf"

Of course. Your stating the case when the user sends a command to GDB
and get's a query as a response. That's fine. 

What about the case when the FE sends a command to GDB and has to deal
with the query? That isn't capable with the current output. The MI
response would have to have the query information built into it, like,

-break-insert "b asdf"
^done,query={choice1="...",choice2="..."}
FE sends->choice1
...

I currently don't have a need for such a feature, but I'm just
suggesting that the current mechanism doesn't allow the FE to do this
sort of thing nicely. I'm sure it will be needed eventually.

Bob Rossi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]