-
Notifications
You must be signed in to change notification settings - Fork 281
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: initial DWARF debugger integration #1804
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enables stepping around and setting breakpoints in native code. Variables represenation is still a todo, and this needs some polish. It refactors the `Source.sourceMap` into a more generic location provider, which may be backed by the new IWasmSymbols interface. This then talks to the DWARF debugger. The SourceContainer's `_sourceMaps` are also now just folded into the `Source.sourceMap`; that information was duplicate and the only benefit was deduplication if two sources had the same sourcemap, but this is really rare. This also made all location mapping asynchronous, so there were a few refactors around there, too. It also refactors how I implemented WAT (text format decompilation) last iteration. That previously "pretended" the source of the WASM was WAT, but this caused issues because the location transformation we did on the scripts is done before location mapping. So instead, the WAT is an extra fake 'file' in the symbols and we resolve any unknown locations into the WAT file. One that that _doesn't_ work yet is entrypoint breakpoints for wasm, which means that breakpoints set before the debug session starts may be missed. I have a thread out to the Chromium folks to see if there's a solution to this. For #1789
connor4312
force-pushed
the
connor4312/wasm-1
branch
from
September 15, 2023 23:48
9ec82e5
to
676e7e7
Compare
Looks like compilation will be unhappy until I publish the @vscode/dwarf-debugging module, which I will do soon, but not yet. Still, I would appreciate a review--I'm planning to make a PR stack and then collapse them once everything's good. |
roblourens
previously approved these changes
Sep 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
mjbvz
previously approved these changes
Sep 20, 2023
* implement inlined method handling and improve stepping * update tests
feat: prompt to install extension on wasm step
feat: make wasm inline breakpoints work
feat: make wasm variable store work
deepak1556
approved these changes
Sep 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enables stepping around and setting breakpoints in native code.
Variables represenation is still a todo, and this needs some polish.
It refactors the
Source.sourceMap
into a more generic locationprovider, which may be backed by the new IWasmSymbols interface. This
then talks to the DWARF debugger. The SourceContainer's
_sourceMaps
are also now just folded into the
Source.sourceMap
; that informationwas duplicate and the only benefit was deduplication if two sources had
the same sourcemap, but this is really rare.
This also made all location mapping asynchronous, so there were a
few refactors around there, too.
It also refactors how I implemented WAT (text format decompilation) last
iteration. That previously "pretended" the source of the WASM was WAT,
but this caused issues because the location transformation we did on the
scripts is done before location mapping. So instead, the WAT is an extra
fake 'file' in the symbols and we resolve any unknown locations into the
WAT file.
One that that doesn't work yet is entrypoint breakpoints for wasm,
which means that breakpoints set before the debug session starts may be
missed. I have a thread out to the Chromium folks to see if there's
a solution to this.
For #1789