From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by sourceware.org (Postfix) with ESMTPS id 073213858D29 for ; Mon, 22 Mar 2021 16:13:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 073213858D29 Received: by mail-qv1-xf2e.google.com with SMTP id x16so8910483qvk.3 for ; Mon, 22 Mar 2021 09:13:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t7bS6GhDsDcLflAe9zG3oUshYE32oJceUYnc5d4Neso=; b=CVkH7TfivGrsii02kB3bNPbHM+DsW3aS3NYiArNslAAxx7A5BIl4LTlkLVkc1Pib7x sO9CUCjP8K28wN2auVj+MAngWpreF5qdMkwJr/WLlnHiqTDouXGHOxEWrmD4cBIZHg3k zttDUiFHbRPsHic5bQyVxDvN/NpOLvbKcFczPq+0HW/kLPq+O0CB9yL/76atiy2XpFAl Z1s/pwqE+uzI20PO9js564C+eToiQHQMSGmQlyiWKOPsB2HXdguNZPd8agQ62qq6rD6B y3/KXutzXpDnql/OuH8S1Yzj6q45BkUnXBIImKWgIAunVwTNt8tAovpyBHpi85hmfmAq osFA== X-Gm-Message-State: AOAM532LlAPSQES1G6THFOIib2OzLDoDHNGncwnKBZ93tsSxuVHNYr2p Y6xJKkIlnE7YCw4o8RXW3J+1m3rlhz+glg== X-Google-Smtp-Source: ABdhPJwDLu0CvTwDY4T4NV2XRMag6vQwA4j6XDLBS4BZUs2RSEgNtz+hCbFqNoTz4foo3k+Ap33LIA== X-Received: by 2002:a0c:bdaf:: with SMTP id n47mr350417qvg.48.1616429584078; Mon, 22 Mar 2021 09:13:04 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:2c21:ec8a:30f3:55a6? ([2804:7f0:4841:2841:2c21:ec8a:30f3:55a6]) by smtp.gmail.com with ESMTPSA id f8sm11231048qkk.23.2021.03.22.09.13.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Mar 2021 09:13:03 -0700 (PDT) Subject: Re: [PATCH] Add startswith function and use it instead of CONST_STRNEQ. To: Alan Modra , Tom Tromey , Mike Frysinger Cc: Alan Modra via Binutils , gdb-patches@sourceware.org References: <4d8880dd-4a83-f0fc-dafd-2079493d4093@suse.cz> <20210319063759.GM6791@bubble.grove.modra.org> <20210320070037.GR6791@bubble.grove.modra.org> <87wnu1k5z1.fsf@tromey.com> <20210321131254.GS6791@bubble.grove.modra.org> <87k0q0j5ql.fsf@tromey.com> <20210322120652.GV6791@bubble.grove.modra.org> From: Luis Machado Message-ID: Date: Mon, 22 Mar 2021 13:13:00 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210322120652.GV6791@bubble.grove.modra.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 22 Mar 2021 16:13:06 -0000 On 3/22/21 9:06 AM, Alan Modra via Gdb-patches wrote: > On Sun, Mar 21, 2021 at 08:13:06PM -0600, Tom Tromey wrote: >> Alan> Yes, the following compiles. Fortunately all gdb files that include >> Alan> gdbsupport/common-utils.h also include bfd.h by one means or another. >> >> Sorry, I misunderstood. I thought the proposal was to put the >> function in ansidecl.h. >> >> gdbserver can't generally include bfd. Maybe it works sometimes, but I >> imagine if you do a gdbserver-only build, bfd.h won't even be created. >> (At least, it shouldn't be, because gdbserver doesn't require bfd.) >> >> So I think some other approach is needed. Either ansidecl.h, or a new >> header; or rename either the BFD or GDB function and go from there. > > A new header would be best, I think. > >> I'm happy to implement it if you like. > > Yes, that way you'll get it done properly. :) Sorry for the breakage. > Just FTR, I'm seeing breakage in sim/aarch64 and sim/arm. Both are complaining about "-Werror=implicit-function-declaration" regarding strncmp and strlen. Is this the breakage you're talking about? Just so I know what to expect when it gets fixed.