From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id muVgJUQQ9GcifCoAWB0awg (envelope-from ) for ; Mon, 07 Apr 2025 13:49:56 -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=cpcLVZ8x; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 88EC21E0C3; Mon, 7 Apr 2025 13:49:56 -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,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 F0FE31E05C for ; Mon, 7 Apr 2025 13:49:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92F253864832 for ; Mon, 7 Apr 2025 17:49:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92F253864832 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=cpcLVZ8x 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 BCA13384B430 for ; Mon, 7 Apr 2025 17:48:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BCA13384B430 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 BCA13384B430 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744048130; cv=none; b=YIgCJUN04rC/lBJmmFsoi5j4U4Q1y1N0+TCwfk9JUvdk5jkEnn4wutU4I1dzDtOZW/zzGhR5MpmGoPsOvhKR4ZXcTBMIs7WUz0wfDlATi2oqwxSguuAqWF09aTjmmCZqYJ8BnuAn+kVinfW7fZGXx6JoS7e9C4aEbiyhJMPy6Qw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744048130; c=relaxed/simple; bh=r75nsUTSDZlkGoqCW6Igz/bgV977WtHRR5IPRWygXoQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Jcp0Sv3cpcU7HODBOszU4AyjRyhOfAwOCy7KCw1zAseZlM4WSzoNoecy8RcGACQr0GafxsjX7Kpqrb9SlFSbqrI4cdPskaLUkDkY8qIhm+PQZUA/sOKYRBqSO0Rz3diQZZqEWashMxeBcXyuD6S8DfYltX3Sn2u30q2RGL9FRQA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCA13384B430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744048130; 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=B0/VSOOoZoIQx7oVr6miyuQAWEWRSK0mCuOHA2V0BDU=; b=cpcLVZ8xTTDJVtJRS2QibYFCpDMl0dIIU/qMT4n4H/1LGEV8ZIUCJ/hQkWDJJM4IRYCSo1 krnd8b/Z10nyfHUDMYcyiSyeMcELtHCQywG/mPpzy+FNTzDAVttxqIXAy5ySJaiSeOgaYT VFb4dTOyiS1z8MaekaVT3BbR42YOVPA= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-658-ET3osd1MMJKgB9ym-cee3A-1; Mon, 07 Apr 2025 13:48:48 -0400 X-MC-Unique: ET3osd1MMJKgB9ym-cee3A-1 X-Mimecast-MFC-AGG-ID: ET3osd1MMJKgB9ym-cee3A_1744048128 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-47699e92ab0so86066541cf.0 for ; Mon, 07 Apr 2025 10:48:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744048128; x=1744652928; h=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=B0/VSOOoZoIQx7oVr6miyuQAWEWRSK0mCuOHA2V0BDU=; b=hgjcdm1XNkXlPbT7TxQGUQnJgnxv999Uix22ZY84KGmPJQbgZyWF20EuQyiKZXb9+Z hH/KID90U0AzfgAIJmt3CdrlDgGi/5Eb2TYE56XEesoq4Iis2PkkQ8NKWJFraY2106KZ kWe2cgvROTGpnSEt8UyoVvoEDViNIGxX9P6D9z0w1jfMu0RETFp5Wiohbpng778bhWJo ju15eXC0bJS+PiU9Iv7tl3/WKpZCac0Fg4/9q6BPY7Bit+WXPz9uuTH4/O326bOjS8l9 kHLR57bVmTLHxfVClh6jm7BrwhBdTl5GPVgPC6DTxtFT0u2MCn/edzIcj64DDY9Nrv+9 dzUQ== X-Gm-Message-State: AOJu0Yy2Dix24ll2qSYzymnzXUgzB1OGe3bG0fMe0nAH66QH0Tq4LDgP Yl864LPrRFGYUgFzj0RRiXrjYExYNCAie6cvyR7ErwmIiLGGWNl8WqPO6eDxSvZPltGCISMdE1t UkX/cyq5QFVfhvtzs5lTVS7woutmKITcjo2vT5W5obQuuekgzanvZiHmjyrUHcs5YVJU= X-Gm-Gg: ASbGncss145LIs1ENebSKJRvoXLIUbRrPdbFBxj6+r+TJQ8wH98a1ylnvspaAxDLfSR 5iaVR4WmnhcWZ9JsGu5eVTaMPoCXolMLmwAmYnos/GjBmtd0ESZpRRA+LYkEJQ4yNjAaiq01473 8NoWmBr36AiKIPqLaiq09IAlrFlpvbcl/pjdFSL7YhhI+tRjJLfMKpZAOBC+UTg4i65GO0Tx55+ iSqQYf/gpw1hqOuzHIR0ZeKS8b1brwgKkW+aDBvuLiDdQHmygCe/Yrj9dqFASQuk9LtXtU4cRff uXhmHqSlugdcgN5dnTy8gdnSgTQ= X-Received: by 2002:a05:622a:ce:b0:476:aa36:d67c with SMTP id d75a77b69052e-47925a75a5emr174570861cf.49.1744048128341; Mon, 07 Apr 2025 10:48:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrHuwX0ry3WvkA1uMW+iPDvcBpfgFJQN+RG3sO+iqwc4VsRdiT6rMCE1vsskvep7/Wf1etIw== X-Received: by 2002:a05:622a:ce:b0:476:aa36:d67c with SMTP id d75a77b69052e-47925a75a5emr174570631cf.49.1744048128055; Mon, 07 Apr 2025 10:48:48 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1003? ([2804:14d:8084:9a69::1003]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4791b1443a6sm62954191cf.78.2025.04.07.10.48.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Apr 2025 10:48:47 -0700 (PDT) Message-ID: <296b9f38-16ef-4488-ba5a-58394bde1fbb@redhat.com> Date: Mon, 7 Apr 2025 14:48:45 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] gdb, configure: Add disable-formats option for configure To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20250307115821.1507435-1-guinevere@redhat.com> <87wmc1173c.fsf@tromey.com> From: Guinevere Larsen In-Reply-To: <87wmc1173c.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 0-geWuFXgsyTUBIxRsvo17-V2o5SctimdKc4LFTzb_Q_1744048128 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="------------YD7pgyymVAIgFeCmD7QyMkUI" 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. --------------YD7pgyymVAIgFeCmD7QyMkUI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/3/25 2:35 PM, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen writes: > Guinevere> GDB has support for many binary file formats, some which might be very > Guinevere> unlikely to be found in some situations (such as the COFF format in > Guinevere> linux). This commit introduces the option for a user to choose which > Guinevere> formats GDB will support at build configuration time. > > Guinevere> +* Configure changes > Guinevere> + > Guinevere> +enable-binary-file-formats=[FORMAT,...] > Guinevere> +enable-binary-file-formats=all > > Add the leading "--" here? > I didn't look to see what other NEWS entries do. I double checked the other NEWS entries, and you're right, I should add "--" to the option. > Guinevere> +# Object files to be used when building with support for all file formats. > Guinevere> +all_binary_format_obs="dbxread.o mipsread.o coffread.o coff-pe-read.o xcoffread.o" > > I would much rather have this kind of information in the Makefile. I > know gdb doesn't always do that right now -- but the current way is kind > of bad IMO. > > We can use GNU make features, so it's not hard to transform a list of > formats like "elf xcoff" into a list of variable references like > "$(elf_OBJS) $(xcoff_OBJS)" I'm fine with changing this. I'm only unsure what GNU make feature you mean. I suppose you mean the makefile should have: elf_OBJS=elfread.c xcoff_OBJS=xcoff.c all_format_OBJS="$(elf_OBJS) $(xcoff_OBJS) ..." and there is some way to parse --enable-binary-file-formats in the makefile? > > Guinevere> diff --git a/gdb/configure.format b/gdb/configure.format > > Then we wouldn't need this file, either. > > Tom > -- Cheers, Guinevere Larsen She/Her/Hers --------------YD7pgyymVAIgFeCmD7QyMkUI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 4/3/25 2:35 PM, Tom Tromey wrote:
"Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:
Guinevere> GDB has support for many binary file formats, some which might be very
Guinevere> unlikely to be found in some situations (such as the COFF format in
Guinevere> linux). This commit introduces the option for a user to choose which
Guinevere> formats GDB will support at build configuration time.

