OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |