From: "Marc Khouzam" <marc.khouzam@ericsson.com>
To: "Hui Zhu" <teawater@gmail.com>, "Nick Roberts" <nickrob@snap.net.nz>
Cc: "Daniel Jacobowitz" <drow@false.org>, <gdb@sources.redhat.com>,
"Michael Snyder" <msnyder@vmware.com>
Subject: RE: Reverse debugging
Date: Mon, 20 Jul 2009 12:50:00 -0000 [thread overview]
Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA07BFF93E@ecamlmw720.eamcs.ericsson.se> (raw)
In-Reply-To: <daef60380907192026k2bc4621dtd524513152777e7d@mail.gmail.com>
> -----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, but what about I keep it but add some 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 not 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 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 confirm off'.
If Nick cannot use that then he'll still need you to have a switch to
turn these queries off.
Thanks
Marc
>
> Thanks,
> Hui
>
>
> On Sun, Jul 19, 2009 at 11:19, Marc
> Khouzam<marc.khouzam@ericsson.com> 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; 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 its console
> >> > considered
> >> > a tty. It 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? 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
> > not always what I want. For 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. Note that this
> seems to be what
> >
> > is being done everywhere else in GDB. There is only one
> case (pending
> > breakpoints) that uses default queries, outside of PRecord.
> Except for
> > that
> > one case, it is really only PRecord that uses yquery and
> nquery. And
> > the
> > 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 <marc.khouzam@ericsson.com>
> >
> > * record.c (record_store_registers): Replace nquery with
> > query to allow frontends to automatically answer 'y'.
> > (record_xfer_partial): Ditto.
> >
> >
> > ### Eclipse Workspace Patch 1.0
> > #P src
> > Index: gdb/record.c
> > ===================================================================
> > 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 =
> > - 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 =
> > - 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)))
> >
> >
> >
> >
>
next prev parent reply other threads:[~2009-07-20 12:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 0:40 Nick Roberts
2009-07-14 0:53 ` Michael Snyder
2009-07-14 1:28 ` Nick Roberts
2009-07-14 17:36 ` Michael Snyder
2009-07-15 2:28 ` Nick Roberts
2009-07-16 3:09 ` Hui Zhu
2009-07-16 15:55 ` Marc Khouzam
2009-07-17 2:41 ` Nick Roberts
2009-07-17 14:12 ` Marc Khouzam
2009-07-17 14:25 ` Daniel Jacobowitz
2009-07-17 14:56 ` Marc Khouzam
2009-07-17 15:02 ` Daniel Jacobowitz
2009-07-19 3:21 ` Marc Khouzam
2009-07-20 3:27 ` Hui Zhu
2009-07-20 12:50 ` Marc Khouzam [this message]
2009-07-20 13:19 ` Marc Khouzam
2009-07-20 14:51 ` Hui Zhu
2009-07-21 3:21 ` Marc Khouzam
2009-09-11 13:26 ` Marc Khouzam
2009-07-18 1:06 ` Nick Roberts
2009-07-18 4:00 ` Daniel Jacobowitz
2009-07-22 17:46 ` Marc Khouzam
2009-07-16 3:05 ` Hui Zhu
2009-07-17 2:32 ` Nick Roberts
2009-08-17 7:49 ` Jakob Engblom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6D19CA8D71C89C43A057926FE0D4ADAA07BFF93E@ecamlmw720.eamcs.ericsson.se \
--to=marc.khouzam@ericsson.com \
--cc=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=msnyder@vmware.com \
--cc=nickrob@snap.net.nz \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox