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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 script.GetTokenLocation(token_pos, &line, &column); | 274 script.GetTokenLocation(token_pos, &line, &column); |
275 } | 275 } |
276 OS::Print( | 276 OS::Print( |
277 "pc=0x%" Px " fp=0x%" Px " sp=0x%" Px " %s%s (%s:%" Pd ":%" Pd ")\n", pc, | 277 "pc=0x%" Px " fp=0x%" Px " sp=0x%" Px " %s%s (%s:%" Pd ":%" Pd ")\n", pc, |
278 fp, sp, is_optimized ? (is_inlined ? "inlined " : "optimized ") : "", | 278 fp, sp, is_optimized ? (is_inlined ? "inlined " : "optimized ") : "", |
279 func_name.ToCString(), url.ToCString(), line, column); | 279 func_name.ToCString(), url.ToCString(), line, column); |
280 } | 280 } |
281 | 281 |
282 | 282 |
283 void SimulatorDebugger::PrintBacktrace() { | 283 void SimulatorDebugger::PrintBacktrace() { |
284 StackFrameIterator frames(sim_->get_register(FP), sim_->get_register(SP), | 284 StackFrameIterator frames( |
285 sim_->get_pc(), | 285 sim_->get_register(FP), sim_->get_register(SP), sim_->get_pc(), |
286 StackFrameIterator::kDontValidateFrames); | 286 StackFrameIterator::kDontValidateFrames, Thread::Current(), |
| 287 StackFrameIterator::kNoCrossThreadIteration); |
287 StackFrame* frame = frames.NextFrame(); | 288 StackFrame* frame = frames.NextFrame(); |
288 ASSERT(frame != NULL); | 289 ASSERT(frame != NULL); |
289 Function& function = Function::Handle(); | 290 Function& function = Function::Handle(); |
290 Function& inlined_function = Function::Handle(); | 291 Function& inlined_function = Function::Handle(); |
291 Code& code = Code::Handle(); | 292 Code& code = Code::Handle(); |
292 Code& unoptimized_code = Code::Handle(); | 293 Code& unoptimized_code = Code::Handle(); |
293 while (frame != NULL) { | 294 while (frame != NULL) { |
294 if (frame->IsDartFrame()) { | 295 if (frame->IsDartFrame()) { |
295 code = frame->LookupDartCode(); | 296 code = frame->LookupDartCode(); |
296 function = code.function(); | 297 function = code.function(); |
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 set_register(CODE_REG, code); | 2511 set_register(CODE_REG, code); |
2511 set_register(PP, pp); | 2512 set_register(PP, pp); |
2512 buf->Longjmp(); | 2513 buf->Longjmp(); |
2513 } | 2514 } |
2514 | 2515 |
2515 } // namespace dart | 2516 } // namespace dart |
2516 | 2517 |
2517 #endif // defined(USING_SIMULATOR) | 2518 #endif // defined(USING_SIMULATOR) |
2518 | 2519 |
2519 #endif // defined TARGET_ARCH_MIPS | 2520 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |