Skip to content

Not possible to debug with gdb #130287

Closed

Description

@MichalStrehovsky

When looking at a crashdump with gdb I cannot even print a backtrace:

(gdb) bt
Python Exception <class 'gdb.error'>: Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x574a80 [in module /home/michals/gdb-15.1/System.Globalization.Tests.dbg]
Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x574a8d [in module /home/michals/gdb-15.1/System.Globalization.Tests.dbg]

Copilot says System.Globalization.Tests.dbg  contains invalid  DW_AT_object_pointer  attributes emitted as  DW_FORM_implicit_const 0 

Looking around on the internet, I found that clang recently took a change under LLDB tuning to generate debug info that GDB cannot even parse: llvm/llvm-project#124790.

We compile native code with -glldb (LLDB tuning of debug info):

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-null-conversion)
add_compile_options(-glldb)
else()

Do we need to use lldb tuning?

gdb is 15.1 that comes standard with ubuntu 24 (latest available for WSL).

Activity

  1. added
    untriaged
    on Jul 7, 2026
  2. dotnet-policy-service commented on Jul 7, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/runtime-infrastructure
    See info in area-owners.md if you want to be subscribed.

  3. akoeplinger commented on Jul 7, 2026

    @akoeplinger
    Member

    looks like we switched to -glldb in #90873 to fix some other issue...

    /cc @filipnavara in case you have ideas

  4. akoeplinger commented on Jul 7, 2026

    @akoeplinger
    Member

    @MichalStrehovsky presumably it works if you install lldb from Ubuntu repos right?

  5. MichalStrehovsky commented on Jul 7, 2026

    @MichalStrehovsky
    MemberAuthor

    @MichalStrehovsky presumably it works if you install lldb from Ubuntu repos right?

    It "works". I'm running lldb --core core.from.helix ExecutableFileName. It takes good 2 minutes to launch, I haven't root caused that one, so I wanted to switch to gdb and that's when I hit this one (that was easier to root cause).

    (I'm looking at runfo get-helix-payload -j 4151bc93-6412-4a3d-81c5-148e9a0efd70 -w System.Globalization.Tests -o c:\hellix\4151bc93-6412-4a3d-81c5-148e9a0efd70\System.Globalization.Tests\ if anyone wants to play along.)

  6. MichalStrehovsky commented on Jul 7, 2026

    @MichalStrehovsky
    MemberAuthor

    looks like we switched to -glldb in #90873 to fix some other issue...

    I went through the repro steps of the associated issue #90791 with clang-18. I can no longer repro the issue -glldb was previously working around. The repro steps work fine with -g and clang-18. This looked like a clang/LLVM bug and looks like the clang/LLVM bug was fixed. We should just revert. Revert at #130296.

  7. added a commit that references this issue on Jul 7, 2026
    98d1148
  8. removed
    untriaged
    on Jul 7, 2026
  9. added a commit that references this issue on Jul 15, 2026
    3474532
  10. locked and limited conversation to collaborators on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions