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

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

Issue 10928149: Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger c… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/debugger.h ('k') | runtime/vm/debugger_api_impl.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 "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 760
761 761
762 void Debugger::SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info) { 762 void Debugger::SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info) {
763 ASSERT((pause_info == kNoPauseOnExceptions) || 763 ASSERT((pause_info == kNoPauseOnExceptions) ||
764 (pause_info == kPauseOnUnhandledExceptions) || 764 (pause_info == kPauseOnUnhandledExceptions) ||
765 (pause_info == kPauseOnAllExceptions)); 765 (pause_info == kPauseOnAllExceptions));
766 exc_pause_info_ = pause_info; 766 exc_pause_info_ = pause_info;
767 } 767 }
768 768
769 769
770 Dart_ExceptionPauseInfo Debugger::GetExceptionPauseInfo() {
771 return (Dart_ExceptionPauseInfo)exc_pause_info_;
772 }
773
774
770 // TODO(hausner): Determine whether the exception is handled or not. 775 // TODO(hausner): Determine whether the exception is handled or not.
771 bool Debugger::ShouldPauseOnException(DebuggerStackTrace* stack_trace, 776 bool Debugger::ShouldPauseOnException(DebuggerStackTrace* stack_trace,
772 const Object& exc) { 777 const Object& exc) {
773 if (exc_pause_info_ == kNoPauseOnExceptions) { 778 if (exc_pause_info_ == kNoPauseOnExceptions) {
774 return false; 779 return false;
775 } 780 }
776 if ((exc_pause_info_ & kPauseOnAllExceptions) != 0) { 781 if ((exc_pause_info_ & kPauseOnAllExceptions) != 0) {
777 return true; 782 return true;
778 } 783 }
779 // Assume TypeError and AssertionError exceptions are unhandled. 784 // Assume TypeError and AssertionError exceptions are unhandled.
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 } 1571 }
1567 1572
1568 1573
1569 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 1574 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
1570 ASSERT(bpt->next() == NULL); 1575 ASSERT(bpt->next() == NULL);
1571 bpt->set_next(code_breakpoints_); 1576 bpt->set_next(code_breakpoints_);
1572 code_breakpoints_ = bpt; 1577 code_breakpoints_ = bpt;
1573 } 1578 }
1574 1579
1575 } // namespace dart 1580 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698