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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 } | 599 } |
600 } | 600 } |
601 | 601 |
602 // Printing routines. When running in "testing" mode, these will print | 602 // Printing routines. When running in "testing" mode, these will print |
603 // messages with relatively stable content (eg, not a line:column format). | 603 // messages with relatively stable content (eg, not a line:column format). |
604 | 604 |
605 String BreakpointToString(Breakpoint breakpoint) { | 605 String BreakpointToString(Breakpoint breakpoint) { |
606 if (printForTesting) return breakpoint.toString(); | 606 if (printForTesting) return breakpoint.toString(); |
607 int id = breakpoint.id; | 607 int id = breakpoint.id; |
608 String name = breakpoint.methodName; | 608 String name = breakpoint.methodName; |
609 String location = breakpoint.location(vmContext.debugState); | 609 String location = breakpoint.locationString(vmContext.debugState); |
610 return "$id: $name @ $location"; | 610 return "$id: $name @ $location"; |
611 } | 611 } |
612 | 612 |
613 void printSetBreakpoint(Breakpoint breakpoint) { | 613 void printSetBreakpoint(Breakpoint breakpoint) { |
614 writeStdout("### set breakpoint "); | 614 writeStdout("### set breakpoint "); |
615 writeStdoutLine(BreakpointToString(breakpoint)); | 615 writeStdoutLine(BreakpointToString(breakpoint)); |
616 } | 616 } |
617 | 617 |
618 void printDeletedBreakpoint(Breakpoint breakpoint) { | 618 void printDeletedBreakpoint(Breakpoint breakpoint) { |
619 writeStdout("### deleted breakpoint "); | 619 writeStdout("### deleted breakpoint "); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 return ''; | 667 return ''; |
668 } else if (response is ProcessTerminated) { | 668 } else if (response is ProcessTerminated) { |
669 return '### process terminated\n'; | 669 return '### process terminated\n'; |
670 | 670 |
671 } else if (response is ConnectionError) { | 671 } else if (response is ConnectionError) { |
672 return '### lost connection to the virtual machine\n'; | 672 return '### lost connection to the virtual machine\n'; |
673 } | 673 } |
674 return ''; | 674 return ''; |
675 } | 675 } |
676 } | 676 } |
OLD | NEW |