bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29075] objdump -S does not support debuginfod


From: mliska at suse dot cz
Subject: [Bug binutils/29075] objdump -S does not support debuginfod
Date: Thu, 21 Apr 2022 12:54:35 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29075

--- Comment #6 from Martin Liska <mliska at suse dot cz> ---
Sure, let's assume you have a system that has set DEBUGINFOD_URLS variable (in
my case DEBUGINFOD_URLS=https://debuginfod.opensuse.org/).

Let's clear debuginfod cache:
$ rm -rf ~/.cache/debuginfod_client/

$ DEBUGINFOD_VERBOSE=1 gdb -batch -ex start -ex list -ex q /usr/bin/true
debuginfod_find_debuginfo 0ddf05298021415bd79cc96e790d4bb4f24a4d18
server urls "https://debuginfod.opensuse.org/ "
checking build-id
checking cache dir /home/marxin/.cache/debuginfod_client
found
/home/marxin/.cache/debuginfod_client/0ddf05298021415bd79cc96e790d4bb4f24a4d18/debuginfo
(fd=14)
debuginfod_find_source 0ddf05298021415bd79cc96e790d4bb4f24a4d18
/usr/src/debug/coreutils-9.0-2.3.x86_64/src/true.c

server urls "https://debuginfod.opensuse.org/ "
checking build-id
checking filename
suffix ##usr##src##debug##coreutils-9.0-2.3.x86_64##src##true.c
checking cache dir /home/marxin/.cache/debuginfod_client
found
/home/marxin/.cache/debuginfod_client/0ddf05298021415bd79cc96e790d4bb4f24a4d18/source##usr##src##debug##coreutils-9.0-2.3.x86_64##src##true.c
(fd=14)
Temporary breakpoint 1 at 0x2280: file src/true.c, line 56.
debuginfod_find_debuginfo 533594f0cf90f7393b7ab521c01100dc07bf6f51
server urls "https://debuginfod.opensuse.org/ "
checking build-id
checking cache dir /home/marxin/.cache/debuginfod_client
not found No such file or directory (err=-2)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdc48) at src/true.c:56
debuginfod_find_source 0ddf05298021415bd79cc96e790d4bb4f24a4d18
/usr/src/debug/coreutils-9.0-2.3.x86_64/src/true.c

server urls "https://debuginfod.opensuse.org/ "
checking build-id
checking filename
suffix ##usr##src##debug##coreutils-9.0-2.3.x86_64##src##true.c
checking cache dir /home/marxin/.cache/debuginfod_client
found
/home/marxin/.cache/debuginfod_client/0ddf05298021415bd79cc96e790d4bb4f24a4d18/source##usr##src##debug##coreutils-9.0-2.3.x86_64##src##true.c
(fd=18)
debuginfod_find_source 0ddf05298021415bd79cc96e790d4bb4f24a4d18
/usr/src/debug/coreutils-9.0-2.3.x86_64/src/true.c

server urls "https://debuginfod.opensuse.org/ "
checking build-id
checking filename
suffix ##usr##src##debug##coreutils-9.0-2.3.x86_64##src##true.c
checking cache dir /home/marxin/.cache/debuginfod_client
found
/home/marxin/.cache/debuginfod_client/0ddf05298021415bd79cc96e790d4bb4f24a4d18/source##usr##src##debug##coreutils-9.0-2.3.x86_64##src##true.c
(fd=18)
56      {
51        exit (status);
52      }
53      
54      int
55      main (int argc, char **argv)
56      {
57        /* Recognize --help or --version only if it's the only command-line
58           argument.  */
59        if (argc == 2)
60          {
A debugging session is active.

        Inferior 1 [process 1731] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

And similar should be seen for objdump:

$ DEBUGINFOD_VERBOSE=1 objdump -S -d /usr/bin/true

/usr/bin/true:     file format elf64-x86-64


Disassembly of section .init:

0000000000002000 <.init>:
    2000:       f3 0f 1e fa             endbr64 
    2004:       48 83 ec 08             sub    $0x8,%rsp
    2008:       48 8b 05 d9 4f 00 00    mov    0x4fd9(%rip),%rax        # 6fe8
<__cxa_finalize@plt+0x4d88>
    200f:       48 85 c0                test   %rax,%rax
    2012:       74 02                   je     2016 <abort@plt-0x1a>
    2014:       ff d0                   call   *%rax
    2016:       48 83 c4 08             add    $0x8,%rsp
    201a:       c3                      ret    

Disassembly of section .plt:

0000000000002020 <abort@plt-0x10>:
    2020:       ff 35 e2 4f 00 00       push   0x4fe2(%rip)        # 7008
<__cxa_finalize@plt+0x4da8>
    2026:       ff 25 e4 4f 00 00       jmp    *0x4fe4(%rip)        # 7010
<__cxa_finalize@plt+0x4db0>
    202c:       0f 1f 40 00             nopl   0x0(%rax)

0000000000002030 <abort@plt>:
    2030:       ff 25 e2 4f 00 00       jmp    *0x4fe2(%rip)        # 7018
<__cxa_finalize@plt+0x4db8>
    2036:       68 00 00 00 00          push   $0x0
    203b:       e9 e0 ff ff ff          jmp    2020 <abort@plt-0x10>

0000000000002040 <__errno_location@plt>:
    2040:       ff 25 da 4f 00 00       jmp    *0x4fda(%rip)        # 7020
<__cxa_finalize@plt+0x4dc0>
    2046:       68 01 00 00 00          push   $0x1
    204b:       e9 d0 ff ff ff          jmp    2020 <abort@plt-0x10>
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]