From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15782 invoked by alias); 14 Sep 2009 05:45:52 -0000 Received: (qmail 15772 invoked by uid 22791); 14 Sep 2009 05:45:52 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f186.google.com (HELO mail-pz0-f186.google.com) (209.85.222.186) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Sep 2009 05:45:44 +0000 Received: by pzk16 with SMTP id 16so2347656pzk.18 for ; Sun, 13 Sep 2009 22:45:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.250.21 with SMTP id x21mr424674wfh.321.1252907143110; Sun, 13 Sep 2009 22:45:43 -0700 (PDT) In-Reply-To: References: From: Hui Zhu Date: Mon, 14 Sep 2009 05:45:00 -0000 Message-ID: Subject: Re: set record query To: Marc Khouzam Cc: "tromey@redhat.com" , "gdb-patches@sourceware.org" , Michael Snyder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00392.txt.bz2 On Mon, Sep 14, 2009 at 08:21, Marc Khouzam wro= te: > >> -----Original Message----- >> From: Hui Zhu [mailto:teawater@gmail.com] >> Sent: September-11-09 10:57 PM >> To: Marc Khouzam >> Cc: tromey@redhat.com; gdb-patches@sourceware.org; Michael Snyder >> Subject: Re: set record query >> >> If you don't mind. =A0I suggest you discussion "Eclipse handle query" in >> a special thread. > > You are probably right that it may be a good way to proceed. > I'll try to come up with an other suggest and start a new thread also. > >> Let's talk about my idea about this patch. =A0I think give a switch to >> close the query in the prec is not bad. =A0Even if we don't use Eclipse, >> we still need close query sometime. >> But someone want this swich always "yes", someone want always "no". >> >> So I suggest each query have a special "switch" to control it. >> For example: >> set record query off >> set record changememory yes >> set record changereg yes >> >> If query is on, this yes or no choice yquery or nquery. =A0If query is >> off, this yes or no can be the answer. >> >> What do you think about it? > > I see your point and it may be useful to some people. > On the other hand it may be going a bit far in giving the user > different configuration options. > > In any case, if this approach is the one chosen, it would solve > my problem, so I'm not against it :-) but I would lean towards > something simpler. =A0But that is just me. > > Thanks > > Marc > > >> >> >> Thanks, >> Hui >> >> >> On Sat, Sep 12, 2009 at 09:08, Marc Khouzam >> wrote: >> >> -----Original Message----- >> >> From: Tom Tromey [mailto:tromey@redhat.com] >> >> Sent: September-11-09 6:07 PM >> >> To: Marc Khouzam >> >> Cc: 'gdb-patches@sourceware.org' >> >> Subject: Re: set record query >> >> >> >> >>>>> "Marc" =3D=3D Marc Khouzam writes: >> >> >> >> Marc> here is a patch to allow to enable/disable the queries >> >> Marc> used in Record. =A0It is relevant to: >> >> Marc> http://sourceware.org/ml/gdb/2009-09/msg00165.html >> >> Marc> What do you think? >> >> >> >> It seems like a strange approach to me. >> > >> > I was hoping for something more generic for queries, but in the few >> > email exchanges, things kept coming back to such a specific new >> > Record command. >> > >> >> I don't think I know the whole background here. =A0Is this >> to help users >> >> who enter commands at a console? =A0Or MI? =A0Or CLI commands sent by >> >> Eclipse, but not from a user console (that is, in response >> to some GUI >> >> control)? >> > >> > Sorry, I should have summarized the issue in the mail. =A0Here goes. >> > >> > When Eclipse is interacting with GDB, there is a single "channel of >> > communication" which is used for everything (MI, CLI when >> no MI equivalent, >> > and Eclipse console). =A0This channel triggers the GDB code paths >> > that are "!input_from_terminal_p ()" and this makes every query >> > be automatically answered with the default answer. >> > >> > This was not a problem before because there was only a single >> > use of nquery() and it was never triggered by Eclipse >> > (it was for pending breakpoints). >> > With PRecord though, there are new uses of nquery(), and >> these, from Eclipse, >> > keep being answer 'N' automatically. >> > >> > Only one case is actually a problem right now: >> > it is when changing memory (or registers) while replaying >> execution; in this >> > case there is an nquery(), and since it is automatically >> answered, I just >> > cannot set memory during an replay. =A0Being able to change >> memory during >> > replay is one of the cool features of PRecord, and that is >> why I'm trying >> > really hard to get this to work for 7.0. >> > BTW, to attempt to set memory, we use -var-assign so I >> cannot use the >> > "server" prefix. >> > >> >> For MI, it seems like there should be arguments to the >> >> internal function >> >> and then the MI commands should disable querying that way. >> >> That is, you >> >> don't need a new user-visible setting for this. >> > >> > Disabling queries based on MI is something that was brought up. >> > The idea was to have queries check if the interpreter was MI and in >> > this case, answer 'Y' to any query. >> > I like this because it is more future-proof. >> > Is that what you are suggesting too? >> > >> >> For the CLI-commands-sent-by-Eclipse case, it seems like >> you could use >> >> the "server" prefix. >> > >> > This may be useful for other cases, but in the current case >> (-var-assign) >> > it does not work. >> > >> >> For the console case... it seems to me that queries are just >> >> a necessary part of that. >> > >> > It would be nicer to have queries in this case but not only does it >> > not work because we are in the case !input_from_terminal_p >> (), but having >> > a query would block the "communication channel" waiting for >> user input, >> > which would somewhat lock-up the Eclipse GUI. >> > >> > So, to summarize the summary, I need a way to get GDB to >> answer 'Y' for every >> > query, even nquery(). =A0And right now, the only time this is >> needed is for PRecord. >> > >> > Thanks for any more guidance. >> > >> > Marc >> > >> Hi Marc, If you really cannot handle query with Eclipse, I think this patch is OK with me. Because I really want prec in 7.0 can work well with Eclipse. I will add switch for each query. BTW, I suggest don't add "set record query " to doc. Because I don't want simple customer use it because we have switch for each query. Thanks, Hui