From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 7E5543858D1E for ; Fri, 20 Jan 2023 17:16:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E5543858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 30KHGIK1029258 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Jan 2023 12:16:23 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 30KHGIK1029258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1674234984; bh=aYR9FN+axsb+/1eb31CPu9RFjE5nv2ADZa7N8MsfyS0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Z7x4es7lXarWJML9L/hgkKd7bW1aG91E+f84zrO62/YZP0CgomYt0JOnb2/JrHFbw 6H4EbLtntT6mheujNpez9JPw8feKnk3fboMk2TiCl4xFIcauj5LYoEymGpMBUItt0l g1Rnjpic2lu3RUF1m0OEN4UOZ6okxFNE5XWeDWl0= Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 2B25B1E0D3; Fri, 20 Jan 2023 12:16:18 -0500 (EST) Message-ID: Date: Fri, 20 Jan 2023 12:16:17 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v8 4/6] GDB: Allow arbitrary keywords in integer set commands Content-Language: en-US To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, Andrew Burgess , Tom Tromey , Simon Sobisch References: <368aabac-7418-3323-841a-45a16f82b796@polymtl.ca> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 20 Jan 2023 17:16:18 +0000 X-Spam-Status: No, score=-3032.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > It is used by `parse_option' however, where no setting is involved, so > it's not clear to me how to do that. I could make an artificial setting I > suppose, but I feel like it's kind of creating a problem to fit the > solution. Let me know if I've missed something. Ah, I probably thought that parse_option had a setting object, nevermind then. >>> - var_zuinteger_unlimited, >>> /* Enumerated type. Can only have one of the specified values. >>> *VAR is a char pointer to the name of the element that we >>> find. */ >>> var_enum >>> }; >>> >>> +/* A structure describing an extra literal accepted and shown in place >>> + of a number. */ >>> +struct literal_def >>> + { >>> + /* The literal to define, e.g. "unlimited". */ >>> + const char *literal; >>> + /* The number to substitute internally for LITERAL or VAL; >>> + the use of this number is not allowed (unless the same as VAL). */ >>> + LONGEST use; >>> + /* An optional number accepted that stands for the literal. */ >>> + gdb::optional val; >> >> Could you please add an empty line between each field? I find that >> makes it easier to read. > > Done (`enum var_types' above seems inconsistent about it). Yeah there are some instances of that, seems like an old style. Simon