From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 300BE3857342 for ; Wed, 28 Sep 2022 18:20:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 300BE3857342 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664389224; 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=FUBC7KXtnpSQ3fJb/cNDi/G/JP9WE0Ok01LyRaU+GA0=; b=hxuMW8skoLRbSlYHKgLST6McbQpKeh/BbceHIxMcaZ3NSt8Y1QZe3xUsz/Asm+UDOVXsC/ s40x26jYm9T7V/yxEmaVQNxy0BmYQReSprna2u+9GSX5fbIcAflOm8GVshMq/T0o0ycWXb ElTBqilAVa+dCaB0Rc5n6FVzhSTR3KY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-444-YjmWVcs_PNeKGM9mEzmqcA-1; Wed, 28 Sep 2022 14:20:23 -0400 X-MC-Unique: YjmWVcs_PNeKGM9mEzmqcA-1 Received: by mail-wm1-f70.google.com with SMTP id 84-20020a1c0257000000b003b4be28d7e3so1668931wmc.0 for ; Wed, 28 Sep 2022 11:20:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=FUBC7KXtnpSQ3fJb/cNDi/G/JP9WE0Ok01LyRaU+GA0=; b=HxSzurIeg6bnWc9VU8QKQo+TwqS7DKDeSn56bz+Su93QXGLjDZfa1wvzZ7QEwiWtk9 qZAyyT9rFz8igWvR3eVqkz0Gxqr0KfLqfCjtafJj5UXb5L1pKTfFuEsr8Iw/hIqFEa2f ZL1JTXi+Xdh54wcXwVM1ghLPA/nBQJp6CY8RAGC3RqQ1mDyDlUopoT2V0ZMRRf1vjSLi WogQj3t5AoiFP7k+9iPckju7Dt6Tepw3X4c+iz1h8SIvCHeq8KP9EpOfpJp69W/ENgrj OOry4h173EsiSQ9XoAKUimVzdRcWIXhpaCaQKQgpDQnss4MzMt2Jkh6EjuAaDAfute8U Zm1A== X-Gm-Message-State: ACrzQf1R/mPpi/wHFYMRKEEdtp5A3qAMKGuYNzuPVwbeHhr6YF5i0mSp nI0Ytw6xwcizBebhr10brW8iRGV8vKbblHxo05hvy2dQ3RH62Ldu7XOnOwdazom4tLPqa4MenMn frbaOCo0BTSMD5dimNNSglEt0M8pTxhrR1wb+W9Nk X-Received: by 2002:a05:6000:1886:b0:22a:2944:a09 with SMTP id a6-20020a056000188600b0022a29440a09mr22046755wri.391.1664389222507; Wed, 28 Sep 2022 11:20:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xqjumYHedm3FswvedoIV6z/PVPCJrEU0YJ9pPSw+Vf3evwcYuQ6HcoTAJUNUERi6nt35noTC6+C6QA21PN/Y= X-Received: by 2002:a05:6000:1886:b0:22a:2944:a09 with SMTP id a6-20020a056000188600b0022a29440a09mr22046748wri.391.1664389222284; Wed, 28 Sep 2022 11:20:22 -0700 (PDT) MIME-Version: 1.0 References: <20220928021052.315981-1-amerey@redhat.com> <20220928142818.GH7916@redhat.com> In-Reply-To: <20220928142818.GH7916@redhat.com> From: Aaron Merey Date: Wed, 28 Sep 2022 14:20:11 -0400 Message-ID: Subject: Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections. To: "Frank Ch. Eigler" Cc: elfutils-devel@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Frank, On Wed, Sep 28, 2022 at 10:28 AM Frank Ch. Eigler wrote: > On Tue, Sep 27, 2022 at 10:10:52PM -0400, Aaron Merey via Elfutils-devel wrote: > > > [...] In order to distinguish between debuginfo and executable > > files with the same build-id, this function includes a bool > > parameter use_debuginfo. If true, attempt to retrieve the section > > from the debuginfo file with the given build-id. If false, use the > > executable instead. [...] > > How would a client know which one to use? Does it provide power or > benefit to force them to choose (or iterate?). Is there a scenario > where the content could be different between the two (if both > existed)? > > If that decisionmaking is not warranted to put upon the shoulders of > the client, the server could just be asked for a section name "as if > from an unstripped executable", and let it find that in the executable > or debuginfo, whereever. Good point, the server/client should figure this out internally. On IRC we also discussed the possible usefulness of client-side emulation of section queries in case a server isn't built with _find_section support. Will update the patch to include these details. > > [...] Although this patch does not implement it, we could generate > > .gdb_index on-the-fly if the target file does not contain it. > > However for large debuginfo files generating the index can take a > > non-trivial amount of time (ex. about 25 seconds for a 2.5GB > > debuginfo file). [...] > > Even that is not too bad, considering that the alternative would be > having to download that 2.5GB file. I recall you saying that on some > distros, gdb-index sections are always there anyway, so we wouldn't > have to rush to implement this feature. I did a quick experiment checking the debuginfo for the libraries used by gdb, firefox and qemu-kvm on F36. Out of the 265 files I checked only 1 (libicudata.so.69.1 debuginfo) didn't contain a .gdb_index because it strangely does not contain any .debug_* sections at all. Aaron