| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index 4bd5fa0cf0cd64b761d4bacb59195ac52b2ab28d..e1279a25fa222ffe03dbbd198bb4bc9c285169df 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -149,13 +149,20 @@ BreakLocation BreakLocation::FromCodeOffset(Handle<DebugInfo> debug_info,
|
| return it.GetBreakLocation();
|
| }
|
|
|
| +// Move GetFirstFrameSummary Definition to here as FromFrame use it.
|
| +FrameSummary GetFirstFrameSummary(JavaScriptFrame* frame) {
|
| + List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
|
| + frame->Summarize(&frames);
|
| + return frames.first();
|
| +}
|
| +
|
| BreakLocation BreakLocation::FromFrame(Handle<DebugInfo> debug_info,
|
| JavaScriptFrame* frame) {
|
| // Code offset to the instruction after the current one, possibly a break
|
| // location as well. So the "- 1" to exclude it from the search.
|
| - Code* code = frame->LookupCode();
|
| - int code_offset = static_cast<int>(frame->pc() - code->instruction_start());
|
| - return FromCodeOffset(debug_info, code_offset - 1);
|
| + // Get code offset from the unoptimized code.
|
| + FrameSummary summary = GetFirstFrameSummary(frame);
|
| + return FromCodeOffset(debug_info, summary.code_offset() - 1);
|
| }
|
|
|
| // Find the break point at the supplied address, or the closest one before
|
| @@ -794,13 +801,6 @@ bool Debug::IsBreakOnException(ExceptionBreakType type) {
|
| }
|
|
|
|
|
| -FrameSummary GetFirstFrameSummary(JavaScriptFrame* frame) {
|
| - List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
|
| - frame->Summarize(&frames);
|
| - return frames.first();
|
| -}
|
| -
|
| -
|
| void Debug::PrepareStepIn(Handle<JSFunction> function) {
|
| if (!is_active()) return;
|
| if (last_step_action() < StepIn) return;
|
|
|