Another proposal for frontends and queries.

Marc Khouzam marc.khouzam@ericsson.com
Mon Sep 14 14:57:00 GMT 2009


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org 
> [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Monday, September 14, 2009 10:49 AM
> To: gdb-patches@sourceware.org
> Cc: Marc Khouzam; 'Joel Brobecker'
> Subject: Re: Another proposal for frontends and queries.
> 
> On Monday 14 September 2009 15:27:08, Marc Khouzam wrote:
> > Having a switch on a command turns out to be insufficient because
> > there is not a 1-1 mapping between queries and commands.  Currently
> > PRecord will query before changing memory, but this will be 
> triggered
> > by any of:
> > -var-assign a 8
> > p a=8
> > set var a=8
> > and others.
> 
> To me, this all sounds like we should should revisit why precord uses
> nquery at all.  If we stopped using nquery, and used query (defaulting
> to the action a frontend might want), what would the user lose?
> Having to type n + enter, instead of just enter to cancel, 
> doesn't seem like
> a bad deal to me.  Plus, wouldn't we want these particular offending
> precord queries to default to 'y' even when in script/batch mode?
> 
> I think we should scrap out nquery from record.c, turning those to
> query's, 'error's or normal stops, appropriately.  What would 
> be missed?

You got my vote.
 
> There's issue of how does a frontend handle queries in a cli console
> with -interpreter-exec cli (how does a frontend simulate queries
> done on a a real CLI attached to a terminal), but that seems like
> a mostly independent problem.

For Eclipse, we pretty much turn off queries for our CLI console.
It is not the best solution, but since we don't want queries
for our UI using MI, we don't have a choice.
But you are right that is another issue.

Thanks,
Marc



More information about the Gdb-patches mailing list