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

Unified Diff: tools/ddbg.dart

Issue 10414074: Unite processing of all simple commands in command-line debugger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ddbg.dart
diff --git a/tools/ddbg.dart b/tools/ddbg.dart
index 5ca8254d0558ba3824df848836e73a40e29e80e3..80537003bcf9a5877b6673a78f0d761b12680dea 100644
--- a/tools/ddbg.dart
+++ b/tools/ddbg.dart
@@ -68,20 +68,10 @@ void processCommand(String cmdLine) {
return;
}
var command = args[0];
- if (command == "r") {
- var cmd = { "id": seqNum, "command": "resume" };
- sendCmd(cmd).then((result) => handleGenericResponse(result));
- stackTrace = curFrame = null;
- } else if (command == "s") {
- var cmd = { "id": seqNum, "command": "stepOver" };
- sendCmd(cmd).then((result) => handleGenericResponse(result));
- stackTrace = curFrame = null;
- } else if (command == "si") {
- var cmd = { "id": seqNum, "command": "stepInto" };
- sendCmd(cmd).then((result) => handleGenericResponse(result));
- stackTrace = curFrame = null;
- } else if (command == "so") {
- var cmd = { "id": seqNum, "command": "stepOut" };
+ var simple_commands =
+ { 'r':'resume', 's':'stepOver', 'si':'stepInto', 'so':'stepOut'};
+ if (simple_commands[command] != null) {
+ var cmd = { "id": seqNum, "command": simple_commands[command]};
sendCmd(cmd).then((result) => handleGenericResponse(result));
stackTrace = curFrame = null;
} else if (command == "bt") {
« 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