OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import "dart:async"; | 5 import "dart:async"; |
6 | 6 |
7 import "dart:convert" show | 7 import "dart:convert" show |
8 UTF8; | 8 UTF8; |
9 | 9 |
10 import "dart:io" show | 10 import "dart:io" show |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 } | 592 } |
593 } | 593 } |
594 | 594 |
595 // Printing routines. When running in "testing" mode, these will print | 595 // Printing routines. When running in "testing" mode, these will print |
596 // messages with relatively stable content (eg, not a line:column format). | 596 // messages with relatively stable content (eg, not a line:column format). |
597 | 597 |
598 String BreakpointToString(Breakpoint breakpoint) { | 598 String BreakpointToString(Breakpoint breakpoint) { |
599 if (printForTesting) return breakpoint.toString(); | 599 if (printForTesting) return breakpoint.toString(); |
600 int id = breakpoint.id; | 600 int id = breakpoint.id; |
601 String name = breakpoint.methodName; | 601 String name = breakpoint.methodName; |
602 String location = breakpoint.location(vmContext.debugState); | 602 String location = breakpoint.locationString(vmContext.debugState); |
603 return "$id: $name @ $location"; | 603 return "$id: $name @ $location"; |
604 } | 604 } |
605 | 605 |
606 void printSetBreakpoint(Breakpoint breakpoint) { | 606 void printSetBreakpoint(Breakpoint breakpoint) { |
607 writeStdout("### set breakpoint "); | 607 writeStdout("### set breakpoint "); |
608 writeStdoutLine(BreakpointToString(breakpoint)); | 608 writeStdoutLine(BreakpointToString(breakpoint)); |
609 } | 609 } |
610 | 610 |
611 void printDeletedBreakpoint(Breakpoint breakpoint) { | 611 void printDeletedBreakpoint(Breakpoint breakpoint) { |
612 writeStdout("### deleted breakpoint "); | 612 writeStdout("### deleted breakpoint "); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 return ''; | 660 return ''; |
661 } else if (response is ProcessTerminated) { | 661 } else if (response is ProcessTerminated) { |
662 return '### process terminated\n'; | 662 return '### process terminated\n'; |
663 | 663 |
664 } else if (response is ConnectionError) { | 664 } else if (response is ConnectionError) { |
665 return '### lost connection to the virtual machine\n'; | 665 return '### lost connection to the virtual machine\n'; |
666 } | 666 } |
667 return ''; | 667 return ''; |
668 } | 668 } |
669 } | 669 } |
OLD | NEW |