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

Side by Side Diff: runtime/vm/debugger_x64.cc

Issue 26255004: Allow the debugger to inspect local variables from optimized and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/debugger_mips.cc ('k') | runtime/vm/deopt_instructions.h » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/debugger.h" 8 #include "vm/debugger.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
11 #include "vm/cpu.h" 11 #include "vm/cpu.h"
12 #include "vm/stub_code.h" 12 #include "vm/stub_code.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 // TODO(hausner): Handle captured variables.
17 RawInstance* ActivationFrame::GetLocalVarValue(intptr_t slot_index) {
18 uword var_address = fp() + slot_index * kWordSize;
19 return reinterpret_cast<RawInstance*>(
20 *reinterpret_cast<uword*>(var_address));
21 }
22
23
24 RawInstance* ActivationFrame::GetInstanceCallReceiver( 16 RawInstance* ActivationFrame::GetInstanceCallReceiver(
25 intptr_t num_actual_args) { 17 intptr_t num_actual_args) {
26 ASSERT(num_actual_args > 0); // At minimum we have a receiver on the stack. 18 ASSERT(num_actual_args > 0); // At minimum we have a receiver on the stack.
27 // Stack pointer points to last argument that was pushed on the stack. 19 // Stack pointer points to last argument that was pushed on the stack.
28 uword receiver_addr = sp() + ((num_actual_args - 1) * kWordSize); 20 uword receiver_addr = sp() + ((num_actual_args - 1) * kWordSize);
29 return reinterpret_cast<RawInstance*>( 21 return reinterpret_cast<RawInstance*>(
30 *reinterpret_cast<uword*>(receiver_addr)); 22 *reinterpret_cast<uword*>(receiver_addr));
31 } 23 }
32 24
33 25
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 64
73 assembler.ReturnPatchable(); 65 assembler.ReturnPatchable();
74 assembler.FinalizeInstructions(code_region); 66 assembler.FinalizeInstructions(code_region);
75 67
76 CPU::FlushICache(pc_ - 13, 13); 68 CPU::FlushICache(pc_ - 13, 13);
77 } 69 }
78 70
79 } // namespace dart 71 } // namespace dart
80 72
81 #endif // defined TARGET_ARCH_X64 73 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/debugger_mips.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698