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

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

Issue 13940008: Add library id, location info to breakpointResolved event (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« 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 "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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 Isolate::Current()->debugger()->SyncBreakpoint(this); 73 Isolate::Current()->debugger()->SyncBreakpoint(this);
74 } 74 }
75 75
76 76
77 RawScript* SourceBreakpoint::SourceCode() { 77 RawScript* SourceBreakpoint::SourceCode() {
78 const Function& func = Function::Handle(function_); 78 const Function& func = Function::Handle(function_);
79 return func.script(); 79 return func.script();
80 } 80 }
81 81
82 82
83 void SourceBreakpoint::GetCodeLocation(
84 Library* lib,
85 Script* script,
86 intptr_t* pos) {
87 const Function& func = Function::Handle(function_);
88 const Class& cls = Class::Handle(func.origin());
89 *lib = cls.library();
90 *script = func.script();
91 *pos = token_pos();
92 }
93
94
83 RawString* SourceBreakpoint::SourceUrl() { 95 RawString* SourceBreakpoint::SourceUrl() {
84 const Script& script = Script::Handle(SourceCode()); 96 const Script& script = Script::Handle(SourceCode());
85 return script.url(); 97 return script.url();
86 } 98 }
87 99
88 100
89 intptr_t SourceBreakpoint::LineNumber() { 101 intptr_t SourceBreakpoint::LineNumber() {
90 // Compute line number lazily since it causes scanning of the script. 102 // Compute line number lazily since it causes scanning of the script.
91 if (line_number_ < 0) { 103 if (line_number_ < 0) {
92 const Script& script = Script::Handle(SourceCode()); 104 const Script& script = Script::Handle(SourceCode());
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 } 1745 }
1734 1746
1735 1747
1736 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 1748 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
1737 ASSERT(bpt->next() == NULL); 1749 ASSERT(bpt->next() == NULL);
1738 bpt->set_next(code_breakpoints_); 1750 bpt->set_next(code_breakpoints_);
1739 code_breakpoints_ = bpt; 1751 code_breakpoints_ = bpt;
1740 } 1752 }
1741 1753
1742 } // namespace dart 1754 } // 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