Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aot debug: process lldb_function_to_function_dbi only for C #3278

Merged
merged 1 commit into from
Apr 3, 2024
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
22 changes: 22 additions & 0 deletions core/iwasm/compilation/debug/dwarf_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,28 @@ lldb_function_to_function_dbi(const AOTCompContext *comp_ctx,
const size_t num_function_args = function_args.GetSize();
dwarf_extractor *extractor;

/*
* Process only known languages.
* We have a few assumptions which might not be true for non-C functions.
*
* At least it's known broken for C++ and Rust:
* https://github.com/bytecodealliance/wasm-micro-runtime/issues/3187
* https://github.com/bytecodealliance/wasm-micro-runtime/issues/3163
*/
LanguageType language_type = function.GetLanguage();
switch (language_type) {
case eLanguageTypeC89:
case eLanguageTypeC:
case eLanguageTypeC99:
case eLanguageTypeC11:
case eLanguageTypeC17:
break;
default:
LOG_WARNING("func %s has unsuppoted language_type 0x%x",
function_name, (int)language_type);
return NULL;
}

if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
return NULL;

Expand Down