From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ou84ExPJWGBPIQAAWB0awg (envelope-from ) for ; Mon, 22 Mar 2021 12:42:59 -0400 Received: by simark.ca (Postfix, from userid 112) id 4230E1EF78; Mon, 22 Mar 2021 12:42:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 444C71E54D for ; Mon, 22 Mar 2021 12:42:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0D8EB3851C2B; Mon, 22 Mar 2021 16:42:57 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id D3D303851C0D; Mon, 22 Mar 2021 16:42:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D3D303851C0D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 027A0AB8A; Mon, 22 Mar 2021 16:42:53 +0000 (UTC) Subject: Re: [PATCH] Add startswith function and use it instead of CONST_STRNEQ. To: Alan Modra , Tom Tromey , Mike Frysinger 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: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Mon, 22 Mar 2021 17:42:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.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-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alan Modra via Binutils , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 3/22/21 1:06 PM, Alan Modra 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. > Hello. I feel also responsible for the current compilation problems, I pulled the trigger. Anyway for the sim failures. What about directly including in bfd-in.h? diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index fda9fe0198e..d35e2ece516 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -38,6 +38,7 @@ extern "C" { #include "diagnostics.h" #include #include +#include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #ifndef SABER Or do I miss something? Thanks, Martin