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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 if (in_event_notification_) return; | 1588 if (in_event_notification_) return; |
1589 | 1589 |
1590 // Check whether we are in a Dart function that the user is | 1590 // Check whether we are in a Dart function that the user is |
1591 // interested in. | 1591 // interested in. |
1592 ActivationFrame* frame = TopDartFrame(); | 1592 ActivationFrame* frame = TopDartFrame(); |
1593 ASSERT(frame != NULL); | 1593 ASSERT(frame != NULL); |
1594 const Function& func = frame->function(); | 1594 const Function& func = frame->function(); |
1595 if (!IsDebuggable(func)) { | 1595 if (!IsDebuggable(func)) { |
1596 return; | 1596 return; |
1597 } | 1597 } |
| 1598 if (frame->TokenPos() == Scanner::kDummyTokenIndex) { |
| 1599 return; |
| 1600 } |
1598 | 1601 |
1599 if (FLAG_verbose_debug) { | 1602 if (FLAG_verbose_debug) { |
1600 OS::Print(">>> single step break at %s:%" Pd " (func %s token %" Pd ")\n", | 1603 OS::Print(">>> single step break at %s:%" Pd " (func %s token %" Pd ")\n", |
1601 String::Handle(frame->SourceUrl()).ToCString(), | 1604 String::Handle(frame->SourceUrl()).ToCString(), |
1602 frame->LineNumber(), | 1605 frame->LineNumber(), |
1603 String::Handle(frame->QualifiedFunctionName()).ToCString(), | 1606 String::Handle(frame->QualifiedFunctionName()).ToCString(), |
1604 frame->TokenPos()); | 1607 frame->TokenPos()); |
1605 } | 1608 } |
1606 | 1609 |
1607 stack_trace_ = CollectStackTrace(); | 1610 stack_trace_ = CollectStackTrace(); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 } | 1877 } |
1875 | 1878 |
1876 | 1879 |
1877 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1880 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
1878 ASSERT(bpt->next() == NULL); | 1881 ASSERT(bpt->next() == NULL); |
1879 bpt->set_next(code_breakpoints_); | 1882 bpt->set_next(code_breakpoints_); |
1880 code_breakpoints_ = bpt; | 1883 code_breakpoints_ = bpt; |
1881 } | 1884 } |
1882 | 1885 |
1883 } // namespace dart | 1886 } // namespace dart |
OLD | NEW |