From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dd14210.kasserver.com (dd14210.kasserver.com [85.13.138.83]) by sourceware.org (Postfix) with ESMTPS id 210093858D28 for ; Fri, 8 Apr 2022 12:44:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 210093858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=milianw.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=milianw.de Received: from agathemoarbauer.localnet (p54a1bbed.dip0.t-ipconnect.de [84.161.187.237]) by dd14210.kasserver.com (Postfix) with ESMTPSA id 777AC2403BD for ; Fri, 8 Apr 2022 14:44:22 +0200 (CEST) From: Milian Wolff To: elfutils-devel@sourceware.org Subject: Questions regarding debuginfod.h API Date: Fri, 08 Apr 2022 14:44:22 +0200 Message-ID: <5817622.lOV4Wx5bFT@agathemoarbauer> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2022 12:44:25 -0000 Hey all, now that archlinux is supporting debuginfod, I have finally tried it out. It's such a game changer, many thanks for everyone involved in working on this! Now to my question: In applications using elfutils, we will now automatically download debug information when DEBUGINFOD_URLS is defined. But doing that can take a very long time. I would like to give the user feedback about this situation and ideally provide a means to cancel the download. Looking at `debuginfod.h` I `debuginfod_set_progressfn` which looks ideal. But how do I access the default `debuginfod_client *` which seems to exist without me ever calling `debuginfod_begin` anywhere? Or do I need to create a new client here via `debuginfod_begin`? Then, how would I cancel an ongoing download job? GDB seems to do that when I press `CTRL+C`, but I do not see any API I could use for that purpose? Finally, what is the recommended way to check whether debuginfod is available? Should one rely on the build system to discover the `debuginfod.h` header file, or is some other compile time check suggested to detect it? I'm asking, because while I want to add the above API to get a better debuginfod experience, I do not necessarily want to raise the minimum elfutils version requirement just for that purpose. Many thanks again! -- Milian Wolff http://milianw.de