LLDB mainline
ArchitectureWasm.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_ARCHITECTURE_WASM_ARCHITECTUREWASM_H
10#define LLDB_SOURCE_PLUGINS_ARCHITECTURE_WASM_ARCHITECTUREWASM_H
11
13
14namespace lldb_private {
15
17public:
18 static llvm::StringRef GetPluginNameStatic() { return "wasm"; }
19 static void Initialize();
20 static void Terminate();
21
22 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
23
24 void OverrideStopInfo(Thread &thread) const override {}
25
26 /// A WebAssembly function begins with a local variable declaration header
27 /// that is part of the function but is not an executable instruction. Skip it
28 /// so the address lands on the first instruction.
29 Address SkipFunctionHeader(Address addr) const override;
30
31private:
32 static std::unique_ptr<Architecture> Create(const ArchSpec &arch);
33 ArchitectureWasm() = default;
34};
35
36} // namespace lldb_private
37
38#endif // LLDB_SOURCE_PLUGINS_ARCHITECTURE_WASM_ARCHITECTUREWASM_H
A section + offset based address class.
Definition Address.h:62
An architecture specification class.
Definition ArchSpec.h:32
void OverrideStopInfo(Thread &thread) const override
This is currently intended to handle cases where a program stops at an instruction that won't get exe...
Address SkipFunctionHeader(Address addr) const override
A WebAssembly function begins with a local variable declaration header that is part of the function b...
static std::unique_ptr< Architecture > Create(const ArchSpec &arch)
llvm::StringRef GetPluginName() override
static llvm::StringRef GetPluginNameStatic()
A class that represents a running process on the host machine.