Re: Another proposal for frontends and queries.

Tom Tromey
2009-09-18T16:42:45Z

>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> The last (I think :-)) part that I don't understand is if a FE must
Marc> code in advance for a potential query? This solution seems to go
Marc> towards a way that would allow a FE to be ready for any query
Marc> on any command. A new query could be added to a command by a new GDB
Marc> version, and FEs would not need to change. That would be nice.
Marc> Is that how you see it?

Yeah -- a front end could choose what to do, even present the query to
the user.

Marc> I'm asking because, in some case a FE
Marc> will want to answer the query itself, without seeking input from the user.
Marc> For example, for PRecord, when the query asks if we should allow to change
Marc> memory, I won't ask the user, I just want to say 'y'.
Marc> I don't see how a FE could be smart enough to generically answer
Marc> queries like that? (unless we code for it in advance)

Yeah, good point. This seems to imply that the query "error" should
include a token naming the query -- and I guess that such tokens should
remain stable over time. (I was hoping to avoid that...)

Marc> On the flip side, if a FE knows in advance the potential queries
Marc> to a specific command, then maybe all we need is some new MI general
Marc> parameter "-query <y | n>" that could be added by the frontend
Marc> to any command (some details would need to be worked out to handle
Marc> multiple queries in the same command though).

Marc> Does this make sense?

Yes, except that the queries could also change over time.

I'm not sure this is a great idea after all. Maybe the solution is
really just to have all queries default to "go ahead and do it" in MI.
I really don't know.

Tom