From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10318 invoked by alias); 11 Jul 2014 18:05:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10255 invoked by uid 89); 11 Jul 2014 18:05:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 11 Jul 2014 18:05:35 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6BI5YmD027762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 11 Jul 2014 14:05:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6BI5Wts008736; Fri, 11 Jul 2014 14:05:33 -0400 Message-ID: <53C0276C.4030508@redhat.com> Date: Fri, 11 Jul 2014 18:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [PATCH] fix record "run" regression References: <1404251135-2427-1-git-send-email-tromey@redhat.com> <53B3D640.2060807@redhat.com> <87ha2ynwez.fsf@fleche.redhat.com> <53B6BCFF.90703@redhat.com> <87r41xi3v2.fsf@fleche.redhat.com> <53BBB93B.9060207@redhat.com> <871ttr7qn7.fsf@fleche.redhat.com> In-Reply-To: <871ttr7qn7.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00286.txt.bz2 On 07/11/2014 06:26 PM, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves 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