Repository navigation
Open
4 / 44 of 4 issues completedOpen
4 / 44 of 4 issues completed
Copy link
Labels
IR-loweringLowering between dialects (dialect-mir to LLVM dialect)Lowering between dialects (dialect-mir to LLVM dialect)codegenDevice code-generation pipeline (Rust MIR to IR to PTX)Device code-generation pipeline (Rust MIR to IR to PTX)cuda-oxideSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookdebug infoDebug information in generated PTX/IR (line/source maps)Debug information in generated PTX/IR (line/source maps)enhancementNew feature or requestNew feature or requestllvm-exportTextual LLVM/NVVM IR exporter (llvm-export crate)Textual LLVM/NVVM IR exporter (llvm-export crate)trackingUmbrella tracking issueUmbrella tracking issue
Milestone
Description
Summary
PR #225 adds the first useful device-debug tier: line tables. That gives cuda-gdb source breakpoints, stepping, and basic backtraces.
This issue tracks the larger follow-up: full debug metadata for variables, arguments, and Rust types.
Goal
Make debugger workflows like these possible for device code:
(cuda-gdb) info locals
(cuda-gdb) print idx
(cuda-gdb) print some_struct.fieldLikely work
- carry rustc
Body::var_debug_infointo the MIR/importer pipeline - preserve enough variable/place information through lowering
- emit
DILocalVariablefor args and locals - emit a useful
DITypetree for the first supported Rust type surface - emit
llvm.dbg.value/ equivalent variable location metadata - decide how this interacts with optimization, likely including an opt-skip or debug-preserving mode
- add cuda-gdb validation for local/argument inspection
Non-goal
Line-table source mapping is not tracked here. That is handled by #225.
This issue is about variable/type inspection, not just file/line/column mapping.
Metadata
Metadata
Assignees
Labels
IR-loweringLowering between dialects (dialect-mir to LLVM dialect)Lowering between dialects (dialect-mir to LLVM dialect)codegenDevice code-generation pipeline (Rust MIR to IR to PTX)Device code-generation pipeline (Rust MIR to IR to PTX)cuda-oxideSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookSIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, bookdebug infoDebug information in generated PTX/IR (line/source maps)Debug information in generated PTX/IR (line/source maps)enhancementNew feature or requestNew feature or requestllvm-exportTextual LLVM/NVVM IR exporter (llvm-export crate)Textual LLVM/NVVM IR exporter (llvm-export crate)trackingUmbrella tracking issueUmbrella tracking issue
Activity
nihalpasham commentedon Jun 16, 2026
Opened #233 as the first
CUDA_OXIDE_DEBUG=fullimplementation slice.What #233 covers:
A few choices from the implementation:
dbg.declareintodbg.valueopt -O2stays enabled, since LLVM can salvage many debug locations itself.target ..., debugafterllcso source breakpoints stay fast.target ..., debugbecause cuda-gdb needs it for local/argument inspectionWhat remains here:
var_debug_infodbg.valuedirectly[-]Track full device debug metadata for variables and types[/-][+]Tracking: full device debug metadata for variables and types[/+]nihalpasham commentedon Aug 21, 2026
cuda-devtools debugger-assessment follow-ups (validated against main
6c5458fe991bbde32c5bee74d87822aef1b5a691):Full variable/type debug children:
Related line-table follow-ups (outside #226's stated scope; see #224/#225):
#[kernel]prologue instructions off the attribute line #1117 — keep generated#[kernel]prologue off attribute linesExternal cuda-devtools dependency:
trapis misclassified as stack overflow after ptxas reuses R1 on a terminal local-memory path #1123 — track the sm_120 terminal-trap R1-reuse recurrence against NVBugs 710864/711266 and relate the open work in 5158747The
trap()versusbreakpoint()API question is expected behavior, not an eighth issue: they intentionally match CUDA C++__trap()and__brkpt().feat(mir-importer): emit host-style { data_ptr, length } DWARF struct…