Chromium Code Reviews| Index: runtime/vm/debugger.cc |
| diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
| index 6bfbede60abb9d9e5554b8acfd88fed330125959..6582b833b2ba979a14e82714d73f1d894f499236 100644 |
| --- a/runtime/vm/debugger.cc |
| +++ b/runtime/vm/debugger.cc |
| @@ -720,8 +720,10 @@ void ActivationFrame::PrintDescriptorsError(const char* message) { |
| OS::PrintErr("pc_ %" Px "\n", pc_); |
| OS::PrintErr("deopt_id_ %" Px "\n", deopt_id_); |
| OS::PrintErr("context_level_ %" Px "\n", context_level_); |
| +#if !defined(DART_PRECOMPILED_RUNTIME) |
| DisassembleToStdout formatter; |
| code().Disassemble(&formatter); |
| +#endif // !defined(DART_PRECOMPILED_RUNTIME) |
| PcDescriptors::Handle(code().pc_descriptors()).Print(); |
| StackFrameIterator frames(StackFrameIterator::kDontValidateFrames, |
| Thread::Current(), |
| @@ -1890,6 +1892,7 @@ ActivationFrame* Debugger::CollectDartFrame(Isolate* isolate, |
| } |
| +#if !defined(DART_PRECOMPILED_RUNTIME) |
| RawArray* Debugger::DeoptimizeToArray(Thread* thread, |
| StackFrame* frame, |
| const Code& code) { |
| @@ -1911,6 +1914,7 @@ RawArray* Debugger::DeoptimizeToArray(Thread* thread, |
| return dest_frame.raw(); |
| } |
| +#endif // !defined(DART_PRECOMPILED_RUNTIME) |
| DebuggerStackTrace* Debugger::CollectStackTrace() { |
| @@ -1949,6 +1953,7 @@ void Debugger::AppendCodeFrames(Thread* thread, |
| Code* code, |
| Code* inlined_code, |
| Array* deopt_frame) { |
| +#if !defined(DART_PRECOMPILED_RUNTIME) |
| if (code->is_optimized() && !FLAG_precompiled_runtime) { |
|
zra
2017/07/11 20:25:08
Do you still need to check FLAG_precompiled_runtim
Aske Simon Christensen
2017/07/12 18:51:33
The runtime flag is presumably there to make the f
|
| // TODO(rmacnak): Use CodeSourceMap |
| *deopt_frame = DeoptimizeToArray(thread, frame, *code); |
| @@ -1966,10 +1971,11 @@ void Debugger::AppendCodeFrames(Thread* thread, |
| *inlined_code, *deopt_frame, |
| deopt_frame_offset)); |
| } |
| - } else { |
| - stack_trace->AddActivation(CollectDartFrame( |
| - isolate, frame->pc(), frame, *code, Object::null_array(), 0)); |
| + return; |
| } |
| +#endif // !defined(DART_PRECOMPILED_RUNTIME) |
| + stack_trace->AddActivation(CollectDartFrame(isolate, frame->pc(), frame, |
| + *code, Object::null_array(), 0)); |
| } |
| @@ -2060,6 +2066,10 @@ DebuggerStackTrace* Debugger::CollectAsyncCausalStackTrace() { |
| DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() { |
| +#if defined(DART_PRECOMPILED_RUNTIME) |
| + ASSERT(!FLAG_async_debugger); |
| + return NULL; |
| +#else |
| if (!FLAG_async_debugger) { |
| return NULL; |
| } |
| @@ -2203,6 +2213,7 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() { |
| } |
| return stack_trace; |
| +#endif // defined(DART_PRECOMPILED_RUNTIME) |
| } |