Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get location info from function indexes in addr2line script (bytecode…
…alliance#3206) Update the `addr2line` script so that: - line info is printed in a more convenient format, e.g. ``` 0: c at wasm-micro-runtime/test-tools/addr2line/trap.c:5:1 1: b at wasm-micro-runtime/test-tools/addr2line/trap.c:11:12 2: a at wasm-micro-runtime/test-tools/addr2line/trap.c:17:12 ``` similar to how Rust prints stack traces when there's a panic. In an IDE, the user can conveniently click on the printed path and be redirected to the file line. - a new `--no-addr` argument can be provided to the script It can be used in fast interpreter mode (that is not supported by the script otherwise) or with older wamr versions (where the stack trace only had the function index info and not the function address). In that case, `wasm-objdump` is used to get the function name from the index and `llvm-dwarfdump` to obtain the location info (where the line refers to the start of the function).
- Loading branch information