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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 2045863002: [debug] load correct stack slot for frame details. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5071.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/debug/debug-evaluate.h" 8 #include "src/debug/debug-evaluate.h"
9 #include "src/debug/debug-frames.h" 9 #include "src/debug/debug-frames.h"
10 #include "src/debug/debug-scopes.h" 10 #include "src/debug/debug-scopes.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 Handle<FixedArray> locals = 555 Handle<FixedArray> locals =
556 isolate->factory()->NewFixedArray(local_count * 2); 556 isolate->factory()->NewFixedArray(local_count * 2);
557 557
558 // Fill in the values of the locals. 558 // Fill in the values of the locals.
559 int local = 0; 559 int local = 0;
560 int i = 0; 560 int i = 0;
561 for (; i < scope_info->StackLocalCount(); ++i) { 561 for (; i < scope_info->StackLocalCount(); ++i) {
562 // Use the value from the stack. 562 // Use the value from the stack.
563 if (ScopeInfo::VariableIsSynthetic(scope_info->LocalName(i))) continue; 563 if (ScopeInfo::VariableIsSynthetic(scope_info->LocalName(i))) continue;
564 locals->set(local * 2, scope_info->LocalName(i)); 564 locals->set(local * 2, scope_info->LocalName(i));
565 Handle<Object> value = frame_inspector.GetExpression(i); 565 Handle<Object> value =
566 frame_inspector.GetExpression(scope_info->StackLocalIndex(i));
566 // TODO(yangguo): We convert optimized out values to {undefined} when they 567 // TODO(yangguo): We convert optimized out values to {undefined} when they
567 // are passed to the debugger. Eventually we should handle them somehow. 568 // are passed to the debugger. Eventually we should handle them somehow.
568 if (value->IsOptimizedOut()) value = isolate->factory()->undefined_value(); 569 if (value->IsOptimizedOut()) value = isolate->factory()->undefined_value();
569 locals->set(local * 2 + 1, *value); 570 locals->set(local * 2 + 1, *value);
570 local++; 571 local++;
571 } 572 }
572 if (local < local_count) { 573 if (local < local_count) {
573 // Get the context containing declarations. 574 // Get the context containing declarations.
574 Handle<Context> context( 575 Handle<Context> context(
575 Handle<Context>::cast(frame_inspector.GetContext())->closure_context()); 576 Handle<Context>::cast(frame_inspector.GetContext())->closure_context());
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 return Smi::FromInt(isolate->debug()->is_active()); 1743 return Smi::FromInt(isolate->debug()->is_active());
1743 } 1744 }
1744 1745
1745 1746
1746 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1747 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1747 UNIMPLEMENTED(); 1748 UNIMPLEMENTED();
1748 return NULL; 1749 return NULL;
1749 } 1750 }
1750 } // namespace internal 1751 } // namespace internal
1751 } // namespace v8 1752 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5071.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698