Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] fix record "run" regression
Date: Fri, 11 Jul 2014 18:10:00 -0000	[thread overview]
Message-ID: <53C0276C.4030508@redhat.com> (raw)
In-Reply-To: <871ttr7qn7.fsf@fleche.redhat.com>

On 07/11/2014 06:26 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> The comment is stale now.  If we can indeed use gdb_run_cmd,
> Pedro> then I don't think we need the $use_gdb_stub check?
> 
> The use_gdb_stub check is there so that we skip the test on target
> remote, which I think shouldn't be expected to work, as you can't re-run
> there.  But I think I must be missing something.

It was explained in the sentence just below:

> That gets us coverage for "target rem; record; target rem;"
> too.

... because gdb_run_cmd does "target remote" instead of "run"
against remote targets.

In general, if we can write a test in a way that runs against
any target, it's best to not restrict it, even if what is
tested against some target board isn't exactly the bug the
test was written for, as it gives us wider coverage.

In this case, if we write:

 gdb_run_cmd
 gdb_test_multiple "" "restarting inferior" {
     -re "Breakpoint .* main .*${gdb_prompt} " {
 	pass "restarting inferior"
     }
 }

We'll still make sure that "run; record; run" works,
but in addition, we'll also make sure that
"target rem; record; target rem" (and likewise target sim
or whatever means gdb_run_cmd uses to spawn a particular
target) works too.

-- 
Pedro Alves


  reply	other threads:[~2014-07-11 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 21:45 Tom Tromey
2014-07-02  9:52 ` Pedro Alves
2014-07-03 18:13   ` Tom Tromey
2014-07-04 14:41     ` Pedro Alves
2014-07-07 15:30       ` Tom Tromey
2014-07-08  9:26         ` Pedro Alves
2014-07-11 18:05           ` Tom Tromey
2014-07-11 18:10             ` Pedro Alves [this message]
2014-07-11 18:12               ` Tom Tromey
2014-07-11 18:29                 ` Pedro Alves
2014-07-11 21:25                   ` Tom Tromey

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=53C0276C.4030508@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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