From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id q7M8GH3rymfUBggAWB0awg (envelope-from ) for ; Fri, 07 Mar 2025 07:50:05 -0500 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=Lz3YdHkr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5329B1E105; Fri, 7 Mar 2025 07:50:05 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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.0 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 B45EF1E08E for ; Fri, 7 Mar 2025 07:50:03 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 43DE63858408 for ; Fri, 7 Mar 2025 12:50:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43DE63858408 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=Lz3YdHkr 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 512AA3858414 for ; Fri, 7 Mar 2025 12:49:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 512AA3858414 Authentication-Results: sourceware.org; dmarc=pass (p=none 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 512AA3858414 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=1741351761; cv=none; b=ERrMcJwP54m+e608BQmKaoUSbWwSzGOKBEJI/OixIHXoO5wuKqnbeaYWOfpm5Ewf9N1nusp7M0aNPe6DNj5GSgQm6nls7cfGMSz1mVOX7694ljfW/2ioLlhYk9MRBjnFrvzxQtE72UZEOAG8wJZeP7Z1Ri/tgwOO64tozovcZgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741351761; c=relaxed/simple; bh=2D/fo/XrN489vfr8QitkC+BgSqnyMUr3mo+jEWDdalM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=UHefZUaGA4BzbCQUYkzDJtP14toJlhSYG8y5D5EEPimqbwLcpHk1Z9qXSFlhczEs/i9RYG8MSHDxkdfKljtDegEvm6xxbxb752/UVgrQPD1doHKSiQGRwnn1kYSQ1mx4GyeR0qJZLEFkd8Vqcycj/S7YdNxwhVRyOEiPgaI8kzg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 512AA3858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741351761; 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=WXLzPaaqQzRCA6dfxbZcdiOc/GTHk+Y+vBKcBQzaYFw=; b=Lz3YdHkr3xo/q0t63pMtATnvi8P7B/lRVGgoRHr0oHVsU7+bLQe8vUUDzKQPQDvbnec+aA KQnmko04fH6/W86GSV5wSl7Gy1qSNF5jPLjCHjO41yCpL135gXT2S1RR5WNKR2soCCY9TV ts6jGTFjrfPGnNHmnXTXQ3PgJK4Ttl4= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-EEnuo7sMMVmjEYtQLQ9SfA-1; Fri, 07 Mar 2025 07:49:19 -0500 X-MC-Unique: EEnuo7sMMVmjEYtQLQ9SfA-1 X-Mimecast-MFC-AGG-ID: EEnuo7sMMVmjEYtQLQ9SfA_1741351759 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2234dddbd6fso36022055ad.0 for ; Fri, 07 Mar 2025 04:49:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741351758; x=1741956558; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WXLzPaaqQzRCA6dfxbZcdiOc/GTHk+Y+vBKcBQzaYFw=; b=lWZZ+HzTH+svxiBnzc97eKkxRntxmEtttib5dYEO/aW7c7NwB1zJk5LC6qT/iggVl0 KH32p2poxbwLfct2LCEhGatd99o6RNpqxrQKsgeCzPIInd7lNql7GFZPvPGjr4dVvwO3 Z5gWaaWR7ByrMqPvEkZ61DpRxbfaDRSiCGXZDw8tL/0pMKh/ylSEL2cX0JYJ5RI9pLnu P4kIL2VO7kZ8Db5KE0207UfUZsLFus6PQsd/Pgrk2C+v60y8lUP3inrioj1/lUd6cp8E f/043btCUJkEB///jD0MX8UjW2Ri4/Ms1mrSrjtojMYcMJTpPEa/h4jcsFxcUaD/SwoE ettA== X-Gm-Message-State: AOJu0YzsE2R4yeO/sVI8n/rcte/CV9IsQA+s73s23S9SxHqkWQ0KNSWd 8UTULt1Z1I++JG20fPMJ0uoFs72uo9MxrebzCTDMYAWmE0XUV6f6Qglqo5LG5gj7D5YI4EofHrO e8wmbZQezu20Bt4fGlFSgC2cTIAHlpMnBtoYvdjGWfz/CV/BgvhXuSWhYVSI= X-Gm-Gg: ASbGncs7X2+Mu/b8MGKgObkWQdYuySyzMoIYmngGyavH7WTdA6AsJyu3F/UzmEpetj+ WVKTW/djWoWUvf74Ni5BhtfA1vh9ux8uWbJk1S3aap08nhYOBVrYJrvrv/MWzW15P+y+LSYbwKb VacPfuHj2cFYvjTWim5DCOBVr0xbC6S0MTVkR/qTHrP8m08ihsjozSiyYbarO6cf4LfzlibzdcG lLV4V7RAmGhGFV5Q2KMb+Cq6OgZzyeiPzUvcPH9PvWb/dc20d2nLYUU4Ms7dZwXt3o6fD7Ho5gh oc6lFp3Blq5pldQ7gmiKpgCj9tk= X-Received: by 2002:a17:902:e552:b0:21f:58fd:d215 with SMTP id d9443c01a7336-2240940234dmr120275885ad.11.1741351758630; Fri, 07 Mar 2025 04:49:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYgWgNQqfOF+Qe+uqQymQVVpVbksNjUpHqHdsUdtyQUFMdPn7YC+C5PAmvvs/i5vyta26oeA== X-Received: by 2002:a17:902:e552:b0:21f:58fd:d215 with SMTP id d9443c01a7336-2240940234dmr120275665ad.11.1741351758285; Fri, 07 Mar 2025 04:49:18 -0800 (PST) Received: from ?IPV6:2804:14d:8084:9a69::1001? ([2804:14d:8084:9a69::1001]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af281075ecfsm2896963a12.5.2025.03.07.04.49.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Mar 2025 04:49:17 -0800 (PST) Message-ID: <43ba8f99-9b68-44a0-9d23-72cb41ab0106@redhat.com> Date: Fri, 7 Mar 2025 09:49:14 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] gdb, configure: Add disable-formats option for configure To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20250307115821.1507435-1-guinevere@redhat.com> <867c51kpns.fsf@gnu.org> From: Guinevere Larsen In-Reply-To: <867c51kpns.fsf@gnu.org> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7KSnpZcIV7Z8GgUbwtBF0VIwxHGVExf-nOpttZtak44_1741351759 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 3/7/25 9:09 AM, Eli Zaretskii wrote: >> From: Guinevere Larsen >> Cc: Guinevere Larsen >> Date: Fri, 7 Mar 2025 08:58:21 -0300 >> >> GDB has support for many binary file formats, some which might be very >> unlikely to be found in some situations (such as the COFF format in >> linux). This commit introduces the option for a user to choose which >> formats GDB will support at build configuration time. >> >> This is especially useful to avoid possible security concerns with >> readers that aren't expected to be used at all, as they are one of >> the simplest vectors for an attacker to try and hit GDB with. This >> change can also reduce the size of the final binary, if that is a >> concern. >> >> This commit adds a switch to the configure script allowing a user to >> only enable selected file formats, called --enable-binary-file-formats. >> The default behavior when the switch is omitted is to compile all file >> formats, keeping the original behavior of the script. At the time of >> this commit, the valid options for this option are: dbx, coff (which >> includes coff-pe), xcoff, mips, elf, macho and all. All is treated >> especially, activating all supported readers. >> >> A few targets may require specific binary file format support, as they >> directly call functions defined by the file reader. Specifically, >> windows targets require coff support, and rs6000 aix and lynx178 targets >> require xcoff support. Considering that those formats are the main - or >> only - one available in those targets, I believe it makes sense to >> re-enable those readers. If that happens, the script will emit the >> following warning: >> >> FOO is required to support one or more requested targets. Adding it >> >> Users aren't able to force the disabling of those formats, since GDB >> will not compile without those readers. Ideally we'd like to be able >> to disable even those formats, in case a user wants to build GDB only >> to examine remote files for example, but the current infrastructure >> for the file format readers doesn't allow us to do it. >> >> Mach-O and elf support are also dependent on BFD support being compiled >> in. In case one of those was requested and BFD does not support them, >> the following error is emitted: >> >> FOO was requested, but BFD does not support it. >> >> Finally, this configure switch is also printed by the "show >> configuration" command in GDB. >> --- >> gdb/Makefile.in | 13 +++---- >> gdb/NEWS | 11 ++++++ >> gdb/README | 24 +++++++++++++ >> gdb/config.in | 3 ++ >> gdb/configure | 81 +++++++++++++++++++++++++++++++++++++++++--- >> gdb/configure.ac | 65 +++++++++++++++++++++++++++++++++-- >> gdb/configure.format | 51 ++++++++++++++++++++++++++++ >> gdb/configure.tgt | 20 +++++++++-- >> gdb/doc/gdb.texinfo | 8 +++++ >> gdb/top.c | 5 +++ >> 10 files changed, 264 insertions(+), 17 deletions(-) >> create mode 100644 gdb/configure.format > Thanks, but can you describe the changes sine v2, so I could determine > whether I need to review the documentation parts of this? TIA. > oh sorry, I knew I had forgotten something. The change is pretty trivial, I just updated the documentation to have the correct  flag. I believe there should be nothing for you to review I just forgot to add your tag. -- Cheers, Guinevere Larsen She/Her/Hers