[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

Paolo Severini via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 27 16:06:11 PST 2020


paolosev updated this revision to Diff 240711.
paolosev added a comment.

In D72751#1841498 <https://reviews.llvm.org/D72751#1841498>, @labath wrote:

> Thanks. I am glad that we were able to sort that out.
>
> Now that there's nothing wasm-specific in `DynamicLoaderWasmDYLD::LoadModuleAtAddress`, I have another question. :)
>
> The code in that function is a subset of the base `DynamicLoader::LoadModuleAtAddress` method you are overriding.  Is there a reason for that?
>  It doesn't seem like the additional stuff in the base method should hurt here. What the additional code does is that it tries to search for the object file on the local filesystem, and if it finds it, it will use that instead of copying the file over from the remote. In fact, that sounds like it could be useful here too, as copying that much data over gdb-remote isn't particularly fast..
>
> What do you think about that?


You are right! At this point `DynamicLoaderWasmDYLD::LoadModuleAtAddress` does not do anything specific to Wasm and there is no reason to override `DynamicLoader::LoadModuleAtAddress`. We can just call that base function, which should also work when the Wasm module is in the local filesystem.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72751/new/

https://reviews.llvm.org/D72751

Files:
  lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWasm.py
  lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/test_wasm.yaml
  lldb/source/API/SystemInitializerFull.cpp
  lldb/source/Plugins/DynamicLoader/CMakeLists.txt
  lldb/source/Plugins/DynamicLoader/wasm-DYLD/CMakeLists.txt
  lldb/source/Plugins/DynamicLoader/wasm-DYLD/DynamicLoaderWasmDYLD.cpp
  lldb/source/Plugins/DynamicLoader/wasm-DYLD/DynamicLoaderWasmDYLD.h
  lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
  lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
  lldb/tools/lldb-test/SystemInitializerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72751.240711.patch
Type: text/x-patch
Size: 28645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200128/b21f53fd/attachment-0001.bin>


More information about the lldb-commits mailing list