LLDB mainline
lldb_private::wasm Namespace Reference

Classes

class  DynamicLoaderWasmDYLD
class  ObjectFileWasm
 Generic Wasm object file reader. More...
class  ProcessWasm
 ProcessWasm provides the access to the Wasm program state retrieved from the Wasm engine. More...
class  RegisterContextWasm
class  SymbolVendorWasm
class  ThreadWasm
 ProcessWasm provides the access to the Wasm program state retrieved from the Wasm engine. More...
class  UnwindWasm
 UnwindWasm manages stack unwinding for a WebAssembly process. More...
struct  wasm_addr_t
 For the purpose of debugging, we can represent all these separated 32-bit address spaces with a single virtual 64-bit address space. More...
struct  WasmGlobal
 A global declared by the module itself. More...
struct  WasmVirtualRegisterInfo

Typedefs

typedef std::shared_ptr< RegisterContextWasmRegisterContextWasmSP

Enumerations

enum  WasmAddressType : uint8_t { Memory = 0x00 , Object = 0x01 , Global = 0x02 , Invalid = 0x03 }
 Each WebAssembly module has separate address spaces for Code and Memory. More...

Functions

static constexpr uint64_t MakeFieldMask (uint32_t bits, uint32_t shift)

Variables

static constexpr uint32_t kWasmOffsetBits = 32
 Widths of the fields a 64-bit address is made of, from the low bits up.
static constexpr uint32_t kWasmModuleIDBits = 30
static constexpr uint32_t kWasmAddressTypeBits = 2
static constexpr uint32_t kWasmModuleIDShift = kWasmOffsetBits
static constexpr uint32_t kWasmAddressTypeShift
static constexpr uint64_t kWasmOffsetMask = MakeFieldMask(kWasmOffsetBits, 0)
static constexpr uint64_t kWasmModuleIDMask
static constexpr uint64_t kWasmAddressTypeMask

Typedef Documentation

◆ RegisterContextWasmSP

Definition at line 24 of file RegisterContextWasm.h.

Enumeration Type Documentation

◆ WasmAddressType

Each WebAssembly module has separate address spaces for Code and Memory.

A WebAssembly module also has a Data section which, when the module is loaded, gets mapped into a region in the module Memory.

Globals are not addressable: they live in an index space of their own. The synthetic Global space stands in for one, holding the index where an address would hold an offset, so that a global can be named and read.

The tag is two bits wide and these are the only spaces there are, so the remaining value means an address that belongs to nothing.

Enumerator
Memory 
Object 
Global 
Invalid 

Definition at line 28 of file WasmAddress.h.

Function Documentation

◆ MakeFieldMask()

constexpr uint64_t lldb_private::wasm::MakeFieldMask ( uint32_t bits,
uint32_t shift )
staticconstexpr

Definition at line 49 of file WasmAddress.h.

References lldb_private::bits().

Variable Documentation

◆ kWasmAddressTypeBits

uint32_t lldb_private::wasm::kWasmAddressTypeBits = 2
staticconstexpr

Definition at line 40 of file WasmAddress.h.

◆ kWasmAddressTypeMask

uint64_t lldb_private::wasm::kWasmAddressTypeMask
staticconstexpr
Initial value:
=
static constexpr uint64_t MakeFieldMask(uint32_t bits, uint32_t shift)
Definition WasmAddress.h:49
static constexpr uint32_t kWasmAddressTypeBits
Definition WasmAddress.h:40
static constexpr uint32_t kWasmAddressTypeShift
Definition WasmAddress.h:46

Definition at line 56 of file WasmAddress.h.

Referenced by lldb_private::wasm::ObjectFileWasm::SetLoadAddress().

◆ kWasmAddressTypeShift

uint32_t lldb_private::wasm::kWasmAddressTypeShift
staticconstexpr
Initial value:
=
static constexpr uint32_t kWasmModuleIDShift
Definition WasmAddress.h:45
static constexpr uint32_t kWasmModuleIDBits
Definition WasmAddress.h:39

Definition at line 46 of file WasmAddress.h.

Referenced by lldb_private::wasm::wasm_addr_t::wasm_addr_t().

◆ kWasmModuleIDBits

uint32_t lldb_private::wasm::kWasmModuleIDBits = 30
staticconstexpr

Definition at line 39 of file WasmAddress.h.

◆ kWasmModuleIDMask

uint64_t lldb_private::wasm::kWasmModuleIDMask
staticconstexpr

◆ kWasmModuleIDShift

uint32_t lldb_private::wasm::kWasmModuleIDShift = kWasmOffsetBits
staticconstexpr

Definition at line 45 of file WasmAddress.h.

Referenced by lldb_private::wasm::wasm_addr_t::wasm_addr_t().

◆ kWasmOffsetBits

uint32_t lldb_private::wasm::kWasmOffsetBits = 32
staticconstexpr

Widths of the fields a 64-bit address is made of, from the low bits up.

The bitfields below are declared with the same constants, so a field and the mask that extracts it cannot come to disagree.

Definition at line 38 of file WasmAddress.h.

◆ kWasmOffsetMask

uint64_t lldb_private::wasm::kWasmOffsetMask = MakeFieldMask(kWasmOffsetBits, 0)
staticconstexpr

Definition at line 53 of file WasmAddress.h.

Referenced by lldb_private::wasm::wasm_addr_t::wasm_addr_t().