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

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

Issue 867113003: Revert r43217, r43215, r43208, r43207, and r43202. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/dart_api_impl_test.cc ('k') | runtime/vm/isolate.h » ('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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 latent_breakpoints_ = latent_breakpoints_->next(); 1059 latent_breakpoints_ = latent_breakpoints_->next();
1060 delete bpt; 1060 delete bpt;
1061 } 1061 }
1062 while (code_breakpoints_ != NULL) { 1062 while (code_breakpoints_ != NULL) {
1063 CodeBreakpoint* bpt = code_breakpoints_; 1063 CodeBreakpoint* bpt = code_breakpoints_;
1064 code_breakpoints_ = code_breakpoints_->next(); 1064 code_breakpoints_ = code_breakpoints_->next();
1065 bpt->Disable(); 1065 bpt->Disable();
1066 delete bpt; 1066 delete bpt;
1067 } 1067 }
1068 // Signal isolate shutdown event. 1068 // Signal isolate shutdown event.
1069 if (!Service::IsServiceIsolate(isolate_)) { 1069 SignalIsolateEvent(DebuggerEvent::kIsolateShutdown);
1070 SignalIsolateEvent(DebuggerEvent::kIsolateShutdown);
1071 }
1072 } 1070 }
1073 1071
1074 1072
1075 static RawFunction* ResolveLibraryFunction( 1073 static RawFunction* ResolveLibraryFunction(
1076 const Library& library, 1074 const Library& library,
1077 const String& fname) { 1075 const String& fname) {
1078 ASSERT(!library.IsNull()); 1076 ASSERT(!library.IsNull());
1079 const Object& object = Object::Handle(library.ResolveName(fname)); 1077 const Object& object = Object::Handle(library.ResolveName(fname));
1080 if (!object.IsNull() && object.IsFunction()) { 1078 if (!object.IsNull() && object.IsFunction()) {
1081 return Function::Cast(object).raw(); 1079 return Function::Cast(object).raw();
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 RemoveInternalBreakpoints(); 2247 RemoveInternalBreakpoints();
2250 } 2248 }
2251 } 2249 }
2252 2250
2253 2251
2254 void Debugger::Initialize(Isolate* isolate) { 2252 void Debugger::Initialize(Isolate* isolate) {
2255 if (initialized_) { 2253 if (initialized_) {
2256 return; 2254 return;
2257 } 2255 }
2258 isolate_ = isolate; 2256 isolate_ = isolate;
2259
2260 // Use the isolate's control port as the isolate_id for debugging. 2257 // Use the isolate's control port as the isolate_id for debugging.
2261 // This port will be used as a unique ID to represent the isolate in the 2258 // This port will be used as a unique ID to represet the isolate in the
2262 // debugger wire protocol messages. 2259 // debugger wire protocol messages.
2263 isolate_id_ = isolate->main_port(); 2260 isolate_id_ = isolate->main_port();
2264 initialized_ = true; 2261 initialized_ = true;
2265 } 2262 }
2266 2263
2267 2264
2268 void Debugger::NotifyIsolateCreated() { 2265 void Debugger::NotifyIsolateCreated() {
2269 // Signal isolate creation event. 2266 // Signal isolate creation event.
2270 if (!Service::IsServiceIsolate(isolate_)) { 2267 SignalIsolateEvent(DebuggerEvent::kIsolateCreated);
2271 SignalIsolateEvent(DebuggerEvent::kIsolateCreated);
2272 }
2273 } 2268 }
2274 2269
2275 2270
2276 // Return innermost closure contained in 'function' that contains 2271 // Return innermost closure contained in 'function' that contains
2277 // the given token position. 2272 // the given token position.
2278 RawFunction* Debugger::FindInnermostClosure(const Function& function, 2273 RawFunction* Debugger::FindInnermostClosure(const Function& function,
2279 intptr_t token_pos) { 2274 intptr_t token_pos) {
2280 const Class& owner = Class::Handle(isolate_, function.Owner()); 2275 const Class& owner = Class::Handle(isolate_, function.Owner());
2281 if (owner.closures() == GrowableObjectArray::null()) { 2276 if (owner.closures() == GrowableObjectArray::null()) {
2282 return Function::null(); 2277 return Function::null();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2629 } 2624 }
2630 2625
2631 2626
2632 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2627 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2633 ASSERT(bpt->next() == NULL); 2628 ASSERT(bpt->next() == NULL);
2634 bpt->set_next(code_breakpoints_); 2629 bpt->set_next(code_breakpoints_);
2635 code_breakpoints_ = bpt; 2630 code_breakpoints_ = bpt;
2636 } 2631 }
2637 2632
2638 } // namespace dart 2633 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698