Guinevere> +* Configure changes
Guinevere> +
Guinevere> +enable-binary-file-formats=[FORMAT,...]
Guinevere> +enable-binary-file-formats=all

Add the leading "--" here?
I didn't look to see what other NEWS entries do.
I double checked the other NEWS entries, and you're right, I should add "--" to the option.
Guinevere> +# Object files to be used when building with support for all file formats.
Guinevere> +all_binary_format_obs="dbxread.o mipsread.o coffread.o coff-pe-read.o xcoffread.o"

I would much rather have this kind of information in the Makefile.  I
know gdb doesn't always do that right now -- but the current way is kind
of bad IMO.

We can use GNU make features, so it's not hard to transform a list of
formats like "elf xcoff" into a list of variable references like
"$(elf_OBJS) $(xcoff_OBJS)"

I'm fine with changing this. I'm only unsure what GNU make feature you mean. I suppose you mean the makefile should have:

elf_OBJS=elfread.c
xcoff_OBJS=xcoff.c
all_format_OBJS="$(elf_OBJS) $(xcoff_OBJS) ..."

and there is some way to parse --enable-binary-file-formats in the makefile?


Guinevere> diff --git a/gdb/configure.format b/gdb/configure.format

Then we wouldn't need this file, either.

Tom


-- 
Cheers,
Guinevere Larsen
She/Her/Hers
--------------YD7pgyymVAIgFeCmD7QyMkUI--