From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LiZsFay342iYjiEAWB0awg (envelope-from ) for ; Mon, 06 Oct 2025 08:35:56 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=C4RJndT4; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TWbhbSHz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=rAX8ZaTj; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Twi/se48; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 496681E0B6; Mon, 06 Oct 2025 08:35:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7CD581E047 for ; Mon, 06 Oct 2025 08:35:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03A723858C60 for ; Mon, 6 Oct 2025 12:35:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03A723858C60 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=C4RJndT4; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TWbhbSHz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=rAX8ZaTj; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Twi/se48 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id E46783858C52 for ; Mon, 6 Oct 2025 12:29:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E46783858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E46783858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759753764; cv=none; b=N2+5U2IjXTTlrEfS5gYfgdRsd2SBKo1R3DjHUz3k0Nr+5VjYM8L88j+t7pfDnq2/ramQeMXz3e8sOqP/irYUeGu9PAhq+7LAnsPOLJxZznkMwjZKBuQBMc1vJmKYdIQ0GtA67T0scZiMR4KAUgwN7C1mD/tp4A3bUZzShC+qxOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759753764; c=relaxed/simple; bh=aKd4IMi+363v0iY40E+w/hwu8Si15gceuaEbFuBIIFk=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=tT3kP/8aPjPfNMCaAGt7AFJqHBOcAx0vxevCumNq7hgmnX3+eqRY35qVBDolMU9FDb8AT4sTvNOLx1VmKemGevCBho/UVjpfhJO/upqgwkiMPMFGANM1A7Y56EfTcKk960W44XAfvQVtxjsMr39K3olC+JNqijKkbdV6FC9IBQ8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E46783858C52 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DA4DB1F452; Mon, 6 Oct 2025 12:29:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1759753763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F36sVKKKaoyZakAFUWCUC6IlP53xyWRzF5tiN27gqnI=; b=C4RJndT4sTJJPM89JRrXh74ut159DI5BBjkifcfl1dYq8WMm+DYKSyprR7G1P6kfx0dMr1 RQ4XBWA2xKCOaXo4UfTBA7//bY4BhLoPmwK+eryvdF/gz0C+W39DUY+MoE8kSm+XytsLgV hSu65w8snowkCjFiwUsN/hHWNxLDCPI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1759753763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F36sVKKKaoyZakAFUWCUC6IlP53xyWRzF5tiN27gqnI=; b=TWbhbSHzV/MLqKpJDhD6eLn6MmPXR47Rq+nqC1H16syZQyr4UKecav6FNg3KXuJpo8OtJI OHNNwiIka8LiG5AA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1759753762; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F36sVKKKaoyZakAFUWCUC6IlP53xyWRzF5tiN27gqnI=; b=rAX8ZaTjwAfcuB1b4zifCZ9rriqQ5XVp2dzluzZrp/ed9hGyeYjAHX1SzG9Ugpd2x0J9/G lCrwMulfqiSXLc71JYEABZH0zOFNEnwR6tE/F9d0R+g1F3Lyz5SgpIe8AaiFfZ5mH47Enr dkjqtwR0NCVywHeRlYFXCTc/nrdPP9s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1759753762; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F36sVKKKaoyZakAFUWCUC6IlP53xyWRzF5tiN27gqnI=; b=Twi/se48EiJnWopN7+ZtVSjcrrveEJSK7Fs7cnARJ86WnOUE1gsBbCytIP80RYK/dYYn6d dL1hR2JM7XyiT6AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7166C13995; Mon, 6 Oct 2025 12:29:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id tDpXGiK242jjdgAAD6G6ig (envelope-from ); Mon, 06 Oct 2025 12:29:22 +0000 Message-ID: <593e66ac-e202-4a17-aa52-ef5ee66dceef@suse.de> Date: Mon, 6 Oct 2025 14:29:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv9 0/3] new gdb.Style API To: Andrew Burgess , Tom Tromey Cc: gdb-patches@sourceware.org References: <878qhr7pm5.fsf@tromey.com> <87y0pp7br2.fsf@redhat.com> <8ca0db41-c3a2-4192-b279-88d18e34fbd4@suse.de> <87v7kt6xa5.fsf@redhat.com> <87plb076aq.fsf@redhat.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <87plb076aq.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email, suse.de:mid, imap1.dmz-prg2.suse.org:helo] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 10/6/25 11:01, Andrew Burgess wrote: > Tom de Vries writes: > >> On 10/5/25 20:03, Andrew Burgess wrote: >>> Tom de Vries writes: >>> >>>> On 10/5/25 14:51, Andrew Burgess wrote: >>>>> Tom Tromey writes: >>>>> >>>>>>>>>>> "Andrew" == Andrew Burgess writes: >>>>>> >>>>>> [...] >>>>>> Andrew> In v9: >>>>>> >>>>>> Going for a record here. >>>>>> >>>>>> I think these are ok. Thanks for doing this. >>>>>> Approved-By: Tom Tromey >>>>> >>>>> Pushed. >>>> >>>> Hi, >>>> >>>> I'm running into pre-commit failures: >>> >>> I searched on the GDB wiki, and did a grep in gdb/ and gdb/doc/ but >>> could find nothing about "pre-commit" except for one comment in >>> check-include-guards.py, but that doesn't say what "pre-commit" is. >>> >>> Is this process documented somewhere else? Or have I just failed at >>> finding it? >>> >> >> Hi Andrew, >> >> AFAIK there's not really a process, that is, there's no formal agreement >> on a requirement to run it. [ See also this email thread ( >> https://sourceware.org/pipermail/gdb-patches/2025-October/221320.html ) >> on the status of tclint as pre-commit hook. ] >> >> There's a file called .pre-commit-config.yaml in the root dir of the >> repository. I have added some information in there on how to install >> pre-commit, and how to skip some/all checks. > > Thanks for the pointer. > > Out of interest, is there any reason why these tests couldn't be (also > be) added as actual tests to GDB's testsuite? > > I haven't tried setting up the infrastructure needed to run these tests > using the pre-commit framework yet, but I'm guessing the time needed to > run these tests is insignificant compared to the existing GDB testsuite. > Hi Andrew, I gave it a try ( https://sourceware.org/pipermail/gdb-patches/2025-October/221445.html ). The new test-case takes about 5 seconds on my laptop. The test-case cannot do anything if pre-commit is not installed, so it's unsupported in that case. But it doesn't require the pre-commit git hooks to be installed. So the test will work even if you didn't do "pre-commit install". OTOH, it does require a git repo, so the test will be unsupported on a snapshot. Thanks, - Tom > Thanks, > Andrew > > > >> >> Thanks, >> - Tom >> >>>> ... >>>> flake8...................................................................Failed >>>> - hook id: flake8 >>>> - duration: 0.25s >>>> - exit code: 1 >>>> >>>> gdb/python/lib/gdb/__init__.py:557:31: F405 'Parameter' may be >>>> undefined, or defined from star imports: _gdb >>>> gdb/python/lib/gdb/__init__.py:579:21: F405 'COMMAND_NONE' may be >>>> undefined, or defined from star imports: _gdb >>>> gdb/python/lib/gdb/__init__.py:612:21: F405 'Color' may be undefined, or >>>> defined from star imports: _gdb >>>> gdb/python/lib/gdb/__init__.py:613:21: F405 'PARAM_COLOR' may be >>>> undefined, or defined from star imports: _gdb >>>> ... >>> >>> The patch below doesn't break GDB's Python support. And based on the >>> existing code comments, I suspect this is the required fix. But I >>> haven't run the "pre-commit" tests (see comments above), so you might >>> one to check this fixes the issue you reported. >>> >>> Thanks, >>> Andrew >>> >>> --- >>> >>> commit 5812afb15e8b7774984c238eb67adcf6eaa704a9 >>> Author: Andrew Burgess >>> Date: Sun Oct 5 18:55:33 2025 +0100 >>> >>> gdb/python: fix some flake8 warnings related to Python code >>> >>> After these commits: >>> >>> * 49e4d0cdca3 gdb/python: add gdb.Style class >>> * d5214580a5f gdb/python: new class gdb.StyleParameterSet >>> * 3c724596812 gdb/python: extend gdb.write to support styled output >>> >>> the following issues were pointed out on the mailing list: >>> >>> I'm running into pre-commit failures: >>> ... >>> flake8...................................................................Failed >>> - hook id: flake8 >>> - duration: 0.25s >>> - exit code: 1 >>> >>> gdb/python/lib/gdb/__init__.py:557:31: F405 'Parameter' may be undefined, or defined from star imports: _gdb >>> gdb/python/lib/gdb/__init__.py:579:21: F405 'COMMAND_NONE' may be undefined, or defined from star imports: _gdb >>> gdb/python/lib/gdb/__init__.py:612:21: F405 'Color' may be undefined, or defined from star imports: _gdb >>> gdb/python/lib/gdb/__init__.py:613:21: F405 'PARAM_COLOR' may be undefined, or defined from star imports: _gdb >>> >>> I believe this patch should resolve these issues. >>> >>> diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py >>> index 0388c6a2c00..65f76988925 100644 >>> --- a/gdb/python/lib/gdb/__init__.py >>> +++ b/gdb/python/lib/gdb/__init__.py >>> @@ -34,6 +34,10 @@ from _gdb import ( >>> parameter, >>> selected_inferior, >>> write, >>> + Parameter, >>> + COMMAND_NONE, >>> + Color, >>> + PARAM_COLOR, >>> ) >>> >>> # isort: split >>> >