From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BX/fJ14/b2FNDAAAWB0awg (envelope-from ) for ; Tue, 19 Oct 2021 17:57:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 939251F0BD; Tue, 19 Oct 2021 17:57:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CBB751EDDB for ; Tue, 19 Oct 2021 17:57:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1FE133858435 for ; Tue, 19 Oct 2021 21:57:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FE133858435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634680669; bh=E5KsK92/iBpT7a5ezigFwfmt/por/WGbJU1KyzMtmMk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JK6t9QEgR6Bn7FZvpuvQPA6y63IzHIrsdHY+lTtbfXpb1XKfMLjgIGzZ5aKY9GFIS ujCdpUtDWTkusCW76NvQAFbhtZ+qijaQDNAu4cECgap4d+wmvsrzOqIeCU1S/1pv2E A5s5BMNBbJwvq5xdtnvNDZu8eQwjME0v9SAXzC3w= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id DDE6B3858D39 for ; Tue, 19 Oct 2021 21:57:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DDE6B3858D39 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F1B0821A71; Tue, 19 Oct 2021 21:57:29 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D5C6013B05; Tue, 19 Oct 2021 21:57:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id v+2RMUk/b2HUCwAAMHmgww (envelope-from ); Tue, 19 Oct 2021 21:57:29 +0000 Subject: Re: [PATCH][gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as unittest To: Tom Tromey , Tom de Vries via Gdb-patches References: <20210911120254.GA19083@delia.home> <87zgr4x4xm.fsf@tromey.com> Message-ID: Date: Tue, 19 Oct 2021 23:56:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <87zgr4x4xm.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 10/19/21 8:09 PM, Tom Tromey wrote: > 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. > Done. > It seems weird that both a declaration and definition are needed. > I guess it's a compiler issue though. > Indeed, some warning, -Wmissing-declarations if I'm not mistaken. > 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. > I've moved it to gdb/extension.h. I suppose I usually do this to avoid .h-triggered rebuilds while writing the patch, and then forget to move it to a proper location. > 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. Done, and committed. Thanks, - Tom