5#ifndef V8_WASM_WASM_DEBUG_H_
6#define V8_WASM_WASM_DEBUG_H_
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
59 if (index != other.index)
return false;
63 if (
storage != other.storage)
return false;
97 auto it = std::lower_bound(
99 [](
const Value& changed_value,
int stack_index) {
100 return changed_value.index < stack_index;
106 void Print(std::ostream&)
const;
142 *
FindValue(entry - 1, stack_index) != *value);
156 void Print(std::ostream&)
const;
181 int GetNumLocals(Address
pc,
Isolate* isolate);
182 WasmValue GetLocalValue(
int local, Address
pc, Address fp,
183 Address debug_break_fp,
Isolate* isolate);
184 int GetStackDepth(Address
pc,
Isolate* isolate);
188 WasmValue GetStackValue(
int index, Address
pc, Address fp,
189 Address debug_break_fp,
Isolate* isolate);
191 void SetBreakpoint(
int func_index,
int offset,
Isolate* current_isolate);
193 bool IsFrameBlackboxed(WasmFrame* frame);
196 bool PrepareStep(WasmFrame*);
198 void PrepareStepOutTo(WasmFrame*);
205 void ClearStepping(WasmFrame*);
207 bool IsStepping(WasmFrame*);
209 void RemoveBreakpoint(
int func_index,
int offset,
Isolate* current_isolate);
219 size_t EstimateCurrentMemoryConsumption()
const;
222 std::unique_ptr<DebugInfoImpl>
impl_;
std::unique_ptr< DebugInfoImpl > impl_
base::Vector< const Value > changed_values() const
size_t EstimateCurrentMemoryConsumption() const
std::vector< Value > changed_values_
const Value * FindChangedValue(int stack_index) const
Entry(int pc_offset, int stack_height, std::vector< Value > changed_values)
void Print(std::ostream &) const
const Entry * GetEntry(int pc_offset) const
DebugSideTable(int num_locals, std::vector< Entry > entries)
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(DebugSideTable)
std::vector< Entry > entries_
const Entry::Value * FindValue(const Entry *entry, int stack_index) const
size_t EstimateCurrentMemoryConsumption() const
void Print(std::ostream &) const
auto make_iterator_range(ForwardIterator begin, ForwardIterator end)
constexpr Vector< T > VectorOf(T *start, size_t size)
V8_NOINLINE bool EquivalentTypes(ValueType type1, ValueType type2, const WasmModule *module1, const WasmModule *module2)
wasm::WasmModule WasmModule
wasm::WasmFunction WasmFunction
#define DCHECK_LE(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_GT(v1, v2)
#define V8_EXPORT_PRIVATE
bool operator()(const Entry &a, const Entry &b) const
const WasmModule * module
bool operator==(const Value &other) const