Index: src/debug/debug.h |
diff --git a/src/debug/debug.h b/src/debug/debug.h |
index eb2708c32f36ee802463e529b07fb57b2d171b54..8901146383591f02ecd55a70b65e0a25d0bb3183 100644 |
--- a/src/debug/debug.h |
+++ b/src/debug/debug.h |
@@ -20,6 +20,7 @@ |
#include "src/runtime/runtime.h" |
#include "src/string-stream.h" |
#include "src/v8threads.h" |
+#include "src/wasm/wasm-debug.h" |
#include "include/v8-debug.h" |
@@ -68,8 +69,7 @@ class BreakLocation { |
// the address. |
static BreakLocation FromCodeOffset(Handle<DebugInfo> debug_info, int offset); |
- static BreakLocation FromFrame(Handle<DebugInfo> debug_info, |
- JavaScriptFrame* frame); |
+ static BreakLocation FromFrame(StandardFrame* frame); |
static void AllForStatementPosition(Handle<DebugInfo> debug_info, |
int statement_position, |
@@ -203,6 +203,24 @@ class BreakLocation { |
DISALLOW_COPY_AND_ASSIGN(BytecodeArrayIterator); |
}; |
+ class WasmBytecodeIterator : public Iterator { |
+ public: |
+ WasmBytecodeIterator(Handle<DebugInfo> debug_info, BreakLocatorType type); |
+ ~WasmBytecodeIterator() override {} |
+ |
+ BreakLocation GetBreakLocation() override; |
+ bool Done() const override { return wasm_insn_iterator.Done(); } |
+ void Next() override; |
+ int code_offset() override { return position_; } |
+ |
+ private: |
+ wasm::WasmInstructionIterator wasm_insn_iterator; |
+ BreakLocatorType break_locator_type_; |
+ Handle<wasm::WasmDebugInfo> wasm_debug_info; |
+ int func_index; |
+ DISALLOW_COPY_AND_ASSIGN(WasmBytecodeIterator); |
+ }; |
+ |
static Iterator* GetIterator(Handle<DebugInfo> debug_info, |
BreakLocatorType type = ALL_BREAK_LOCATIONS); |
@@ -435,8 +453,8 @@ class Debug { |
// Internal logic |
bool Load(); |
- void Break(JavaScriptFrame* frame); |
- void SetAfterBreakTarget(JavaScriptFrame* frame); |
+ void Break(StandardFrame* frame); |
+ void SetAfterBreakTarget(StandardFrame* frame); |
// Scripts handling. |
Handle<FixedArray> GetLoadedScripts(); |