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

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

Issue 10447045: Introduce library ids and info in the wire protocol (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 field_name = field.name(); 887 field_name = field.name();
888 field_value = GetStaticField(cls, field_name); 888 field_value = GetStaticField(cls, field_name);
889 field_list.Add(field_name); 889 field_list.Add(field_name);
890 field_list.Add(field_value); 890 field_list.Add(field_value);
891 } 891 }
892 } 892 }
893 return Array::MakeArray(field_list); 893 return Array::MakeArray(field_list);
894 } 894 }
895 895
896 896
897 RawArray* Debugger::GetLibraryFields(const Library& lib) {
898 const GrowableObjectArray& field_list =
899 GrowableObjectArray::Handle(GrowableObjectArray::New(8));
900 DictionaryIterator it(lib);
901 Object& entry = Object::Handle();
902 Field& field = Field::Handle();
903 Class& cls = Class::Handle();
904 String& field_name = String::Handle();
905 Object& field_value = Object::Handle();
906 while (it.HasNext()) {
907 entry = it.GetNext();
908 if (entry.IsField()) {
909 field ^= entry.raw();
910 cls = field.owner();
911 ASSERT(field.is_static());
912 field_name = field.name();
913 field_value = GetStaticField(cls, field_name);
914 field_list.Add(field_name);
915 field_list.Add(field_value);
916 }
917 }
918 return Array::MakeArray(field_list);
919 }
920
921
897 void Debugger::VisitObjectPointers(ObjectPointerVisitor* visitor) { 922 void Debugger::VisitObjectPointers(ObjectPointerVisitor* visitor) {
898 ASSERT(visitor != NULL); 923 ASSERT(visitor != NULL);
899 SourceBreakpoint* bpt = src_breakpoints_; 924 SourceBreakpoint* bpt = src_breakpoints_;
900 while (bpt != NULL) { 925 while (bpt != NULL) {
901 bpt->VisitObjectPointers(visitor); 926 bpt->VisitObjectPointers(visitor);
902 bpt = bpt->next(); 927 bpt = bpt->next();
903 } 928 }
904 CodeBreakpoint* cbpt = code_breakpoints_; 929 CodeBreakpoint* cbpt = code_breakpoints_;
905 while (cbpt != NULL) { 930 while (cbpt != NULL) {
906 cbpt->VisitObjectPointers(visitor); 931 cbpt->VisitObjectPointers(visitor);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 } 1222 }
1198 1223
1199 1224
1200 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 1225 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
1201 ASSERT(bpt->next() == NULL); 1226 ASSERT(bpt->next() == NULL);
1202 bpt->set_next(code_breakpoints_); 1227 bpt->set_next(code_breakpoints_);
1203 code_breakpoints_ = bpt; 1228 code_breakpoints_ = bpt;
1204 } 1229 }
1205 1230
1206 } // namespace dart 1231 } // 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