From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> From: Tom de Vries 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-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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 21:57:32 -0000 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