Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb <gdb@sourceware.org>
To: psmith@gnu.org, "Arsen Arsenović" <arsen@aarsen.me>
Cc: gdb@sourceware.org
Subject: Re: Does gdb debuginfod download libc etc.?
Date: Sun, 8 Mar 2026 22:32:59 -0400	[thread overview]
Message-ID: <8c514818-14bd-462d-8aed-0c323327acae@simark.ca> (raw)
In-Reply-To: <4844fe241f5524951dc68a6ce05e450897342034.camel@gnu.org>



On 2026-03-08 17:04, Paul Smith via Gdb wrote:
> [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=55)
> found
> /home/pds/.cache/debuginfod_client/f87c1d8cd2118209ef2350b22b187a64d705
> d6cd/executable (fd=14)
> Reading symbols from
> /home/pds/.cache/debuginfod_client/f87c1d8cd2118209ef2350b22b187a64d705
> d6cd/executable...
> 
> ⚠️ warning: platform-specific solib_create_inferior_hook did not load
> initial shared libraries.
> 
> ⚠️ warning: .dynamic section for "/lib64/ld-linux-x86-64.so.2" is not
> at the expected address (wrong library or version mismatch?)
> 
> ⚠️ warning: Could not load shared library symbols for 9 libraries, 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=-2)
> (No debugging symbols found in /lib64/ld-linux-x86-64.so.2)

I noticed a difference between the first debuginfod call (which
succeeds) and the second one (that fails).  The first one is
debuginfod_find_executable and the second is debuginfod_find_debuginfo.
Could it be important?

Are you able to replicate those queries using the debuginfod-find CLI
tool?

This is equivalent to the first query, I would expect it to work:

  debuginfod-find executable f87c1d8cd2118209ef2350b22b187a64d705d6cd

And this is equivalent to the second query, I would expect it to fail:

  debuginfod-find debuginfo 8cfa19934886748ff4603da8aa8fdb0c2402b8cf

It would then be interesting to see if you are able to fetch the second
one using (assuming debuginfod really has it):

  debuginfo-find executable 8cfa19934886748ff4603da8aa8fdb0c2402b8cf

Here is the documentation from the debuginfod man page for these two
requests:

   /buildid/BUILDID/debuginfo

     If the given buildid is known to the server, this request will
     result in a binary object that contains the customary .*debug_*
     sections.  This may be a split debuginfo file as created by strip,
     or it may be an original unstripped executable.

   /buildid/BUILDID/executable

     If  the  given buildid is known to the server, this request will
     result in a binary object that contains the normal executable
     segments.  This may be a executable stripped by strip, or it may be
     an original unstripped executable.  ET_DYN shared li‐ braries are
     considered to be a type of executable.

I'm thinking that your ld-linux library might not have debug info (the
.debug_* sections), so it might not be returned by the debuginfo
request, but it could be returned by the executable request.  Even if it
does not have debug info, it would still be valuable for GDB to have it.

> I wonder if it has something to do with this:
> 
>> ⚠️ warning: platform-specific solib_create_inferior_hook did not load
>> initial shared libraries.

GDB still ends up listing the shared libs, so it might be red herring.
It is still curious though.  What OS are you on (I want to know which of
the solib-*.c implementations you are using)?

Simon

  reply	other threads:[~2026-03-09  2:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-07 23:58 Paul Smith via Gdb
2026-03-08  9:44 ` Arsen Arsenović via Gdb
2026-03-08 21:04   ` Paul Smith via Gdb
2026-03-09  2:32     ` Simon Marchi via Gdb [this message]
2026-03-09 13:57       ` Paul Smith via Gdb
2026-03-09 15:36         ` Simon Marchi via Gdb
2026-03-09 17:28           ` Andrew Burgess via Gdb
2026-03-09 16:57         ` Andrew Burgess via Gdb
2026-03-09 20:32           ` Paul Smith via Gdb
2026-03-09 21:19             ` Paul Smith via Gdb
2026-03-10  9:12               ` Mark Wielaard
2026-03-10 14:20               ` Andrew Burgess via Gdb
2026-03-10 17:12                 ` Paul Smith via Gdb
2026-03-11  9:28                   ` Andrew Burgess via Gdb
2026-03-11 14:46                     ` Paul Smith via Gdb
2026-03-12 20:38                     ` Paul Smith via Gdb
2026-03-13 13:45                       ` Andrew Burgess via Gdb
2026-03-13 15:44                         ` Paul Smith via Gdb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c514818-14bd-462d-8aed-0c323327acae@simark.ca \
    --to=gdb@sourceware.org \
    --cc=arsen@aarsen.me \
    --cc=psmith@gnu.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox