-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Wrapper script for symbolizing addresses #16094
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
Comments
This is a WIP for #16094 The first PR will be for item 1, using llvm-symbolizer with DWARF.
This is a WIP for #16094 The first PR will be for item 1, using llvm-symbolizer with DWARF.
Emsymbolizer is a tool for symbolizing a binary, i.e. showing the file/line or symbol info for a code address. As described in #16094 there are several ways to do this with emscripten. The first PR is for item 1, using llvm-symbolizer with DWARF.
Can this be closed now that the tool exists? |
We currently have 1 and 2 implemented. 3 seems less important (because the browser understands name sections already) and I don't even know what an end-developer use case for 5 would be (mostly I just included it for completeness). But that does leave 3, which maybe we should have before we consider the tool initial-feature-complete? |
#21367 and llvm/llvm-project#82083 implement item 3. The only other possible thing to add is item 4, emscripten symbol map support. I'm not sure how necessary this is given that source maps are strictly more powerful than symbol maps, and it's probably best for most (all?) users to use them instead; I don't know of any use cases where symbol maps would be better. So I also don't currently have a plan to implement that. |
I think I'm going to go ahead and close this. If someone wants to request more features for emsymbolizer, they can reopen this, or open a new bug if it's something not listed here. |
There are lots of use cases for getting the line number and/or symbol name from a code address, and there are several existing ways it can be done:
Given that 3 is wasm-specific, and 2 and 4 are emscripten-specific, it might be warranted to have an emscripten-specific wrapper that can just figure out which, if any, of these sources of information are available, and print the information.
Some of these (at least the LLVM-based ones) currently require section offsets rather than the file offsets printed by the engines in stack traces and the like. That's an orthogonal problem to this one (e.g. we might want to fix the llvm tools and/or internal interfaces to use file offsets instead). But either way this script can do any necessary conversions, and we can adjust it if we make changes to LLVM, and it will have utility even aside from that.
The text was updated successfully, but these errors were encountered: