Skip to content

Invalid Range List Offset 0x1a in DW_AT_ranges Attribute in demo.exe Debug Information #1257

@dongzhaolee

Description

@dongzhaolee

OS: Windows 11 24H2 26100.3624
VSCode version: 1.98.2
CodeLLDB version:from 1.11.0 to 1.11.4
Compiler: rustc

rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: x86_64-pc-windows-gnu
release: 1.85.1
LLVM version: 19.1.7

Debuggee:
x86_64-pc-windows-gnu
the debuggee uses DWARF debug info (gnu ABI)

Details:
I have encountered an error when debugging rust demo on VSCode. The error message indicates that there is an issue with the DW_AT_ranges attribute in the debug information, specifically with an invalid range list offset.

Debug Console:

Console is in 'commands' mode, prefix expressions with '?'.
Loading Rust formatters from D:\rust.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib/rustlib/etc
Launching: C:\Users\zhaod\code\demo\target\debug\demo.exe
Launched process 13200 from 'C:\Users\zhaod\code\demo\target\debug\demo.exe'
error: demo.exe [0x00000000000021bf]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000001a) attribute, but range extraction failed (invalid range list offset 0x1a), please file a bug and attach the file at the start of this error message
error: demo.exe [0x00000000000021f1]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000001a) attribute, but range extraction failed (invalid range list offset 0x1a), please file a bug and attach the file at the start of this error message

Code:

fn main() {
    println!("Hello, world!");
    let v = vec![2, 3, 5, 7, 11];
    println!("{:?}", v);
}

In fact, on my Windows system, any code can reproduce the problem regardless, as long as breakpoints are set. There is no error reported when no breakpoint is set.

After testing on many versions of codelldb, I found thatv1.11.0, v1.11.1, v1.11.2, v1.11.3, v1.11.4 versions of codelldb report errors when debugging breakpoints, but it works fine on v1.10.0!

But even if it works on v1.10.1, it can't be debugged properly due to the difference with the structc LLVM version, e.g., you can't see the contents of the elements in the Vec

Metadata

Metadata

Assignees

No one assigned

    Labels

    cause:LLDBCaused by a bug in LLDB engine. Generally, this is not something I can fix myself.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions