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

Unified Diff: src/debug/debug.cc

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Document that the forward declaration is only needed for VS 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
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index f6f652edf259c2300b7fa7acf3dd49b349b14181..c067a6b1051083e799dbeef48534ecd6a074416c 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -60,8 +60,12 @@ Debug::Debug(Isolate* isolate)
}
BreakLocation BreakLocation::FromFrame(StandardFrame* frame) {
- // TODO(clemensh): Handle Wasm frames.
- DCHECK(!frame->is_wasm());
+ if (frame->is_wasm()) {
+ WasmInterpreterEntryFrame* wasm_frame =
+ WasmInterpreterEntryFrame::cast(frame);
+ return wasm_frame->wasm_instance()->compiled_module()->GetBreakLocation(
+ wasm_frame->position());
+ }
auto summary = FrameSummary::GetFirst(frame).AsJavaScript();
int offset = summary.code_offset();
@@ -2330,8 +2334,6 @@ DebugScope::DebugScope(Debug* debug)
// frame id.
StackTraceFrameIterator it(isolate());
bool has_frames = !it.done();
- // We don't currently support breaking inside wasm framess.
- DCHECK(!has_frames || !it.is_wasm());
debug_->thread_local_.break_frame_id_ =
has_frames ? it.frame()->id() : StackFrame::NO_ID;
debug_->SetNextBreakId();
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug-frames.h » ('j') | src/wasm/wasm-interpreter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698