Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: runtime/vm/debugger.cc

Issue 12380031: Fixed debugger stacktrace generation that failed a VM assertion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698