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

Unified Diff: src/frames.cc

Issue 1909663005: [interpreter] Fix stack trace printers for debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: empty patch set as per comment Created 4 years, 8 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 | « no previous file | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 145f50f49ee579e17d5942bc0d28c3d9aeb46b39..e4ca9346b997d48c72cef1da71adfd54df82ed8d 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1398,14 +1398,20 @@ void JavaScriptFrame::Print(StringStream* accumulator,
int offset = static_cast<int>(pc - code->instruction_start());
int source_pos = code->SourcePosition(offset);
int line = script->GetLineNumber(source_pos) + 1;
- accumulator->Add(":%d", line);
+ accumulator->Add(":%d] [pc=%p]", line, pc);
+ } else if (is_interpreted()) {
+ const InterpretedFrame* iframe =
+ reinterpret_cast<const InterpretedFrame*>(this);
+ BytecodeArray* bytecodes = iframe->GetBytecodeArray();
+ int offset = iframe->GetBytecodeOffset();
+ int source_pos = bytecodes->SourcePosition(offset);
+ int line = script->GetLineNumber(source_pos) + 1;
+ accumulator->Add(":%d] [bytecode=%p offset=%d]", line, bytecodes, offset);
} else {
int function_start_pos = shared->start_position();
int line = script->GetLineNumber(function_start_pos) + 1;
- accumulator->Add(":~%d", line);
+ accumulator->Add(":~%d] [pc=%p]", line, pc);
}
-
- accumulator->Add("] [pc=%p] ", pc);
}
accumulator->Add("(this=%o", receiver);
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698