[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging
Paolo Severini via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 23 18:23:16 PST 2020
paolosev updated this revision to Diff 240077.
paolosev added a comment.
Thanks for the explanation! I wasn't quite clear on "executable module" here, but after your comments I realized that `Target::SetExecutableModule()` should not probably be called also for Wasm modules.
The point is that `ObjectFileWasm::CalculateType()` should return `eTypeSharedLibrary`, not `eTypeExecutable`.
With this change the first issue is easily solved: we just need to call `Target::SetSectionLoadAddress()` once, in `ObjectFileWasm::SetLoadAddress()` because `Target::SetExecutableModule() -> Target::ClearModules() -> SectionLoadList::Clear()` is not called, and `DynamicLoaderWasmDYLD::DidAttach()` can be simplified to just call `ProcessGDBRemote::LoadModules()`.
Does this solution work for you? If so, we should look at the second point, the need to initialize `m_file_addr = m_file_offset = 0` for the "code" Section in order to make the DWARF symbols work...
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 28124 bytes
Desc: not available
More information about the lldb-commits