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 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 } | 1171 } |
1172 source_bpt = new SourceBreakpoint(nextId(), target_function, breakpoint_pos); | 1172 source_bpt = new SourceBreakpoint(nextId(), target_function, breakpoint_pos); |
1173 RegisterSourceBreakpoint(source_bpt); | 1173 RegisterSourceBreakpoint(source_bpt); |
1174 if (target_function.HasCode()) { | 1174 if (target_function.HasCode()) { |
1175 MakeCodeBreakpointsAt(target_function, breakpoint_pos, source_bpt); | 1175 MakeCodeBreakpointsAt(target_function, breakpoint_pos, source_bpt); |
1176 } | 1176 } |
1177 if (!closure.IsNull() && closure.HasCode()) { | 1177 if (!closure.IsNull() && closure.HasCode()) { |
1178 MakeCodeBreakpointsAt(closure, breakpoint_pos, source_bpt); | 1178 MakeCodeBreakpointsAt(closure, breakpoint_pos, source_bpt); |
1179 } | 1179 } |
1180 source_bpt->Enable(); | 1180 source_bpt->Enable(); |
| 1181 SignalBpResolved(source_bpt); |
1181 return source_bpt; | 1182 return source_bpt; |
1182 } | 1183 } |
1183 | 1184 |
1184 | 1185 |
1185 // Synchronize the enabled/disabled state of all code breakpoints | 1186 // Synchronize the enabled/disabled state of all code breakpoints |
1186 // associated with the source breakpoint bpt. | 1187 // associated with the source breakpoint bpt. |
1187 void Debugger::SyncBreakpoint(SourceBreakpoint* bpt) { | 1188 void Debugger::SyncBreakpoint(SourceBreakpoint* bpt) { |
1188 CodeBreakpoint* cbpt = code_breakpoints_; | 1189 CodeBreakpoint* cbpt = code_breakpoints_; |
1189 while (cbpt != NULL) { | 1190 while (cbpt != NULL) { |
1190 if (bpt == cbpt->src_bpt()) { | 1191 if (bpt == cbpt->src_bpt()) { |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 } | 1836 } |
1836 | 1837 |
1837 | 1838 |
1838 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1839 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
1839 ASSERT(bpt->next() == NULL); | 1840 ASSERT(bpt->next() == NULL); |
1840 bpt->set_next(code_breakpoints_); | 1841 bpt->set_next(code_breakpoints_); |
1841 code_breakpoints_ = bpt; | 1842 code_breakpoints_ = bpt; |
1842 } | 1843 } |
1843 | 1844 |
1844 } // namespace dart | 1845 } // namespace dart |
OLD | NEW |