From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 96F9C3858422 for ; Fri, 23 Sep 2022 20:34:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96F9C3858422 Received: by mail-pl1-x62f.google.com with SMTP id v1so1168757plo.9 for ; Fri, 23 Sep 2022 13:34:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=8yhWkuVZeER6N2aG0wxZZ/t0q88MxTuJWW9uwzZgCp0=; b=gZrqBan/df4oEdERjPTrUusSff/E70dq82yDZL4yct1wLjcQVjMAWdOOyDFAg1M67J BWDCCQpJqcgjQGdhFTWLEkzpkCC9T64gFGTV095DGvh0AToDaiS5uB9blhUfvXe8B4u5 K0C6W4nWkt5gqUJqOBbCPvCag/anbE7vio5anPZFf7LaY0b3oBXVtFTCOrar1HEntBlX YTsNUtXSQG5fNNUBCG58XHqrFIJf4Z+Vm5xbHYfQRDeUDS2cQnfluNTrt7t+PQhEptNa BKfSDZX0BYvLNtxkMrCFXzZxog9nPuKEVJ4lQ9359Qjl6Gy9t5WruG494lmNLG6488Dj Z+BQ== X-Gm-Message-State: ACrzQf1vdK2ADZxjawb8ntLZOAZsXtU/rSygM0tawegdJ2aOqWjw2Niw Zs/xideQJGovZ2eIxglLzBvcHbNy+G3Y1Q== X-Google-Smtp-Source: AMsMyM6wSKOWdK0aavm3NNNr1OD2WI7SSvGzcLwErjkpf+env4t39Ntmviial98H/y92PAApWKWnTw== X-Received: by 2002:a17:902:8346:b0:178:a33f:89cf with SMTP id z6-20020a170902834600b00178a33f89cfmr10196085pln.9.1663965263546; Fri, 23 Sep 2022 13:34:23 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:d77a:914:377d:c10f]) by smtp.gmail.com with ESMTPSA id f15-20020aa7968f000000b005386162bc2asm6999751pfk.92.2022.09.23.13.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 13:34:22 -0700 (PDT) Date: Fri, 23 Sep 2022 13:34:17 -0700 From: Fangrui Song To: Simon Marchi Cc: Nick Clifton , Alan Modra , Jan Beulich , binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH v3] binutils, gdb: support zstd compressed debug sections Message-ID: <20220923203417.gn5y7wl4o7mctdod@google.com> References: <20220923040837.550160-1-maskray@google.com> <20220923182038.ilg6lh235f6zzdmr@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-27.3 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 23 Sep 2022 20:34:29 -0000 On 2022-09-23, Simon Marchi wrote: > > >On 2022-09-23 14:20, Fangrui Song wrote: >> On 2022-09-23, Simon Marchi wrote: >>> >>> >>> On 2022-09-23 11:45, Nick Clifton wrote: >>>> Hi Fangrui, >>>> >>>>> PR29397 PR29563: The new configure option --with-zstd defaults to auto. >>>>> If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support zstd >>>>> compressed debug sections for most tools. >> >> Hi Simon and Nick, >> >> I have checked that `make all-gdb` works in a --enable-gdb --without-debuginfod build. >> >> I then inspected the 2020 commits adding AC_DEBUGINFOD to >> gdb/configure.ac and binutils/configure.ac. They come with no >> PKG_PROG_PKG_CONFIG and config/debuginfod.m4 does not have >> PKG_PROG_PKG_CONFIG, but they still work.  So I think AC_ZSTD doesn't >> need PKG_PROG_PKG_CONFIG, either. Though I have no insight why it >> behaves that way:) > >Ok, I am a bit confused. Based on my comprehension, since the first >call to PKG_CHECK_MODULES may not happen do to a condition: > > if test "x$with_debuginfod" != xno; then > PKG_CHECK_MODULES([DEBUGINFOD], [libdebuginfod >= 0.179], > ... > fi > >... the probing for pkg-config should not happen if --without-debuginfod >is used. But in gdb/configure, I see that the probing for pkg-config >actually appears outside the condition. > >Anyway, good if it works. > >> +diff --git a/gdb/NEWS b/gdb/NEWS >> +index 9619842bc03..1457c99ff04 100644 >> +--- a/gdb/NEWS >> ++++ b/gdb/NEWS >> +@@ -57,6 +57,8 @@ >> + + * The Windows native target now supports target async. >> + ++* gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF. >> ++ > >I'm not sure I understand the diff above, but I think it's missing an >empty line between the previous bullet and the new bullet. Otherwise, >that is OK for GDB. > >Simon Thanks! The gdb news entry looks like (immediately before "* New commands") --- a/gdb/NEWS +++ b/gdb/NEWS @@ -57,6 +57,8 @@ * The Windows native target now supports target async. +* gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF. + * New commands maintenance set ignore-prologue-end-flag on|off