Skip to content

Not possible to debug with gdb #130287

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions