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

Add wasm_runtime_get_func_name_from_index() api #4117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jiax-cn
Copy link
Contributor

@Jiax-cn Jiax-cn commented Feb 27, 2025

WAMR already implements this function, but its scope is limited to the source file and only applies to the module instance. I reimplemented this because it is clearer to obtain function names in the following scenarios, where the (WASM/AOT) module has not yet been instantiated:

  1. aot_create_perf_map() This creates /tmp/perf-.map for linux-perf.
  2. aot_add_llvm_func1() By doing so, LLVM can include function names in the IR and machine code, allowing us to see them in the call stack when debugging AOT with LLDB/GDB.

If this is useful, I would be happy to submit PRs for these two scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant