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> // 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_MIPS) | 9 #if defined(TARGET_ARCH_MIPS) |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 return true; | 251 return true; |
252 } | 252 } |
253 } | 253 } |
254 return false; | 254 return false; |
255 } | 255 } |
256 | 256 |
257 | 257 |
258 TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code, | 258 TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code, |
259 uword pc) { | 259 uword pc) { |
260 TokenPosition token_pos = TokenPosition::kNoSource; | 260 TokenPosition token_pos = TokenPosition::kNoSource; |
261 uword pc_offset = pc - code.EntryPoint(); | 261 uword pc_offset = pc - code.PayloadStart(); |
262 const PcDescriptors& descriptors = | 262 const PcDescriptors& descriptors = |
263 PcDescriptors::Handle(code.pc_descriptors()); | 263 PcDescriptors::Handle(code.pc_descriptors()); |
264 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); | 264 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); |
265 while (iter.MoveNext()) { | 265 while (iter.MoveNext()) { |
266 if (iter.PcOffset() == pc_offset) { | 266 if (iter.PcOffset() == pc_offset) { |
267 return iter.TokenPos(); | 267 return iter.TokenPos(); |
268 } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) { | 268 } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) { |
269 token_pos = iter.TokenPos(); | 269 token_pos = iter.TokenPos(); |
270 } | 270 } |
271 } | 271 } |
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2531 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2531 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
2532 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2532 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
2533 buf->Longjmp(); | 2533 buf->Longjmp(); |
2534 } | 2534 } |
2535 | 2535 |
2536 } // namespace dart | 2536 } // namespace dart |
2537 | 2537 |
2538 #endif // defined(USING_SIMULATOR) | 2538 #endif // defined(USING_SIMULATOR) |
2539 | 2539 |
2540 #endif // defined TARGET_ARCH_MIPS | 2540 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |