diff options
Diffstat (limited to 'lldb/docs')
-rw-r--r-- | lldb/docs/index.rst | 1 | ||||
-rw-r--r-- | lldb/docs/resources/build.rst | 5 | ||||
-rw-r--r-- | lldb/docs/resources/lldbgdbremote.md | 67 | ||||
-rw-r--r-- | lldb/docs/use/formatting.rst | 6 |
4 files changed, 75 insertions, 4 deletions
diff --git a/lldb/docs/index.rst b/lldb/docs/index.rst index d49d0d8..a981c0a 100644 --- a/lldb/docs/index.rst +++ b/lldb/docs/index.rst @@ -86,6 +86,7 @@ current state, follow the links to their respective issues: * `RISC-V <https://github.com/llvm/llvm-project/issues/55383>`_ * `LoongArch <https://github.com/llvm/llvm-project/issues/112693>`_ +* `WebAssembly <https://github.com/llvm/llvm-project/issues/150449>`_ Get Involved ------------ diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst index 4bbec89..0db8c92 100644 --- a/lldb/docs/resources/build.rst +++ b/lldb/docs/resources/build.rst @@ -204,12 +204,13 @@ checked out above, but now we will have multiple build-trees: Run CMake with ``-B`` pointing to a new directory for the provided build-tree\ :sup:`1` and the positional argument pointing to the ``llvm`` -directory in the source-tree. Note that we leave out LLDB here and only include +directory in the source-tree.\ :sup:`2` Note that we leave out LLDB here and only include Clang. Then we build the ``ALL`` target with ninja: :: $ cmake -B /path/to/llvm-build -G Ninja \ + -DCMAKE_BUILD_TYPE=[<build type>] \ -DLLVM_ENABLE_PROJECTS=clang \ -DCMAKE_BUILD_TYPE=Release \ [<more cmake options>] /path/to/llvm-project/llvm @@ -238,6 +239,8 @@ remove it from the Ninja command. #. The ``-B`` argument was undocumented for a while and is only officially supported since `CMake version 3.14 <https://cmake.org/cmake/help/v3.14/release/3.14.html#command-line>`_ + #. If you want to have a standalone LLDB build with tests enabled, you also + need to pass in ``-DLLVM_ENABLE_RUNTIME='libcxx;libcxxabi;libunwind'`` to your CMake invocation when configuring your LLVM standalone build. .. _CommonCMakeOptions: diff --git a/lldb/docs/resources/lldbgdbremote.md b/lldb/docs/resources/lldbgdbremote.md index 80c6809..36b95f1 100644 --- a/lldb/docs/resources/lldbgdbremote.md +++ b/lldb/docs/resources/lldbgdbremote.md @@ -2463,3 +2463,70 @@ omitting them will work fine; these numbers are always base 16. The length of the payload is not provided. A reliable, 8-bit clean, transport layer is assumed. + +## Wasm Packets + +The packet below are supported by the +[WAMR](https://github.com/bytecodealliance/wasm-micro-runtime) and +[V8](https://v8.dev) Wasm runtimes. + + +### qWasmCallStack + +Get the Wasm call stack for the given thread id. This returns a hex-encoded +list of PC values, one for each frame of the call stack. To match the Wasm +specification, the addresses are encoded in little endian byte order, even if +the endian of the Wasm runtime's host is not little endian. + +``` +send packet: $qWasmCallStack:202dbe040#08 +read packet: $9c01000000000040e501000000000040fe01000000000040# +``` + +**Priority to Implement:** Only required for Wasm support. Necessary to show +stack traces. + +### qWasmGlobal + +Get the value of a Wasm global variable for the given frame index at the given +variable index. The indexes are encoded as base 10. The result is a hex-encoded +address from where to read the value. + +``` +send packet: $qWasmGlobal:0;2#cb +read packet: $e0030100#b9 +``` + +**Priority to Implement:** Only required for Wasm support. Necessary to show +variables. + + +### qWasmLocal + +Get the value of a Wasm function argument or local variable for the given frame +index at the given variable index. The indexes are encoded as base 10. The +result is a hex-encoded address from where to read the value. + + +``` +send packet: $qWasmLocal:0;2#cb +read packet: $e0030100#b9 +``` + +**Priority to Implement:** Only required for Wasm support. Necessary to show +variables. + + +### qWasmStackValue + +Get the value of a Wasm local variable from the Wasm operand stack, for the +given frame index at the given variable index. The indexes are encoded as base +10. The result is a hex-encoded address from where to read value. + +``` +send packet: $qWasmStackValue:0;2#cb +read packet: $e0030100#b9 +``` + +**Priority to Implement:** Only required for Wasm support. Necessary to show +variables. diff --git a/lldb/docs/use/formatting.rst b/lldb/docs/use/formatting.rst index 39ccfed..c5a880c 100644 --- a/lldb/docs/use/formatting.rst +++ b/lldb/docs/use/formatting.rst @@ -344,19 +344,19 @@ E.g., the following setting would reconstruct the entire function name (and is L :: - (lldb) settings set plugin.cplusplus.dislpay.function-name-format "${function.return-left}${function.scope}${function.basename}${function.template-arguments}${function.formatted-arguments}${function.qualifiers}${function.return-right}${function.suffix}" + (lldb) settings set plugin.cplusplus.display.function-name-format "${function.return-left}${function.scope}${function.basename}${function.template-arguments}${function.formatted-arguments}${function.qualifiers}${function.return-right}${function.suffix}" If a user wanted to only print the name and arguments of a C++ function one could do: :: - (lldb) settings set plugin.cplusplus.dislpay.function-name-format "${function.scope}${function.basename}${function.formatted-arguments}" + (lldb) settings set plugin.cplusplus.display.function-name-format "${function.scope}${function.basename}${function.formatted-arguments}" Then the following would highlight just the basename in green: :: - (lldb) settings set plugin.cplusplus.dislpay.function-name-format "${function.scope}${ansi.fg.yellow}${function.basename}${ansi.normal}${function.formatted-arguments}" + (lldb) settings set plugin.cplusplus.display.function-name-format "${function.scope}${ansi.fg.yellow}${function.basename}${ansi.normal}${function.formatted-arguments}" The ``${function.name-with-args}`` by default asks the language plugin whether it supports a language-specific ``function-name-format`` (e.g., the ``plugin.cplusplus.display.function-name-format`` for C++), and if it does, uses it. Otherwise it will display the demangled function name. |