Chromium Code Reviews| 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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1057 (exc_pause_info_ == kNoPauseOnExceptions)) { | 1057 (exc_pause_info_ == kNoPauseOnExceptions)) { |
| 1058 return; | 1058 return; |
| 1059 } | 1059 } |
| 1060 DebuggerStackTrace* stack_trace = CollectStackTrace(); | 1060 DebuggerStackTrace* stack_trace = CollectStackTrace(); |
| 1061 if (!ShouldPauseOnException(stack_trace, exc)) { | 1061 if (!ShouldPauseOnException(stack_trace, exc)) { |
| 1062 return; | 1062 return; |
| 1063 } | 1063 } |
| 1064 ASSERT(stack_trace_ == NULL); | 1064 ASSERT(stack_trace_ == NULL); |
| 1065 stack_trace_ = stack_trace; | 1065 stack_trace_ = stack_trace; |
| 1066 ASSERT(obj_cache_ == NULL); | 1066 ASSERT(obj_cache_ == NULL); |
| 1067 in_event_notification_ = true; | |
| 1067 obj_cache_ = new RemoteObjectCache(64); | 1068 obj_cache_ = new RemoteObjectCache(64); |
| 1068 DebuggerEvent event; | 1069 DebuggerEvent event; |
| 1069 event.type = kExceptionThrown; | 1070 event.type = kExceptionThrown; |
| 1070 event.exception = &exc; | 1071 event.exception = &exc; |
| 1071 (*event_handler_)(&event); | 1072 (*event_handler_)(&event); |
|
Ivan Posva
2013/08/09 16:31:34
I think we should abstract the dispatch to the eve
| |
| 1073 in_event_notification_ = false; | |
| 1072 stack_trace_ = NULL; | 1074 stack_trace_ = NULL; |
| 1073 obj_cache_ = NULL; // Remote object cache is zone allocated. | 1075 obj_cache_ = NULL; // Remote object cache is zone allocated. |
| 1074 } | 1076 } |
| 1075 | 1077 |
| 1076 | 1078 |
| 1077 // Given a function and a token position range, return the best fit | 1079 // Given a function and a token position range, return the best fit |
| 1078 // token position to set a breakpoint. | 1080 // token position to set a breakpoint. |
| 1079 // If multiple possible breakpoint positions are within the given range, | 1081 // If multiple possible breakpoint positions are within the given range, |
| 1080 // the one with the lowest machine code address is picked. | 1082 // the one with the lowest machine code address is picked. |
| 1081 // If no possible breakpoint location exists in the given range, the closest | 1083 // If no possible breakpoint location exists in the given range, the closest |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1863 } | 1865 } |
| 1864 | 1866 |
| 1865 | 1867 |
| 1866 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1868 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1867 ASSERT(bpt->next() == NULL); | 1869 ASSERT(bpt->next() == NULL); |
| 1868 bpt->set_next(code_breakpoints_); | 1870 bpt->set_next(code_breakpoints_); |
| 1869 code_breakpoints_ = bpt; | 1871 code_breakpoints_ = bpt; |
| 1870 } | 1872 } |
| 1871 | 1873 |
| 1872 } // namespace dart | 1874 } // namespace dart |
| OLD | NEW |