From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69141 invoked by alias); 3 Oct 2016 17:10:06 -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 69060 invoked by uid 89); 3 Oct 2016 17:10:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1431, 8.4, feels, dislike 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 ESMTP; Mon, 03 Oct 2016 17:10:03 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BBF84E338; Mon, 3 Oct 2016 17:10:02 +0000 (UTC) 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 u93HA1wa016912; Mon, 3 Oct 2016 13:10:01 -0400 Subject: Re: [PATCH v3 2/2] Add test for user context selection sync To: Simon Marchi , gdb-patches@sourceware.org References: <20160924201331.23605-1-simon.marchi@polymtl.ca> <20160924201331.23605-2-simon.marchi@polymtl.ca> Cc: Antoine Tremblay From: Pedro Alves Message-ID: <22ae2259-f47d-4ea0-53fc-510aa9b6f45c@redhat.com> Date: Mon, 03 Oct 2016 17:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160924201331.23605-2-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg00017.txt.bz2 On 09/24/2016 09:13 PM, Simon Marchi wrote: > +set main_break_line [gdb_get_line_number "main break line"] > +set thread_loop_line [gdb_get_line_number "thread loop line"] > +set thread_caller_line [gdb_get_line_number "thread caller line"] > + > +# Call PROCNAME with the given arguments, inside a with_test_prefix $procname > +# block. > + > +proc with_test_prefix_procname { procname args } { > + with_test_prefix $procname { > + # Note: this syntax requires TCL 8.5, if we need to support 8.4, > + # we'll need to find an alternative. > + $procname {*}$args > + } > +} An alternative (not talking about TCL 8.5 here), would be to go the gdb_caching_proc way. That is, something like: proc prefixed_proc {name body} { ... } .. and then define the procs that you want to prefix with prefixed_proc instead of proc. But either way is fine with me. I mildly dislike using the proc names as prefix strings as it feels like implementation details leaking, but as long as the proc names are clear enough, I won't really complain about it. Who knows, I may even grow to like it. :-) > + # When using mi_expect_stop, we don't expect a prompt after the *stopped > + # event, since the blocking commands are done from the CLI. Seting async to > + # 1 makes it not expect the prompt. > + set async 1 "Setting". This is OK as is with the typo fixed. Thanks, Pedro Alves