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

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

Issue 396213005: Fix PcDescriptor iteratot to never return a pointer to a memory location since the data can move wi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/raw_object.h ('k') | runtime/vm/stack_frame.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 <setjmp.h> 5 #include <setjmp.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_ARM) 9 #if defined(TARGET_ARCH_ARM)
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 266
267 intptr_t SimulatorDebugger::GetApproximateTokenIndex(const Code& code, 267 intptr_t SimulatorDebugger::GetApproximateTokenIndex(const Code& code,
268 uword pc) { 268 uword pc) {
269 intptr_t token_pos = -1; 269 intptr_t token_pos = -1;
270 const PcDescriptors& descriptors = 270 const PcDescriptors& descriptors =
271 PcDescriptors::Handle(code.pc_descriptors()); 271 PcDescriptors::Handle(code.pc_descriptors());
272 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); 272 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
273 while (iter.HasNext()) { 273 while (iter.HasNext()) {
274 const RawPcDescriptors::PcDescriptorRec& rec = iter.Next(); 274 RawPcDescriptors::PcDescriptorRec rec;
275 iter.NextRec(&rec);
275 if (rec.pc() == pc) { 276 if (rec.pc() == pc) {
276 return rec.token_pos(); 277 return rec.token_pos();
277 } else if ((token_pos <= 0) && (rec.pc() > pc)) { 278 } else if ((token_pos <= 0) && (rec.pc() > pc)) {
278 token_pos = rec.token_pos(); 279 token_pos = rec.token_pos();
279 } 280 }
280 } 281 }
281 return token_pos; 282 return token_pos;
282 } 283 }
283 284
284 285
(...skipping 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3723 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 3724 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
3724 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 3725 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
3725 buf->Longjmp(); 3726 buf->Longjmp();
3726 } 3727 }
3727 3728
3728 } // namespace dart 3729 } // namespace dart
3729 3730
3730 #endif // !defined(HOST_ARCH_ARM) 3731 #endif // !defined(HOST_ARCH_ARM)
3731 3732
3732 #endif // defined TARGET_ARCH_ARM 3733 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698