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

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

Issue 2626253002: [wasm] Set and store breakpoints in wasm (Closed)
Patch Set: Remove CheckBreakPoints methods 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-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-objects.h
diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
index 23cebe082ee16f8820c13da88d67dafd74b022fe..142b87690d9624ba836bc3de861a81558387a2d1 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -5,6 +5,7 @@
#ifndef V8_WASM_OBJECTS_H_
#define V8_WASM_OBJECTS_H_
+#include "src/debug/debug.h"
#include "src/debug/interface-types.h"
#include "src/objects-inl.h"
#include "src/trap-handler/trap-handler.h"
@@ -36,6 +37,10 @@ class WasmInstanceWrapper;
bool has_##name(); \
DECLARE_ACCESSORS(name, type)
+#define DECLARE_OPTIONAL_GETTER(name, type) \
+ bool has_##name(); \
+ DECLARE_GETTER(name, type)
+
// Representation of a WebAssembly.Module JavaScript-level object.
class WasmModuleObject : public JSObject {
public:
@@ -158,6 +163,7 @@ class WasmSharedModuleData : public FixedArray {
kModuleBytes,
kScript,
kAsmJsOffsetTable,
+ kBreakPointInfos,
kFieldCount
};
@@ -168,6 +174,7 @@ class WasmSharedModuleData : public FixedArray {
DECLARE_OPTIONAL_ACCESSORS(module_bytes, SeqOneByteString);
DECLARE_GETTER(script, Script);
DECLARE_OPTIONAL_ACCESSORS(asm_js_offset_table, ByteArray);
+ DECLARE_OPTIONAL_GETTER(breakpoint_infos, FixedArray);
static Handle<WasmSharedModuleData> New(
Isolate* isolate, Handle<Foreign> module_wrapper,
@@ -179,6 +186,12 @@ class WasmSharedModuleData : public FixedArray {
// Recreate the ModuleWrapper from the module bytes after deserialization.
static void RecreateModuleWrapper(Isolate*, Handle<WasmSharedModuleData>);
+
+ static void AddBreakpoint(Handle<WasmSharedModuleData>, int position,
+ Handle<Object> break_point_object);
+
+ static void SetBreakpointsOnNewInstance(Handle<WasmSharedModuleData>,
+ Handle<WasmInstanceObject>);
};
class WasmCompiledModule : public FixedArray {
@@ -374,6 +387,15 @@ class WasmCompiledModule : public FixedArray {
const debug::Location& end,
std::vector<debug::Location>* locations);
+ // Set a breakpoint on the given byte position inside the given module.
+ // This will affect all live and future instances of the module.
+ // The passed position might be modified to point to the next breakable
+ // location inside the same function.
+ // If it points outside a function, or behind the last breakable location,
+ // this function returns false and does not set any breakpoint.
+ static bool SetBreakPoint(Handle<WasmCompiledModule>, int* position,
+ Handle<Object> break_point_object);
+
private:
void InitId();
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698