From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 31C923858D38 for ; Fri, 19 May 2023 12:43:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 31C923858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-96f40c19477so292632366b.1 for ; Fri, 19 May 2023 05:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684500195; x=1687092195; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EGU0w45AjHO0i359iAJNoTV0RDBoAc9pcrVLmPKZCQc=; b=UahUIAI5E/TnM3VGBnWkeTU6X8m+IALwPqQpUOHYfozL5BIkA7sTaoL7xHluIExVaA IgS+209ekxDEBj2OoK6qqhx1BqYsz6k/srct3vT2kUvFhaMGgeBxGMRGJ1XWMlpNQzeY Sy5S9Om3fcPxPGhnKhQFGflx3N/u2tSAY/yVoBGPs3zqnOj6RM7E74R7DPatCqTtv61h rezDsTCEok9AUrJVgI3GzEmcYkE3uaNko0tkCMmskCnccX1Re9TCMz5drmmzoWNpFMzU hf3TTKQE64KY11NOVtIKZ9Wn5LI+/gqdkWl+DPlPCLpyxi3a6RA64CZGJG1tVgtjcqD1 EkJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684500195; x=1687092195; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EGU0w45AjHO0i359iAJNoTV0RDBoAc9pcrVLmPKZCQc=; b=WMtDurCQHg8zja3qqIUPqjSPUXrYERlVO1JdhYNtXSXLCnmhO15wTFwufGjh49fsc4 V69DbToHzF2f89SmyBISTl63nSR0l6wwVJqYx3KxxoZepxnKZann6Zh1cKlQ8poxA7xq lkRLVfRTDlSeJHCabGzOmSMBFHGfQCHz1u1nE7W1UyJ0wS52fqo02WFz6Fvl5a8rgfhr gFOhLbFoUTfnvdK+B10n2eDoYwZYn5X0b9VjBiqNMZi8TTc6PsEsyVhVcOlrfF39fNue 40LawQLxQZ5k07oCQ4WUmyVrU5SmulVSj5PVOJCa5F2Jk3reVMQ+EZRvHVbh9euYmmHQ dKeg== X-Gm-Message-State: AC+VfDzAnooWF1it65BycBDuOVYgbNtVQTO1hDDCeKj9l6Boygyur/Fc erIvNpaNU2Mocio6atpudSU= X-Google-Smtp-Source: ACHHUZ6tKdqM7pXMoaXhJCnSkpS14KTb6UFtNWPFM/yq09XnV/WKvEsoVekWzokJgYvuMj2WXkYj2A== X-Received: by 2002:a17:906:9b85:b0:94f:6218:191d with SMTP id dd5-20020a1709069b8500b0094f6218191dmr1486794ejc.32.1684500194684; Fri, 19 May 2023 05:43:14 -0700 (PDT) Received: from [10.26.0.4] ([194.126.177.67]) by smtp.gmail.com with ESMTPSA id rp20-20020a170906d97400b0096f641c6167sm823023ejb.181.2023.05.19.05.43.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 May 2023 05:43:14 -0700 (PDT) Message-ID: <0d2e05d0-d344-43e5-678f-55312bfc8bd9@gmail.com> Date: Fri, 19 May 2023 14:43:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2] MIPS: Sync elf.h from binutils Content-Language: en-US To: "Maciej W. Rozycki" , Florian Weimer Cc: Ying Huang , libc-alpha@sourceware.org, yunqiang.su@oss.cipunited.com References: <20230516061449.192954-1-ying.huang@oss.cipunited.com> <87v8gs6a3l.fsf@oldenburg.str.redhat.com> From: Gabriel Ravier In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: On 5/19/23 13:21, Maciej W. Rozycki wrote: > On Tue, 16 May 2023, Florian Weimer via Libc-alpha wrote: > >>> +/* Object attribute values. */ >>> +enum >>> +{ >>> + /* Values defined for Tag_GNU_MIPS_ABI_MSA. */ >>> + >>> + /* Not tagged or not using any ABIs affected by the differences. */ >>> + Val_GNU_MIPS_ABI_MSA_ANY = 0, >>> + >>> + /* Using 128-bit MSA. */ >>> + Val_GNU_MIPS_ABI_MSA_128 = 1, >>> +}; >> Any reason for using enum constants here, and not #define? I understand >> there is other MIPS precedent, but why continue in this direction? > AFAICT all architectures use enumeration constants for object attributes, > with the exception of TI C6X which seems to have special requirements. I > don't know what the actual original rationale has been, but it does help a > lot with debugging. > > Maciej I'll add that the problem this is likely to be referring to (gdb not knowing about macros) can be alleviated by using -g3 instead of just -g, but from what I've seen using enums is still better w.r.t. debugging in some cases even with -g3, and it's especially convenient when using stuff like Fedora debuginfo for debugging - debug packages don't typically use -g3 from what I've seen, just -g.