Skip to content

debuginfo: DWARF inlined_subroutine + .debug_rnglists #1707

Description

@octalide

What

Emit DW_TAG_inlined_subroutine with DW_AT_abstract_origin + DW_AT_call_file/call_line; the inline pass clones/remaps callee dbg-values and scopes into the caller (via clone_instruction). Pull in .debug_rnglists (DW_AT_ranges via DW_FORM_sec_offset) for the non-contiguous PC ranges of inlined bodies. Shared, covers ELF + Mach-O.

Why

Inlining transparency — debuggers must show inlined frames with correct call sites. Inlined code otherwise misattributes to the caller's line and locals vanish from backtraces. Needs the full location machinery (incl. computed/fragmented values) to render inlined locals.

Acceptance

  • lldb shows inlined frames with correct call file:line and locals on an optimized -g binary, both primes.
  • llvm-dwarfdump --verify clean.

Depends-on: #1706.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:codegenIR/middle-end, isel, regalloc, frame, encoders, inline asmfeaturenew capability, or an extension of an existing one

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions