From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PDfLHE/DfGqFEiEAWB0awg (envelope-from ) for ; Wed, 12 Aug 2026 15:02:39 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QYXH2VLM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5FF571E166; Wed, 12 Aug 2026 15:02:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2EBF21E09B for ; Wed, 12 Aug 2026 15:02:38 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 388814BB3B93 for ; Wed, 12 Aug 2026 19:02:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 388814BB3B93 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QYXH2VLM Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 976094B9DB70 for ; Wed, 12 Aug 2026 19:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 976094B9DB70 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 976094B9DB70 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786561330; cv=none; b=eExoZabgxJpgr8qz6hHvQl7ThjB7CJqzDsFXtzsBDeKq7lLz1markoo59AYJQu5pbMdFb8QmV5O26/xWOuD6n2xUdIBsPwcMSDDwFdMsPVjjAb1C/4988Za4s3bcjnr1eS8q0Bkz2JGMfjwGB/QAyC42rG0e3dBAYc5UMSEyBQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786561330; c=relaxed/simple; bh=9vlKqGKaa15ocmvqqB62zz2vbisghpMFPO3e8Vq1d/o=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=iOmmr72fhbbXFzjWhQpkvf1x7+o0JqZuJb5AQW1JVpjBCJm+kWsTpO16i8WJbk93cnjXb8ycPwUe1f+vlOImYJ76PsPLXvvLdRxh5FLt5dFiktT5dU6Dsx4fhoefFuvGrQCuv6n/34WJuMIDcTh+eRzNtwaxysaneW++rBuAgKQ= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QYXH2VLM DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 976094B9DB70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786561330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6TG739x4Ks8s+7bTv8TjtiydlKdX1v+0ioQpJRY2Zto=; b=QYXH2VLM3//V6FUUJ2USNqGMl+fn4+zoWat/Ry2s5bi387xXq6AtgP32X/wl5nZZV85KUd 9x/ioPVTTR8jGAxcJ0NIkZtgclzYriu3d4KxsJun2//o1JjD/xNEVL6/XrtMjiBmSAwTqz zIeA/xGgi96cz+O8A1EdEtw+IYMN12M= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-126-F9HzYPTLOOW-D-4cwekHJg-1; Wed, 12 Aug 2026 15:02:09 -0400 X-MC-Unique: F9HzYPTLOOW-D-4cwekHJg-1 X-Mimecast-MFC-AGG-ID: F9HzYPTLOOW-D-4cwekHJg_1786561328 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-38dc085b0a7so2589845a91.2 for ; Wed, 12 Aug 2026 12:02:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786561328; x=1787166128; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6TG739x4Ks8s+7bTv8TjtiydlKdX1v+0ioQpJRY2Zto=; b=ZbcOsp0wKOUUMVwdFUhM6WT0nBhuG6ilI1wKBUKRmRgYB5nWf5Izp3xeOao17sY9PG nWF513wNs82V1l/6RXbYj5oJzOcd9gNVtwi+IbDlvmI2dq9CcoXTI7rlHA3RhUv+DLy2 x+Q+MF2OB16NWWAgEdNx9LdgBCljhZ4ulFPB7r/Tx8WYdGsxKx+MJiRZVJWVXsupRpAo +SKitfucluL3GNoJz19MAVKe30xlROIcpx2cwxV8Fm5ft83MTmxyJIz72kouwnd7wGFn wURiHDgfGU69kX4qus2R3/QteJGmJhrOye3YqQo/DhK2300N/pNyr+3PU1kZlyxKo9yK pV3g== X-Gm-Message-State: AOJu0YyaeiUk4gkkA0iL5eosER8bG+81Z3ptICbLZlN0V5zKQmkCdybo yTZox1XxRUk9A7l1YyW+peH7xQ6L+MjsqTjE/qKn7nrYZGlMYnDIGF4DFqsqHM/TAdzsClVQ9XD 4uQL2tTFMA2ziHfqCYkiEDj/100RTEnG3FcvLoUgGmAKdrAHlFs1efZFFCWKHIcA= X-Gm-Gg: AR+sD11JhAqIZUiq9uKiHvGn93C0VWgvgqinC3cHlWJw0G3CH6F/Zj0q5tlYjSsc/+i eNfuFAzoXINVPDE0g3ZVh/Zrcssb6xZG4RU0wU4ERyJWNIL+MEp+TOnUIdT4ON+3s8hYLImwZgg SkKzr0sFKfYxbEflnEuCr83Qk26FKF6RDOmt7y84iBbEGZFvWP7hyQLDiFu2k3cWJj5HKBTBjjg VIEfSc73yKqLen+G4aXNW3bajj2TA7Q1mJ0vGXbbopI1Bc0IXoFwG7C0XBBFXB/iTEtk2Acbvga ZzuaVWctJiNts8A4RNSsd7kywBoVgcGDo8VQ8uuWAPGlxrfLjP2Pi80MnYZomkvQ75anYNhjsAk iqO/LXRjSMw== X-Received: by 2002:a17:90b:28ce:b0:38f:23d6:b4a9 with SMTP id 98e67ed59e1d1-3931e345ab1mr368035a91.21.1786561327675; Wed, 12 Aug 2026 12:02:07 -0700 (PDT) X-Received: by 2002:a17:90b:28ce:b0:38f:23d6:b4a9 with SMTP id 98e67ed59e1d1-3931e345ab1mr367910a91.21.1786561327065; Wed, 12 Aug 2026 12:02:07 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:993e::75d? ([2804:14d:8084:993e::75d]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1412d8bd946sm309788c88.5.2026.08.12.12.02.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2026 12:02:06 -0700 (PDT) Message-ID: <3ed43262-e5cf-4974-981e-76bcce5b9db2@redhat.com> Date: Wed, 12 Aug 2026 16:02:02 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [GDB 18] gdb/configure: fix string quoting in AC_MSG_WARN and AC_MSG_ERROR To: Andrew Burgess , Eli Zaretskii Cc: gdb-patches@sourceware.org References: <14328877dfdc53dcfad582dd2b56861dc92396fd.1786453193.git.aburgess@redhat.com> <86bjb8ye3r.fsf@gnu.org> <87v79gk45k.fsf@redhat.com> From: Guinevere Larsen In-Reply-To: <87v79gk45k.fsf@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 0fHqukQVt2SpEJKdw_7eWT8OGM9t4hax0cIwPimTXVU_1786561328 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 8/11/26 1:33 PM, Andrew Burgess wrote: > Adding Guinevere to the CC list as the author of this feature. > > Eli Zaretskii writes: > >>> From: Andrew Burgess >>> Cc: Eli Zaretskii , >>> Andrew Burgess >>> Date: Tue, 11 Aug 2026 14:02:06 +0100 >>> >>> If / when approve I plan to push this to both master and gdb-18-branch. >> Thanks. I have a question about this below. >> >>> Now when configuring with >>> --enable-binary-file-formats='coff,xcoff,elf,macho' on a target that >>> doesn't support Mach-O, e.g. GNU/Linux, the configure will stop like >>> this: >>> >>> checking for ELF support in BFD... yes >>> checking for library containing dlopen... (cached) none required >>> checking for Mach-O support in BFD... no >>> configure: error: Mach-O support was requested, but BFD does not support it >>> make: *** [Makefile:13461: configure-gdb] Error 1 >> Hmm... so building with Mach-O support on GNU/Linux and MS-Windows is >> not possible at all? I'm not sure I understand the "BFD does not >> support it" part of the error message: shouldn't BFD that is compiled >> as part of GDB be configured to support Mach-O when GDB is configured >> with --enable-binary-file-formats='coff,xcoff,elf,macho'? Or what am >> I missing? > My understand is that to get support for Mach-O you'll need to use > --enable-targets=.... to add a suitable target in addition to the > default (GNU/Linux or Windows depending on the build host). > > Doing this will, I believe, cause BFD to be built with support for that > target. > > The --enable-binary-file-formats flag then controls the GDB side of > things, you could choose to exclude macho support from GDB if you > wished. > > I'm not sure the use case for doing that is super obvious, and I think > that macho is probably a choice for a motivating use case. (as a side-note the idea here is that, if a CVE is identified against the reader of a format that an OS doesn't support, the maintainers of GDB in that OS won't need to manage backports for that CVE, without leaving the system potentially vulnerable to that CVE). > > If we consider coff/xcoff, which on GNU/Linux we get "for free". But > supporting these in GDB means we have an increased surface area for > bugs, all in code that many GNU/Linux distros don't care about. > > The motivation for the --enable-binary-file-formats flag was to be able > to compile a GDB that runs on GNU/Linux and only supports ELF. > > Hopefully Guinevere will chip in and correct any mistakes I've made in > the above explanation. From what I remember, and a cursory check in bfd/configure.ac, you're spot on BFD decides which formats to support based on the targets that are being compiled, and that is ran well before --enabile-binary-file-formats has a chance to run, so the best that gdb's configure can do is detect that it's not available and warn you. Note that before I introduced the feature, the format would just silently not be compiled in this example situation, and would always be compiled when a relevant target was added. You can verify that by compiling a previous release and looking for Mach-O related object files. So in the end, my only change was to notice when the user has specifically requested an impossible configuration, we loudly fail instead of silently ignoring the request. > > Thanks, > Andrew > -- Cheers, Guinevere Larsen it/its she/her (deprecated)