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

Side by Side Diff: tools/ddbg.dart

Issue 12518014: Fixed command-line debugger to use new IO API. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | 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 // Simple interactive debugger shell that connects to the Dart VM's debugger 5 // Simple interactive debugger shell that connects to the Dart VM's debugger
6 // connection port. 6 // connection port.
7 7
8 import "dart:io"; 8 import "dart:io";
9 import "dart:json" as json; 9 import "dart:json" as json;
10 import "dart:utf"; 10 import "dart:utf";
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 64
65 Future sendCmd(Map<String, dynamic> cmd) { 65 Future sendCmd(Map<String, dynamic> cmd) {
66 var completer = new Completer(); 66 var completer = new Completer();
67 int id = cmd["id"]; 67 int id = cmd["id"];
68 outstandingCommands[id] = completer; 68 outstandingCommands[id] = completer;
69 if (verbose) { 69 if (verbose) {
70 print("sending: '${json.stringify(cmd)}'"); 70 print("sending: '${json.stringify(cmd)}'");
71 } 71 }
72 vmSock.addString(json.stringify(cmd)); 72 vmSock.write(json.stringify(cmd));
73 return completer.future; 73 return completer.future;
74 } 74 }
75 75
76 76
77 void processCommand(String cmdLine) { 77 void processCommand(String cmdLine) {
78 seqNum++; 78 seqNum++;
79 var args = cmdLine.split(' '); 79 var args = cmdLine.split(' ');
80 if (args.length == 0) { 80 if (args.length == 0) {
81 return; 81 return;
82 } 82 }
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 process.stdin.close(); 558 process.stdin.close();
559 process.exitCode.then((int exitCode) { 559 process.exitCode.then((int exitCode) {
560 print('${arguments.join(" ")} exited with $exitCode'); 560 print('${arguments.join(" ")} exited with $exitCode');
561 }); 561 });
562 debuggerMain(); 562 debuggerMain();
563 }); 563 });
564 } else { 564 } else {
565 debuggerMain(); 565 debuggerMain();
566 } 566 }
567 } 567 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698