From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id asbPBXXkrWm1Fh0AWB0awg (envelope-from ) for ; Sun, 08 Mar 2026 17:04:53 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tysXhJcN; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0060D1E0DD; Sun, 08 Mar 2026 17:04:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 517971E089 for ; Sun, 08 Mar 2026 17:04:50 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 51C3A4BA23E6 for ; Sun, 8 Mar 2026 21:04:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51C3A4BA23E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1773003883; bh=Siwc16969NlvSxvPkws91doOdYRzTMlulo8F0Esl58c=; h=Subject:To:Cc:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=tysXhJcNQJ6ksdQssy0QkfbCeID/+EWIr3apk9siBRkkcIiPqL5Q0QgkkuIvtSPRx ynD1iY7xrhT5yJNnKC0VSEgqZmjbqK7EQrjVQGDRT4pvKIyEFAU9MKtM12dFueQtOV GXpdLJvQ6YkTq/3/jLlLybikigXpIDXsc7FoYDa8= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 8CD524BA2E11 for ; Sun, 8 Mar 2026 21:04:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CD524BA2E11 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8CD524BA2E11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773003846; cv=none; b=HOXnTBc0JijUrII6Fe7w5FTn9x4TWFkTWlbnc3vzZD1p5Qqtr4jwvGESG64q85fjdpuIFc0+XWC+p5x6omQ5aEk3NMfRZIc47i22z0pl+rYcqtA9Iymf6F3IyXgJMrBelhVQXg3CWQ58u82Dwkh4J1pP4si4xG8Tjhfb5FMs5qY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773003846; c=relaxed/simple; bh=CrDbR9QpXTbkgktPFHaRbEpI2f86b5ROIDrsSF+L2LU=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=nWZUcj2Yi1YfZBCj6BBdNZwAUen4Rkv6xyu0X2IfPHr4VMpMKq6ZPi5e8sBPB7xFuW3RLp9/dcmmBwFNLFZU3/x42iqbAOaSmcbdxFc7msyg2LDbst7Ed5Xih2juX3Duj/cbhl8bGI7bflk1Hpz3xflXiQvp08si2f18A/NWfKs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CD524BA2E11 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzLIC-0007LC-JO; Sun, 08 Mar 2026 17:04:04 -0400 Message-ID: <4844fe241f5524951dc68a6ce05e450897342034.camel@gnu.org> Subject: Re: Does gdb debuginfod download libc etc.? To: Arsen =?UTF-8?Q?Arsenovi=C4=87?= Cc: gdb@sourceware.org Date: Sun, 08 Mar 2026 17:04:01 -0400 In-Reply-To: <86wlzmfyep.fsf@aarsen.me> References: <86wlzmfyep.fsf@aarsen.me> Organization: GNU's Not Linux! Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (by Flathub.org) MIME-Version: 1.0 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Paul Smith via Gdb Reply-To: psmith@gnu.org Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Sun, 2026-03-08 at 10:44 +0100, Arsen Arsenovi=C4=87 wrote: > This is strange - I've tried replicating it. Thanks for making that effort! > For context, I run a debuginfod instance populated with packages I > build for my own Gentoo binhost.=C2=A0 To test this, I got a dump from a > few days ago, and put it in a blank Arch Linux container (meaning it > had access to none of my installed libraries) with gdb 17.1, and told > it to look up debug info on my debuginfod server.=C2=A0 It pulled all the > libraries That definitely looks like what I had hoped to see. However it doesn't work for me. FWIW I forgot to mention I'm using GDB 17.1 that I built myself using latest elfutils with all the stuff in it that is needed (json-c, curl, xz/zstd, etc.) (I hope!!) I'm confident that all the binaries etc. have build IDs: if I run "eu-unstrip -n --core core" then not only do I see all the build IDs, but eu-unstrip actually downloads everything correctly from the debuginfod server! Before I run it my cache is empty, afterwards it has all the things in it. But, they are still not loaded by GDB (I guess that makes sense--if it were trying to load them and failing I'd see messages). > You can probably try debugging this by setting: >=20 > =C2=A0 set debug separate-debug-file on >=20 > ... or such, to see whether gdb knows about the build IDs. I tried enabling this but didn't learn much. I don't use any separate debug info: all my libraries have the debuginfo in the file itself. I did discover that setting DEBUGINFOD_VERBOSE before starting GDB will show internal debug info from the debuginfod library so I ran this: DEBUGINFOD_VERBOSE=3D9 gdb -c core Here's the output I get: --------------- [separate-debug-file] build_id_to_bfd_suffix: enter [separate-debug-file] build_id_to_debug_bfd_1: Trying /lib/debug/.build-id/f8/7c1d8cd2118209ef2350b22b187a64d705d6cd... [separate-debug-file] build_id_to_debug_bfd_1: path doesn't exist [separate-debug-file] build_id_to_debug_bfd_1: no suitable file found [separate-debug-file] build_id_to_bfd_suffix: exit debuginfod_find_executable f87c1d8cd2118209ef2350b22b187a64d705d6cd server urls "http://debuginfod:8002" checking build-id checking cache dir /home/pds/.cache/debuginfod_client found /home/pds/.cache/debuginfod_client/f87c1d8cd2118209ef2350b22b187a64d705 d6cd/hdr-executable (bytes=3D55) found /home/pds/.cache/debuginfod_client/f87c1d8cd2118209ef2350b22b187a64d705 d6cd/executable (fd=3D14) Reading symbols from /home/pds/.cache/debuginfod_client/f87c1d8cd2118209ef2350b22b187a64d705 d6cd/executable... =E2=9A=A0=EF=B8=8F warning: platform-specific solib_create_inferior_hook di= d not load initial shared libraries. =E2=9A=A0=EF=B8=8F warning: .dynamic section for "/lib64/ld-linux-x86-64.so= .2" is not at the expected address (wrong library or version mismatch?) =E2=9A=A0=EF=B8=8F warning: Could not load shared library symbols for 9 lib= raries, e.g. /opt/lib64/libicui18n.so.75. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? Reading symbols from /lib64/ld-linux-x86-64.so.2... [separate-debug-file] find_separate_debug_file_by_buildid: start: looking for separate debug info (build-id) for /lib64/ld-linux-x86- 64.so.2 [separate-debug-file] build_id_to_bfd_suffix: enter [separate-debug-file] build_id_to_debug_bfd_1: Trying /lib/debug/.build-id/8c/fa19934886748ff4603da8aa8fdb0c2402b8cf.debug... [separate-debug-file] build_id_to_debug_bfd_1: path doesn't exist [separate-debug-file] build_id_to_debug_bfd_1: no suitable file found [separate-debug-file] build_id_to_bfd_suffix: exit [separate-debug-file] find_separate_debug_file_by_buildid: end: looking for separate debug info (build-id) for /lib64/ld-linux-x86-64.so.2 debuginfod_find_debuginfo 8cfa19934886748ff4603da8aa8fdb0c2402b8cf server urls "http://debuginfod:8002" checking build-id checking cache dir /home/pds/.cache/debuginfod_client not found No such file or directory (err=3D-2) (No debugging symbols found in /lib64/ld-linux-x86-64.so.2) Reading symbols from system-supplied DSO at 0x7ffff85e4000... [separate-debug-file] find_separate_debug_file_by_buildid: start: looking for separate debug info (build-id) for system-supplied DSO at 0x7ffff85e4000 [separate-debug-file] build_id_to_bfd_suffix: enter [separate-debug-file] build_id_to_debug_bfd_1: Trying /lib/debug/.build-id/bf/619d454c75501884ae152c241f1f2c2039f532.debug... [separate-debug-file] build_id_to_debug_bfd_1: path doesn't exist [separate-debug-file] build_id_to_debug_bfd_1: no suitable file found [separate-debug-file] build_id_to_bfd_suffix: exit [separate-debug-file] find_separate_debug_file_by_buildid: end: looking for separate debug info (build-id) for system-supplied DSO at 0x7ffff85e4000 debuginfod_find_debuginfo bf619d454c75501884ae152c241f1f2c2039f532 server urls "http://debuginfod:8002" checking build-id checking cache dir /home/pds/.cache/debuginfod_client not found No such file or directory (err=3D-2) (No debugging symbols found in system-supplied DSO at 0x7ffff85e4000) Core was generated by `/opt/bin/exe'. #0 0x0000000001fa11ca in WriteCompressedCoreDump () [Current thread is 1 (LWP 2184998)] --------------- I wonder if it has something to do with this: > =E2=9A=A0=EF=B8=8F warning: platform-specific solib_create_inferior_hook = did not load > initial shared libraries. But I don't know what that means or how to go further in debugging. Based on the lack of debuginfod verbose output, GDB is not even asking to load those libraries so it seems to be something more basic / in GDB itself, not in the debuginfod support. Maybe there's some autoconf switch or library that I'm missing?