diff options
author | 2018-06-29 14:17:53 -0700 | |
---|---|---|
committer | 2018-06-29 14:19:23 -0700 | |
commit | 7ba40ccf3c63dccd13f15a0587005e8f413c6cd7 (patch) | |
tree | a7e1e6002daa3427709dc1bbc43b8ea59e669315 /src/main/java/com/google/devtools/build/lib/skylarkdebug/proto | |
parent | 38fbbf20419ce76152a1c3d024a5fedfef47403a (diff) |
Debug server: retrieve nested frame bindings tree lazily.
TYPE_CHANGE_OK=Proto hasn't yet been used
PiperOrigin-RevId: 202705882
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skylarkdebug/proto')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto | 31 |
1 files changed, 28 insertions, 3 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 cc0de17909..a3df9e4291 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 { ListFramesRequest list_frames = 104; StartDebuggingRequest start_debugging = 105; PauseThreadRequest pause_thread = 106; + GetChildrenRequest get_children = 107; } } @@ -98,6 +99,19 @@ message PauseThreadRequest { int64 thread_id = 1; } +// A request to list the children of a previously-communicated Value, such as +// its elements (for a list or dictionary), its fields (for a struct), and so +// forth. +message GetChildrenRequest { + // The identifier of the relevant thread. + int64 thread_id = 1; + + // The identifier of the value for which children are being requested. If the + // value has no children, an empty list will be returned in + // GetChildrenResponse. + int64 value_id = 2; +} + // 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 @@ -118,6 +132,7 @@ message DebugEvent { ListFramesResponse list_frames = 104; StartDebuggingResponse start_debugging = 105; PauseThreadResponse pause_thread = 106; + GetChildrenResponse get_children = 107; ThreadPausedEvent thread_paused = 1001; ThreadContinuedEvent thread_continued = 1002; @@ -162,6 +177,11 @@ message StartDebuggingResponse { message PauseThreadResponse { } +// The response to a GetChildrenRequest. +message GetChildrenResponse { + repeated Value children = 1; +} + // An event indicating that a thread was paused during execution. message ThreadPausedEvent { // The thread that was paused. @@ -307,7 +327,12 @@ message Value { // themselves do not have a meaningful type with respect to our rendering. string type = 3; - // Any child values associated with this value, such as its elements (for a - // list or dictionary), its fields (for a struct), and so forth. - repeated Value child = 4; + // Will be false if the value is known to have no children. May sometimes be + // true if this isn't yet known, in which case GetChildrenResponse#children + // will be empty. + bool has_children = 4; + + // An identifier for this value, used to request its children. The same value + // may be known by multiple ids. Not set for values without children. + int64 id = 5; } |