Skip to content

Commit f096b2f

Browse files
authored
wamrc: Fix truncated DW_AT_producer (#3537)
1 parent db025e4 commit f096b2f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

core/iwasm/compilation/debug/dwarf_extractor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ typedef struct dwarf_extractor {
3939

4040
#define TO_EXTRACTOR(handle) (dwarf_extractor *)(handle)
4141

42+
static const char *compiler_name = "WAMR AoT compiler";
4243
static bool is_debugger_initialized;
4344

4445
dwarf_extractor_handle_t
@@ -209,8 +210,8 @@ dwarf_gen_comp_unit_info(const AOTCompContext *comp_ctx)
209210

210211
comp_unit = LLVMDIBuilderCreateCompileUnit(
211212
comp_ctx->debug_builder, LLDB_TO_LLVM_LANG_TYPE(lang_type),
212-
comp_ctx->debug_file, "WAMR AoT compiler", 12, 0, NULL, 0, 1, NULL,
213-
0, LLVMDWARFEmissionFull, 0, 0, 0, "/", 1, "", 0);
213+
comp_ctx->debug_file, compiler_name, strlen(compiler_name), 0, NULL,
214+
0, 1, NULL, 0, LLVMDWARFEmissionFull, 0, 0, 0, "/", 1, "", 0);
214215
}
215216
return comp_unit;
216217
}

0 commit comments

Comments
 (0)