| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "vm/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 StackFrame* frame = iterator.NextFrame(); | 878 StackFrame* frame = iterator.NextFrame(); |
| 879 bool get_saved_context = false; | 879 bool get_saved_context = false; |
| 880 while (frame != NULL) { | 880 while (frame != NULL) { |
| 881 ASSERT(frame->IsValid()); | 881 ASSERT(frame->IsValid()); |
| 882 if (frame->IsDartFrame()) { | 882 if (frame->IsDartFrame()) { |
| 883 code = frame->LookupDartCode(); | 883 code = frame->LookupDartCode(); |
| 884 ActivationFrame* activation = new ActivationFrame(frame->pc(), | 884 ActivationFrame* activation = new ActivationFrame(frame->pc(), |
| 885 frame->fp(), | 885 frame->fp(), |
| 886 frame->sp(), | 886 frame->sp(), |
| 887 code); | 887 code); |
| 888 if (get_saved_context) { | 888 if (get_saved_context && !activation->code().is_optimized()) { |
| 889 ctx = activation->GetSavedContext(); | 889 ctx = activation->GetSavedContext(); |
| 890 } | 890 } |
| 891 activation->SetContext(ctx); | 891 activation->SetContext(ctx); |
| 892 stack_trace->AddActivation(activation); | 892 stack_trace->AddActivation(activation); |
| 893 get_saved_context = activation->function().IsClosureFunction(); | 893 get_saved_context = activation->function().IsClosureFunction(); |
| 894 } else if (frame->IsEntryFrame()) { | 894 } else if (frame->IsEntryFrame()) { |
| 895 ctx = reinterpret_cast<EntryFrame*>(frame)->SavedContext(); | 895 ctx = reinterpret_cast<EntryFrame*>(frame)->SavedContext(); |
| 896 get_saved_context = false; | 896 get_saved_context = false; |
| 897 } | 897 } |
| 898 frame = iterator.NextFrame(); | 898 frame = iterator.NextFrame(); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1734 } | 1734 } |
| 1735 | 1735 |
| 1736 | 1736 |
| 1737 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1737 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1738 ASSERT(bpt->next() == NULL); | 1738 ASSERT(bpt->next() == NULL); |
| 1739 bpt->set_next(code_breakpoints_); | 1739 bpt->set_next(code_breakpoints_); |
| 1740 code_breakpoints_ = bpt; | 1740 code_breakpoints_ = bpt; |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 } // namespace dart | 1743 } // namespace dart |
| OLD | NEW |