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

Unified Diff: src/wasm/wasm-interpreter.h

Issue 2649533002: [wasm] Implement stepping in wasm code (Closed)
Patch Set: Rebase Created 3 years, 11 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/wasm/wasm-debug.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-interpreter.h
diff --git a/src/wasm/wasm-interpreter.h b/src/wasm/wasm-interpreter.h
index 7162f22b320770350c7fd5216af5bb09537ce054..f0167d03e7a9c3b76c18f27e7094ed9d8990ef8a 100644
--- a/src/wasm/wasm-interpreter.h
+++ b/src/wasm/wasm-interpreter.h
@@ -120,6 +120,13 @@ class V8_EXPORT_PRIVATE WasmInterpreter {
// +------------- Finish -------------> FINISHED
enum State { STOPPED, RUNNING, PAUSED, FINISHED, TRAPPED };
+ // Tells a thread to pause after certain instructions.
+ enum BreakFlag : uint8_t {
+ None = 0,
+ AfterReturn = 1 << 0,
+ AfterCall = 1 << 1
+ };
+
// Representation of a thread in the interpreter.
class V8_EXPORT_PRIVATE Thread {
// Don't instante Threads; they will be allocated as ThreadImpl in the
@@ -150,6 +157,9 @@ class V8_EXPORT_PRIVATE WasmInterpreter {
// TODO(wasm): Implement this once we support multiple threads.
// bool SetBreakpoint(const WasmFunction* function, int pc, bool enabled);
// bool GetBreakpoint(const WasmFunction* function, int pc);
+
+ void AddBreakFlags(uint8_t flags);
+ void ClearBreakFlags();
};
WasmInterpreter(const ModuleBytesEnv& env, AccountingAllocator* allocator);
« no previous file with comments | « src/wasm/wasm-debug.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698