Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: src/debug/debug.h

Issue 2096863003: [wasm] prototype for breakpoint support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@extend-script-functionality
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698