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

feat(wasm): support for wasm #166

Merged
merged 20 commits into from
Nov 24, 2020
Merged

feat(wasm): support for wasm #166

merged 20 commits into from
Nov 24, 2020

Conversation

mitsuhiko
Copy link
Member

@mitsuhiko mitsuhiko commented Nov 9, 2019

This implements WASM supposed based on the notes in #290.

Things of note:

  • WASM has no debug/code id, so I made something up for testing (Build ID Section for WASM WebAssembly/tool-conventions#133)
  • It uses a non unified addressing system so data and functions are separate. This might be irrelevant for us but I need to verify this
  • there is no load address
  • unclear about alignment values and pointer sizes. I just assumed this is all 4 bytes
  • it changes the load_address to an address_offset that can be negative to handle the code section offset in WASM.

@mitsuhiko
Copy link
Member Author

Notes on how to approximate a symbol table: WebAssembly/tool-conventions#38

@mitsuhiko mitsuhiko requested a review from a team August 6, 2020 09:51
Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with clippy errors fixed

* master: (22 commits)
  fix(debuginfo): Update dmsort to 1.0.1 to avoid panic due to UB (#287)
  ci: Use GHA instead of zeus (#286)
  ref: Introduce explicit NameMangling and better DemangleOptions (#275)
  meta: Bump all semver-major dependencies (#283)
  feat(demangle): Update swift demangler to 5.3 (#282)
  ref: Add File/FunctionIterator and lifetimes to DebugSession (#279)
  fix: Implement new clippy advice (#280)
  fix: Add a SymbolIterator and Lifetimes to ObjectLike trait (#277)
  ci: Switch to GitHub Actions (#273)
  ref: Introduce feature flags for demangling languages (#274)
  ref(common): Change InstructionInfo setters to Option (#272)
  ref: Remove all deprecated items (#271)
  ref: Replace failure with std::error::Error (#264)
  ref: Remove deprecated proguard support (#267)
  build: Reorganize the workspace (#266)
  build(unreal): Rename with-serde to serde (#265)
  fix(debuginfo): Detect mangled anonymous namespaces in PDB inlinees (#261)
  release: 7.5.0
  meta: Update changelog for 7.5.0
  feat: Unsafe transmute for PDB symbols (#258)
  ...
@jan-auer jan-auer marked this pull request as draft November 17, 2020 10:59
@mitsuhiko mitsuhiko mentioned this pull request Nov 23, 2020
2 tasks
@mitsuhiko mitsuhiko marked this pull request as ready for review November 24, 2020 11:02
@mitsuhiko mitsuhiko changed the title feat(wasm): work in progress support for wasm feat(wasm): support for wasm Nov 24, 2020
Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you strip the wasm file somehow? 1.4M is quite a lot for the fixture…

symbolic-debuginfo/src/dwarf.rs Outdated Show resolved Hide resolved
symbolic-debuginfo/src/wasm.rs Outdated Show resolved Hide resolved
symbolic-debuginfo/src/wasm.rs Show resolved Hide resolved
symbolic-debuginfo/src/wasm.rs Show resolved Hide resolved
symbolic-debuginfo/src/wasm.rs Outdated Show resolved Hide resolved
@mitsuhiko
Copy link
Member Author

I compiled the example WASM file with no_std. Beautiful 4K now :)

@mitsuhiko mitsuhiko merged commit 5d007d7 into master Nov 24, 2020
@mitsuhiko mitsuhiko deleted the feature/wasm branch November 24, 2020 15:18
jan-auer added a commit that referenced this pull request Dec 22, 2020
* master: (21 commits)
  fix: New nightly clippy lint (#295)
  fix(release): Do not publish examples to crates.io
  release: 8.0.0
  ref(debuginfo): Remove re-exports of error types (#300)
  meta: Update changelog
  ref(debuginfo): Switch to error with kind (#299)
  ref(minidump): Switch to error with kind (#298)
  ref(unreal): Switch to error with kind (#297)
  ref(symcache): Switch to error with kind (#296)
  feat: Rename architecture to wasm32 (#294)
  fix(debuginfo): Prefer DWARF names for Dart functions (#293)
  fix: clippy (#292)
  hack(dwarf): Skip line program sequences at 0 (#291)
  feat(wasm): support for wasm (#166)
  ci: Run rust nighlty on a schedule (#289)
  ref: Updates for rust 1.48 (#288)
  fix(debuginfo): Update dmsort to 1.0.1 to avoid panic due to UB (#287)
  ci: Use GHA instead of zeus (#286)
  ref: Introduce explicit NameMangling and better DemangleOptions (#275)
  meta: Bump all semver-major dependencies (#283)
  ...
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

Successfully merging this pull request may close these issues.

3 participants