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

Issue 11028040: - Add support to interrupt a running isolate (Closed)

Created:
8 years, 2 months ago by siva
Modified:
8 years, 2 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org, keertip, devoncarew
Visibility:
Public.

Description

- Add support to interrupt a running isolate with the following command: <=== InterruptCmd = "{" RequestId "," command ":" interrupt "," params ":" "{" isolateId ":" Integer "}" "}" ===> InterruptCmdResp = "{" RequestId "}" - Send isolate events over to the debugger client in the following format: ===> "{" event ":" isolate "," params ":" "{" reason ":" created "," id ":" Integer "}" "}" ===> "{" event ":" isolate "," params ":" "{" reason ":" shutdown "," id ":" Integer "}" "}" ===> "{" event ":" paused "," params ":" "{" reason ":" interrupted "," callFrames ":" StackTrace "}" "}" - Added id ";" Integer, to params in all paused events messages - create per isolate debugger message queues, instead of the global static one - Add 'i' command in ddbg to exercise the interrupt feature - Add support for handling isolave event messages in ddbg Committed: https://code.google.com/p/dart/source/detail?r=13333

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -112 lines) Patch
M runtime/bin/dbg_connection.h View 2 chunks +5 lines, -3 lines 0 comments Download
M runtime/bin/dbg_connection.cc View 1 2 5 chunks +35 lines, -27 lines 0 comments Download
M runtime/bin/dbg_message.h View 1 2 4 chunks +75 lines, -27 lines 0 comments Download
M runtime/bin/dbg_message.cc View 1 2 3 4 9 chunks +136 lines, -28 lines 2 comments Download
M runtime/include/dart_debugger_api.h View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M runtime/vm/debugger.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 3 chunks +21 lines, -3 lines 2 comments Download
M runtime/vm/debugger_api_impl.cc View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 2 3 9 chunks +23 lines, -9 lines 0 comments Download
M tools/ddbg.dart View 1 2 3 4 chunks +16 lines, -2 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
siva
8 years, 2 months ago (2012-10-05 01:14:56 UTC) #1
devoncarew
I have a few nomenclature suggestions: What about naming the command "interruptIsolate" instead of "interrupt"? ...
8 years, 2 months ago (2012-10-05 18:05:36 UTC) #2
hausner
LGTM with comments. Please also update the Dart Debugger Wire Protocol document I shared with ...
8 years, 2 months ago (2012-10-05 18:06:34 UTC) #3
siva
8 years, 2 months ago (2012-10-05 22:35:06 UTC) #4
Updated the document.

Regarding using interruptIsolate instead of interrupt I would
prefer to keep the messages small if possible.

We want to club events into categories and hence the isolate
event (with created/shutdown maybe more later) instead of
new IsolateCreated and IsolateShutdown event types. That is
also why interrupt is clubbed into "paused" event.

https://chromiumcodereview.appspot.com/11028040/diff/8014/runtime/bin/dbg_mes...
File runtime/bin/dbg_message.cc (right):

https://chromiumcodereview.appspot.com/11028040/diff/8014/runtime/bin/dbg_mes...
runtime/bin/dbg_message.cc:800: const char* start,
On 2012/10/05 18:06:34, hausner wrote:
> Indentation

Done.

https://chromiumcodereview.appspot.com/11028040/diff/8014/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

https://chromiumcodereview.appspot.com/11028040/diff/8014/runtime/vm/debugger...
runtime/vm/debugger.cc:1355: Isolate* isolate = Isolate::Current();
Good point, this is not a static function so just GetIsolateId() is sufficient.

On 2012/10/05 18:06:34, hausner wrote:
> Why do you need to get the debugger object through the current isolate? We are
> in an instance method, and *this should be the same as
> Isolate::Current()->debugger().
> 
> I see that you made SignalIsolateEvent() a static method, but SignalBpReached
is
> an instance method.

https://chromiumcodereview.appspot.com/11028040/diff/8014/tools/ddbg.dart
File tools/ddbg.dart (right):

https://chromiumcodereview.appspot.com/11028040/diff/8014/tools/ddbg.dart#new...
tools/ddbg.dart:51: i <id> Interrupt execution of given isolate id
Yes, but I haven't added that yet. That is the next
one. Currently I am looking at the event messages being printed and use that to
figure out the isolate ID to use.

On 2012/10/05 18:06:34, hausner wrote:
> Don't you also want/need a command to list isolates?

Powered by Google App Engine
This is Rietveld 408576698