Implement option for skipping function index in the callstack (#3785)

Also add a script that converts instruction pointers to function indexes (or function names).

https://github.com/bytecodealliance/wasm-micro-runtime/issues/3758
This commit is contained in:
Marcin Kolny
2024-09-11 09:08:37 +01:00
committed by GitHub
parent b882017674
commit 9c2083a27f
8 changed files with 229 additions and 34 deletions

View File

@ -12,11 +12,19 @@ typedef struct {
* bounds of the current stack frame (and if not, traps). */
bool bounds_checks;
/* Enables or disables instruction pointer (IP) tracking.*/
/* Enables or disables instruction pointer (IP) tracking. */
bool ip;
/* Enables or disables function index in the stack trace. Please note that
* function index can be recovered from the instruction pointer using
* ip2function.py script, so enabling this feature along with `ip` might
* often be redundant.
* This option will automatically be enabled for GC and Perf Profiling mode.
*/
bool func_idx;
/* Enables or disables tracking instruction pointer of a trap. Only takes
* effect when `ip` is enabled.*/
* effect when `ip` is enabled. */
bool trap_ip;
/* Enables or disables parameters, locals and stack operands. */