From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9735 invoked by alias); 19 Jul 2009 03:21:01 -0000 Received: (qmail 9726 invoked by uid 22791); 19 Jul 2009 03:21:00 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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; Sun, 19 Jul 2009 03:20:52 +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 n6J3KjKx002096; Sat, 18 Jul 2009 22:20:45 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Sat, 18 Jul 2009 22:19:40 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: Reverse debugging Date: Sun, 19 Jul 2009 03:21:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA07BD7ADC@ecamlmw720.eamcs.ericsson.se> In-Reply-To: <20090717142516.GA29249@caradoc.them.org> References: <19035.54231.157231.624882@totara.tehura.co.nz> <4A5BD5F3.1090103@vmware.com> <19035.57129.173542.368393@totara.tehura.co.nz> <4A5CC0E1.7020800@vmware.com> <19037.16041.589932.535743@totara.tehura.co.nz> <6D19CA8D71C89C43A057926FE0D4ADAA07BD6DD6@ecamlmw720.eamcs.ericsson.se> <19039.58589.853319.841012@totara.tehura.co.nz> <6D19CA8D71C89C43A057926FE0D4ADAA07BD7500@ecamlmw720.eamcs.ericsson.se> <20090717142516.GA29249@caradoc.them.org> From: "Marc Khouzam" To: "Daniel Jacobowitz" Cc: "Nick Roberts" , "Hui Zhu" , , "Michael Snyder" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00125.txt.bz2 > -----Original Message----- > From: Daniel Jacobowitz [mailto:drow@false.org]=20 > Sent: July-17-09 10:25 AM > To: Marc Khouzam > Cc: Nick Roberts; Hui Zhu; gdb@sources.redhat.com; Michael Snyder > Subject: Re: Reverse debugging >=20 > On Fri, Jul 17, 2009 at 10:12:00AM -0400, Marc Khouzam wrote: > > I noticed that the previous CDT GDB integration has its console > > considered > > a tty. It may be worth looking into the difference... when=20 > time allows > > it :-) >=20 > Wasn't someone just talking on cdt-dev about trouble with whether DSF > used Spawner or not? That'd do it. I was wrong about the console being a tty. The old CDT GDB integration console is also not a tty. What they do though is use 'set confirm off'. That makes sense since queries are being answered automatically anyway. Nick, in your specific case 'confirm off' would work. The default answer to 'record stop' is yes (well, there is not default, but in that case, 'y' is chosen). If you don't want to always 'set confirm off' you may consider setting it right before sending 'record stop' and turn it back on right after. That may be a good enough workaround until there is a proper solution to this query problem. For me the problem for PRecord remains because the default value is=20 not always what I want. For example, in PRecord the default answer=20 to changing memory and loosing the recorded history is "N", but as a frontend, I want to answer "Y". To fix this problem I suggest that in record.c,=20 we replace 'nquery' with 'query'; that will make the default be 'Y' when confirm is off or when there is no tty. Note that this seems to be what is being done everywhere else in GDB. There is only one case (pending=20 breakpoints) that uses default queries, outside of PRecord. Except for that=20 one case, it is really only PRecord that uses yquery and nquery. And the=20 pending breakpoint case is not a problem for frontends that use MI because the MI command does not trigger the query. Note that up to now, I've been recompiling GDB with that suggestion so that I can properly use PRecord in Eclipse. The below patch implements the suggestion. Thanks Marc ChangeLog 2009-07-18 Marc Khouzam * record.c (record_store_registers): Replace nquery with=20 query to allow frontends to automatically answer 'y'. (record_xfer_partial): Ditto. ### Eclipse Workspace Patch 1.0 #P src Index: gdb/record.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/record.c,v retrieving revision 1.8 diff -u -r1.8 record.c --- gdb/record.c 2 Jul 2009 17:21:06 -0000 1.8 +++ gdb/record.c 19 Jul 2009 03:06:01 -0000 @@ -937,13 +937,13 @@ /* Let user choose if he wants to write register or not. */ if (regno < 0) n =3D - nquery (_("Because GDB is in replay mode, changing the " + query (_("Because GDB is in replay mode, changing the " "value of a register will make the execution " "log unusable from this point onward. " "Change all registers?")); else n =3D - nquery (_("Because GDB is in replay mode, changing the value " + query (_("Because GDB is in replay mode, changing the value " "of a register will make the execution log unusable " "from this point onward. Change register %s?"), gdbarch_register_name (get_regcache_arch (regcache), @@ -993,7 +993,7 @@ if (RECORD_IS_REPLAY) { /* Let user choose if he wants to write memory or not. */ - if (!nquery (_("Because GDB is in replay mode, writing to memory " + if (!query (_("Because GDB is in replay mode, writing to memory " "will make the execution log unusable from this " "point onward. Write memory at address %s?"), paddress (target_gdbarch, offset)))