From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway34.websitewelcome.com (gateway34.websitewelcome.com [192.185.148.200]) by sourceware.org (Postfix) with ESMTPS id A8A3A3858D39 for ; Tue, 19 Oct 2021 18:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A8A3A3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tromey.com Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 1D6E712CF54B for ; Tue, 19 Oct 2021 13:09:11 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id ctXymO9TuIWzGctXzmXQB4; Tue, 19 Oct 2021 13:09:11 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0VIIt6dWCQOUwAzu47d5uPP/jNdK+ec/ToOwjn4fJxY=; b=Uwc6+6fU0Yn/RhY9J8eX8o5V2Y h2fYpNmE/MMc3PsssPXNiLWq15Znr1oUaWAm1hu8iLwvX0IEudsrES1zGvi+GhghKGHheQ5u8ZeRF Pupthl0Y5SrqxJBL0/Zg1LKxh; Received: from 174-16-0-219.hlrn.qwest.net ([174.16.0.219]:54004 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mctXy-001I3z-LR; Tue, 19 Oct 2021 12:09:10 -0600 From: Tom Tromey To: Tom de Vries via Gdb-patches Subject: Re: [PATCH][gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as unittest References: <20210911120254.GA19083@delia.home> X-Attribution: Tom Date: Tue, 19 Oct 2021 12:09:09 -0600 In-Reply-To: <20210911120254.GA19083@delia.home> (Tom de Vries via Gdb-patches's message of "Sat, 11 Sep 2021 14:02:56 +0200") Message-ID: <87zgr4x4xm.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.0.219 X-Source-L: No X-Exim-ID: 1mctXy-001I3z-LR X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-0-219.hlrn.qwest.net (murgatroyd) [174.16.0.219]:54004 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3025.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 18:09:13 -0000 Tom> [gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as unittest Thanks for doing this. Tom> +#if GDB_SELF_TEST Tom> +namespace selftests { Tom> +extern void (*hook_set_active_ext_lang) (void); Tom> +void (*hook_set_active_ext_lang) (void) = nullptr; Shouldn't need the "(void)" any more, just "()" should be ok. It seems weird that both a declaration and definition are needed. I guess it's a compiler issue though. Tom> #if GDB_SELF_TEST Tom> namespace selftests { Tom> +extern void (*hook_set_active_ext_lang) (void); I suppose it's hard to stick this declaration somewhere else. Tom> + Tom> +static void Tom> +raise_sigint (void) The (void) thing again, though this could also just be a tiny lambda in the code as well. Tom