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

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

Issue 254683003: Fix stacktrace crasher bug in the VM and duplicate breakpoint crasher bug. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
« runtime/lib/stacktrace.cc ('K') | « runtime/lib/stacktrace.cc ('k') | no next file » | 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 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 intptr_t line_number; 1725 intptr_t line_number;
1726 script.GetTokenLocation(token_pos, &line_number, NULL); 1726 script.GetTokenLocation(token_pos, &line_number, NULL);
1727 OS::Print("Registering pending breakpoint for " 1727 OS::Print("Registering pending breakpoint for "
1728 "uncompiled function '%s' at line %" Pd "\n", 1728 "uncompiled function '%s' at line %" Pd "\n",
1729 func.ToFullyQualifiedCString(), 1729 func.ToFullyQualifiedCString(),
1730 line_number); 1730 line_number);
1731 } 1731 }
1732 SourceBreakpoint* bpt = GetSourceBreakpoint(script, token_pos); 1732 SourceBreakpoint* bpt = GetSourceBreakpoint(script, token_pos);
1733 if (bpt == NULL) { 1733 if (bpt == NULL) {
1734 bpt = new SourceBreakpoint(nextId(), script, token_pos, last_token_pos); 1734 bpt = new SourceBreakpoint(nextId(), script, token_pos, last_token_pos);
1735 RegisterSourceBreakpoint(bpt);
1735 } 1736 }
1736 RegisterSourceBreakpoint(bpt);
1737 bpt->Enable(); 1737 bpt->Enable();
1738 return bpt; 1738 return bpt;
1739 } 1739 }
1740 1740
1741 1741
1742 // Synchronize the enabled/disabled state of all code breakpoints 1742 // Synchronize the enabled/disabled state of all code breakpoints
1743 // associated with the source breakpoint bpt. 1743 // associated with the source breakpoint bpt.
1744 void Debugger::SyncBreakpoint(SourceBreakpoint* bpt) { 1744 void Debugger::SyncBreakpoint(SourceBreakpoint* bpt) {
1745 CodeBreakpoint* cbpt = code_breakpoints_; 1745 CodeBreakpoint* cbpt = code_breakpoints_;
1746 while (cbpt != NULL) { 1746 while (cbpt != NULL) {
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 } 2448 }
2449 2449
2450 2450
2451 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2451 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2452 ASSERT(bpt->next() == NULL); 2452 ASSERT(bpt->next() == NULL);
2453 bpt->set_next(code_breakpoints_); 2453 bpt->set_next(code_breakpoints_);
2454 code_breakpoints_ = bpt; 2454 code_breakpoints_ = bpt;
2455 } 2455 }
2456 2456
2457 } // namespace dart 2457 } // namespace dart
OLDNEW
« runtime/lib/stacktrace.cc ('K') | « runtime/lib/stacktrace.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698