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

Issue 99963004: Rework how we run/kill scripts and how we quit in ddbg. (Closed)

Created:
7 years ago by turnidge
Modified:
7 years ago
Reviewers:
hausner
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Rework how we run/kill scripts and how we quit in ddbg. ------------- Details: Add a new Command class to ddbg and begin using it to implement command dispatching, help, and completion. I hope to migrate all the commands to this pattern. Since command dispatch now accepts command prefixes (e.g. 'q' for 'quit') I now use slightly longer command names. The debugged program no longer starts automatically. It can now be started and stopped with the run/kill commands. The set/show commands are added which provide a general way to modify/query debugger settings. For example, this can be used to change the arguments passed to the debugged script or its vm (e.g. 'set vmargs --myvmarg'). 'q' -> 'quit' 'h' -> 'help'. Also added command help, e.g. 'help run', 'help help'. This is only implemented for the new commands so far. Commando now exports a Stream instead of taking a command handler. This makes it simpler to add error/done handlers for Commando. Reworking ddbg quitting. When the debugged process quits, the debugger no longer quits. When the user quits, try to kill the debugged process, shut down the debugger connection, and shut down commando. When we get an unexpected error in Commando, try to handle it better. Whenever we quit, try to restore echomode/linemode. Add a retry "loop" to handle the case where the debugged process takes a bit to open its debug port. This tends to happen a lot on the second 'run' for some reason. R=hausner@google.com Committed: https://code.google.com/p/dart/source/detail?r=30871

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+631 lines, -148 lines) Patch
M tools/ddbg.dart View 1 2 3 4 5 6 16 chunks +587 lines, -124 lines 0 comments Download
M tools/ddbg/lib/commando.dart View 1 2 8 chunks +44 lines, -24 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
turnidge
7 years ago (2013-12-03 23:30:16 UTC) #1
hausner
LGTM with comments. Futures and streams are causing headaches when trying to understand a program. ...
7 years ago (2013-12-04 00:26:35 UTC) #2
turnidge
I've added two new commands, 'connect' and 'disconnect' which could stand another look. https://codereview.chromium.org/99963004/diff/40001/tools/ddbg.dart File ...
7 years ago (2013-12-04 19:35:20 UTC) #3
turnidge
Committed patchset #7 manually as r30871 (presubmit successful).
7 years ago (2013-12-04 21:21:38 UTC) #4
hausner
7 years ago (2013-12-04 23:48:20 UTC) #5
Message was sent while issue was closed.
Still LGTM. Thanks for the improvements in functionality and readability.

Powered by Google App Engine
This is Rietveld 408576698