Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion core/iwasm/compilation/debug/dwarf_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,20 @@ lldb_function_to_function_dbi(const AOTCompContext *comp_ctx,
LLVMDIBuilderInsertDbgValueAtEnd(DIB, Param, ParamVar, ParamExpression,
ParamLocation, block_curr);

if (!cplusplus) {
if (num_function_args != func_ctx->aot_func->func_type->param_count) {
// for C, this happens when the compiler optimized out some of
// function parameters.
//
// for C++, this mismatch is normal because of the "this" pointer.
if (!cplusplus) {
LOG_WARNING("function args number mismatch! num_function_args: %d, "
"wasm func params: %d, func: %s",
num_function_args,
func_ctx->aot_func->func_type->param_count,
function_name);
}
}
else if (!cplusplus) {
auto variable_list = function.GetBlock().GetVariables(
extractor->target, true, false, false);
if (num_function_args != variable_list.GetSize()) {
Expand Down