diff options
author | 2018-05-07 07:01:51 -0700 | |
---|---|---|
committer | 2018-05-07 07:02:54 -0700 | |
commit | d1d742dfc4360731be2ecdd69511716414abcf8f (patch) | |
tree | 029718504e7e853fdd2af66bc7f81e400da67027 /src/main/java/com/google/devtools | |
parent | 30d877ab145e45cdba725decc5a4967492f19c43 (diff) |
Skylark debugging proto: add a 'pause thread' request/response.
To handle a common debugging workflow where you want to pause
execution of one/all threads.
PiperOrigin-RevId: 195657472
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto b/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto index e9bd422ac8..804319397a 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto +++ b/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto @@ -35,6 +35,7 @@ message DebugRequest { EvaluateRequest evaluate = 103; ListFramesRequest list_frames = 104; StartDebuggingRequest start_debugging = 105; + PauseThreadRequest pause_thread = 106; } } @@ -84,6 +85,15 @@ message ListFramesRequest { message StartDebuggingRequest { } +// A request to pause execution of a thread, or all threads. +message PauseThreadRequest { + // The identifier of the thread to be paused. + // + // If not set (i.e. zero), all current and future Skylark threads will be + // paused until resumed via a ContinueExecutionRequest. + int64 thread_id = 1; +} + // There are two kinds of events: "responses", which correspond to a // DebugRequest sent by the client, and other asynchronous events that may be // sent by the server to notify the client of activity in the Skylark code being @@ -104,6 +114,7 @@ message DebugEvent { EvaluateResponse evaluate = 103; ListFramesResponse list_frames = 104; StartDebuggingResponse start_debugging = 105; + PauseThreadResponse pause_thread = 106; ThreadStartedEvent thread_started = 1000; ThreadEndedEvent thread_ended = 1001; @@ -150,6 +161,12 @@ message ListFramesResponse { message StartDebuggingResponse { } +// The response to a PauseThreadRequest. This is an acknowledgement that the +// request was received. Actual pausing of individual threads happens +// asynchronously, and will be communicated via ThreadPausedEvent(s). +message PauseThreadResponse { +} + // An event indicating that a thread has begun executing Skylark code. message ThreadStartedEvent { // The thread that began. |