llvm-project/lldb/tools/lldb-test
Paolo Severini 4bafceced6 [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging
Summary:
This is the first in a series of patches to enable LLDB debugging of
WebAssembly targets.

Current versions of Clang emit (partial) DWARF debug information in WebAssembly
modules and we can leverage this debug information to give LLDB the ability to
do source-level debugging of Wasm code that runs in a WebAssembly engine.

A way to do this could be to use the remote debugging functionalities provided
by LLDB via the GDB-remote protocol. Remote debugging can indeed be useful not
only to connect a debugger to a process running on a remote machine, but also to
connect the debugger to a managed VM or script engine that runs locally,
provided that the engine implements a GDB-remote stub that offers the ability to
access the engine runtime internal state.

To make this work, the GDB-remote protocol would need to be extended with a few
Wasm-specific custom query commands, used to access aspects of the Wasm engine
state (like the Wasm memory, Wasm local and global variables, and so on).
Furthermore, the DWARF format would need to be enriched with a few Wasm-specific
extensions, here detailed: https://yurydelendik.github.io/webassembly-dwarf.

This CL introduce classes **ObjectFileWasm**, a file plugin to represent a Wasm
module loaded in a debuggee process. It knows how to parse Wasm modules and
store the Code section and the DWARF-specific sections.

Reviewers: jasonmolenda, clayborg, labath

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71575
2020-01-15 16:25:35 -08:00
..
CMakeLists.txt SystemInitializer: Use Targets.def to selectively initialize ABI plugins 2019-09-26 09:47:32 +00:00
FormatUtil.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatUtil.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SystemInitializerTest.cpp [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging 2020-01-15 16:25:35 -08:00
SystemInitializerTest.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
lldb-test.cpp [lldb][NFC] Return a reference from ClangASTContext::getASTContext and remove dead nullptr checks 2019-12-21 22:51:35 +01:00