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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 15 01:23:45 PST 2020


labath added a comment.

Testing dynamic loaders is a bit tricky as they require an actual process around. The best thing available to us right now is the "gdb-client" approach, which consists of mocking the responses of the gdb server. It's not the easiest way to write tests, but I don't think it should be that difficult in this case -- you shouldn't need to mock that many packets -- the main one is `qXfer:libraries`. Then you should be able to run something like "image lookup -a" (or `SBTarget::ResolveLoadAddress`, if you want to try your hand at the scripting API) and check that it resolves to the correct section+offset pair. You can look at the existing tests in `packages/Python/lldbsuite/test/functionalities/gdb_remote_client/` to see how this works...

I will have some more questions about the interaction of this function with ObjectFileWasm::SetLoadAddress, but I need to think this over a bit...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72751





More information about the lldb-commits mailing list