Skip to content

Commit 6139e3f

Browse files
viktormalikdanobi
authored andcommitted
Debug info: emit real types for global variables
When emitting debug info for global variables, emit real types instead of types that are internally used in codegen. This mainly applies to: - pointers which are internally represented as integers - structs which are internally represented as byte arrays Similarly to kernel functions, we will need to emit debug info for global variables that matches their BTF in the kernel so we need the actual types.
1 parent d979c2f commit 6139e3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast/dibuilderbpf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ DIGlobalVariableExpression *DIBuilderBPF::createGlobalVariable(
347347
const SizedType &stype)
348348
{
349349
return createGlobalVariableExpression(
350-
file, name, "global", file, 0, GetType(stype), false);
350+
file, name, "global", file, 0, GetType(stype, false), false);
351351
}
352352

353353
} // namespace bpftrace::ast

0 commit comments

Comments
 (0)