Skip to content

Full debug: emit source-facing device function names and linkage names #1122

Closed

Description

@nihalpasham

Description

cuda-oxide currently writes the physical/exported device symbol into
DISubprogram.name and emits no linkageName. Source-qualified function
breakpoints therefore remain pending even though a breakpoint on the physical
symbol resolves.

This is a child of #226.

Minimal reproducer

With full device debug information, set cuda-gdb breakpoints on a qualified
non-generic helper and on a fully specialized generic device method. The
cuda-devtools T02 assessment demonstrates the failing generic-method case; a
non-generic control such as debuginfo::deep_outer rules out generic syntax as
the root compiler defect.

Expected behavior

DWARF carries a source-facing canonical function identity separately from the
unchanged physical symbol, so cuda-gdb can index qualified source names without
changing ABI/export behavior.

Actual behavior

On baseline 6c5458fe, debuginfo::deep_outer remains pending while the
physical debuginfo__deep_outer symbol hits. Generic methods are listed only
under raw mangled names. DISubprogram has the physical spelling as name and
no linkageName.

Acceptance criteria

  • Carry source-facing/canonical debug identity separately from the physical
    linkage/export name.
  • Definitions emit human name plus exact physical linkageName without
    changing symbols or ABI.
  • Inline scopes use a proven canonical source name and do not invent a linkage
    name.
  • cuda-gdb resolves a qualified non-generic helper and an exact fully
    specialized generic/device method.
  • Tests cover kernels with export overrides, two generic monomorphizations,
    inline scopes, full/line-table modes, LLVM verification, and live cuda-gdb.

Out of scope / follow-up

The generic-eliding shorthand cuda_device::DisjointSlice::get_mut is not a
canonical unique monomorphization name. Supporting that alias requires proper
namespace/type DIEs or an agreed debugger alias policy. The assessment should
use the canonical specialized spelling until that work is defined.

Environment

  • Baseline: 6c5458fe991bbde32c5bee74d87822aef1b5a691
  • CUDA/cuda-gdb: 13.3
  • GPU: RTX 5090 (sm_120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcodegenDevice code-generation pipeline (Rust MIR to IR to PTX)debug infoDebug information in generated PTX/IR (line/source maps)llvm-exportTextual LLVM/NVVM IR exporter (llvm-export crate)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions