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

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

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Rebase after Yangs revert ಠ益ಠ 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 9f31e4ec9505d770dd2f493a1b652338820e6e9c..f311fa101ac94a24cfe68a107407df0f824d4e67 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -15,6 +15,7 @@
namespace v8 {
namespace internal {
namespace wasm {
+class InterpretedFrame;
struct WasmModule;
}
@@ -395,6 +396,10 @@ class WasmCompiledModule : public FixedArray {
static bool SetBreakPoint(Handle<WasmCompiledModule>, int* position,
Handle<Object> break_point_object);
+ // Return an empty handle if no breakpoint is hit at that location, or a
+ // FixedArray with all hit breakpoint objects.
+ MaybeHandle<FixedArray> CheckBreakPoints(int position);
+
private:
void InitId();
@@ -417,8 +422,15 @@ class WasmDebugInfo : public FixedArray {
static void SetBreakpoint(Handle<WasmDebugInfo>, int func_index, int offset);
- static void RunInterpreter(Handle<WasmDebugInfo>, int func_index,
- uint8_t* arg_buffer);
+ void RunInterpreter(int func_index, uint8_t* arg_buffer);
+
+ // Get the stack of the wasm interpreter as pairs of <function index, byte
+ // offset>. The list is ordered bottom-to-top, i.e. caller before callee.
+ std::vector<std::pair<uint32_t, int>> GetInterpretedStack(
+ Address frame_pointer);
+
+ std::unique_ptr<wasm::InterpretedFrame> GetInterpretedFrame(
+ Address frame_pointer, int idx);
DECLARE_GETTER(wasm_instance, WasmInstanceObject);
};
« 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