This is the mail archive of the gdb-patches@sourceware.org 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: Another proposal for frontends and queries.


 

> -----Original Message-----
> From: Joel Brobecker [mailto:brobecker@adacore.com] 
> Sent: Monday, September 14, 2009 10:09 AM
> To: Marc Khouzam
> Cc: gdb-patches@sourceware.org
> Subject: Re: Another proposal for frontends and queries.
> 
> > Another proposal that was thrown out there was to disable queries
> > when having started GDB with the MI interpreter.  The idea is that
> > it would be frontends that would start GDB like that, and frontends
> > know what they are doing and don't need queries.
> > http://sourceware.org/ml/gdb/2009-07/msg00113.html
> > This seems too drastic to me.
> 
> Isn't this is the approach that has always been taken in the past?
> I think that we should bite the bullet and implement this approach.

As long as some solution is chosen, I'll be happy :-)

> The only issue, really, is how to detect that situation from the FE
> so that it can itself ask the user for confirmation before it sends
> the command... 

If a FE wants to ask the user directly, it can do that no matter
what GDB will do.  So I don't think there is a problem here.  But
maybe I misundertood your point?

> Or perhaps, another approach is to return an error
> (like it probably does now) that the frontend detect, and then provide
> a switch for that command to force the execution of that 
> command despite
> the reported consequences.

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.

Marc


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