[wasm] Add support for symbolicating native traces from JS, using a symbols file...
authorAnkit Jain <radical@gmail.com>
Sat, 5 Mar 2022 02:38:26 +0000 (21:38 -0500)
committerGitHub <noreply@github.com>
Sat, 5 Mar 2022 02:38:26 +0000 (21:38 -0500)
commit95770c9198df503d16b5aa9880ebc4e634a970e7
tree825439860fa2204e91f72f09226549bfc8d8d22a
parent1b3ef865fd71b898848a1a4b53bf062db622efa9
[wasm] Add support for symbolicating native traces from JS, using a symbols file (#66042)

* [wasm] Fix run command lines for samples

* [wasm] Export FS_readFile

* [wasm] Add support for symbolicating traces in console errors, or

.. warnings. The regex patterns are hardcoded in `debug.ts`. And the
symbols are loaded from `dotnet.js.symbols`.

We try to symbolicate wherever possible.

* [wasm] Enable symbolicating for non-aot test builds by default

* [wasm] Enable symbol map for debugger tests

* Address feedback from @pavelsavara

* [wasm] Add a `mono_wasm_symbolicate_string` function

.. and use that to symbolicate traces marshaled as C# exceptions (thanks
to @pavelsavara for the suggestion).
13 files changed:
eng/testing/tests.wasm.targets
src/mono/sample/wasm/wasm.mk
src/mono/wasm/build/WasmApp.targets
src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj
src/mono/wasm/runtime/debug.ts
src/mono/wasm/runtime/dotnet.d.ts
src/mono/wasm/runtime/exports.ts
src/mono/wasm/runtime/imports.ts
src/mono/wasm/runtime/method-calls.ts
src/mono/wasm/runtime/run.ts
src/mono/wasm/runtime/types/emscripten.ts
src/mono/wasm/test-main.js
src/mono/wasm/wasm.proj