Repository navigation
Conversation
`CodegenConfig(; debug_info)` selects the debug information, as the `debug_info_kind` of Julia's `CodegenParams`: `:none` (the default), or line tables in a compile unit of the emission kind `:line_tables`, `:directives` (GPUCompiler's for PTX) or `:full`. - The compile unit is of the file `julia` in `.`, as native code's, and the module gets the "Debug Info Version" and "Dwarf Version" flags if it lacks them. - Every function has a subprogram named after its method, with the LLVM name as its linkage name. That includes entries, stubs and C-callable wrappers, whose instructions (calls of the functions they inline included) get the function's line. - Every statement gets the location of its line, with the lines of the functions inlined at it as inlined frames (`inlinedAt`), from the IR's line information. - There is no information about variables or types. `codegen_output` finalizes the debug information. The whole suite passes with debug information on in the test configuration (checked once, not kept). Assisted-by: Claude Code (Opus 5.5)
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #23. This is the plan's debug-info item. GPUCompiler needs it because its error messages build backtraces from
!dbglocations.CodegenConfig(; debug_info)selects the debug information, as thedebug_info_kindof Julia'sCodegenParamsdoes::none(the default), or line tables in a compile unit of emission kind:line_tables,:directives(what GPUCompiler uses for PTX) or:full.DW_LANG_Julia, producerjulia, filejuliain., all as native code's. The module gets theDebug Info VersionandDwarf Versionflags if it lacks them.inlinedAtchains, fromBase.IRShow.buildLineInfoNode). Inlined methods get their own subprograms.codegen_outputfinalizes theDIBuilder.Tests (
test/debuginfo.jl)!dbgwithout debug info;I also ran the whole suite once with debug info enabled in the test configuration (not kept): it passes apart from the one test that expects no debug info. LLVM's verifier and Julia's pipeline accept every module.
Tested locally with
julia +1.12,+1.13and+nightly: 5960, 5966 and 5965 tests pass.🤖 Generated with Claude Code