11.5.5. Debugging Directives: .loc_intermediate
.loc_intermediate
Intermediate language source file location.
Syntax
.loc_intermediate file_index line_number column_positionDescription
Declares the intermediate-language source location (source file, line number, and column position) to be associated with the immediately following PTX instruction. .loc_intermediate refers to file_index which must be defined by a .file directive that names an intermediate IR source file.
A .loc_intermediate directive must be immediately preceded, in program order, by a .loc directive for the same instruction. Only one .loc_intermediate may appear per instruction. Unlike .loc, the .loc_intermediate directive does not support the inlined_at attribute.
The intermediate source location is recorded in the secondary debug line table which is based on ir-name in .nv_intermediate_source_section and is not merged into the primary DWARF .debug_line or .nv_debug_line_ptx sections. The .loc_intermediate directive is allowed only inside kernel or device function bodies.
PTX ISA Notes
Introduced in PTX ISA version 9.4.
Target ISA Notes
Supported on all target architectures.
Examples
.func (.param .b32 func_retval0) _Z17noinline_multiplyii(
.param .b32 _Z17noinline_multiplyii_param_0,
.param .b32 _Z17noinline_multiplyii_param_1
) {
.reg .b32 %r<4>;
.loc 1 71 0
ld.param.b32 %r1, [_Z17noinline_multiplyii_param_0];
ld.param.b32 %r2, [_Z17noinline_multiplyii_param_1];
.loc 1 72 5
.loc_intermediate 2 23 6 // tileIR_source.ir:23:6
mul.lo.s32 %r3, %r2, %r1;
.loc 1 73 5
.loc_intermediate 2 24 0 // tileIR_source.ir:24:0
add.lo.s32 %r3, %r3, %r1;
}
.file 1 "/path/to/vectorAdd.cu"
.file 2 "./tileIR_source.ir"