From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30699 invoked by alias); 12 Sep 2009 01:08:41 -0000 Received: (qmail 30689 invoked by uid 22791); 12 Sep 2009 01:08:40 -0000 X-SWARE-Spam-Status: No, hits=-1.9 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; Sat, 12 Sep 2009 01:08:37 +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 n8C18Kuf004191; Fri, 11 Sep 2009 20:08:20 -0500 Received: from eusrcmw750.eamcs.ericsson.se ([138.85.77.50]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Fri, 11 Sep 2009 20:08:05 -0500 Received: from eusaamw0707.eamcs.ericsson.se ([147.117.20.32]) by eusrcmw750.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Fri, 11 Sep 2009 20:08:04 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.20]) by eusaamw0707.eamcs.ericsson.se ([147.117.20.32]) with mapi; Fri, 11 Sep 2009 21:08:04 -0400 From: Marc Khouzam To: "tromey@redhat.com" CC: "'gdb-patches@sourceware.org'" Date: Sat, 12 Sep 2009 01:08:00 -0000 Subject: RE: set record query Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" 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/msg00356.txt.bz2 > -----Original Message----- > From: Tom Tromey [mailto:tromey@redhat.com]=20 > Sent: September-11-09 6:07 PM > To: Marc Khouzam > Cc: 'gdb-patches@sourceware.org' > Subject: Re: set record query >=20 > >>>>> "Marc" =3D=3D Marc Khouzam writes: >=20 > Marc> here is a patch to allow to enable/disable the queries > Marc> used in Record. It is relevant to: > Marc> http://sourceware.org/ml/gdb/2009-09/msg00165.html > Marc> What do you think? >=20 > 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=20 Record command. > I don't think I know the whole background here. Is this to help users > who enter commands at a console? Or MI? Or 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. Here 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). This 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 Eclips= e, 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. Being 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=20 "server" prefix. > For MI, it seems like there should be arguments to the=20 > internal function > and then the MI commands should disable querying that way.=20=20 > 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? =20 > 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)=20 it does not work. =20 > For the console case... it seems to me that queries are just=20 > 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,=20 which would somewhat lock-up the Eclipse GUI. So, to summarize the summary, I need a way to get GDB to answer 'Y' for eve= ry query, even nquery(). And right now, the only time this is needed is for P= Record. Thanks for any more guidance. Marc