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

Use DW_AT_segment for multi-memory ? #10

Open
yurydelendik opened this issue Apr 15, 2020 · 1 comment
Open

Use DW_AT_segment for multi-memory ? #10

yurydelendik opened this issue Apr 15, 2020 · 1 comment

Comments

@yurydelendik
Copy link
Owner

yurydelendik commented Apr 15, 2020

Extend DW_OP_Wasm_location to point variables (e.g. DW_TAG_variable) to proper memory. The DW_AT_segment has type of "exprloc", so we can use DW_OP_Wasm_location or other vendor tag to point to right memory, e.g. wasm-memory 2 as segment which points to third wasm memory.

Notice that attaching DW_AT_segment to the CU extends it to the entire unit including code range -- it might be a good or bad thing.

See also https://github.com/WebAssembly/multi-memory/

@yurydelendik
Copy link
Owner Author

After digging more about DW_AT_segment -- it comes from i386 architecture where actual physical address is computed based on segment and offset, and that gives address in single address space. We need more.

Looks like DW_OP_xderef-family of operators covers more and actually express what multi memory load and store do.

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

No branches or pull requests

1 participant