-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add LLDB and swift-reflection-dump support for WebAssembly #83923
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
Add LLDB and swift-reflection-dump support for WebAssembly #83923
Conversation
@swift-ci test |
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.
I don't know the WASM stuff but it looks OK. I did find some things to bikeshed on the Swift side.
978a8ac
to
89d8a40
Compare
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.
Found a few more missing return types, but otherwise this LGTM.
f247e52
to
69a2f4b
Compare
}; | ||
|
||
/// Decode 32-bit ULEB constants. | ||
auto decodeULEB32 = [&](uint32_t &val) -> bool { |
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.
Unfortunate that we have to reimplement these for the umpteenth time. Is there no code object format parsing code in LLVM to reuse here?
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.
LGTM modulo Wasm binary format parsing ad-hoc reimplementation. I wish we had one source of truth for this and I'm surprised LLVM doesn't seem to provide reusable (or flexible enough) API for this?
It has, but the problem here is twofold:
|
@swift-ci test |
This patch adds parsing and extracting of the Swift reflection metadata data segments from within the WebAssembly DATA section and tests it using swift-reflection-dump. This is needed to allow LLDB to acces Swift reflection metadata when attached to WebAssembly processes. rdar://159217213
69a2f4b
to
75bee89
Compare
@swift-ci test |
This patch adds parsing and extracting of the Swift reflection metadata data segments from within the WebAssembly DATA section and tests it using swift-reflection-dump. This is needed to allow LLDB to acces Swift reflection metadata when attached to WebAssembly processes.
rdar://159217213