Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>,
	 Michael Snyder <msnyder@vmware.com>,
	 Hui Zhu <teawater@gmail.com>
Subject: Re: Testing of reverse debug commands
Date: Sun, 12 Jul 2009 14:20:00 -0000	[thread overview]
Message-ID: <200907121520.19647.pedro@codesourcery.com> (raw)
In-Reply-To: <20090712080145.GB10756@adacore.com>

On Sunday 12 July 2009 09:01:45, Joel Brobecker wrote:
> >     gdb_test "record" "" "Turn on process record"
> >     # FIXME: command ought to acknowledge, so we can test if it succeeded.
> 
> This is just a shot in the dark since I really don't have much time
> to double-check this, but does gdb_test_multiple allow you to verify
> that no output was generated? For some reason, I thought it did.

You should be able to see the precord target in the target stack
with "maint print target-stack".  You could also use it to plug
that FIXME, but, it's a bit ugly since it exposes precord's
implementation details.

Can't the user ask GDB if process record is in effect (at any time)?  This
seems like something a user would want to do --- "hmmm, I forget, am
I recording now?".  I can think of other interesting things that would be
nice to be able to query GDB, e.g.: "what is the status of the
recording buffers?" --- maybe there should be a "record status" command
or something like that.  Is there one already?

Another hack would be to send GDB another "record" and see if this query
shows up:

record_open ()

  /* Check if record target is already running.  */
  if (current_target.to_stratum == record_stratum)
    {
      if (!nquery
          (_("Process record target already running, do you want to delete "
             "the old record log?")))
        return;
    }

That's also hackish, but the good thing is that you end up adding a test
for a code path that isn't tested currently.  :-)

-- 
Pedro Alves


  reply	other threads:[~2009-07-12 14:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-12  0:44 Michael Snyder
2009-07-12  8:02 ` Joel Brobecker
2009-07-12 14:20   ` Pedro Alves [this message]
2009-07-12 14:29   ` Jan Kratochvil
2009-07-12 17:19     ` Michael Snyder
2009-07-12 18:19       ` Joel Brobecker
2009-07-12 18:25       ` Pedro Alves
2009-07-12 18:50       ` Marc Khouzam
2009-07-12 19:07         ` Pedro Alves
2009-07-12 19:26           ` Marc Khouzam

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=200907121520.19647.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=msnyder@vmware.com \
    --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