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_ARM) | 9 #if defined(TARGET_ARCH_ARM) |
10 | 10 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 return true; | 240 return true; |
241 } | 241 } |
242 } | 242 } |
243 return false; | 243 return false; |
244 } | 244 } |
245 | 245 |
246 | 246 |
247 TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code, | 247 TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code, |
248 uword pc) { | 248 uword pc) { |
249 TokenPosition token_pos = TokenPosition::kNoSource; | 249 TokenPosition token_pos = TokenPosition::kNoSource; |
250 uword pc_offset = pc - code.EntryPoint(); | 250 uword pc_offset = pc - code.PayloadStart(); |
251 const PcDescriptors& descriptors = | 251 const PcDescriptors& descriptors = |
252 PcDescriptors::Handle(code.pc_descriptors()); | 252 PcDescriptors::Handle(code.pc_descriptors()); |
253 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); | 253 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); |
254 while (iter.MoveNext()) { | 254 while (iter.MoveNext()) { |
255 if (iter.PcOffset() == pc_offset) { | 255 if (iter.PcOffset() == pc_offset) { |
256 return iter.TokenPos(); | 256 return iter.TokenPos(); |
257 } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) { | 257 } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) { |
258 token_pos = iter.TokenPos(); | 258 token_pos = iter.TokenPos(); |
259 } | 259 } |
260 } | 260 } |
(...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3907 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3907 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
3908 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3908 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
3909 buf->Longjmp(); | 3909 buf->Longjmp(); |
3910 } | 3910 } |
3911 | 3911 |
3912 } // namespace dart | 3912 } // namespace dart |
3913 | 3913 |
3914 #endif // defined(USING_SIMULATOR) | 3914 #endif // defined(USING_SIMULATOR) |
3915 | 3915 |
3916 #endif // defined TARGET_ARCH_ARM | 3916 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |