From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 10F2D3858C53 for ; Wed, 10 Aug 2022 15:57:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10F2D3858C53 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-421-udrOKQHOObKvNT2gAf9hsA-1; Wed, 10 Aug 2022 11:57:40 -0400 X-MC-Unique: udrOKQHOObKvNT2gAf9hsA-1 Received: by mail-wm1-f70.google.com with SMTP id c17-20020a7bc011000000b003a2bfaf8d3dso7587570wmb.0 for ; Wed, 10 Aug 2022 08:57:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=6wuTDDc9Bg+SgZaLOGUpyxa7gmgR9S8nzroVO6nE1Y4=; b=cH7p+WGEuwTeGqjtyuDu7izrUXdPJG3T8mqDsSoFkgMO3JRXu3xN9ttKf9Qw0fIHwp hlC3d8pNXtQkMuLrD0L7STpsEvcjeckWXNyhY5UZi/1/Cf29ccljLRHncH/LS9TTgUan ZPKcgGsyQVfoH3XfMtCptMhAkF95eB9wfVclnwLj6FjHPnT1xJakaFoBgG7U+mcqZ9Bu sehbIUb6KCxlN5zkZ7KAAv6t005QC+iYfSiMx7o+0sE6+0xLnatbYO5KpGIGnN0rwJpq bnNLdGMMHQTckiuqhLx97eKEoPkBMQxFQE8FB1msPjBWMNC1tF9UAszNJFZsSzaC1RW5 a9dg== X-Gm-Message-State: ACgBeo3cQEzTk+LtrE+8Z61i8tRVP9p6S58vqEMlSUWjRakhjsV7glFj wMuNp+NkG5PN4Or2sYRVijrxLSQe0jfx5P92+s8RktjnxXT1SIWLhJ0ElCP5iKaiy5ZOv22CMGV RLE71cLlzZtZiR5Ov6w== X-Received: by 2002:a05:600c:1f11:b0:3a5:3df9:4859 with SMTP id bd17-20020a05600c1f1100b003a53df94859mr2848198wmb.175.1660147059151; Wed, 10 Aug 2022 08:57:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR4fd7yK4S1Q/eqq97OFUk0Axf4zhSpzbjQfGNHbPO/vJxtOuUS8ZrdDRRKSOa8xq3QNRacl7w== X-Received: by 2002:a05:600c:1f11:b0:3a5:3df9:4859 with SMTP id bd17-20020a05600c1f1100b003a53df94859mr2848189wmb.175.1660147058939; Wed, 10 Aug 2022 08:57:38 -0700 (PDT) Received: from [192.168.1.6] (adsl-2-solo-236-177.claranet.co.uk. [80.168.236.177]) by smtp.gmail.com with ESMTPSA id u11-20020a05600c19cb00b003a31b79dc0esm8231884wmq.1.2022.08.10.08.57.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Aug 2022 08:57:38 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2022 16:57:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 To: Andrew Burgess , binutils@sourceware.org References: From: Nick Clifton Subject: Re: [PATCH 3/3] objdump: allow the disassembler colors to be customized In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2022 15:57:45 -0000 Hi Andrew, > I don't know if this style of environment encoded settings will be > acceptable or not. If we are going to accept an environment variable for patch 2/3 then I see no reason why it cannot be extended here. > The alternative would be some kind of > configuration file system. Meh - of the two I prefer environment variables over configuration files. Environment variables are easier to change in a nested fashion, configuration files are not. > My inspiration for the approach I propose > here is the LS_COLORS variable used by `ls`. Agreed - there is precedence for this kind of behaviour. > + ::= "OFF" | "B" | "X" Shouldn't the modes be "off", "on" and "extended" ? > + ::= "=" Your syntax description does not document "". It really should do so, or else provide a reference to where it is documentede. > + ::= "ad" | "ao" | "as" | "cm" | "im" > + | "mn" | "rg" | "sm" | "sy" | "tx" I am a big fan of long descriptive names. It makes things much easier to read. So by all means, allow shortened versions if you want, but it would be really nice to support names like "registers", "addresses", "symbols" etc. > + /* The defaults colors for --disassembler-color=color. */ > + disasm_styles[(unsigned int) dis_style_address] = "35"; > + disasm_styles[(unsigned int) dis_style_address_offset] = "35"; You might as well replace these magic numbers (eg 35) with #define'd constants. That would be more descriptive. (Assuming that the defined names are color names of course). Cheers Nick