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

Unified Diff: tools/ddbg.dart

Issue 13533016: Add line table command to debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ddbg.dart
===================================================================
--- tools/ddbg.dart (revision 21008)
+++ tools/ddbg.dart (working copy)
@@ -48,6 +48,7 @@
pg <id> Print all global variables visible within given library id
ls <lib_id> List loaded scripts in library
gs <lib_id> <script_url> Get source text of script in library
+ tok <lib_id> <script_url> Get line and token table of script in library
epi <none|all|unhandled> Set exception pause info
i <id> Interrupt execution of given isolate id
h Print help
@@ -181,6 +182,13 @@
"libraryId": int.parse(args[1]),
"url": args[2] } };
sendCmd(cmd).then((result) => handleGetSourceResponse(result));
+ } else if (command == "tok" && args.length == 3) {
+ var cmd = { "id": seqNum,
+ "command": "getLineNumberTable",
+ "params": { "isolateId" : isolate_id,
+ "libraryId": int.parse(args[1]),
+ "url": args[2] } };
+ sendCmd(cmd).then((result) => handleGetLineTableResponse(result));
} else if (command == "epi" && args.length == 2) {
var cmd = { "id": seqNum,
"command": "setPauseOnException",
@@ -324,6 +332,13 @@
}
+handleGetLineTableResponse(response) {
+ Map result = response["result"];
+ var info = result["lines"];
+ print("Line info table:\n$info");
+}
+
+
void handleGetLibraryResponse(response) {
Map result = response["result"];
List libs = result["libraries"];
@@ -391,7 +406,7 @@
void handlePausedEvent(msg) {
assert(msg["params"] != null);
var reason = msg["params"]["reason"];
- isolate_id = msg["params"]["id"];
+ isolate_id = msg["params"]["isolateId"];
stackTrace = msg["params"]["callFrames"];
assert(stackTrace != null);
assert(stackTrace.length >= 1);
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698