| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 script.GetTokenLocation(token_pos, &line, &column); | 296 script.GetTokenLocation(token_pos, &line, &column); |
| 297 } | 297 } |
| 298 OS::Print( | 298 OS::Print( |
| 299 "pc=0x%" Px " fp=0x%" Px " sp=0x%" Px " %s%s (%s:%" Pd ":%" Pd ")\n", pc, | 299 "pc=0x%" Px " fp=0x%" Px " sp=0x%" Px " %s%s (%s:%" Pd ":%" Pd ")\n", pc, |
| 300 fp, sp, is_optimized ? (is_inlined ? "inlined " : "optimized ") : "", | 300 fp, sp, is_optimized ? (is_inlined ? "inlined " : "optimized ") : "", |
| 301 func_name.ToCString(), url.ToCString(), line, column); | 301 func_name.ToCString(), url.ToCString(), line, column); |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 void SimulatorDebugger::PrintBacktrace() { | 305 void SimulatorDebugger::PrintBacktrace() { |
| 306 StackFrameIterator frames(sim_->get_register(FP), sim_->get_register(SP), | 306 StackFrameIterator frames( |
| 307 sim_->get_pc(), | 307 sim_->get_register(FP), sim_->get_register(SP), sim_->get_pc(), |
| 308 StackFrameIterator::kDontValidateFrames); | 308 StackFrameIterator::kDontValidateFrames, Thread::Current(), |
| 309 StackFrameIterator::kNoCrossThreadIteration); |
| 309 StackFrame* frame = frames.NextFrame(); | 310 StackFrame* frame = frames.NextFrame(); |
| 310 ASSERT(frame != NULL); | 311 ASSERT(frame != NULL); |
| 311 Function& function = Function::Handle(); | 312 Function& function = Function::Handle(); |
| 312 Function& inlined_function = Function::Handle(); | 313 Function& inlined_function = Function::Handle(); |
| 313 Code& code = Code::Handle(); | 314 Code& code = Code::Handle(); |
| 314 Code& unoptimized_code = Code::Handle(); | 315 Code& unoptimized_code = Code::Handle(); |
| 315 while (frame != NULL) { | 316 while (frame != NULL) { |
| 316 if (frame->IsDartFrame()) { | 317 if (frame->IsDartFrame()) { |
| 317 code = frame->LookupDartCode(); | 318 code = frame->LookupDartCode(); |
| 318 function = code.function(); | 319 function = code.function(); |
| (...skipping 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3647 set_register(NULL, CODE_REG, code); | 3648 set_register(NULL, CODE_REG, code); |
| 3648 set_register(NULL, PP, pp); | 3649 set_register(NULL, PP, pp); |
| 3649 buf->Longjmp(); | 3650 buf->Longjmp(); |
| 3650 } | 3651 } |
| 3651 | 3652 |
| 3652 } // namespace dart | 3653 } // namespace dart |
| 3653 | 3654 |
| 3654 #endif // !defined(USING_SIMULATOR) | 3655 #endif // !defined(USING_SIMULATOR) |
| 3655 | 3656 |
| 3656 #endif // defined TARGET_ARCH_ARM64 | 3657 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |