From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cH+gGpBek2jcOQUAWB0awg (envelope-from ) for ; Wed, 06 Aug 2025 09:54:24 -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=M5mL4aOx; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 699A51E100; Wed, 6 Aug 2025 09:54:24 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F12C41E091 for ; Wed, 6 Aug 2025 09:54:23 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 712A43858D29 for ; Wed, 6 Aug 2025 13:54:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 712A43858D29 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=M5mL4aOx Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id E3C603858D29 for ; Wed, 6 Aug 2025 13:53:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3C603858D29 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 E3C603858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754488431; cv=none; b=WEnV5mZFhMgDQViJidDXH6Kz8HwsMzttsIdwXKbStBHJpsSZDWgVlS/y9JxnU2q/jEI4S8qFnls8ldiMYHxVmdQnmd9hMj6nNRZGdo1IHsVOjPA1nSHbWm1ImSxt/AVpSYEGzCInqaGFnbTPTdFSW59u8orIXA8wmjpRAPcCQNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754488431; c=relaxed/simple; bh=m5D0lEUnnGHAy7GciC1QZZFJOJZ1YAcKW/IEYk5EkjY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=iroqSAS41Q7cT5n/PlQsB3sv0B8Bw5EN0uvQw/llxmcBTtNuYSCzRYU0E6uGA4FaG6PQwLVRH1ICdJpZ3uqEhSPThaBi2WnMl7IBgdMDFX1F7zPpYoaij8UTfLmT3P/tqYlyh4piASdD/tyTpWVUqIx4kpsbFlKd5dk014CADsw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3C603858D29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754488430; 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: in-reply-to:in-reply-to:references:references; bh=E/Z9IcqhTeKXnjiE7CDNm1sBVQgbCtWfYasfcfbx1b8=; b=M5mL4aOxVkCJb5EdNI5QmPTpJxQqp9jxOx55Rhf14B+QvJ5NxDsiDMSyolHfDs/Qli04YR RwdRZe/X9uyNVHE4B/x+Ji9jBWHJ8sAqIH9mxm/wDXRj8VvwkZbJfnDcez8z7Mk0td+jl1 3D/OyOitndZCTseZjgoQYdICVQqztRA= 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-219-8123qnLPO--PCt8utUB6zQ-1; Wed, 06 Aug 2025 09:53:49 -0400 X-MC-Unique: 8123qnLPO--PCt8utUB6zQ-1 X-Mimecast-MFC-AGG-ID: 8123qnLPO--PCt8utUB6zQ_1754488428 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-31edd69d754so5296473a91.1 for ; Wed, 06 Aug 2025 06:53:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754488428; x=1755093228; h=in-reply-to:content-language:references:cc:to:from:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=E/Z9IcqhTeKXnjiE7CDNm1sBVQgbCtWfYasfcfbx1b8=; b=Urf11iyJUiYClkJQg/c+7KRiSG3FY2HgcDfAFSK1fFuz/zXu4U38V+t6B8kxr1gsz1 NnA/vAScruD+ONxP+MWEiVT+2yumMHavT4cNdrz5wdai2Vg95zIuVJ7p9wphTFAr0bnQ Rn9H97mjBR9hhdbuLAAJCg4qQHijEWj2vRnkzrBGyMomdfeP+rUORJiDEiXUxH9vgGKX xOYeqZQi7co2RTLYwygVxbdMIdqKuMpspeZ06tY+uEIwtcbXv8G2ZpBMitqPbVSNqhjb d3v1sMbfJTV1zFZKPxCG+3RIBfHFYNcf2W0WJpdp+oyemMMGmkVlCdmE1rTNoJD71SJa rkrA== X-Forwarded-Encrypted: i=1; AJvYcCXRUf8JaWvo0kMiuXUTchiHjmgGMLWEJLBosVwflfVwG2rs65x7FFHVh05r49mLzE5vz9vcGwJpoGc0Ag==@sourceware.org X-Gm-Message-State: AOJu0Ywo8B3OnoMvK51NWeEmPaLJNBLZrNNGMymT5q1BqAy8ogfhGloa hx7rEZqM4kANJYiitIUb1x4QzlOFibS7xdwZl91sT7gDV+tQzVJHWd0UFx6qrnF9dsbIxUoElve cuLNVa2wzKDSU+u0BjeoRmiRsc4iMLWqMWTUhXySiW21OQeRMzSH/ymSBPy5jUG0= X-Gm-Gg: ASbGncuJU/MV77jH4FyYnfDt5B/tNbdqBvbT5vAVF9IHBcd1B5PKL+nbyZNHZwZmIou lhTxVMBTr6+uuqCrM37j5eh1pfJNNq3L+e3wRA0Zm4xxxjaePiXJmDnHJOp7QGFJnzJcRRE7Plc iY7bspt4uOgZRRtCz8CEFl4VcVhb1BWlrgmwpguZFElWM/K6z3zHYZTB4cmwli8/wTMZKHsunqy K4LLyOvOVnrd4vHe+K/E0X/jKlnfhhRPHMVGlnT5xjnAxZXbbHHUupmERe+sU2Qp+qdWiFIiHOY AU4HYGC4ESsIb/MhRRhW2N6eR57GxRRNdGS+WzXvUEgr+LOOIVE= X-Received: by 2002:a17:90b:3848:b0:31f:1744:e7fd with SMTP id 98e67ed59e1d1-321675ac368mr3457062a91.31.1754488427825; Wed, 06 Aug 2025 06:53:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFI11RjnZUtVeY+9VJ+qG40Zz/vxlKR5LzbO1tPuewnwIGbnz+68CItYhajhTN59+hWPFlBtg== X-Received: by 2002:a17:90b:3848:b0:31f:1744:e7fd with SMTP id 98e67ed59e1d1-321675ac368mr3457030a91.31.1754488427289; Wed, 06 Aug 2025 06:53:47 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1000? ([2804:14d:8084:9a69::1000]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31f63c25f0dsm20074115a91.0.2025.08.06.06.53.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Aug 2025 06:53:46 -0700 (PDT) Message-ID: <6f40184b-9190-4597-a326-f62bb544d3b4@redhat.com> Date: Wed, 6 Aug 2025 10:53:38 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6] gdb, configure: Add disable-formats option for configure From: Guinevere Larsen To: Simon Marchi , gdb-patches@sourceware.org Cc: Eli Zaretskii References: <20250526171111.2633770-1-guinevere@redhat.com> <20250707201657.972546-2-guinevere@redhat.com> <551458c7-bcb7-4643-91e4-9e01e0792425@simark.ca> <995b2448-6e30-4ba6-acb8-099b0723ee83@redhat.com> In-Reply-To: <995b2448-6e30-4ba6-acb8-099b0723ee83@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fvdcAxgn0MuU0ZVWMHowBWmp2CG0YhvJEAJUKTZ5Or0_1754488428 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="------------IzFXIs4LL3PX7zK50s6fkhfQ" Content-Language: en-US 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 This is a multi-part message in MIME format. --------------IzFXIs4LL3PX7zK50s6fkhfQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/5/25 5:07 PM, Guinevere Larsen wrote: >>> @@ -1952,11 +1970,17 @@ fi >>>   # Note that WIN32APILIBS is set by GDB_AC_COMMON. >>>   WIN32LIBS="$WIN32LIBS $WIN32APILIBS" >>>   +# Object files to be used when building with support for all file >>> formats. >>> +# This should not have elf or macho, as support for those formats >>> depends >>> +# on BFD enabling them as well. >>> +all_binary_file_srcs="\$(dbx_SRCS) \$(mips_SRCS) \$(coff_SRCS) >>> \$(xcoff_SRCS)" >>> + >>> +support_elf=no >>>   # Add ELF support to GDB, but only if BFD includes ELF support. >>>   GDB_AC_CHECK_BFD([for ELF support in BFD], gdb_cv_var_elf, >>>                    [bfd_get_elf_phdr_upper_bound (NULL)], elf-bfd.h) >>>   if test "$gdb_cv_var_elf" = yes; then >>> -  CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ >>> +  CONFIG_OBS="$CONFIG_OBS stap-probe.o dtrace-probe.o \ >>>           gcore-elf.o elf-none-tdep.o" >> Does it make sense (or is it useful) to compile these other files (other >> than elfread.o) if ELF support is not enabled?  Could we just list them >> all in elf_SRCS so that they are not built if the user doesn't want ELF >> support?  If you don't have an ELF reader. > > I don't know. I took the path of least changes to implementing this, > made worse by me not having a convenient way to test a non-ELF target. > > I'll try to find a way to test if those are necessary and update the > patch if they aren't ah, turns out I could've just tried compiling with no elf support, oops. stap-probe and dtrace-probe can go gcore-elf and elf-none-tdep are required to compile with --enable-targets=all, and since these aren't enough to consider elf supported, I think it's easier to just leave them here than figuring out which targets require them... I did notice that the arm-tdep.c does need them, but didn't go far into anything... I'll submit a v7 with that update shortly -- Cheers, Guinevere Larsen She/it --------------IzFXIs4LL3PX7zK50s6fkhfQ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 8/5/25 5:07 PM, Guinevere Larsen wrote:
@@ -1952,11 +1970,17 @@ fi
  # Note that WIN32APILIBS is set by GDB_AC_COMMON.
  WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
  +# Object files to be used when building with support for all file formats.
+# This should not have elf or macho, as support for those formats depends
+# on BFD enabling them as well.
+all_binary_file_srcs="\$(dbx_SRCS) \$(mips_SRCS) \$(coff_SRCS) \$(xcoff_SRCS)"
+
+support_elf=no
  # Add ELF support to GDB, but only if BFD includes ELF support.
  GDB_AC_CHECK_BFD([for ELF support in BFD], gdb_cv_var_elf,
                   [bfd_get_elf_phdr_upper_bound (NULL)], elf-bfd.h)
  if test "$gdb_cv_var_elf" = yes; then
-  CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
+  CONFIG_OBS="$CONFIG_OBS stap-probe.o dtrace-probe.o \
          gcore-elf.o elf-none-tdep.o"
Does it make sense (or is it useful) to compile these other files (other
than elfread.o) if ELF support is not enabled?  Could we just list them
all in elf_SRCS so that they are not built if the user doesn't want ELF
support?  If you don't have an ELF reader.

I don't know. I took the path of least changes to implementing this, made worse by me not having a convenient way to test a non-ELF target.

I'll try to find a way to test if those are necessary and update the patch if they aren't

ah, turns out I could've just tried compiling with no elf support, oops. stap-probe and dtrace-probe can go

gcore-elf and elf-none-tdep are required to compile with --enable-targets=all, and since these aren't enough to consider elf supported, I think it's easier to just leave them here than figuring out which targets require them... I did notice that the arm-tdep.c does need them, but didn't go far into anything...

I'll submit a v7 with that update shortly

-- 
Cheers,
Guinevere Larsen
She/it
--------------IzFXIs4LL3PX7zK50s6fkhfQ--