| 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 <math.h> // for isnan. | 5 #include <math.h> // for isnan. |
| 6 #include <setjmp.h> | 6 #include <setjmp.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #if defined(TARGET_ARCH_ARM) | 10 #if defined(TARGET_ARCH_ARM) |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 Function& inlined_function = Function::Handle(); | 315 Function& inlined_function = Function::Handle(); |
| 316 Code& code = Code::Handle(); | 316 Code& code = Code::Handle(); |
| 317 Code& unoptimized_code = Code::Handle(); | 317 Code& unoptimized_code = Code::Handle(); |
| 318 while (frame != NULL) { | 318 while (frame != NULL) { |
| 319 if (frame->IsDartFrame()) { | 319 if (frame->IsDartFrame()) { |
| 320 code = frame->LookupDartCode(); | 320 code = frame->LookupDartCode(); |
| 321 function = code.function(); | 321 function = code.function(); |
| 322 if (code.is_optimized()) { | 322 if (code.is_optimized()) { |
| 323 // For optimized frames, extract all the inlined functions if any | 323 // For optimized frames, extract all the inlined functions if any |
| 324 // into the stack trace. | 324 // into the stack trace. |
| 325 InlinedFunctionsIterator it(frame); | 325 InlinedFunctionsIterator it(code, frame->pc()); |
| 326 while (!it.Done()) { | 326 while (!it.Done()) { |
| 327 // Print each inlined frame with its pc in the corresponding | 327 // Print each inlined frame with its pc in the corresponding |
| 328 // unoptimized frame. | 328 // unoptimized frame. |
| 329 inlined_function = it.function(); | 329 inlined_function = it.function(); |
| 330 unoptimized_code = it.code(); | 330 unoptimized_code = it.code(); |
| 331 uword unoptimized_pc = it.pc(); | 331 uword unoptimized_pc = it.pc(); |
| 332 it.Advance(); | 332 it.Advance(); |
| 333 if (!it.Done()) { | 333 if (!it.Done()) { |
| 334 PrintDartFrame(unoptimized_pc, frame->fp(), frame->sp(), | 334 PrintDartFrame(unoptimized_pc, frame->fp(), frame->sp(), |
| 335 inlined_function, | 335 inlined_function, |
| (...skipping 3369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3705 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3705 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
| 3706 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3706 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 3707 buf->Longjmp(); | 3707 buf->Longjmp(); |
| 3708 } | 3708 } |
| 3709 | 3709 |
| 3710 } // namespace dart | 3710 } // namespace dart |
| 3711 | 3711 |
| 3712 #endif // !defined(HOST_ARCH_ARM) | 3712 #endif // !defined(HOST_ARCH_ARM) |
| 3713 | 3713 |
| 3714 #endif // defined TARGET_ARCH_ARM | 3714 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |