Skip to content

llvm-gsymutil: Symbol lost after DWARF -> GSYM conversion #115515

Open
@javierhonduco

Description

@javierhonduco

The issue

An address that symbolizes without issues on DWARF with GNU's addr2line does not yield any result on the converted GSYM file. Happy to help with anything, let me know!

Repro

Fetch the DWARF debug info

Which belongs to a Fedora kernel

$ wget https://debuginfod.fedoraproject.org/buildid/b8d70cf519fac5a5cccdda1a61c38995bd9b3059/debuginfo

addr2line on the DWARF file works without issues

$ addr2line -fe debuginfo 0xffffffff8220012f
entry_SYSCALL_64_after_hwframe
/usr/src/debug/kernel-6.9.11/linux-6.9.11-200.fc40.x86_64/arch/x86/entry/entry_64.S:130

After converting it

$ llvm-gsymutil --convert=debuginfo --out-file=debuginfo.gsym

llvm-gsymutil fails to find the symbol for that same address

$ llvm-gsymutil --address=0xffffffff8220012f debuginfo.gsym
Looking up addresses in "debuginfo.gsym":
0xffffffff8220012f: error: address 0xffffffff8220012f is not in GSYM

Environmental information

$ llvm-gsymutil --version
llvm-gsymutil
LLVM (http://llvm.org/):
  LLVM version 18.1.6
  Optimized build.

But this also fails on a recent commit:

$ git show
commit 9f8c3d3796ebf7ddd4a85134ff109cf03a0b9b5e (grafted, HEAD -> main, origin/main, origin/HEAD)
Author: David Spickett <[email protected]>
Date:   Wed Nov 6 10:42:11 2024 +0000

    [lldb][test] Correct typo in breakpoint test file name
    
    Added by https://github.com/llvm/llvm-project/pull/114896.
/home/javierhonduco/src/llvm-project/build/bin/llvm-gsymutil
LLVM (http://llvm.org/):
  LLVM version 20.0.0git
  Optimized build.

The conversion output: https://gist.github.com/javierhonduco/7d32feaff1b0d04365c6deb1c3a53b8c

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvm-toolsAll llvm tools that do not have corresponding tag

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions