From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9832 invoked by alias); 14 Sep 2009 00:23:27 -0000 Received: (qmail 9822 invoked by uid 22791); 14 Sep 2009 00:23:26 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Sep 2009 00:23:22 +0000 Received: from eusrcmw751.eamcs.ericsson.se (eusrcmw751.exu.ericsson.se [138.85.77.51]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id n8E0NJKW019729; Sun, 13 Sep 2009 19:23:19 -0500 Received: from eusrcmw751.eamcs.ericsson.se ([138.85.77.56]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Sun, 13 Sep 2009 19:21:52 -0500 Received: from eusaamw0712.eamcs.ericsson.se ([147.117.20.181]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Sun, 13 Sep 2009 19:21:52 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.20]) by eusaamw0712.eamcs.ericsson.se ([147.117.20.181]) with mapi; Sun, 13 Sep 2009 20:21:51 -0400 From: Marc Khouzam To: Hui Zhu CC: "tromey@redhat.com" , "gdb-patches@sourceware.org" , Michael Snyder Date: Mon, 14 Sep 2009 00:23:00 -0000 Subject: RE: set record query Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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/msg00389.txt.bz2 > -----Original Message----- > From: Hui Zhu [mailto:teawater@gmail.com]=20 > 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 >=20 > If you don't mind. I 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. =20 > Let's talk about my idea about this patch. I think give a switch to > close the query in the prec is not bad. Even if we don't use Eclipse, > we still need close query sometime. > But someone want this swich always "yes", someone want always "no". >=20 > 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 >=20 > If query is on, this yes or no choice yquery or nquery. If query is > off, this yes or no can be the answer. >=20 > 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. But that is just me. Thanks Marc >=20 >=20 > Thanks, > Hui >=20 >=20 > On Sat, Sep 12, 2009 at 09:08, Marc Khouzam=20 > 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=20 > 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=20 > 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=20 > 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=20 > 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=20 > execution; in this > > case there is an nquery(), and since it is automatically=20 > answered, I just > > cannot set memory during an replay. =A0Being able to change=20 > memory during > > replay is one of the cool features of PRecord, and that is=20 > 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=20 > 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=20 > you could use > >> the "server" prefix. > > > > This may be useful for other cases, but in the current case=20 > (-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=20 > (), but having > > a query would block the "communication channel" waiting for=20 > user input, > > which would somewhat lock-up the Eclipse GUI. > > > > So, to summarize the summary, I need a way to get GDB to=20 > answer 'Y' for every > > query, even nquery(). =A0And right now, the only time this is=20 > needed is for PRecord. > > > > Thanks for any more guidance. > > > > Marc > > >=20