From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20786 invoked by alias); 21 Jul 2009 03:21:50 -0000 Received: (qmail 20776 invoked by uid 22791); 21 Jul 2009 03:21:49 -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; Tue, 21 Jul 2009 03:21:41 +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 n6L3LYCK004769; Mon, 20 Jul 2009 22:21:34 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Mon, 20 Jul 2009 22:20:28 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Reverse debugging Date: Tue, 21 Jul 2009 03:21:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA07C00024@ecamlmw720.eamcs.ericsson.se> In-Reply-To: References: <19035.54231.157231.624882@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> <6D19CA8D71C89C43A057926FE0D4ADAA07BD7ADC@ecamlmw720.eamcs.ericsson.se> <6D19CA8D71C89C43A057926FE0D4ADAA07BFF93E@ecamlmw720.eamcs.ericsson.se> <6D19CA8D71C89C43A057926FE0D4ADAA07BFF98B@ecamlmw720.eamcs.ericsson.se> From: "Marc Khouzam" To: "Hui Zhu" Cc: "Nick Roberts" , "Daniel Jacobowitz" , , "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/msg00151.txt.bz2 =20 > -----Original Message----- > From: Hui Zhu [mailto:teawater@gmail.com]=20 > Sent: July-20-09 10:51 AM > To: Marc Khouzam > Cc: Nick Roberts; Daniel Jacobowitz; gdb@sources.redhat.com;=20 > Michael Snyder > Subject: Re: Reverse debugging >=20 > Hi Marc, >=20 > About change nquery to yquery, if the user answer y, a lot of record > entry will be delete. So I think nquery to be default is better. >=20 > Your patch change yquery to query is OK with me. >=20 > In prec, I use a lot of yquery and nquery and looks like mi cannot > control query very well. So I think add some switches to let you can > control prec more better. >=20 > On the other hand, shell we do some work to make mi support=20 > query better? I've just posted an RFC to try to get queries to work better with frontends. I'm hoping you won't have to change PRecord. Please see http://sourceware.org/ml/gdb/2009-07/msg00150.html Thanks Marc >=20 > Thanks, > Hui >=20 > On Mon, Jul 20, 2009 at 21:19, Marc=20 > Khouzam wrote: > > Typo in my previous email. =A0Sorry. > > > >> (Note that I'm only suggesting to not make the query=20 > default to 'Y'. > >> There would still be a query though.) > > > > Should have read (no "not") > > > >> (Note that I'm only suggesting to make the query default to 'Y'. > >> There would still be a query though.) > > > >> -----Original Message----- > >> From: gdb-owner@sourceware.org > >> [mailto:gdb-owner@sourceware.org] On Behalf Of Marc Khouzam > >> Sent: Monday, July 20, 2009 8:50 AM > >> To: Hui Zhu; Nick Roberts > >> Cc: Daniel Jacobowitz; gdb@sources.redhat.com; Michael Snyder > >> Subject: RE: Reverse debugging > >> > >> > >> > >> > -----Original Message----- > >> > From: Hui Zhu [mailto:teawater@gmail.com] > >> > Sent: Sunday, July 19, 2009 11:27 PM > >> > To: Marc Khouzam; Nick Roberts > >> > Cc: Daniel Jacobowitz; gdb@sources.redhat.com; Michael Snyder > >> > Subject: Re: Reverse debugging > >> > > >> > Thanks Marc, =A0but what about I keep it but add some=20 > switches for it? > >> > I want keep the query to tui user. > >> > For example: > >> > set record query off > >> > set record changememeory on > >> > >> (Note that I'm only suggesting to make the query default to 'Y'. > >> There would still be a query though.) > >> > >> I've been giving the whole problem a little more thought, and I now > >> think that it is the way queries are answered that should=20 > be changed > >> generically. > >> > >> I'll post a patch today and see what people think. > >> > >> Note that the suggestion I will post will rely on 'set=20 > confirm off'. > >> If Nick cannot use that then he'll still need you to have=20 > a switch to > >> turn these queries off. > >> > >> Thanks > >> > >> Marc > >> > >> > >> > > >> > Thanks, > >> > Hui > >> > > >> > > >> > On Sun, Jul 19, 2009 at 11:19, Marc > >> > Khouzam wrote: > >> > >> -----Original Message----- > >> > >> From: Daniel Jacobowitz [mailto:drow@false.org] > >> > >> Sent: July-17-09 10:25 AM > >> > >> To: Marc Khouzam > >> > >> Cc: Nick Roberts; Hui Zhu; gdb@sources.redhat.com;=20 > Michael Snyder > >> > >> Subject: Re: Reverse debugging > >> > >> > >> > >> On Fri, Jul 17, 2009 at 10:12:00AM -0400, Marc Khouzam wrote: > >> > >> > I noticed that the previous CDT GDB integration has=20 > its console > >> > >> > considered > >> > >> > a tty. =A0It may be worth looking into the difference... when > >> > >> time allows > >> > >> > it :-) > >> > >> > >> > >> Wasn't someone just talking on cdt-dev about trouble with > >> > whether DSF > >> > >> used Spawner or not? =A0That'd do it. > >> > > > >> > > I was wrong about the console being a tty. =A0The old CDT GDB > >> > integration > >> > > console is also not a tty. =A0What they do though is use > >> > > 'set confirm off'. =A0That makes sense since queries are > >> > being answered > >> > > automatically anyway. > >> > > > >> > > Nick, in your specific case 'confirm off' would work. =A0 > The default > >> > > answer to > >> > > 'record stop' is yes (well, there is not default, but in > >> > that case, 'y' > >> > > is > >> > > chosen). =A0If you don't want to always 'set confirm off' you > >> > may consider > >> > > setting it right before sending 'record stop' and turn=20 > it back on > >> > > right after. =A0That 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 > >> > > not always what I want. =A0For example, in PRecord the > >> default answer > >> > > 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, > >> > > we replace 'nquery' with 'query'; that will make the > >> > default be 'Y' when > >> > > > >> > > confirm is off or when there is no tty. =A0Note that this > >> > seems to be what > >> > > > >> > > is being done everywhere else in GDB. =A0There is only one > >> > case (pending > >> > > breakpoints) that uses default queries, outside of PRecord. > >> > =A0Except for > >> > > that > >> > > one case, it is really only PRecord that uses yquery and > >> > nquery. =A0And > >> > > the > >> > > pending breakpoint case is not a problem for frontends=20 > 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 =A0Marc Khouzam =A0 > >> > > > >> > > =A0 =A0 =A0 =A0* record.c (record_store_registers): Replace nquery= with > >> > > =A0 =A0 =A0 =A0query to allow frontends to automatically answer 'y= '. > >> > > =A0 =A0 =A0 =A0(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 =A0 =A0 =A0 =A02 Jul 2009 17:21:06 -0000 =A0 =A0 = =A0 1.8 > >> > > +++ gdb/record.c =A0 =A0 =A0 =A019 Jul 2009 03:06:01 -0000 > >> > > @@ -937,13 +937,13 @@ > >> > > =A0 =A0 =A0 =A0 =A0/* Let user choose if he wants to write register > >> > or not. =A0*/ > >> > > =A0 =A0 =A0 =A0 =A0if (regno < 0) > >> > > =A0 =A0 =A0 =A0 =A0 =A0n =3D > >> > > - =A0 =A0 =A0 =A0 =A0 =A0 nquery (_("Because GDB is in replay mode, > >> > changing the " > >> > > + =A0 =A0 =A0 =A0 =A0 =A0 query (_("Because GDB is in replay mode, > >> > changing the " > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"value of a registe= r will make the > >> > execution " > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"log unusable from = this point onward. =A0" > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Change all registe= rs?")); > >> > > =A0 =A0 =A0 =A0 =A0else > >> > > =A0 =A0 =A0 =A0 =A0 =A0n =3D > >> > > - =A0 =A0 =A0 =A0 =A0 =A0 nquery (_("Because GDB is in replay mode, > >> changing the > >> > > value " > >> > > + =A0 =A0 =A0 =A0 =A0 =A0 query (_("Because GDB is in replay mode, > >> changing the > >> > > value " > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"of a register will= make the=20 > execution log > >> > > unusable " > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"from this point on= ward. =A0Change > >> > register %s?"), > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gdbarch_register_name (= get_regcache_arch > >> > > (regcache), > >> > > @@ -993,7 +993,7 @@ > >> > > =A0 =A0 =A0 if (RECORD_IS_REPLAY) > >> > > =A0 =A0 =A0 =A0{ > >> > > =A0 =A0 =A0 =A0 =A0/* Let user choose if he wants to write memory > >> or not. =A0*/ > >> > > - =A0 =A0 =A0 =A0 if (!nquery (_("Because GDB is in replay mode, > >> writing to > >> > > memory " > >> > > + =A0 =A0 =A0 =A0 if (!query (_("Because GDB is in replay=20 > mode, writing to > >> > > memory " > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "will make the exe= cution log > >> > unusable from this > >> > > " > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "point onward. =A0= Write memory at > >> > address %s?"), > >> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 paddress (target_gdbar= ch, offset))) > >> > > > >> > > > >> > > > >> > > > >> > > >> > > >=20