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

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

Issue 192443004: Complete the switch to ServiceObject (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 len++; // String terminator. 705 len++; // String terminator.
706 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 706 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
707 OS::SNPrint(chars, len, kFormat, func_name, url.ToCString(), line); 707 OS::SNPrint(chars, len, kFormat, func_name, url.ToCString(), line);
708 return chars; 708 return chars;
709 } 709 }
710 710
711 711
712 void ActivationFrame::PrintToJSONObject(JSONObject* jsobj) { 712 void ActivationFrame::PrintToJSONObject(JSONObject* jsobj) {
713 intptr_t line = LineNumber(); 713 intptr_t line = LineNumber();
714 const Script& script = Script::Handle(SourceScript()); 714 const Script& script = Script::Handle(SourceScript());
715 715 // TODO(johnmccutchan): Can we return a reference to a specific frame?
716 jsobj->AddProperty("id", "stacktrace");
717 jsobj->AddProperty("type", "StackFrame");
turnidge 2014/03/10 21:03:28 Why are you adding an id/type to the frame?
716 jsobj->AddProperty("script", script); 718 jsobj->AddProperty("script", script);
717 jsobj->AddProperty("line", line); 719 jsobj->AddProperty("line", line);
718 jsobj->AddProperty("col", ColumnNumber()); 720 jsobj->AddProperty("col", ColumnNumber());
719 jsobj->AddProperty("function", function()); 721 jsobj->AddProperty("function", function());
720 jsobj->AddProperty("code", code()); 722 jsobj->AddProperty("code", code());
721 723
722 // TODO(turnidge): Consider dropping lineString from the frame. 724 // TODO(turnidge): Consider dropping lineString from the frame.
723 String& line_string = String::Handle(script.GetLine(line)); 725 String& line_string = String::Handle(script.GetLine(line));
724 jsobj->AddProperty("lineString", line_string.ToCString()); 726 jsobj->AddProperty("lineString", line_string.ToCString());
725 { 727 {
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 } 2323 }
2322 2324
2323 2325
2324 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2326 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2325 ASSERT(bpt->next() == NULL); 2327 ASSERT(bpt->next() == NULL);
2326 bpt->set_next(code_breakpoints_); 2328 bpt->set_next(code_breakpoints_);
2327 code_breakpoints_ = bpt; 2329 code_breakpoints_ = bpt;
2328 } 2330 }
2329 2331
2330 } // namespace dart 2332 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698