OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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> // NOLINT | 5 #include <setjmp.h> // NOLINT |
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_ARM64) | 9 #if defined(TARGET_ARCH_ARM64) |
10 | 10 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 return true; | 258 return true; |
259 } | 259 } |
260 } | 260 } |
261 return false; | 261 return false; |
262 } | 262 } |
263 | 263 |
264 | 264 |
265 TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code, | 265 TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code, |
266 uword pc) { | 266 uword pc) { |
267 TokenPosition token_pos = TokenPosition::kNoSource; | 267 TokenPosition token_pos = TokenPosition::kNoSource; |
268 uword pc_offset = pc - code.EntryPoint(); | 268 uword pc_offset = pc - code.PayloadStart(); |
269 const PcDescriptors& descriptors = | 269 const PcDescriptors& descriptors = |
270 PcDescriptors::Handle(code.pc_descriptors()); | 270 PcDescriptors::Handle(code.pc_descriptors()); |
271 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); | 271 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); |
272 while (iter.MoveNext()) { | 272 while (iter.MoveNext()) { |
273 if (iter.PcOffset() == pc_offset) { | 273 if (iter.PcOffset() == pc_offset) { |
274 return iter.TokenPos(); | 274 return iter.TokenPos(); |
275 } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) { | 275 } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) { |
276 token_pos = iter.TokenPos(); | 276 token_pos = iter.TokenPos(); |
277 } | 277 } |
278 } | 278 } |
(...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3605 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); | 3605 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); |
3606 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); | 3606 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); |
3607 buf->Longjmp(); | 3607 buf->Longjmp(); |
3608 } | 3608 } |
3609 | 3609 |
3610 } // namespace dart | 3610 } // namespace dart |
3611 | 3611 |
3612 #endif // !defined(USING_SIMULATOR) | 3612 #endif // !defined(USING_SIMULATOR) |
3613 | 3613 |
3614 #endif // defined TARGET_ARCH_ARM64 | 3614 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |