Chromium Code Reviews| Index: src/frames.cc |
| diff --git a/src/frames.cc b/src/frames.cc |
| index 145f50f49ee579e17d5942bc0d28c3d9aeb46b39..bbe6eb79e2c81d501ce0c3edb628ea32f4e4c0b4 100644 |
| --- a/src/frames.cc |
| +++ b/src/frames.cc |
| @@ -1398,14 +1398,21 @@ 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); |
|
Michael Starzinger
2016/04/21 17:05:18
nit: Doesn't this print the line number twice now?
Yang
2016/04/22 05:03:39
You are right. Fixed.
|
| } |
| - |
| - accumulator->Add("] [pc=%p] ", pc); |
| } |
| accumulator->Add("(this=%o", receiver); |