Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 75 | <h1><a href="clouddebugger_v2.html">Cloud Debugger API</a> . <a href="clouddebugger_v2.debugger.html">debugger</a> . <a href="clouddebugger_v2.debugger.debuggees.html">debuggees</a> . <a href="clouddebugger_v2.debugger.debuggees.breakpoints.html">breakpoints</a></h1> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 78 | <code><a href="#delete">delete(debuggeeId, breakpointId, clientVersion=None, x__xgafv=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 79 | <p class="firstline">Deletes the breakpoint from the debuggee.</p> |
| 80 | <p class="toc_element"> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 81 | <code><a href="#get">get(debuggeeId, breakpointId, clientVersion=None, x__xgafv=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 82 | <p class="firstline">Gets breakpoint information.</p> |
| 83 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 84 | <code><a href="#list">list(debuggeeId, waitToken=None, clientVersion=None, action_value=None, includeInactive=None, includeAllUsers=None, stripResults=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Lists all breakpoints for the debuggee.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 86 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 87 | <code><a href="#set">set(debuggeeId, body=None, canaryOption=None, clientVersion=None, x__xgafv=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 88 | <p class="firstline">Sets the breakpoint to the debuggee.</p> |
| 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 91 | <code class="details" id="delete">delete(debuggeeId, breakpointId, clientVersion=None, x__xgafv=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 92 | <pre>Deletes the breakpoint from the debuggee. |
| 93 | |
| 94 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 95 | debuggeeId: string, Required. ID of the debuggee whose breakpoint to delete. (required) |
| 96 | breakpointId: string, Required. ID of the breakpoint to delete. (required) |
| 97 | clientVersion: string, Required. The client version making the call. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 98 | Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 99 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 100 | Allowed values |
| 101 | 1 - v1 error format |
| 102 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 103 | |
| 104 | Returns: |
| 105 | An object of the form: |
| 106 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 107 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 108 | # empty messages in your APIs. A typical example is to use it as the request |
| 109 | # or the response type of an API method. For instance: |
| 110 | # |
| 111 | # service Foo { |
| 112 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 113 | # } |
| 114 | # |
| 115 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 116 | }</pre> |
| 117 | </div> |
| 118 | |
| 119 | <div class="method"> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 120 | <code class="details" id="get">get(debuggeeId, breakpointId, clientVersion=None, x__xgafv=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 121 | <pre>Gets breakpoint information. |
| 122 | |
| 123 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 124 | debuggeeId: string, Required. ID of the debuggee whose breakpoint to get. (required) |
| 125 | breakpointId: string, Required. ID of the breakpoint to get. (required) |
| 126 | clientVersion: string, Required. The client version making the call. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 127 | Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 128 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 129 | Allowed values |
| 130 | 1 - v1 error format |
| 131 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 132 | |
| 133 | Returns: |
| 134 | An object of the form: |
| 135 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 136 | { # Response for getting breakpoint information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 137 | "breakpoint": { # ------------------------------------------------------------------------------ # Complete breakpoint state. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 138 | # The fields `id` and `location` are guaranteed to be set. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 139 | # ## Breakpoint (the resource) |
| 140 | # |
| 141 | # Represents the breakpoint specification, status and results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 142 | "canaryExpireTime": "A String", # The deadline for the breakpoint to stay in CANARY_ACTIVE state. The value |
| 143 | # is meaningless when the breakpoint is not in CANARY_ACTIVE state. |
| 144 | "status": { # Represents a contextual status message. # Breakpoint status. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 145 | # |
| 146 | # The status includes an error flag and a human readable message. |
| 147 | # This field is usually unset. The message can be either |
| 148 | # informational or an error message. Regardless, clients should always |
| 149 | # display the text message back to the user. |
| 150 | # |
| 151 | # Error status indicates complete failure of the breakpoint. |
| 152 | # |
| 153 | # Example (non-final state): `Still loading symbols...` |
| 154 | # |
| 155 | # Examples (final state): |
| 156 | # |
| 157 | # * `Invalid line number` referring to location |
| 158 | # * `Field f not found in class C` referring to condition |
| 159 | # The message can indicate an error or informational status, and refer to |
| 160 | # specific parts of the containing object. |
| 161 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 162 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 163 | "isError": True or False, # Distinguishes errors from informational messages. |
| 164 | "description": { # Represents a message with parameters. # Status message text. |
| 165 | "parameters": [ # Optional parameters to be embedded into the message. |
| 166 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 167 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 168 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 169 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 170 | # character. |
| 171 | # |
| 172 | # Examples: |
| 173 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 174 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 175 | # is loaded. Again, $0 is very important.` |
| 176 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 177 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 178 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 179 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 180 | "state": "A String", # The current state of the breakpoint. |
| 181 | "userEmail": "A String", # E-mail address of the user that created this breakpoint |
| 182 | "action": "A String", # Action that the agent should perform when the code at the |
| 183 | # breakpoint location is hit. |
| 184 | "logLevel": "A String", # Indicates the severity of the log. Only relevant when action is `LOG`. |
| 185 | "id": "A String", # Breakpoint identifier, unique in the scope of the debuggee. |
| 186 | "location": { # Represents a location in the source code. # Breakpoint source location. |
| 187 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 188 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 189 | # Agents that do not support setting breakpoints on specific columns ignore |
| 190 | # this field. |
| 191 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 192 | }, |
| 193 | "finalTime": "A String", # Time this breakpoint was finalized as seen by the server in seconds |
| 194 | # resolution. |
| 195 | "variableTable": [ # The `variable_table` exists to aid with computation, memory and network |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 196 | # traffic optimization. It enables storing a variable once and reference |
| 197 | # it from multiple variables, including variables stored in the |
| 198 | # `variable_table` itself. |
| 199 | # For example, the same `this` object, which may appear at many levels of |
| 200 | # the stack, can have all of its data stored once in this table. The |
| 201 | # stack frame variables then would hold only a reference to it. |
| 202 | # |
| 203 | # The variable `var_table_index` field is an index into this repeated field. |
| 204 | # The stored objects are nameless and get their name from the referencing |
| 205 | # variable. The effective variable is a merge of the referencing variable |
| 206 | # and the referenced variable. |
| 207 | { # Represents a variable or an argument possibly of a compound object type. |
| 208 | # Note how the following variables are represented: |
| 209 | # |
| 210 | # 1) A simple variable: |
| 211 | # |
| 212 | # int x = 5 |
| 213 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 214 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 215 | # |
| 216 | # 2) A compound object: |
| 217 | # |
| 218 | # struct T { |
| 219 | # int m1; |
| 220 | # int m2; |
| 221 | # }; |
| 222 | # T x = { 3, 7 }; |
| 223 | # |
| 224 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 225 | # name: "x", |
| 226 | # type: "T", |
| 227 | # members { name: "m1", value: "3", type: "int" }, |
| 228 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 229 | # } |
| 230 | # |
| 231 | # 3) A pointer where the pointee was captured: |
| 232 | # |
| 233 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 234 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 235 | # |
| 236 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 237 | # name: "p", |
| 238 | # type: "T*", |
| 239 | # value: "0x00500500", |
| 240 | # members { name: "m1", value: "3", type: "int" }, |
| 241 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 242 | # } |
| 243 | # |
| 244 | # 4) A pointer where the pointee was not captured: |
| 245 | # |
| 246 | # T* p = new T; |
| 247 | # |
| 248 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 249 | # name: "p", |
| 250 | # type: "T*", |
| 251 | # value: "0x00400400" |
| 252 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 253 | # } |
| 254 | # |
| 255 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 256 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 257 | # |
| 258 | # Note that a null pointer should not have members. |
| 259 | # |
| 260 | # 5) An unnamed value: |
| 261 | # |
| 262 | # int* p = new int(7); |
| 263 | # |
| 264 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 265 | # name: "p", |
| 266 | # value: "0x00500500", |
| 267 | # type: "int*", |
| 268 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 269 | # |
| 270 | # 6) An unnamed pointer where the pointee was not captured: |
| 271 | # |
| 272 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 273 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 274 | # |
| 275 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 276 | # name: "pp", |
| 277 | # value: "0x00500500", |
| 278 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 279 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 280 | # value: "0x00400400", |
| 281 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 282 | # status { |
| 283 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 284 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 285 | # } |
| 286 | # } |
| 287 | # } |
| 288 | # |
| 289 | # To optimize computation, memory and network traffic, variables that |
| 290 | # repeat in the output multiple times can be stored once in a shared |
| 291 | # variable table and be referenced using the `var_table_index` field. The |
| 292 | # variables stored in the shared table are nameless and are essentially |
| 293 | # a partition of the complete variable. To reconstruct the complete |
| 294 | # variable, merge the referencing variable with the referenced variable. |
| 295 | # |
| 296 | # When using the shared variable table, the following variables: |
| 297 | # |
| 298 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 299 | # T* p = &x; |
| 300 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 301 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 302 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 303 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 304 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 305 | # |
| 306 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 307 | # members { name: "m1", value: "3", type: "int" }, |
| 308 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 309 | # } |
| 310 | # |
| 311 | # Note that the pointer address is stored with the referencing variable |
| 312 | # and not with the referenced variable. This allows the referenced variable |
| 313 | # to be shared between pointers and references. |
| 314 | # |
| 315 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 316 | "members": [ # Members contained or pointed to by the variable. |
| 317 | # Object with schema name: Variable |
| 318 | ], |
| 319 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 320 | # unset. A status of a single variable only applies to that variable or |
| 321 | # expression. The rest of breakpoint data still remains valid. Variables |
| 322 | # might be reported in error state even when breakpoint is not in final |
| 323 | # state. |
| 324 | # |
| 325 | # The message may refer to variable name with `refers_to` set to |
| 326 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 327 | # In either case variable value and members will be unset. |
| 328 | # |
| 329 | # Example of error message applied to name: `Invalid expression syntax`. |
| 330 | # |
| 331 | # Example of information message applied to value: `Not captured`. |
| 332 | # |
| 333 | # Examples of error message applied to value: |
| 334 | # |
| 335 | # * `Malformed string`, |
| 336 | # * `Field f not found in class C` |
| 337 | # * `Null pointer dereference` |
| 338 | # The message can indicate an error or informational status, and refer to |
| 339 | # specific parts of the containing object. |
| 340 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 341 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 342 | "isError": True or False, # Distinguishes errors from informational messages. |
| 343 | "description": { # Represents a message with parameters. # Status message text. |
| 344 | "parameters": [ # Optional parameters to be embedded into the message. |
| 345 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 346 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 347 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 348 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 349 | # character. |
| 350 | # |
| 351 | # Examples: |
| 352 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 353 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 354 | # is loaded. Again, $0 is very important.` |
| 355 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 356 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 357 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 358 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 359 | "name": "A String", # Name of the variable, if any. |
| 360 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 361 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 362 | # a type is agent specific. It is recommended to include the dynamic type |
| 363 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 364 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 365 | # one variable can reference the same variable in the table. The |
| 366 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 367 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 368 | }, |
| 369 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 370 | "createTime": "A String", # Time this breakpoint was created by the server in seconds resolution. |
| 371 | "logMessageFormat": "A String", # Only relevant when action is `LOG`. Defines the message to log when |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 372 | # the breakpoint hits. The message may include parameter placeholders `$0`, |
| 373 | # `$1`, etc. These placeholders are replaced with the evaluated value |
| 374 | # of the appropriate expression. Expressions not referenced in |
| 375 | # `log_message_format` are not logged. |
| 376 | # |
| 377 | # Example: `Message received, id = $0, count = $1` with |
| 378 | # `expressions` = `[ message.id, message.count ]`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 379 | "labels": { # A set of custom breakpoint properties, populated by the agent, to be |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 380 | # displayed to the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 381 | "a_key": "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 382 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 383 | "expressions": [ # List of read-only expressions to evaluate at the breakpoint location. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 384 | # The expressions are composed using expressions in the programming language |
| 385 | # at the source location. If the breakpoint action is `LOG`, the evaluated |
| 386 | # expressions are included in log statements. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 387 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 388 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 389 | "evaluatedExpressions": [ # Values of evaluated expressions at breakpoint time. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 390 | # The evaluated expressions appear in exactly the same order they |
| 391 | # are listed in the `expressions` field. |
| 392 | # The `name` field holds the original expression text, the `value` or |
| 393 | # `members` field holds the result of the evaluated expression. |
| 394 | # If the expression cannot be evaluated, the `status` inside the `Variable` |
| 395 | # will indicate an error and contain the error text. |
| 396 | { # Represents a variable or an argument possibly of a compound object type. |
| 397 | # Note how the following variables are represented: |
| 398 | # |
| 399 | # 1) A simple variable: |
| 400 | # |
| 401 | # int x = 5 |
| 402 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 403 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 404 | # |
| 405 | # 2) A compound object: |
| 406 | # |
| 407 | # struct T { |
| 408 | # int m1; |
| 409 | # int m2; |
| 410 | # }; |
| 411 | # T x = { 3, 7 }; |
| 412 | # |
| 413 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 414 | # name: "x", |
| 415 | # type: "T", |
| 416 | # members { name: "m1", value: "3", type: "int" }, |
| 417 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 418 | # } |
| 419 | # |
| 420 | # 3) A pointer where the pointee was captured: |
| 421 | # |
| 422 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 423 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 424 | # |
| 425 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 426 | # name: "p", |
| 427 | # type: "T*", |
| 428 | # value: "0x00500500", |
| 429 | # members { name: "m1", value: "3", type: "int" }, |
| 430 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 431 | # } |
| 432 | # |
| 433 | # 4) A pointer where the pointee was not captured: |
| 434 | # |
| 435 | # T* p = new T; |
| 436 | # |
| 437 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 438 | # name: "p", |
| 439 | # type: "T*", |
| 440 | # value: "0x00400400" |
| 441 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 442 | # } |
| 443 | # |
| 444 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 445 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 446 | # |
| 447 | # Note that a null pointer should not have members. |
| 448 | # |
| 449 | # 5) An unnamed value: |
| 450 | # |
| 451 | # int* p = new int(7); |
| 452 | # |
| 453 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 454 | # name: "p", |
| 455 | # value: "0x00500500", |
| 456 | # type: "int*", |
| 457 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 458 | # |
| 459 | # 6) An unnamed pointer where the pointee was not captured: |
| 460 | # |
| 461 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 462 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 463 | # |
| 464 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 465 | # name: "pp", |
| 466 | # value: "0x00500500", |
| 467 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 468 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 469 | # value: "0x00400400", |
| 470 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 471 | # status { |
| 472 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 473 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 474 | # } |
| 475 | # } |
| 476 | # } |
| 477 | # |
| 478 | # To optimize computation, memory and network traffic, variables that |
| 479 | # repeat in the output multiple times can be stored once in a shared |
| 480 | # variable table and be referenced using the `var_table_index` field. The |
| 481 | # variables stored in the shared table are nameless and are essentially |
| 482 | # a partition of the complete variable. To reconstruct the complete |
| 483 | # variable, merge the referencing variable with the referenced variable. |
| 484 | # |
| 485 | # When using the shared variable table, the following variables: |
| 486 | # |
| 487 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 488 | # T* p = &x; |
| 489 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 490 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 491 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 492 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 493 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 494 | # |
| 495 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 496 | # members { name: "m1", value: "3", type: "int" }, |
| 497 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 498 | # } |
| 499 | # |
| 500 | # Note that the pointer address is stored with the referencing variable |
| 501 | # and not with the referenced variable. This allows the referenced variable |
| 502 | # to be shared between pointers and references. |
| 503 | # |
| 504 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 505 | "members": [ # Members contained or pointed to by the variable. |
| 506 | # Object with schema name: Variable |
| 507 | ], |
| 508 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 509 | # unset. A status of a single variable only applies to that variable or |
| 510 | # expression. The rest of breakpoint data still remains valid. Variables |
| 511 | # might be reported in error state even when breakpoint is not in final |
| 512 | # state. |
| 513 | # |
| 514 | # The message may refer to variable name with `refers_to` set to |
| 515 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 516 | # In either case variable value and members will be unset. |
| 517 | # |
| 518 | # Example of error message applied to name: `Invalid expression syntax`. |
| 519 | # |
| 520 | # Example of information message applied to value: `Not captured`. |
| 521 | # |
| 522 | # Examples of error message applied to value: |
| 523 | # |
| 524 | # * `Malformed string`, |
| 525 | # * `Field f not found in class C` |
| 526 | # * `Null pointer dereference` |
| 527 | # The message can indicate an error or informational status, and refer to |
| 528 | # specific parts of the containing object. |
| 529 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 530 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 531 | "isError": True or False, # Distinguishes errors from informational messages. |
| 532 | "description": { # Represents a message with parameters. # Status message text. |
| 533 | "parameters": [ # Optional parameters to be embedded into the message. |
| 534 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 535 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 536 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 537 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 538 | # character. |
| 539 | # |
| 540 | # Examples: |
| 541 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 542 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 543 | # is loaded. Again, $0 is very important.` |
| 544 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 545 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 546 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 547 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 548 | "name": "A String", # Name of the variable, if any. |
| 549 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 550 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 551 | # a type is agent specific. It is recommended to include the dynamic type |
| 552 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 553 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 554 | # one variable can reference the same variable in the table. The |
| 555 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 556 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 557 | }, |
| 558 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 559 | "isFinalState": True or False, # When true, indicates that this is a final result and the |
| 560 | # breakpoint state will not change from here on. |
| 561 | "stackFrames": [ # The stack at breakpoint time, where stack_frames[0] represents the most |
| 562 | # recently entered function. |
| 563 | { # Represents a stack frame context. |
| 564 | "arguments": [ # Set of arguments passed to this function. |
| 565 | # Note that this might not be populated for all stack frames. |
| 566 | { # Represents a variable or an argument possibly of a compound object type. |
| 567 | # Note how the following variables are represented: |
| 568 | # |
| 569 | # 1) A simple variable: |
| 570 | # |
| 571 | # int x = 5 |
| 572 | # |
| 573 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 574 | # |
| 575 | # 2) A compound object: |
| 576 | # |
| 577 | # struct T { |
| 578 | # int m1; |
| 579 | # int m2; |
| 580 | # }; |
| 581 | # T x = { 3, 7 }; |
| 582 | # |
| 583 | # { // Captured variable |
| 584 | # name: "x", |
| 585 | # type: "T", |
| 586 | # members { name: "m1", value: "3", type: "int" }, |
| 587 | # members { name: "m2", value: "7", type: "int" } |
| 588 | # } |
| 589 | # |
| 590 | # 3) A pointer where the pointee was captured: |
| 591 | # |
| 592 | # T x = { 3, 7 }; |
| 593 | # T* p = &x; |
| 594 | # |
| 595 | # { // Captured variable |
| 596 | # name: "p", |
| 597 | # type: "T*", |
| 598 | # value: "0x00500500", |
| 599 | # members { name: "m1", value: "3", type: "int" }, |
| 600 | # members { name: "m2", value: "7", type: "int" } |
| 601 | # } |
| 602 | # |
| 603 | # 4) A pointer where the pointee was not captured: |
| 604 | # |
| 605 | # T* p = new T; |
| 606 | # |
| 607 | # { // Captured variable |
| 608 | # name: "p", |
| 609 | # type: "T*", |
| 610 | # value: "0x00400400" |
| 611 | # status { is_error: true, description { format: "unavailable" } } |
| 612 | # } |
| 613 | # |
| 614 | # The status should describe the reason for the missing value, |
| 615 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 616 | # |
| 617 | # Note that a null pointer should not have members. |
| 618 | # |
| 619 | # 5) An unnamed value: |
| 620 | # |
| 621 | # int* p = new int(7); |
| 622 | # |
| 623 | # { // Captured variable |
| 624 | # name: "p", |
| 625 | # value: "0x00500500", |
| 626 | # type: "int*", |
| 627 | # members { value: "7", type: "int" } } |
| 628 | # |
| 629 | # 6) An unnamed pointer where the pointee was not captured: |
| 630 | # |
| 631 | # int* p = new int(7); |
| 632 | # int** pp = &p; |
| 633 | # |
| 634 | # { // Captured variable |
| 635 | # name: "pp", |
| 636 | # value: "0x00500500", |
| 637 | # type: "int**", |
| 638 | # members { |
| 639 | # value: "0x00400400", |
| 640 | # type: "int*" |
| 641 | # status { |
| 642 | # is_error: true, |
| 643 | # description: { format: "unavailable" } } |
| 644 | # } |
| 645 | # } |
| 646 | # } |
| 647 | # |
| 648 | # To optimize computation, memory and network traffic, variables that |
| 649 | # repeat in the output multiple times can be stored once in a shared |
| 650 | # variable table and be referenced using the `var_table_index` field. The |
| 651 | # variables stored in the shared table are nameless and are essentially |
| 652 | # a partition of the complete variable. To reconstruct the complete |
| 653 | # variable, merge the referencing variable with the referenced variable. |
| 654 | # |
| 655 | # When using the shared variable table, the following variables: |
| 656 | # |
| 657 | # T x = { 3, 7 }; |
| 658 | # T* p = &x; |
| 659 | # T& r = x; |
| 660 | # |
| 661 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 662 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 663 | # { name: "r", type="T&", var_table_index: 3 } |
| 664 | # |
| 665 | # { // Shared variable table entry #3: |
| 666 | # members { name: "m1", value: "3", type: "int" }, |
| 667 | # members { name: "m2", value: "7", type: "int" } |
| 668 | # } |
| 669 | # |
| 670 | # Note that the pointer address is stored with the referencing variable |
| 671 | # and not with the referenced variable. This allows the referenced variable |
| 672 | # to be shared between pointers and references. |
| 673 | # |
| 674 | # The type field is optional. The debugger agent may or may not support it. |
| 675 | "members": [ # Members contained or pointed to by the variable. |
| 676 | # Object with schema name: Variable |
| 677 | ], |
| 678 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 679 | # unset. A status of a single variable only applies to that variable or |
| 680 | # expression. The rest of breakpoint data still remains valid. Variables |
| 681 | # might be reported in error state even when breakpoint is not in final |
| 682 | # state. |
| 683 | # |
| 684 | # The message may refer to variable name with `refers_to` set to |
| 685 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 686 | # In either case variable value and members will be unset. |
| 687 | # |
| 688 | # Example of error message applied to name: `Invalid expression syntax`. |
| 689 | # |
| 690 | # Example of information message applied to value: `Not captured`. |
| 691 | # |
| 692 | # Examples of error message applied to value: |
| 693 | # |
| 694 | # * `Malformed string`, |
| 695 | # * `Field f not found in class C` |
| 696 | # * `Null pointer dereference` |
| 697 | # The message can indicate an error or informational status, and refer to |
| 698 | # specific parts of the containing object. |
| 699 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 700 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 701 | "isError": True or False, # Distinguishes errors from informational messages. |
| 702 | "description": { # Represents a message with parameters. # Status message text. |
| 703 | "parameters": [ # Optional parameters to be embedded into the message. |
| 704 | "A String", |
| 705 | ], |
| 706 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 707 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 708 | # character. |
| 709 | # |
| 710 | # Examples: |
| 711 | # |
| 712 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 713 | # is loaded. Again, $0 is very important.` |
| 714 | # * `Please pay $$10 to use $0 instead of $1.` |
| 715 | }, |
| 716 | "refersTo": "A String", # Reference to which the message applies. |
| 717 | }, |
| 718 | "name": "A String", # Name of the variable, if any. |
| 719 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 720 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 721 | # a type is agent specific. It is recommended to include the dynamic type |
| 722 | # rather than a static type of an object. |
| 723 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 724 | # one variable can reference the same variable in the table. The |
| 725 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 726 | "value": "A String", # Simple value of the variable. |
| 727 | }, |
| 728 | ], |
| 729 | "locals": [ # Set of local variables at the stack frame location. |
| 730 | # Note that this might not be populated for all stack frames. |
| 731 | { # Represents a variable or an argument possibly of a compound object type. |
| 732 | # Note how the following variables are represented: |
| 733 | # |
| 734 | # 1) A simple variable: |
| 735 | # |
| 736 | # int x = 5 |
| 737 | # |
| 738 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 739 | # |
| 740 | # 2) A compound object: |
| 741 | # |
| 742 | # struct T { |
| 743 | # int m1; |
| 744 | # int m2; |
| 745 | # }; |
| 746 | # T x = { 3, 7 }; |
| 747 | # |
| 748 | # { // Captured variable |
| 749 | # name: "x", |
| 750 | # type: "T", |
| 751 | # members { name: "m1", value: "3", type: "int" }, |
| 752 | # members { name: "m2", value: "7", type: "int" } |
| 753 | # } |
| 754 | # |
| 755 | # 3) A pointer where the pointee was captured: |
| 756 | # |
| 757 | # T x = { 3, 7 }; |
| 758 | # T* p = &x; |
| 759 | # |
| 760 | # { // Captured variable |
| 761 | # name: "p", |
| 762 | # type: "T*", |
| 763 | # value: "0x00500500", |
| 764 | # members { name: "m1", value: "3", type: "int" }, |
| 765 | # members { name: "m2", value: "7", type: "int" } |
| 766 | # } |
| 767 | # |
| 768 | # 4) A pointer where the pointee was not captured: |
| 769 | # |
| 770 | # T* p = new T; |
| 771 | # |
| 772 | # { // Captured variable |
| 773 | # name: "p", |
| 774 | # type: "T*", |
| 775 | # value: "0x00400400" |
| 776 | # status { is_error: true, description { format: "unavailable" } } |
| 777 | # } |
| 778 | # |
| 779 | # The status should describe the reason for the missing value, |
| 780 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 781 | # |
| 782 | # Note that a null pointer should not have members. |
| 783 | # |
| 784 | # 5) An unnamed value: |
| 785 | # |
| 786 | # int* p = new int(7); |
| 787 | # |
| 788 | # { // Captured variable |
| 789 | # name: "p", |
| 790 | # value: "0x00500500", |
| 791 | # type: "int*", |
| 792 | # members { value: "7", type: "int" } } |
| 793 | # |
| 794 | # 6) An unnamed pointer where the pointee was not captured: |
| 795 | # |
| 796 | # int* p = new int(7); |
| 797 | # int** pp = &p; |
| 798 | # |
| 799 | # { // Captured variable |
| 800 | # name: "pp", |
| 801 | # value: "0x00500500", |
| 802 | # type: "int**", |
| 803 | # members { |
| 804 | # value: "0x00400400", |
| 805 | # type: "int*" |
| 806 | # status { |
| 807 | # is_error: true, |
| 808 | # description: { format: "unavailable" } } |
| 809 | # } |
| 810 | # } |
| 811 | # } |
| 812 | # |
| 813 | # To optimize computation, memory and network traffic, variables that |
| 814 | # repeat in the output multiple times can be stored once in a shared |
| 815 | # variable table and be referenced using the `var_table_index` field. The |
| 816 | # variables stored in the shared table are nameless and are essentially |
| 817 | # a partition of the complete variable. To reconstruct the complete |
| 818 | # variable, merge the referencing variable with the referenced variable. |
| 819 | # |
| 820 | # When using the shared variable table, the following variables: |
| 821 | # |
| 822 | # T x = { 3, 7 }; |
| 823 | # T* p = &x; |
| 824 | # T& r = x; |
| 825 | # |
| 826 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 827 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 828 | # { name: "r", type="T&", var_table_index: 3 } |
| 829 | # |
| 830 | # { // Shared variable table entry #3: |
| 831 | # members { name: "m1", value: "3", type: "int" }, |
| 832 | # members { name: "m2", value: "7", type: "int" } |
| 833 | # } |
| 834 | # |
| 835 | # Note that the pointer address is stored with the referencing variable |
| 836 | # and not with the referenced variable. This allows the referenced variable |
| 837 | # to be shared between pointers and references. |
| 838 | # |
| 839 | # The type field is optional. The debugger agent may or may not support it. |
| 840 | "members": [ # Members contained or pointed to by the variable. |
| 841 | # Object with schema name: Variable |
| 842 | ], |
| 843 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 844 | # unset. A status of a single variable only applies to that variable or |
| 845 | # expression. The rest of breakpoint data still remains valid. Variables |
| 846 | # might be reported in error state even when breakpoint is not in final |
| 847 | # state. |
| 848 | # |
| 849 | # The message may refer to variable name with `refers_to` set to |
| 850 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 851 | # In either case variable value and members will be unset. |
| 852 | # |
| 853 | # Example of error message applied to name: `Invalid expression syntax`. |
| 854 | # |
| 855 | # Example of information message applied to value: `Not captured`. |
| 856 | # |
| 857 | # Examples of error message applied to value: |
| 858 | # |
| 859 | # * `Malformed string`, |
| 860 | # * `Field f not found in class C` |
| 861 | # * `Null pointer dereference` |
| 862 | # The message can indicate an error or informational status, and refer to |
| 863 | # specific parts of the containing object. |
| 864 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 865 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 866 | "isError": True or False, # Distinguishes errors from informational messages. |
| 867 | "description": { # Represents a message with parameters. # Status message text. |
| 868 | "parameters": [ # Optional parameters to be embedded into the message. |
| 869 | "A String", |
| 870 | ], |
| 871 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 872 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 873 | # character. |
| 874 | # |
| 875 | # Examples: |
| 876 | # |
| 877 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 878 | # is loaded. Again, $0 is very important.` |
| 879 | # * `Please pay $$10 to use $0 instead of $1.` |
| 880 | }, |
| 881 | "refersTo": "A String", # Reference to which the message applies. |
| 882 | }, |
| 883 | "name": "A String", # Name of the variable, if any. |
| 884 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 885 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 886 | # a type is agent specific. It is recommended to include the dynamic type |
| 887 | # rather than a static type of an object. |
| 888 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 889 | # one variable can reference the same variable in the table. The |
| 890 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 891 | "value": "A String", # Simple value of the variable. |
| 892 | }, |
| 893 | ], |
| 894 | "location": { # Represents a location in the source code. # Source location of the call site. |
| 895 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 896 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 897 | # Agents that do not support setting breakpoints on specific columns ignore |
| 898 | # this field. |
| 899 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 900 | }, |
| 901 | "function": "A String", # Demangled function name at the call site. |
| 902 | }, |
| 903 | ], |
| 904 | "condition": "A String", # Condition that triggers the breakpoint. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 905 | # The condition is a compound boolean expression composed using expressions |
| 906 | # in a programming language at the source location. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 907 | }, |
| 908 | }</pre> |
| 909 | </div> |
| 910 | |
| 911 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 912 | <code class="details" id="list">list(debuggeeId, waitToken=None, clientVersion=None, action_value=None, includeInactive=None, includeAllUsers=None, stripResults=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 913 | <pre>Lists all breakpoints for the debuggee. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 914 | |
| 915 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 916 | debuggeeId: string, Required. ID of the debuggee whose breakpoints to list. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 917 | waitToken: string, A wait token that, if specified, blocks the call until the breakpoints |
| 918 | list has changed, or a server selected timeout has expired. The value |
| 919 | should be set from the last response. The error code |
| 920 | `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which |
| 921 | should be called again with the same `wait_token`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 922 | clientVersion: string, Required. The client version making the call. |
| 923 | Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). |
| 924 | action_value: string, Only breakpoints with the specified action will pass the filter. |
| 925 | includeInactive: boolean, When set to `true`, the response includes active and inactive |
| 926 | breakpoints. Otherwise, it includes only active breakpoints. |
| 927 | includeAllUsers: boolean, When set to `true`, the response includes the list of breakpoints set by |
| 928 | any user. Otherwise, it includes only breakpoints set by the caller. |
| 929 | stripResults: boolean, This field is deprecated. The following fields are always stripped out of |
| 930 | the result: `stack_frames`, `evaluated_expressions` and `variable_table`. |
| 931 | x__xgafv: string, V1 error format. |
| 932 | Allowed values |
| 933 | 1 - v1 error format |
| 934 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 935 | |
| 936 | Returns: |
| 937 | An object of the form: |
| 938 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 939 | { # Response for listing breakpoints. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 940 | "nextWaitToken": "A String", # A wait token that can be used in the next call to `list` (REST) or |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 941 | # `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 942 | "breakpoints": [ # List of breakpoints matching the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 943 | # The fields `id` and `location` are guaranteed to be set on each breakpoint. |
| 944 | # The fields: `stack_frames`, `evaluated_expressions` and `variable_table` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 945 | # are cleared on each breakpoint regardless of its status. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 946 | { # ------------------------------------------------------------------------------ |
| 947 | # ## Breakpoint (the resource) |
| 948 | # |
| 949 | # Represents the breakpoint specification, status and results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 950 | "canaryExpireTime": "A String", # The deadline for the breakpoint to stay in CANARY_ACTIVE state. The value |
| 951 | # is meaningless when the breakpoint is not in CANARY_ACTIVE state. |
| 952 | "status": { # Represents a contextual status message. # Breakpoint status. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 953 | # |
| 954 | # The status includes an error flag and a human readable message. |
| 955 | # This field is usually unset. The message can be either |
| 956 | # informational or an error message. Regardless, clients should always |
| 957 | # display the text message back to the user. |
| 958 | # |
| 959 | # Error status indicates complete failure of the breakpoint. |
| 960 | # |
| 961 | # Example (non-final state): `Still loading symbols...` |
| 962 | # |
| 963 | # Examples (final state): |
| 964 | # |
| 965 | # * `Invalid line number` referring to location |
| 966 | # * `Field f not found in class C` referring to condition |
| 967 | # The message can indicate an error or informational status, and refer to |
| 968 | # specific parts of the containing object. |
| 969 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 970 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 971 | "isError": True or False, # Distinguishes errors from informational messages. |
| 972 | "description": { # Represents a message with parameters. # Status message text. |
| 973 | "parameters": [ # Optional parameters to be embedded into the message. |
| 974 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 975 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 976 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 977 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 978 | # character. |
| 979 | # |
| 980 | # Examples: |
| 981 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 982 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 983 | # is loaded. Again, $0 is very important.` |
| 984 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 985 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 986 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 987 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 988 | "state": "A String", # The current state of the breakpoint. |
| 989 | "userEmail": "A String", # E-mail address of the user that created this breakpoint |
| 990 | "action": "A String", # Action that the agent should perform when the code at the |
| 991 | # breakpoint location is hit. |
| 992 | "logLevel": "A String", # Indicates the severity of the log. Only relevant when action is `LOG`. |
| 993 | "id": "A String", # Breakpoint identifier, unique in the scope of the debuggee. |
| 994 | "location": { # Represents a location in the source code. # Breakpoint source location. |
| 995 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 996 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 997 | # Agents that do not support setting breakpoints on specific columns ignore |
| 998 | # this field. |
| 999 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 1000 | }, |
| 1001 | "finalTime": "A String", # Time this breakpoint was finalized as seen by the server in seconds |
| 1002 | # resolution. |
| 1003 | "variableTable": [ # The `variable_table` exists to aid with computation, memory and network |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1004 | # traffic optimization. It enables storing a variable once and reference |
| 1005 | # it from multiple variables, including variables stored in the |
| 1006 | # `variable_table` itself. |
| 1007 | # For example, the same `this` object, which may appear at many levels of |
| 1008 | # the stack, can have all of its data stored once in this table. The |
| 1009 | # stack frame variables then would hold only a reference to it. |
| 1010 | # |
| 1011 | # The variable `var_table_index` field is an index into this repeated field. |
| 1012 | # The stored objects are nameless and get their name from the referencing |
| 1013 | # variable. The effective variable is a merge of the referencing variable |
| 1014 | # and the referenced variable. |
| 1015 | { # Represents a variable or an argument possibly of a compound object type. |
| 1016 | # Note how the following variables are represented: |
| 1017 | # |
| 1018 | # 1) A simple variable: |
| 1019 | # |
| 1020 | # int x = 5 |
| 1021 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1022 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1023 | # |
| 1024 | # 2) A compound object: |
| 1025 | # |
| 1026 | # struct T { |
| 1027 | # int m1; |
| 1028 | # int m2; |
| 1029 | # }; |
| 1030 | # T x = { 3, 7 }; |
| 1031 | # |
| 1032 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1033 | # name: "x", |
| 1034 | # type: "T", |
| 1035 | # members { name: "m1", value: "3", type: "int" }, |
| 1036 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1037 | # } |
| 1038 | # |
| 1039 | # 3) A pointer where the pointee was captured: |
| 1040 | # |
| 1041 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1042 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1043 | # |
| 1044 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1045 | # name: "p", |
| 1046 | # type: "T*", |
| 1047 | # value: "0x00500500", |
| 1048 | # members { name: "m1", value: "3", type: "int" }, |
| 1049 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1050 | # } |
| 1051 | # |
| 1052 | # 4) A pointer where the pointee was not captured: |
| 1053 | # |
| 1054 | # T* p = new T; |
| 1055 | # |
| 1056 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1057 | # name: "p", |
| 1058 | # type: "T*", |
| 1059 | # value: "0x00400400" |
| 1060 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1061 | # } |
| 1062 | # |
| 1063 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1064 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1065 | # |
| 1066 | # Note that a null pointer should not have members. |
| 1067 | # |
| 1068 | # 5) An unnamed value: |
| 1069 | # |
| 1070 | # int* p = new int(7); |
| 1071 | # |
| 1072 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1073 | # name: "p", |
| 1074 | # value: "0x00500500", |
| 1075 | # type: "int*", |
| 1076 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1077 | # |
| 1078 | # 6) An unnamed pointer where the pointee was not captured: |
| 1079 | # |
| 1080 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1081 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1082 | # |
| 1083 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1084 | # name: "pp", |
| 1085 | # value: "0x00500500", |
| 1086 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1087 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1088 | # value: "0x00400400", |
| 1089 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1090 | # status { |
| 1091 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1092 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1093 | # } |
| 1094 | # } |
| 1095 | # } |
| 1096 | # |
| 1097 | # To optimize computation, memory and network traffic, variables that |
| 1098 | # repeat in the output multiple times can be stored once in a shared |
| 1099 | # variable table and be referenced using the `var_table_index` field. The |
| 1100 | # variables stored in the shared table are nameless and are essentially |
| 1101 | # a partition of the complete variable. To reconstruct the complete |
| 1102 | # variable, merge the referencing variable with the referenced variable. |
| 1103 | # |
| 1104 | # When using the shared variable table, the following variables: |
| 1105 | # |
| 1106 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1107 | # T* p = &x; |
| 1108 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1109 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1110 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 1111 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 1112 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1113 | # |
| 1114 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1115 | # members { name: "m1", value: "3", type: "int" }, |
| 1116 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1117 | # } |
| 1118 | # |
| 1119 | # Note that the pointer address is stored with the referencing variable |
| 1120 | # and not with the referenced variable. This allows the referenced variable |
| 1121 | # to be shared between pointers and references. |
| 1122 | # |
| 1123 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1124 | "members": [ # Members contained or pointed to by the variable. |
| 1125 | # Object with schema name: Variable |
| 1126 | ], |
| 1127 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1128 | # unset. A status of a single variable only applies to that variable or |
| 1129 | # expression. The rest of breakpoint data still remains valid. Variables |
| 1130 | # might be reported in error state even when breakpoint is not in final |
| 1131 | # state. |
| 1132 | # |
| 1133 | # The message may refer to variable name with `refers_to` set to |
| 1134 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 1135 | # In either case variable value and members will be unset. |
| 1136 | # |
| 1137 | # Example of error message applied to name: `Invalid expression syntax`. |
| 1138 | # |
| 1139 | # Example of information message applied to value: `Not captured`. |
| 1140 | # |
| 1141 | # Examples of error message applied to value: |
| 1142 | # |
| 1143 | # * `Malformed string`, |
| 1144 | # * `Field f not found in class C` |
| 1145 | # * `Null pointer dereference` |
| 1146 | # The message can indicate an error or informational status, and refer to |
| 1147 | # specific parts of the containing object. |
| 1148 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 1149 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1150 | "isError": True or False, # Distinguishes errors from informational messages. |
| 1151 | "description": { # Represents a message with parameters. # Status message text. |
| 1152 | "parameters": [ # Optional parameters to be embedded into the message. |
| 1153 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1154 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1155 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1156 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 1157 | # character. |
| 1158 | # |
| 1159 | # Examples: |
| 1160 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1161 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1162 | # is loaded. Again, $0 is very important.` |
| 1163 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1164 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1165 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1166 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1167 | "name": "A String", # Name of the variable, if any. |
| 1168 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1169 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 1170 | # a type is agent specific. It is recommended to include the dynamic type |
| 1171 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1172 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 1173 | # one variable can reference the same variable in the table. The |
| 1174 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 1175 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1176 | }, |
| 1177 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1178 | "createTime": "A String", # Time this breakpoint was created by the server in seconds resolution. |
| 1179 | "logMessageFormat": "A String", # Only relevant when action is `LOG`. Defines the message to log when |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1180 | # the breakpoint hits. The message may include parameter placeholders `$0`, |
| 1181 | # `$1`, etc. These placeholders are replaced with the evaluated value |
| 1182 | # of the appropriate expression. Expressions not referenced in |
| 1183 | # `log_message_format` are not logged. |
| 1184 | # |
| 1185 | # Example: `Message received, id = $0, count = $1` with |
| 1186 | # `expressions` = `[ message.id, message.count ]`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1187 | "labels": { # A set of custom breakpoint properties, populated by the agent, to be |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1188 | # displayed to the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1189 | "a_key": "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1190 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1191 | "expressions": [ # List of read-only expressions to evaluate at the breakpoint location. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1192 | # The expressions are composed using expressions in the programming language |
| 1193 | # at the source location. If the breakpoint action is `LOG`, the evaluated |
| 1194 | # expressions are included in log statements. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1195 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1196 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1197 | "evaluatedExpressions": [ # Values of evaluated expressions at breakpoint time. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1198 | # The evaluated expressions appear in exactly the same order they |
| 1199 | # are listed in the `expressions` field. |
| 1200 | # The `name` field holds the original expression text, the `value` or |
| 1201 | # `members` field holds the result of the evaluated expression. |
| 1202 | # If the expression cannot be evaluated, the `status` inside the `Variable` |
| 1203 | # will indicate an error and contain the error text. |
| 1204 | { # Represents a variable or an argument possibly of a compound object type. |
| 1205 | # Note how the following variables are represented: |
| 1206 | # |
| 1207 | # 1) A simple variable: |
| 1208 | # |
| 1209 | # int x = 5 |
| 1210 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1211 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1212 | # |
| 1213 | # 2) A compound object: |
| 1214 | # |
| 1215 | # struct T { |
| 1216 | # int m1; |
| 1217 | # int m2; |
| 1218 | # }; |
| 1219 | # T x = { 3, 7 }; |
| 1220 | # |
| 1221 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1222 | # name: "x", |
| 1223 | # type: "T", |
| 1224 | # members { name: "m1", value: "3", type: "int" }, |
| 1225 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1226 | # } |
| 1227 | # |
| 1228 | # 3) A pointer where the pointee was captured: |
| 1229 | # |
| 1230 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1231 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1232 | # |
| 1233 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1234 | # name: "p", |
| 1235 | # type: "T*", |
| 1236 | # value: "0x00500500", |
| 1237 | # members { name: "m1", value: "3", type: "int" }, |
| 1238 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1239 | # } |
| 1240 | # |
| 1241 | # 4) A pointer where the pointee was not captured: |
| 1242 | # |
| 1243 | # T* p = new T; |
| 1244 | # |
| 1245 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1246 | # name: "p", |
| 1247 | # type: "T*", |
| 1248 | # value: "0x00400400" |
| 1249 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1250 | # } |
| 1251 | # |
| 1252 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1253 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1254 | # |
| 1255 | # Note that a null pointer should not have members. |
| 1256 | # |
| 1257 | # 5) An unnamed value: |
| 1258 | # |
| 1259 | # int* p = new int(7); |
| 1260 | # |
| 1261 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1262 | # name: "p", |
| 1263 | # value: "0x00500500", |
| 1264 | # type: "int*", |
| 1265 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1266 | # |
| 1267 | # 6) An unnamed pointer where the pointee was not captured: |
| 1268 | # |
| 1269 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1270 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1271 | # |
| 1272 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1273 | # name: "pp", |
| 1274 | # value: "0x00500500", |
| 1275 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1276 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1277 | # value: "0x00400400", |
| 1278 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1279 | # status { |
| 1280 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1281 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1282 | # } |
| 1283 | # } |
| 1284 | # } |
| 1285 | # |
| 1286 | # To optimize computation, memory and network traffic, variables that |
| 1287 | # repeat in the output multiple times can be stored once in a shared |
| 1288 | # variable table and be referenced using the `var_table_index` field. The |
| 1289 | # variables stored in the shared table are nameless and are essentially |
| 1290 | # a partition of the complete variable. To reconstruct the complete |
| 1291 | # variable, merge the referencing variable with the referenced variable. |
| 1292 | # |
| 1293 | # When using the shared variable table, the following variables: |
| 1294 | # |
| 1295 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1296 | # T* p = &x; |
| 1297 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1298 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1299 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 1300 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 1301 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1302 | # |
| 1303 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1304 | # members { name: "m1", value: "3", type: "int" }, |
| 1305 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1306 | # } |
| 1307 | # |
| 1308 | # Note that the pointer address is stored with the referencing variable |
| 1309 | # and not with the referenced variable. This allows the referenced variable |
| 1310 | # to be shared between pointers and references. |
| 1311 | # |
| 1312 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1313 | "members": [ # Members contained or pointed to by the variable. |
| 1314 | # Object with schema name: Variable |
| 1315 | ], |
| 1316 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1317 | # unset. A status of a single variable only applies to that variable or |
| 1318 | # expression. The rest of breakpoint data still remains valid. Variables |
| 1319 | # might be reported in error state even when breakpoint is not in final |
| 1320 | # state. |
| 1321 | # |
| 1322 | # The message may refer to variable name with `refers_to` set to |
| 1323 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 1324 | # In either case variable value and members will be unset. |
| 1325 | # |
| 1326 | # Example of error message applied to name: `Invalid expression syntax`. |
| 1327 | # |
| 1328 | # Example of information message applied to value: `Not captured`. |
| 1329 | # |
| 1330 | # Examples of error message applied to value: |
| 1331 | # |
| 1332 | # * `Malformed string`, |
| 1333 | # * `Field f not found in class C` |
| 1334 | # * `Null pointer dereference` |
| 1335 | # The message can indicate an error or informational status, and refer to |
| 1336 | # specific parts of the containing object. |
| 1337 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 1338 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1339 | "isError": True or False, # Distinguishes errors from informational messages. |
| 1340 | "description": { # Represents a message with parameters. # Status message text. |
| 1341 | "parameters": [ # Optional parameters to be embedded into the message. |
| 1342 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1343 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1344 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1345 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 1346 | # character. |
| 1347 | # |
| 1348 | # Examples: |
| 1349 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1350 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1351 | # is loaded. Again, $0 is very important.` |
| 1352 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1353 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1354 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1355 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1356 | "name": "A String", # Name of the variable, if any. |
| 1357 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1358 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 1359 | # a type is agent specific. It is recommended to include the dynamic type |
| 1360 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1361 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 1362 | # one variable can reference the same variable in the table. The |
| 1363 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 1364 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1365 | }, |
| 1366 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1367 | "isFinalState": True or False, # When true, indicates that this is a final result and the |
| 1368 | # breakpoint state will not change from here on. |
| 1369 | "stackFrames": [ # The stack at breakpoint time, where stack_frames[0] represents the most |
| 1370 | # recently entered function. |
| 1371 | { # Represents a stack frame context. |
| 1372 | "arguments": [ # Set of arguments passed to this function. |
| 1373 | # Note that this might not be populated for all stack frames. |
| 1374 | { # Represents a variable or an argument possibly of a compound object type. |
| 1375 | # Note how the following variables are represented: |
| 1376 | # |
| 1377 | # 1) A simple variable: |
| 1378 | # |
| 1379 | # int x = 5 |
| 1380 | # |
| 1381 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 1382 | # |
| 1383 | # 2) A compound object: |
| 1384 | # |
| 1385 | # struct T { |
| 1386 | # int m1; |
| 1387 | # int m2; |
| 1388 | # }; |
| 1389 | # T x = { 3, 7 }; |
| 1390 | # |
| 1391 | # { // Captured variable |
| 1392 | # name: "x", |
| 1393 | # type: "T", |
| 1394 | # members { name: "m1", value: "3", type: "int" }, |
| 1395 | # members { name: "m2", value: "7", type: "int" } |
| 1396 | # } |
| 1397 | # |
| 1398 | # 3) A pointer where the pointee was captured: |
| 1399 | # |
| 1400 | # T x = { 3, 7 }; |
| 1401 | # T* p = &x; |
| 1402 | # |
| 1403 | # { // Captured variable |
| 1404 | # name: "p", |
| 1405 | # type: "T*", |
| 1406 | # value: "0x00500500", |
| 1407 | # members { name: "m1", value: "3", type: "int" }, |
| 1408 | # members { name: "m2", value: "7", type: "int" } |
| 1409 | # } |
| 1410 | # |
| 1411 | # 4) A pointer where the pointee was not captured: |
| 1412 | # |
| 1413 | # T* p = new T; |
| 1414 | # |
| 1415 | # { // Captured variable |
| 1416 | # name: "p", |
| 1417 | # type: "T*", |
| 1418 | # value: "0x00400400" |
| 1419 | # status { is_error: true, description { format: "unavailable" } } |
| 1420 | # } |
| 1421 | # |
| 1422 | # The status should describe the reason for the missing value, |
| 1423 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 1424 | # |
| 1425 | # Note that a null pointer should not have members. |
| 1426 | # |
| 1427 | # 5) An unnamed value: |
| 1428 | # |
| 1429 | # int* p = new int(7); |
| 1430 | # |
| 1431 | # { // Captured variable |
| 1432 | # name: "p", |
| 1433 | # value: "0x00500500", |
| 1434 | # type: "int*", |
| 1435 | # members { value: "7", type: "int" } } |
| 1436 | # |
| 1437 | # 6) An unnamed pointer where the pointee was not captured: |
| 1438 | # |
| 1439 | # int* p = new int(7); |
| 1440 | # int** pp = &p; |
| 1441 | # |
| 1442 | # { // Captured variable |
| 1443 | # name: "pp", |
| 1444 | # value: "0x00500500", |
| 1445 | # type: "int**", |
| 1446 | # members { |
| 1447 | # value: "0x00400400", |
| 1448 | # type: "int*" |
| 1449 | # status { |
| 1450 | # is_error: true, |
| 1451 | # description: { format: "unavailable" } } |
| 1452 | # } |
| 1453 | # } |
| 1454 | # } |
| 1455 | # |
| 1456 | # To optimize computation, memory and network traffic, variables that |
| 1457 | # repeat in the output multiple times can be stored once in a shared |
| 1458 | # variable table and be referenced using the `var_table_index` field. The |
| 1459 | # variables stored in the shared table are nameless and are essentially |
| 1460 | # a partition of the complete variable. To reconstruct the complete |
| 1461 | # variable, merge the referencing variable with the referenced variable. |
| 1462 | # |
| 1463 | # When using the shared variable table, the following variables: |
| 1464 | # |
| 1465 | # T x = { 3, 7 }; |
| 1466 | # T* p = &x; |
| 1467 | # T& r = x; |
| 1468 | # |
| 1469 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 1470 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 1471 | # { name: "r", type="T&", var_table_index: 3 } |
| 1472 | # |
| 1473 | # { // Shared variable table entry #3: |
| 1474 | # members { name: "m1", value: "3", type: "int" }, |
| 1475 | # members { name: "m2", value: "7", type: "int" } |
| 1476 | # } |
| 1477 | # |
| 1478 | # Note that the pointer address is stored with the referencing variable |
| 1479 | # and not with the referenced variable. This allows the referenced variable |
| 1480 | # to be shared between pointers and references. |
| 1481 | # |
| 1482 | # The type field is optional. The debugger agent may or may not support it. |
| 1483 | "members": [ # Members contained or pointed to by the variable. |
| 1484 | # Object with schema name: Variable |
| 1485 | ], |
| 1486 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 1487 | # unset. A status of a single variable only applies to that variable or |
| 1488 | # expression. The rest of breakpoint data still remains valid. Variables |
| 1489 | # might be reported in error state even when breakpoint is not in final |
| 1490 | # state. |
| 1491 | # |
| 1492 | # The message may refer to variable name with `refers_to` set to |
| 1493 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 1494 | # In either case variable value and members will be unset. |
| 1495 | # |
| 1496 | # Example of error message applied to name: `Invalid expression syntax`. |
| 1497 | # |
| 1498 | # Example of information message applied to value: `Not captured`. |
| 1499 | # |
| 1500 | # Examples of error message applied to value: |
| 1501 | # |
| 1502 | # * `Malformed string`, |
| 1503 | # * `Field f not found in class C` |
| 1504 | # * `Null pointer dereference` |
| 1505 | # The message can indicate an error or informational status, and refer to |
| 1506 | # specific parts of the containing object. |
| 1507 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 1508 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 1509 | "isError": True or False, # Distinguishes errors from informational messages. |
| 1510 | "description": { # Represents a message with parameters. # Status message text. |
| 1511 | "parameters": [ # Optional parameters to be embedded into the message. |
| 1512 | "A String", |
| 1513 | ], |
| 1514 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 1515 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 1516 | # character. |
| 1517 | # |
| 1518 | # Examples: |
| 1519 | # |
| 1520 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 1521 | # is loaded. Again, $0 is very important.` |
| 1522 | # * `Please pay $$10 to use $0 instead of $1.` |
| 1523 | }, |
| 1524 | "refersTo": "A String", # Reference to which the message applies. |
| 1525 | }, |
| 1526 | "name": "A String", # Name of the variable, if any. |
| 1527 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 1528 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 1529 | # a type is agent specific. It is recommended to include the dynamic type |
| 1530 | # rather than a static type of an object. |
| 1531 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 1532 | # one variable can reference the same variable in the table. The |
| 1533 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 1534 | "value": "A String", # Simple value of the variable. |
| 1535 | }, |
| 1536 | ], |
| 1537 | "locals": [ # Set of local variables at the stack frame location. |
| 1538 | # Note that this might not be populated for all stack frames. |
| 1539 | { # Represents a variable or an argument possibly of a compound object type. |
| 1540 | # Note how the following variables are represented: |
| 1541 | # |
| 1542 | # 1) A simple variable: |
| 1543 | # |
| 1544 | # int x = 5 |
| 1545 | # |
| 1546 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 1547 | # |
| 1548 | # 2) A compound object: |
| 1549 | # |
| 1550 | # struct T { |
| 1551 | # int m1; |
| 1552 | # int m2; |
| 1553 | # }; |
| 1554 | # T x = { 3, 7 }; |
| 1555 | # |
| 1556 | # { // Captured variable |
| 1557 | # name: "x", |
| 1558 | # type: "T", |
| 1559 | # members { name: "m1", value: "3", type: "int" }, |
| 1560 | # members { name: "m2", value: "7", type: "int" } |
| 1561 | # } |
| 1562 | # |
| 1563 | # 3) A pointer where the pointee was captured: |
| 1564 | # |
| 1565 | # T x = { 3, 7 }; |
| 1566 | # T* p = &x; |
| 1567 | # |
| 1568 | # { // Captured variable |
| 1569 | # name: "p", |
| 1570 | # type: "T*", |
| 1571 | # value: "0x00500500", |
| 1572 | # members { name: "m1", value: "3", type: "int" }, |
| 1573 | # members { name: "m2", value: "7", type: "int" } |
| 1574 | # } |
| 1575 | # |
| 1576 | # 4) A pointer where the pointee was not captured: |
| 1577 | # |
| 1578 | # T* p = new T; |
| 1579 | # |
| 1580 | # { // Captured variable |
| 1581 | # name: "p", |
| 1582 | # type: "T*", |
| 1583 | # value: "0x00400400" |
| 1584 | # status { is_error: true, description { format: "unavailable" } } |
| 1585 | # } |
| 1586 | # |
| 1587 | # The status should describe the reason for the missing value, |
| 1588 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 1589 | # |
| 1590 | # Note that a null pointer should not have members. |
| 1591 | # |
| 1592 | # 5) An unnamed value: |
| 1593 | # |
| 1594 | # int* p = new int(7); |
| 1595 | # |
| 1596 | # { // Captured variable |
| 1597 | # name: "p", |
| 1598 | # value: "0x00500500", |
| 1599 | # type: "int*", |
| 1600 | # members { value: "7", type: "int" } } |
| 1601 | # |
| 1602 | # 6) An unnamed pointer where the pointee was not captured: |
| 1603 | # |
| 1604 | # int* p = new int(7); |
| 1605 | # int** pp = &p; |
| 1606 | # |
| 1607 | # { // Captured variable |
| 1608 | # name: "pp", |
| 1609 | # value: "0x00500500", |
| 1610 | # type: "int**", |
| 1611 | # members { |
| 1612 | # value: "0x00400400", |
| 1613 | # type: "int*" |
| 1614 | # status { |
| 1615 | # is_error: true, |
| 1616 | # description: { format: "unavailable" } } |
| 1617 | # } |
| 1618 | # } |
| 1619 | # } |
| 1620 | # |
| 1621 | # To optimize computation, memory and network traffic, variables that |
| 1622 | # repeat in the output multiple times can be stored once in a shared |
| 1623 | # variable table and be referenced using the `var_table_index` field. The |
| 1624 | # variables stored in the shared table are nameless and are essentially |
| 1625 | # a partition of the complete variable. To reconstruct the complete |
| 1626 | # variable, merge the referencing variable with the referenced variable. |
| 1627 | # |
| 1628 | # When using the shared variable table, the following variables: |
| 1629 | # |
| 1630 | # T x = { 3, 7 }; |
| 1631 | # T* p = &x; |
| 1632 | # T& r = x; |
| 1633 | # |
| 1634 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 1635 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 1636 | # { name: "r", type="T&", var_table_index: 3 } |
| 1637 | # |
| 1638 | # { // Shared variable table entry #3: |
| 1639 | # members { name: "m1", value: "3", type: "int" }, |
| 1640 | # members { name: "m2", value: "7", type: "int" } |
| 1641 | # } |
| 1642 | # |
| 1643 | # Note that the pointer address is stored with the referencing variable |
| 1644 | # and not with the referenced variable. This allows the referenced variable |
| 1645 | # to be shared between pointers and references. |
| 1646 | # |
| 1647 | # The type field is optional. The debugger agent may or may not support it. |
| 1648 | "members": [ # Members contained or pointed to by the variable. |
| 1649 | # Object with schema name: Variable |
| 1650 | ], |
| 1651 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 1652 | # unset. A status of a single variable only applies to that variable or |
| 1653 | # expression. The rest of breakpoint data still remains valid. Variables |
| 1654 | # might be reported in error state even when breakpoint is not in final |
| 1655 | # state. |
| 1656 | # |
| 1657 | # The message may refer to variable name with `refers_to` set to |
| 1658 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 1659 | # In either case variable value and members will be unset. |
| 1660 | # |
| 1661 | # Example of error message applied to name: `Invalid expression syntax`. |
| 1662 | # |
| 1663 | # Example of information message applied to value: `Not captured`. |
| 1664 | # |
| 1665 | # Examples of error message applied to value: |
| 1666 | # |
| 1667 | # * `Malformed string`, |
| 1668 | # * `Field f not found in class C` |
| 1669 | # * `Null pointer dereference` |
| 1670 | # The message can indicate an error or informational status, and refer to |
| 1671 | # specific parts of the containing object. |
| 1672 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 1673 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 1674 | "isError": True or False, # Distinguishes errors from informational messages. |
| 1675 | "description": { # Represents a message with parameters. # Status message text. |
| 1676 | "parameters": [ # Optional parameters to be embedded into the message. |
| 1677 | "A String", |
| 1678 | ], |
| 1679 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 1680 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 1681 | # character. |
| 1682 | # |
| 1683 | # Examples: |
| 1684 | # |
| 1685 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 1686 | # is loaded. Again, $0 is very important.` |
| 1687 | # * `Please pay $$10 to use $0 instead of $1.` |
| 1688 | }, |
| 1689 | "refersTo": "A String", # Reference to which the message applies. |
| 1690 | }, |
| 1691 | "name": "A String", # Name of the variable, if any. |
| 1692 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 1693 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 1694 | # a type is agent specific. It is recommended to include the dynamic type |
| 1695 | # rather than a static type of an object. |
| 1696 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 1697 | # one variable can reference the same variable in the table. The |
| 1698 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 1699 | "value": "A String", # Simple value of the variable. |
| 1700 | }, |
| 1701 | ], |
| 1702 | "location": { # Represents a location in the source code. # Source location of the call site. |
| 1703 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 1704 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 1705 | # Agents that do not support setting breakpoints on specific columns ignore |
| 1706 | # this field. |
| 1707 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 1708 | }, |
| 1709 | "function": "A String", # Demangled function name at the call site. |
| 1710 | }, |
| 1711 | ], |
| 1712 | "condition": "A String", # Condition that triggers the breakpoint. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1713 | # The condition is a compound boolean expression composed using expressions |
| 1714 | # in a programming language at the source location. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1715 | }, |
| 1716 | ], |
| 1717 | }</pre> |
| 1718 | </div> |
| 1719 | |
| 1720 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1721 | <code class="details" id="set">set(debuggeeId, body=None, canaryOption=None, clientVersion=None, x__xgafv=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1722 | <pre>Sets the breakpoint to the debuggee. |
| 1723 | |
| 1724 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1725 | debuggeeId: string, Required. ID of the debuggee where the breakpoint is to be set. (required) |
| 1726 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1727 | The object takes the form of: |
| 1728 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1729 | { # ------------------------------------------------------------------------------ |
| 1730 | # ## Breakpoint (the resource) |
| 1731 | # |
| 1732 | # Represents the breakpoint specification, status and results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1733 | "canaryExpireTime": "A String", # The deadline for the breakpoint to stay in CANARY_ACTIVE state. The value |
| 1734 | # is meaningless when the breakpoint is not in CANARY_ACTIVE state. |
| 1735 | "status": { # Represents a contextual status message. # Breakpoint status. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1736 | # |
| 1737 | # The status includes an error flag and a human readable message. |
| 1738 | # This field is usually unset. The message can be either |
| 1739 | # informational or an error message. Regardless, clients should always |
| 1740 | # display the text message back to the user. |
| 1741 | # |
| 1742 | # Error status indicates complete failure of the breakpoint. |
| 1743 | # |
| 1744 | # Example (non-final state): `Still loading symbols...` |
| 1745 | # |
| 1746 | # Examples (final state): |
| 1747 | # |
| 1748 | # * `Invalid line number` referring to location |
| 1749 | # * `Field f not found in class C` referring to condition |
| 1750 | # The message can indicate an error or informational status, and refer to |
| 1751 | # specific parts of the containing object. |
| 1752 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 1753 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1754 | "isError": True or False, # Distinguishes errors from informational messages. |
| 1755 | "description": { # Represents a message with parameters. # Status message text. |
| 1756 | "parameters": [ # Optional parameters to be embedded into the message. |
| 1757 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1758 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1759 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1760 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 1761 | # character. |
| 1762 | # |
| 1763 | # Examples: |
| 1764 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1765 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1766 | # is loaded. Again, $0 is very important.` |
| 1767 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1768 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1769 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1770 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1771 | "state": "A String", # The current state of the breakpoint. |
| 1772 | "userEmail": "A String", # E-mail address of the user that created this breakpoint |
| 1773 | "action": "A String", # Action that the agent should perform when the code at the |
| 1774 | # breakpoint location is hit. |
| 1775 | "logLevel": "A String", # Indicates the severity of the log. Only relevant when action is `LOG`. |
| 1776 | "id": "A String", # Breakpoint identifier, unique in the scope of the debuggee. |
| 1777 | "location": { # Represents a location in the source code. # Breakpoint source location. |
| 1778 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 1779 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 1780 | # Agents that do not support setting breakpoints on specific columns ignore |
| 1781 | # this field. |
| 1782 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 1783 | }, |
| 1784 | "finalTime": "A String", # Time this breakpoint was finalized as seen by the server in seconds |
| 1785 | # resolution. |
| 1786 | "variableTable": [ # The `variable_table` exists to aid with computation, memory and network |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1787 | # traffic optimization. It enables storing a variable once and reference |
| 1788 | # it from multiple variables, including variables stored in the |
| 1789 | # `variable_table` itself. |
| 1790 | # For example, the same `this` object, which may appear at many levels of |
| 1791 | # the stack, can have all of its data stored once in this table. The |
| 1792 | # stack frame variables then would hold only a reference to it. |
| 1793 | # |
| 1794 | # The variable `var_table_index` field is an index into this repeated field. |
| 1795 | # The stored objects are nameless and get their name from the referencing |
| 1796 | # variable. The effective variable is a merge of the referencing variable |
| 1797 | # and the referenced variable. |
| 1798 | { # Represents a variable or an argument possibly of a compound object type. |
| 1799 | # Note how the following variables are represented: |
| 1800 | # |
| 1801 | # 1) A simple variable: |
| 1802 | # |
| 1803 | # int x = 5 |
| 1804 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1805 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1806 | # |
| 1807 | # 2) A compound object: |
| 1808 | # |
| 1809 | # struct T { |
| 1810 | # int m1; |
| 1811 | # int m2; |
| 1812 | # }; |
| 1813 | # T x = { 3, 7 }; |
| 1814 | # |
| 1815 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1816 | # name: "x", |
| 1817 | # type: "T", |
| 1818 | # members { name: "m1", value: "3", type: "int" }, |
| 1819 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1820 | # } |
| 1821 | # |
| 1822 | # 3) A pointer where the pointee was captured: |
| 1823 | # |
| 1824 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1825 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1826 | # |
| 1827 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1828 | # name: "p", |
| 1829 | # type: "T*", |
| 1830 | # value: "0x00500500", |
| 1831 | # members { name: "m1", value: "3", type: "int" }, |
| 1832 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1833 | # } |
| 1834 | # |
| 1835 | # 4) A pointer where the pointee was not captured: |
| 1836 | # |
| 1837 | # T* p = new T; |
| 1838 | # |
| 1839 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1840 | # name: "p", |
| 1841 | # type: "T*", |
| 1842 | # value: "0x00400400" |
| 1843 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1844 | # } |
| 1845 | # |
| 1846 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1847 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1848 | # |
| 1849 | # Note that a null pointer should not have members. |
| 1850 | # |
| 1851 | # 5) An unnamed value: |
| 1852 | # |
| 1853 | # int* p = new int(7); |
| 1854 | # |
| 1855 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1856 | # name: "p", |
| 1857 | # value: "0x00500500", |
| 1858 | # type: "int*", |
| 1859 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1860 | # |
| 1861 | # 6) An unnamed pointer where the pointee was not captured: |
| 1862 | # |
| 1863 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1864 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1865 | # |
| 1866 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1867 | # name: "pp", |
| 1868 | # value: "0x00500500", |
| 1869 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1870 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1871 | # value: "0x00400400", |
| 1872 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1873 | # status { |
| 1874 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1875 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1876 | # } |
| 1877 | # } |
| 1878 | # } |
| 1879 | # |
| 1880 | # To optimize computation, memory and network traffic, variables that |
| 1881 | # repeat in the output multiple times can be stored once in a shared |
| 1882 | # variable table and be referenced using the `var_table_index` field. The |
| 1883 | # variables stored in the shared table are nameless and are essentially |
| 1884 | # a partition of the complete variable. To reconstruct the complete |
| 1885 | # variable, merge the referencing variable with the referenced variable. |
| 1886 | # |
| 1887 | # When using the shared variable table, the following variables: |
| 1888 | # |
| 1889 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1890 | # T* p = &x; |
| 1891 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1892 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1893 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 1894 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 1895 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1896 | # |
| 1897 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1898 | # members { name: "m1", value: "3", type: "int" }, |
| 1899 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1900 | # } |
| 1901 | # |
| 1902 | # Note that the pointer address is stored with the referencing variable |
| 1903 | # and not with the referenced variable. This allows the referenced variable |
| 1904 | # to be shared between pointers and references. |
| 1905 | # |
| 1906 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1907 | "members": [ # Members contained or pointed to by the variable. |
| 1908 | # Object with schema name: Variable |
| 1909 | ], |
| 1910 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1911 | # unset. A status of a single variable only applies to that variable or |
| 1912 | # expression. The rest of breakpoint data still remains valid. Variables |
| 1913 | # might be reported in error state even when breakpoint is not in final |
| 1914 | # state. |
| 1915 | # |
| 1916 | # The message may refer to variable name with `refers_to` set to |
| 1917 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 1918 | # In either case variable value and members will be unset. |
| 1919 | # |
| 1920 | # Example of error message applied to name: `Invalid expression syntax`. |
| 1921 | # |
| 1922 | # Example of information message applied to value: `Not captured`. |
| 1923 | # |
| 1924 | # Examples of error message applied to value: |
| 1925 | # |
| 1926 | # * `Malformed string`, |
| 1927 | # * `Field f not found in class C` |
| 1928 | # * `Null pointer dereference` |
| 1929 | # The message can indicate an error or informational status, and refer to |
| 1930 | # specific parts of the containing object. |
| 1931 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 1932 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1933 | "isError": True or False, # Distinguishes errors from informational messages. |
| 1934 | "description": { # Represents a message with parameters. # Status message text. |
| 1935 | "parameters": [ # Optional parameters to be embedded into the message. |
| 1936 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1937 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1938 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1939 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 1940 | # character. |
| 1941 | # |
| 1942 | # Examples: |
| 1943 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1944 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1945 | # is loaded. Again, $0 is very important.` |
| 1946 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1947 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1948 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1949 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1950 | "name": "A String", # Name of the variable, if any. |
| 1951 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1952 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 1953 | # a type is agent specific. It is recommended to include the dynamic type |
| 1954 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1955 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 1956 | # one variable can reference the same variable in the table. The |
| 1957 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 1958 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1959 | }, |
| 1960 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1961 | "createTime": "A String", # Time this breakpoint was created by the server in seconds resolution. |
| 1962 | "logMessageFormat": "A String", # Only relevant when action is `LOG`. Defines the message to log when |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1963 | # the breakpoint hits. The message may include parameter placeholders `$0`, |
| 1964 | # `$1`, etc. These placeholders are replaced with the evaluated value |
| 1965 | # of the appropriate expression. Expressions not referenced in |
| 1966 | # `log_message_format` are not logged. |
| 1967 | # |
| 1968 | # Example: `Message received, id = $0, count = $1` with |
| 1969 | # `expressions` = `[ message.id, message.count ]`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1970 | "labels": { # A set of custom breakpoint properties, populated by the agent, to be |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1971 | # displayed to the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1972 | "a_key": "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1973 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1974 | "expressions": [ # List of read-only expressions to evaluate at the breakpoint location. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1975 | # The expressions are composed using expressions in the programming language |
| 1976 | # at the source location. If the breakpoint action is `LOG`, the evaluated |
| 1977 | # expressions are included in log statements. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1978 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1979 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1980 | "evaluatedExpressions": [ # Values of evaluated expressions at breakpoint time. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1981 | # The evaluated expressions appear in exactly the same order they |
| 1982 | # are listed in the `expressions` field. |
| 1983 | # The `name` field holds the original expression text, the `value` or |
| 1984 | # `members` field holds the result of the evaluated expression. |
| 1985 | # If the expression cannot be evaluated, the `status` inside the `Variable` |
| 1986 | # will indicate an error and contain the error text. |
| 1987 | { # Represents a variable or an argument possibly of a compound object type. |
| 1988 | # Note how the following variables are represented: |
| 1989 | # |
| 1990 | # 1) A simple variable: |
| 1991 | # |
| 1992 | # int x = 5 |
| 1993 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1994 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1995 | # |
| 1996 | # 2) A compound object: |
| 1997 | # |
| 1998 | # struct T { |
| 1999 | # int m1; |
| 2000 | # int m2; |
| 2001 | # }; |
| 2002 | # T x = { 3, 7 }; |
| 2003 | # |
| 2004 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2005 | # name: "x", |
| 2006 | # type: "T", |
| 2007 | # members { name: "m1", value: "3", type: "int" }, |
| 2008 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2009 | # } |
| 2010 | # |
| 2011 | # 3) A pointer where the pointee was captured: |
| 2012 | # |
| 2013 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2014 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2015 | # |
| 2016 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2017 | # name: "p", |
| 2018 | # type: "T*", |
| 2019 | # value: "0x00500500", |
| 2020 | # members { name: "m1", value: "3", type: "int" }, |
| 2021 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2022 | # } |
| 2023 | # |
| 2024 | # 4) A pointer where the pointee was not captured: |
| 2025 | # |
| 2026 | # T* p = new T; |
| 2027 | # |
| 2028 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2029 | # name: "p", |
| 2030 | # type: "T*", |
| 2031 | # value: "0x00400400" |
| 2032 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2033 | # } |
| 2034 | # |
| 2035 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2036 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2037 | # |
| 2038 | # Note that a null pointer should not have members. |
| 2039 | # |
| 2040 | # 5) An unnamed value: |
| 2041 | # |
| 2042 | # int* p = new int(7); |
| 2043 | # |
| 2044 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2045 | # name: "p", |
| 2046 | # value: "0x00500500", |
| 2047 | # type: "int*", |
| 2048 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2049 | # |
| 2050 | # 6) An unnamed pointer where the pointee was not captured: |
| 2051 | # |
| 2052 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2053 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2054 | # |
| 2055 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2056 | # name: "pp", |
| 2057 | # value: "0x00500500", |
| 2058 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2059 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2060 | # value: "0x00400400", |
| 2061 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2062 | # status { |
| 2063 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2064 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2065 | # } |
| 2066 | # } |
| 2067 | # } |
| 2068 | # |
| 2069 | # To optimize computation, memory and network traffic, variables that |
| 2070 | # repeat in the output multiple times can be stored once in a shared |
| 2071 | # variable table and be referenced using the `var_table_index` field. The |
| 2072 | # variables stored in the shared table are nameless and are essentially |
| 2073 | # a partition of the complete variable. To reconstruct the complete |
| 2074 | # variable, merge the referencing variable with the referenced variable. |
| 2075 | # |
| 2076 | # When using the shared variable table, the following variables: |
| 2077 | # |
| 2078 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2079 | # T* p = &x; |
| 2080 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2081 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2082 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 2083 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 2084 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2085 | # |
| 2086 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2087 | # members { name: "m1", value: "3", type: "int" }, |
| 2088 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2089 | # } |
| 2090 | # |
| 2091 | # Note that the pointer address is stored with the referencing variable |
| 2092 | # and not with the referenced variable. This allows the referenced variable |
| 2093 | # to be shared between pointers and references. |
| 2094 | # |
| 2095 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2096 | "members": [ # Members contained or pointed to by the variable. |
| 2097 | # Object with schema name: Variable |
| 2098 | ], |
| 2099 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2100 | # unset. A status of a single variable only applies to that variable or |
| 2101 | # expression. The rest of breakpoint data still remains valid. Variables |
| 2102 | # might be reported in error state even when breakpoint is not in final |
| 2103 | # state. |
| 2104 | # |
| 2105 | # The message may refer to variable name with `refers_to` set to |
| 2106 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 2107 | # In either case variable value and members will be unset. |
| 2108 | # |
| 2109 | # Example of error message applied to name: `Invalid expression syntax`. |
| 2110 | # |
| 2111 | # Example of information message applied to value: `Not captured`. |
| 2112 | # |
| 2113 | # Examples of error message applied to value: |
| 2114 | # |
| 2115 | # * `Malformed string`, |
| 2116 | # * `Field f not found in class C` |
| 2117 | # * `Null pointer dereference` |
| 2118 | # The message can indicate an error or informational status, and refer to |
| 2119 | # specific parts of the containing object. |
| 2120 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 2121 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2122 | "isError": True or False, # Distinguishes errors from informational messages. |
| 2123 | "description": { # Represents a message with parameters. # Status message text. |
| 2124 | "parameters": [ # Optional parameters to be embedded into the message. |
| 2125 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2126 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2127 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2128 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 2129 | # character. |
| 2130 | # |
| 2131 | # Examples: |
| 2132 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2133 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2134 | # is loaded. Again, $0 is very important.` |
| 2135 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2136 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2137 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2138 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2139 | "name": "A String", # Name of the variable, if any. |
| 2140 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2141 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 2142 | # a type is agent specific. It is recommended to include the dynamic type |
| 2143 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2144 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 2145 | # one variable can reference the same variable in the table. The |
| 2146 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 2147 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2148 | }, |
| 2149 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2150 | "isFinalState": True or False, # When true, indicates that this is a final result and the |
| 2151 | # breakpoint state will not change from here on. |
| 2152 | "stackFrames": [ # The stack at breakpoint time, where stack_frames[0] represents the most |
| 2153 | # recently entered function. |
| 2154 | { # Represents a stack frame context. |
| 2155 | "arguments": [ # Set of arguments passed to this function. |
| 2156 | # Note that this might not be populated for all stack frames. |
| 2157 | { # Represents a variable or an argument possibly of a compound object type. |
| 2158 | # Note how the following variables are represented: |
| 2159 | # |
| 2160 | # 1) A simple variable: |
| 2161 | # |
| 2162 | # int x = 5 |
| 2163 | # |
| 2164 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 2165 | # |
| 2166 | # 2) A compound object: |
| 2167 | # |
| 2168 | # struct T { |
| 2169 | # int m1; |
| 2170 | # int m2; |
| 2171 | # }; |
| 2172 | # T x = { 3, 7 }; |
| 2173 | # |
| 2174 | # { // Captured variable |
| 2175 | # name: "x", |
| 2176 | # type: "T", |
| 2177 | # members { name: "m1", value: "3", type: "int" }, |
| 2178 | # members { name: "m2", value: "7", type: "int" } |
| 2179 | # } |
| 2180 | # |
| 2181 | # 3) A pointer where the pointee was captured: |
| 2182 | # |
| 2183 | # T x = { 3, 7 }; |
| 2184 | # T* p = &x; |
| 2185 | # |
| 2186 | # { // Captured variable |
| 2187 | # name: "p", |
| 2188 | # type: "T*", |
| 2189 | # value: "0x00500500", |
| 2190 | # members { name: "m1", value: "3", type: "int" }, |
| 2191 | # members { name: "m2", value: "7", type: "int" } |
| 2192 | # } |
| 2193 | # |
| 2194 | # 4) A pointer where the pointee was not captured: |
| 2195 | # |
| 2196 | # T* p = new T; |
| 2197 | # |
| 2198 | # { // Captured variable |
| 2199 | # name: "p", |
| 2200 | # type: "T*", |
| 2201 | # value: "0x00400400" |
| 2202 | # status { is_error: true, description { format: "unavailable" } } |
| 2203 | # } |
| 2204 | # |
| 2205 | # The status should describe the reason for the missing value, |
| 2206 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 2207 | # |
| 2208 | # Note that a null pointer should not have members. |
| 2209 | # |
| 2210 | # 5) An unnamed value: |
| 2211 | # |
| 2212 | # int* p = new int(7); |
| 2213 | # |
| 2214 | # { // Captured variable |
| 2215 | # name: "p", |
| 2216 | # value: "0x00500500", |
| 2217 | # type: "int*", |
| 2218 | # members { value: "7", type: "int" } } |
| 2219 | # |
| 2220 | # 6) An unnamed pointer where the pointee was not captured: |
| 2221 | # |
| 2222 | # int* p = new int(7); |
| 2223 | # int** pp = &p; |
| 2224 | # |
| 2225 | # { // Captured variable |
| 2226 | # name: "pp", |
| 2227 | # value: "0x00500500", |
| 2228 | # type: "int**", |
| 2229 | # members { |
| 2230 | # value: "0x00400400", |
| 2231 | # type: "int*" |
| 2232 | # status { |
| 2233 | # is_error: true, |
| 2234 | # description: { format: "unavailable" } } |
| 2235 | # } |
| 2236 | # } |
| 2237 | # } |
| 2238 | # |
| 2239 | # To optimize computation, memory and network traffic, variables that |
| 2240 | # repeat in the output multiple times can be stored once in a shared |
| 2241 | # variable table and be referenced using the `var_table_index` field. The |
| 2242 | # variables stored in the shared table are nameless and are essentially |
| 2243 | # a partition of the complete variable. To reconstruct the complete |
| 2244 | # variable, merge the referencing variable with the referenced variable. |
| 2245 | # |
| 2246 | # When using the shared variable table, the following variables: |
| 2247 | # |
| 2248 | # T x = { 3, 7 }; |
| 2249 | # T* p = &x; |
| 2250 | # T& r = x; |
| 2251 | # |
| 2252 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 2253 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 2254 | # { name: "r", type="T&", var_table_index: 3 } |
| 2255 | # |
| 2256 | # { // Shared variable table entry #3: |
| 2257 | # members { name: "m1", value: "3", type: "int" }, |
| 2258 | # members { name: "m2", value: "7", type: "int" } |
| 2259 | # } |
| 2260 | # |
| 2261 | # Note that the pointer address is stored with the referencing variable |
| 2262 | # and not with the referenced variable. This allows the referenced variable |
| 2263 | # to be shared between pointers and references. |
| 2264 | # |
| 2265 | # The type field is optional. The debugger agent may or may not support it. |
| 2266 | "members": [ # Members contained or pointed to by the variable. |
| 2267 | # Object with schema name: Variable |
| 2268 | ], |
| 2269 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 2270 | # unset. A status of a single variable only applies to that variable or |
| 2271 | # expression. The rest of breakpoint data still remains valid. Variables |
| 2272 | # might be reported in error state even when breakpoint is not in final |
| 2273 | # state. |
| 2274 | # |
| 2275 | # The message may refer to variable name with `refers_to` set to |
| 2276 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 2277 | # In either case variable value and members will be unset. |
| 2278 | # |
| 2279 | # Example of error message applied to name: `Invalid expression syntax`. |
| 2280 | # |
| 2281 | # Example of information message applied to value: `Not captured`. |
| 2282 | # |
| 2283 | # Examples of error message applied to value: |
| 2284 | # |
| 2285 | # * `Malformed string`, |
| 2286 | # * `Field f not found in class C` |
| 2287 | # * `Null pointer dereference` |
| 2288 | # The message can indicate an error or informational status, and refer to |
| 2289 | # specific parts of the containing object. |
| 2290 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 2291 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 2292 | "isError": True or False, # Distinguishes errors from informational messages. |
| 2293 | "description": { # Represents a message with parameters. # Status message text. |
| 2294 | "parameters": [ # Optional parameters to be embedded into the message. |
| 2295 | "A String", |
| 2296 | ], |
| 2297 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 2298 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 2299 | # character. |
| 2300 | # |
| 2301 | # Examples: |
| 2302 | # |
| 2303 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 2304 | # is loaded. Again, $0 is very important.` |
| 2305 | # * `Please pay $$10 to use $0 instead of $1.` |
| 2306 | }, |
| 2307 | "refersTo": "A String", # Reference to which the message applies. |
| 2308 | }, |
| 2309 | "name": "A String", # Name of the variable, if any. |
| 2310 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 2311 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 2312 | # a type is agent specific. It is recommended to include the dynamic type |
| 2313 | # rather than a static type of an object. |
| 2314 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 2315 | # one variable can reference the same variable in the table. The |
| 2316 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 2317 | "value": "A String", # Simple value of the variable. |
| 2318 | }, |
| 2319 | ], |
| 2320 | "locals": [ # Set of local variables at the stack frame location. |
| 2321 | # Note that this might not be populated for all stack frames. |
| 2322 | { # Represents a variable or an argument possibly of a compound object type. |
| 2323 | # Note how the following variables are represented: |
| 2324 | # |
| 2325 | # 1) A simple variable: |
| 2326 | # |
| 2327 | # int x = 5 |
| 2328 | # |
| 2329 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 2330 | # |
| 2331 | # 2) A compound object: |
| 2332 | # |
| 2333 | # struct T { |
| 2334 | # int m1; |
| 2335 | # int m2; |
| 2336 | # }; |
| 2337 | # T x = { 3, 7 }; |
| 2338 | # |
| 2339 | # { // Captured variable |
| 2340 | # name: "x", |
| 2341 | # type: "T", |
| 2342 | # members { name: "m1", value: "3", type: "int" }, |
| 2343 | # members { name: "m2", value: "7", type: "int" } |
| 2344 | # } |
| 2345 | # |
| 2346 | # 3) A pointer where the pointee was captured: |
| 2347 | # |
| 2348 | # T x = { 3, 7 }; |
| 2349 | # T* p = &x; |
| 2350 | # |
| 2351 | # { // Captured variable |
| 2352 | # name: "p", |
| 2353 | # type: "T*", |
| 2354 | # value: "0x00500500", |
| 2355 | # members { name: "m1", value: "3", type: "int" }, |
| 2356 | # members { name: "m2", value: "7", type: "int" } |
| 2357 | # } |
| 2358 | # |
| 2359 | # 4) A pointer where the pointee was not captured: |
| 2360 | # |
| 2361 | # T* p = new T; |
| 2362 | # |
| 2363 | # { // Captured variable |
| 2364 | # name: "p", |
| 2365 | # type: "T*", |
| 2366 | # value: "0x00400400" |
| 2367 | # status { is_error: true, description { format: "unavailable" } } |
| 2368 | # } |
| 2369 | # |
| 2370 | # The status should describe the reason for the missing value, |
| 2371 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 2372 | # |
| 2373 | # Note that a null pointer should not have members. |
| 2374 | # |
| 2375 | # 5) An unnamed value: |
| 2376 | # |
| 2377 | # int* p = new int(7); |
| 2378 | # |
| 2379 | # { // Captured variable |
| 2380 | # name: "p", |
| 2381 | # value: "0x00500500", |
| 2382 | # type: "int*", |
| 2383 | # members { value: "7", type: "int" } } |
| 2384 | # |
| 2385 | # 6) An unnamed pointer where the pointee was not captured: |
| 2386 | # |
| 2387 | # int* p = new int(7); |
| 2388 | # int** pp = &p; |
| 2389 | # |
| 2390 | # { // Captured variable |
| 2391 | # name: "pp", |
| 2392 | # value: "0x00500500", |
| 2393 | # type: "int**", |
| 2394 | # members { |
| 2395 | # value: "0x00400400", |
| 2396 | # type: "int*" |
| 2397 | # status { |
| 2398 | # is_error: true, |
| 2399 | # description: { format: "unavailable" } } |
| 2400 | # } |
| 2401 | # } |
| 2402 | # } |
| 2403 | # |
| 2404 | # To optimize computation, memory and network traffic, variables that |
| 2405 | # repeat in the output multiple times can be stored once in a shared |
| 2406 | # variable table and be referenced using the `var_table_index` field. The |
| 2407 | # variables stored in the shared table are nameless and are essentially |
| 2408 | # a partition of the complete variable. To reconstruct the complete |
| 2409 | # variable, merge the referencing variable with the referenced variable. |
| 2410 | # |
| 2411 | # When using the shared variable table, the following variables: |
| 2412 | # |
| 2413 | # T x = { 3, 7 }; |
| 2414 | # T* p = &x; |
| 2415 | # T& r = x; |
| 2416 | # |
| 2417 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 2418 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 2419 | # { name: "r", type="T&", var_table_index: 3 } |
| 2420 | # |
| 2421 | # { // Shared variable table entry #3: |
| 2422 | # members { name: "m1", value: "3", type: "int" }, |
| 2423 | # members { name: "m2", value: "7", type: "int" } |
| 2424 | # } |
| 2425 | # |
| 2426 | # Note that the pointer address is stored with the referencing variable |
| 2427 | # and not with the referenced variable. This allows the referenced variable |
| 2428 | # to be shared between pointers and references. |
| 2429 | # |
| 2430 | # The type field is optional. The debugger agent may or may not support it. |
| 2431 | "members": [ # Members contained or pointed to by the variable. |
| 2432 | # Object with schema name: Variable |
| 2433 | ], |
| 2434 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 2435 | # unset. A status of a single variable only applies to that variable or |
| 2436 | # expression. The rest of breakpoint data still remains valid. Variables |
| 2437 | # might be reported in error state even when breakpoint is not in final |
| 2438 | # state. |
| 2439 | # |
| 2440 | # The message may refer to variable name with `refers_to` set to |
| 2441 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 2442 | # In either case variable value and members will be unset. |
| 2443 | # |
| 2444 | # Example of error message applied to name: `Invalid expression syntax`. |
| 2445 | # |
| 2446 | # Example of information message applied to value: `Not captured`. |
| 2447 | # |
| 2448 | # Examples of error message applied to value: |
| 2449 | # |
| 2450 | # * `Malformed string`, |
| 2451 | # * `Field f not found in class C` |
| 2452 | # * `Null pointer dereference` |
| 2453 | # The message can indicate an error or informational status, and refer to |
| 2454 | # specific parts of the containing object. |
| 2455 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 2456 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 2457 | "isError": True or False, # Distinguishes errors from informational messages. |
| 2458 | "description": { # Represents a message with parameters. # Status message text. |
| 2459 | "parameters": [ # Optional parameters to be embedded into the message. |
| 2460 | "A String", |
| 2461 | ], |
| 2462 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 2463 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 2464 | # character. |
| 2465 | # |
| 2466 | # Examples: |
| 2467 | # |
| 2468 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 2469 | # is loaded. Again, $0 is very important.` |
| 2470 | # * `Please pay $$10 to use $0 instead of $1.` |
| 2471 | }, |
| 2472 | "refersTo": "A String", # Reference to which the message applies. |
| 2473 | }, |
| 2474 | "name": "A String", # Name of the variable, if any. |
| 2475 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 2476 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 2477 | # a type is agent specific. It is recommended to include the dynamic type |
| 2478 | # rather than a static type of an object. |
| 2479 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 2480 | # one variable can reference the same variable in the table. The |
| 2481 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 2482 | "value": "A String", # Simple value of the variable. |
| 2483 | }, |
| 2484 | ], |
| 2485 | "location": { # Represents a location in the source code. # Source location of the call site. |
| 2486 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 2487 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 2488 | # Agents that do not support setting breakpoints on specific columns ignore |
| 2489 | # this field. |
| 2490 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 2491 | }, |
| 2492 | "function": "A String", # Demangled function name at the call site. |
| 2493 | }, |
| 2494 | ], |
| 2495 | "condition": "A String", # Condition that triggers the breakpoint. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2496 | # The condition is a compound boolean expression composed using expressions |
| 2497 | # in a programming language at the source location. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2498 | } |
| 2499 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2500 | canaryOption: string, The canary option set by the user upon setting breakpoint. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2501 | clientVersion: string, Required. The client version making the call. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2502 | Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2503 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2504 | Allowed values |
| 2505 | 1 - v1 error format |
| 2506 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2507 | |
| 2508 | Returns: |
| 2509 | An object of the form: |
| 2510 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 2511 | { # Response for setting a breakpoint. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2512 | "breakpoint": { # ------------------------------------------------------------------------------ # Breakpoint resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2513 | # The field `id` is guaranteed to be set (in addition to the echoed fields). |
| 2514 | # ## Breakpoint (the resource) |
| 2515 | # |
| 2516 | # Represents the breakpoint specification, status and results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2517 | "canaryExpireTime": "A String", # The deadline for the breakpoint to stay in CANARY_ACTIVE state. The value |
| 2518 | # is meaningless when the breakpoint is not in CANARY_ACTIVE state. |
| 2519 | "status": { # Represents a contextual status message. # Breakpoint status. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2520 | # |
| 2521 | # The status includes an error flag and a human readable message. |
| 2522 | # This field is usually unset. The message can be either |
| 2523 | # informational or an error message. Regardless, clients should always |
| 2524 | # display the text message back to the user. |
| 2525 | # |
| 2526 | # Error status indicates complete failure of the breakpoint. |
| 2527 | # |
| 2528 | # Example (non-final state): `Still loading symbols...` |
| 2529 | # |
| 2530 | # Examples (final state): |
| 2531 | # |
| 2532 | # * `Invalid line number` referring to location |
| 2533 | # * `Field f not found in class C` referring to condition |
| 2534 | # The message can indicate an error or informational status, and refer to |
| 2535 | # specific parts of the containing object. |
| 2536 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 2537 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2538 | "isError": True or False, # Distinguishes errors from informational messages. |
| 2539 | "description": { # Represents a message with parameters. # Status message text. |
| 2540 | "parameters": [ # Optional parameters to be embedded into the message. |
| 2541 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2542 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2543 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2544 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 2545 | # character. |
| 2546 | # |
| 2547 | # Examples: |
| 2548 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2549 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2550 | # is loaded. Again, $0 is very important.` |
| 2551 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2552 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2553 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2554 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2555 | "state": "A String", # The current state of the breakpoint. |
| 2556 | "userEmail": "A String", # E-mail address of the user that created this breakpoint |
| 2557 | "action": "A String", # Action that the agent should perform when the code at the |
| 2558 | # breakpoint location is hit. |
| 2559 | "logLevel": "A String", # Indicates the severity of the log. Only relevant when action is `LOG`. |
| 2560 | "id": "A String", # Breakpoint identifier, unique in the scope of the debuggee. |
| 2561 | "location": { # Represents a location in the source code. # Breakpoint source location. |
| 2562 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 2563 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 2564 | # Agents that do not support setting breakpoints on specific columns ignore |
| 2565 | # this field. |
| 2566 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 2567 | }, |
| 2568 | "finalTime": "A String", # Time this breakpoint was finalized as seen by the server in seconds |
| 2569 | # resolution. |
| 2570 | "variableTable": [ # The `variable_table` exists to aid with computation, memory and network |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2571 | # traffic optimization. It enables storing a variable once and reference |
| 2572 | # it from multiple variables, including variables stored in the |
| 2573 | # `variable_table` itself. |
| 2574 | # For example, the same `this` object, which may appear at many levels of |
| 2575 | # the stack, can have all of its data stored once in this table. The |
| 2576 | # stack frame variables then would hold only a reference to it. |
| 2577 | # |
| 2578 | # The variable `var_table_index` field is an index into this repeated field. |
| 2579 | # The stored objects are nameless and get their name from the referencing |
| 2580 | # variable. The effective variable is a merge of the referencing variable |
| 2581 | # and the referenced variable. |
| 2582 | { # Represents a variable or an argument possibly of a compound object type. |
| 2583 | # Note how the following variables are represented: |
| 2584 | # |
| 2585 | # 1) A simple variable: |
| 2586 | # |
| 2587 | # int x = 5 |
| 2588 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2589 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2590 | # |
| 2591 | # 2) A compound object: |
| 2592 | # |
| 2593 | # struct T { |
| 2594 | # int m1; |
| 2595 | # int m2; |
| 2596 | # }; |
| 2597 | # T x = { 3, 7 }; |
| 2598 | # |
| 2599 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2600 | # name: "x", |
| 2601 | # type: "T", |
| 2602 | # members { name: "m1", value: "3", type: "int" }, |
| 2603 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2604 | # } |
| 2605 | # |
| 2606 | # 3) A pointer where the pointee was captured: |
| 2607 | # |
| 2608 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2609 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2610 | # |
| 2611 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2612 | # name: "p", |
| 2613 | # type: "T*", |
| 2614 | # value: "0x00500500", |
| 2615 | # members { name: "m1", value: "3", type: "int" }, |
| 2616 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2617 | # } |
| 2618 | # |
| 2619 | # 4) A pointer where the pointee was not captured: |
| 2620 | # |
| 2621 | # T* p = new T; |
| 2622 | # |
| 2623 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2624 | # name: "p", |
| 2625 | # type: "T*", |
| 2626 | # value: "0x00400400" |
| 2627 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2628 | # } |
| 2629 | # |
| 2630 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2631 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2632 | # |
| 2633 | # Note that a null pointer should not have members. |
| 2634 | # |
| 2635 | # 5) An unnamed value: |
| 2636 | # |
| 2637 | # int* p = new int(7); |
| 2638 | # |
| 2639 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2640 | # name: "p", |
| 2641 | # value: "0x00500500", |
| 2642 | # type: "int*", |
| 2643 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2644 | # |
| 2645 | # 6) An unnamed pointer where the pointee was not captured: |
| 2646 | # |
| 2647 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2648 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2649 | # |
| 2650 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2651 | # name: "pp", |
| 2652 | # value: "0x00500500", |
| 2653 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2654 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2655 | # value: "0x00400400", |
| 2656 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2657 | # status { |
| 2658 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2659 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2660 | # } |
| 2661 | # } |
| 2662 | # } |
| 2663 | # |
| 2664 | # To optimize computation, memory and network traffic, variables that |
| 2665 | # repeat in the output multiple times can be stored once in a shared |
| 2666 | # variable table and be referenced using the `var_table_index` field. The |
| 2667 | # variables stored in the shared table are nameless and are essentially |
| 2668 | # a partition of the complete variable. To reconstruct the complete |
| 2669 | # variable, merge the referencing variable with the referenced variable. |
| 2670 | # |
| 2671 | # When using the shared variable table, the following variables: |
| 2672 | # |
| 2673 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2674 | # T* p = &x; |
| 2675 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2676 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2677 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 2678 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 2679 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2680 | # |
| 2681 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2682 | # members { name: "m1", value: "3", type: "int" }, |
| 2683 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2684 | # } |
| 2685 | # |
| 2686 | # Note that the pointer address is stored with the referencing variable |
| 2687 | # and not with the referenced variable. This allows the referenced variable |
| 2688 | # to be shared between pointers and references. |
| 2689 | # |
| 2690 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2691 | "members": [ # Members contained or pointed to by the variable. |
| 2692 | # Object with schema name: Variable |
| 2693 | ], |
| 2694 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2695 | # unset. A status of a single variable only applies to that variable or |
| 2696 | # expression. The rest of breakpoint data still remains valid. Variables |
| 2697 | # might be reported in error state even when breakpoint is not in final |
| 2698 | # state. |
| 2699 | # |
| 2700 | # The message may refer to variable name with `refers_to` set to |
| 2701 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 2702 | # In either case variable value and members will be unset. |
| 2703 | # |
| 2704 | # Example of error message applied to name: `Invalid expression syntax`. |
| 2705 | # |
| 2706 | # Example of information message applied to value: `Not captured`. |
| 2707 | # |
| 2708 | # Examples of error message applied to value: |
| 2709 | # |
| 2710 | # * `Malformed string`, |
| 2711 | # * `Field f not found in class C` |
| 2712 | # * `Null pointer dereference` |
| 2713 | # The message can indicate an error or informational status, and refer to |
| 2714 | # specific parts of the containing object. |
| 2715 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 2716 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2717 | "isError": True or False, # Distinguishes errors from informational messages. |
| 2718 | "description": { # Represents a message with parameters. # Status message text. |
| 2719 | "parameters": [ # Optional parameters to be embedded into the message. |
| 2720 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2721 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2722 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2723 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 2724 | # character. |
| 2725 | # |
| 2726 | # Examples: |
| 2727 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2728 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2729 | # is loaded. Again, $0 is very important.` |
| 2730 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2731 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2732 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2733 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2734 | "name": "A String", # Name of the variable, if any. |
| 2735 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2736 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 2737 | # a type is agent specific. It is recommended to include the dynamic type |
| 2738 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2739 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 2740 | # one variable can reference the same variable in the table. The |
| 2741 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 2742 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2743 | }, |
| 2744 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2745 | "createTime": "A String", # Time this breakpoint was created by the server in seconds resolution. |
| 2746 | "logMessageFormat": "A String", # Only relevant when action is `LOG`. Defines the message to log when |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2747 | # the breakpoint hits. The message may include parameter placeholders `$0`, |
| 2748 | # `$1`, etc. These placeholders are replaced with the evaluated value |
| 2749 | # of the appropriate expression. Expressions not referenced in |
| 2750 | # `log_message_format` are not logged. |
| 2751 | # |
| 2752 | # Example: `Message received, id = $0, count = $1` with |
| 2753 | # `expressions` = `[ message.id, message.count ]`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2754 | "labels": { # A set of custom breakpoint properties, populated by the agent, to be |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2755 | # displayed to the user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2756 | "a_key": "A String", |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2757 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2758 | "expressions": [ # List of read-only expressions to evaluate at the breakpoint location. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2759 | # The expressions are composed using expressions in the programming language |
| 2760 | # at the source location. If the breakpoint action is `LOG`, the evaluated |
| 2761 | # expressions are included in log statements. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2762 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2763 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2764 | "evaluatedExpressions": [ # Values of evaluated expressions at breakpoint time. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2765 | # The evaluated expressions appear in exactly the same order they |
| 2766 | # are listed in the `expressions` field. |
| 2767 | # The `name` field holds the original expression text, the `value` or |
| 2768 | # `members` field holds the result of the evaluated expression. |
| 2769 | # If the expression cannot be evaluated, the `status` inside the `Variable` |
| 2770 | # will indicate an error and contain the error text. |
| 2771 | { # Represents a variable or an argument possibly of a compound object type. |
| 2772 | # Note how the following variables are represented: |
| 2773 | # |
| 2774 | # 1) A simple variable: |
| 2775 | # |
| 2776 | # int x = 5 |
| 2777 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2778 | # { name: "x", value: "5", type: "int" } // Captured variable |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2779 | # |
| 2780 | # 2) A compound object: |
| 2781 | # |
| 2782 | # struct T { |
| 2783 | # int m1; |
| 2784 | # int m2; |
| 2785 | # }; |
| 2786 | # T x = { 3, 7 }; |
| 2787 | # |
| 2788 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2789 | # name: "x", |
| 2790 | # type: "T", |
| 2791 | # members { name: "m1", value: "3", type: "int" }, |
| 2792 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2793 | # } |
| 2794 | # |
| 2795 | # 3) A pointer where the pointee was captured: |
| 2796 | # |
| 2797 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2798 | # T* p = &x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2799 | # |
| 2800 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2801 | # name: "p", |
| 2802 | # type: "T*", |
| 2803 | # value: "0x00500500", |
| 2804 | # members { name: "m1", value: "3", type: "int" }, |
| 2805 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2806 | # } |
| 2807 | # |
| 2808 | # 4) A pointer where the pointee was not captured: |
| 2809 | # |
| 2810 | # T* p = new T; |
| 2811 | # |
| 2812 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2813 | # name: "p", |
| 2814 | # type: "T*", |
| 2815 | # value: "0x00400400" |
| 2816 | # status { is_error: true, description { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2817 | # } |
| 2818 | # |
| 2819 | # The status should describe the reason for the missing value, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2820 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2821 | # |
| 2822 | # Note that a null pointer should not have members. |
| 2823 | # |
| 2824 | # 5) An unnamed value: |
| 2825 | # |
| 2826 | # int* p = new int(7); |
| 2827 | # |
| 2828 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2829 | # name: "p", |
| 2830 | # value: "0x00500500", |
| 2831 | # type: "int*", |
| 2832 | # members { value: "7", type: "int" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2833 | # |
| 2834 | # 6) An unnamed pointer where the pointee was not captured: |
| 2835 | # |
| 2836 | # int* p = new int(7); |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2837 | # int** pp = &p; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2838 | # |
| 2839 | # { // Captured variable |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2840 | # name: "pp", |
| 2841 | # value: "0x00500500", |
| 2842 | # type: "int**", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2843 | # members { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2844 | # value: "0x00400400", |
| 2845 | # type: "int*" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2846 | # status { |
| 2847 | # is_error: true, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2848 | # description: { format: "unavailable" } } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2849 | # } |
| 2850 | # } |
| 2851 | # } |
| 2852 | # |
| 2853 | # To optimize computation, memory and network traffic, variables that |
| 2854 | # repeat in the output multiple times can be stored once in a shared |
| 2855 | # variable table and be referenced using the `var_table_index` field. The |
| 2856 | # variables stored in the shared table are nameless and are essentially |
| 2857 | # a partition of the complete variable. To reconstruct the complete |
| 2858 | # variable, merge the referencing variable with the referenced variable. |
| 2859 | # |
| 2860 | # When using the shared variable table, the following variables: |
| 2861 | # |
| 2862 | # T x = { 3, 7 }; |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2863 | # T* p = &x; |
| 2864 | # T& r = x; |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2865 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2866 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 2867 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 2868 | # { name: "r", type="T&", var_table_index: 3 } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2869 | # |
| 2870 | # { // Shared variable table entry #3: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2871 | # members { name: "m1", value: "3", type: "int" }, |
| 2872 | # members { name: "m2", value: "7", type: "int" } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2873 | # } |
| 2874 | # |
| 2875 | # Note that the pointer address is stored with the referencing variable |
| 2876 | # and not with the referenced variable. This allows the referenced variable |
| 2877 | # to be shared between pointers and references. |
| 2878 | # |
| 2879 | # The type field is optional. The debugger agent may or may not support it. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2880 | "members": [ # Members contained or pointed to by the variable. |
| 2881 | # Object with schema name: Variable |
| 2882 | ], |
| 2883 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2884 | # unset. A status of a single variable only applies to that variable or |
| 2885 | # expression. The rest of breakpoint data still remains valid. Variables |
| 2886 | # might be reported in error state even when breakpoint is not in final |
| 2887 | # state. |
| 2888 | # |
| 2889 | # The message may refer to variable name with `refers_to` set to |
| 2890 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 2891 | # In either case variable value and members will be unset. |
| 2892 | # |
| 2893 | # Example of error message applied to name: `Invalid expression syntax`. |
| 2894 | # |
| 2895 | # Example of information message applied to value: `Not captured`. |
| 2896 | # |
| 2897 | # Examples of error message applied to value: |
| 2898 | # |
| 2899 | # * `Malformed string`, |
| 2900 | # * `Field f not found in class C` |
| 2901 | # * `Null pointer dereference` |
| 2902 | # The message can indicate an error or informational status, and refer to |
| 2903 | # specific parts of the containing object. |
| 2904 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 2905 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2906 | "isError": True or False, # Distinguishes errors from informational messages. |
| 2907 | "description": { # Represents a message with parameters. # Status message text. |
| 2908 | "parameters": [ # Optional parameters to be embedded into the message. |
| 2909 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2910 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2911 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2912 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 2913 | # character. |
| 2914 | # |
| 2915 | # Examples: |
| 2916 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2917 | # * `Failed to load '$0' which helps debug $1 the first time it |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2918 | # is loaded. Again, $0 is very important.` |
| 2919 | # * `Please pay $$10 to use $0 instead of $1.` |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2920 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2921 | "refersTo": "A String", # Reference to which the message applies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2922 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2923 | "name": "A String", # Name of the variable, if any. |
| 2924 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2925 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 2926 | # a type is agent specific. It is recommended to include the dynamic type |
| 2927 | # rather than a static type of an object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2928 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 2929 | # one variable can reference the same variable in the table. The |
| 2930 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 2931 | "value": "A String", # Simple value of the variable. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 2932 | }, |
| 2933 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2934 | "isFinalState": True or False, # When true, indicates that this is a final result and the |
| 2935 | # breakpoint state will not change from here on. |
| 2936 | "stackFrames": [ # The stack at breakpoint time, where stack_frames[0] represents the most |
| 2937 | # recently entered function. |
| 2938 | { # Represents a stack frame context. |
| 2939 | "arguments": [ # Set of arguments passed to this function. |
| 2940 | # Note that this might not be populated for all stack frames. |
| 2941 | { # Represents a variable or an argument possibly of a compound object type. |
| 2942 | # Note how the following variables are represented: |
| 2943 | # |
| 2944 | # 1) A simple variable: |
| 2945 | # |
| 2946 | # int x = 5 |
| 2947 | # |
| 2948 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 2949 | # |
| 2950 | # 2) A compound object: |
| 2951 | # |
| 2952 | # struct T { |
| 2953 | # int m1; |
| 2954 | # int m2; |
| 2955 | # }; |
| 2956 | # T x = { 3, 7 }; |
| 2957 | # |
| 2958 | # { // Captured variable |
| 2959 | # name: "x", |
| 2960 | # type: "T", |
| 2961 | # members { name: "m1", value: "3", type: "int" }, |
| 2962 | # members { name: "m2", value: "7", type: "int" } |
| 2963 | # } |
| 2964 | # |
| 2965 | # 3) A pointer where the pointee was captured: |
| 2966 | # |
| 2967 | # T x = { 3, 7 }; |
| 2968 | # T* p = &x; |
| 2969 | # |
| 2970 | # { // Captured variable |
| 2971 | # name: "p", |
| 2972 | # type: "T*", |
| 2973 | # value: "0x00500500", |
| 2974 | # members { name: "m1", value: "3", type: "int" }, |
| 2975 | # members { name: "m2", value: "7", type: "int" } |
| 2976 | # } |
| 2977 | # |
| 2978 | # 4) A pointer where the pointee was not captured: |
| 2979 | # |
| 2980 | # T* p = new T; |
| 2981 | # |
| 2982 | # { // Captured variable |
| 2983 | # name: "p", |
| 2984 | # type: "T*", |
| 2985 | # value: "0x00400400" |
| 2986 | # status { is_error: true, description { format: "unavailable" } } |
| 2987 | # } |
| 2988 | # |
| 2989 | # The status should describe the reason for the missing value, |
| 2990 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 2991 | # |
| 2992 | # Note that a null pointer should not have members. |
| 2993 | # |
| 2994 | # 5) An unnamed value: |
| 2995 | # |
| 2996 | # int* p = new int(7); |
| 2997 | # |
| 2998 | # { // Captured variable |
| 2999 | # name: "p", |
| 3000 | # value: "0x00500500", |
| 3001 | # type: "int*", |
| 3002 | # members { value: "7", type: "int" } } |
| 3003 | # |
| 3004 | # 6) An unnamed pointer where the pointee was not captured: |
| 3005 | # |
| 3006 | # int* p = new int(7); |
| 3007 | # int** pp = &p; |
| 3008 | # |
| 3009 | # { // Captured variable |
| 3010 | # name: "pp", |
| 3011 | # value: "0x00500500", |
| 3012 | # type: "int**", |
| 3013 | # members { |
| 3014 | # value: "0x00400400", |
| 3015 | # type: "int*" |
| 3016 | # status { |
| 3017 | # is_error: true, |
| 3018 | # description: { format: "unavailable" } } |
| 3019 | # } |
| 3020 | # } |
| 3021 | # } |
| 3022 | # |
| 3023 | # To optimize computation, memory and network traffic, variables that |
| 3024 | # repeat in the output multiple times can be stored once in a shared |
| 3025 | # variable table and be referenced using the `var_table_index` field. The |
| 3026 | # variables stored in the shared table are nameless and are essentially |
| 3027 | # a partition of the complete variable. To reconstruct the complete |
| 3028 | # variable, merge the referencing variable with the referenced variable. |
| 3029 | # |
| 3030 | # When using the shared variable table, the following variables: |
| 3031 | # |
| 3032 | # T x = { 3, 7 }; |
| 3033 | # T* p = &x; |
| 3034 | # T& r = x; |
| 3035 | # |
| 3036 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 3037 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 3038 | # { name: "r", type="T&", var_table_index: 3 } |
| 3039 | # |
| 3040 | # { // Shared variable table entry #3: |
| 3041 | # members { name: "m1", value: "3", type: "int" }, |
| 3042 | # members { name: "m2", value: "7", type: "int" } |
| 3043 | # } |
| 3044 | # |
| 3045 | # Note that the pointer address is stored with the referencing variable |
| 3046 | # and not with the referenced variable. This allows the referenced variable |
| 3047 | # to be shared between pointers and references. |
| 3048 | # |
| 3049 | # The type field is optional. The debugger agent may or may not support it. |
| 3050 | "members": [ # Members contained or pointed to by the variable. |
| 3051 | # Object with schema name: Variable |
| 3052 | ], |
| 3053 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 3054 | # unset. A status of a single variable only applies to that variable or |
| 3055 | # expression. The rest of breakpoint data still remains valid. Variables |
| 3056 | # might be reported in error state even when breakpoint is not in final |
| 3057 | # state. |
| 3058 | # |
| 3059 | # The message may refer to variable name with `refers_to` set to |
| 3060 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 3061 | # In either case variable value and members will be unset. |
| 3062 | # |
| 3063 | # Example of error message applied to name: `Invalid expression syntax`. |
| 3064 | # |
| 3065 | # Example of information message applied to value: `Not captured`. |
| 3066 | # |
| 3067 | # Examples of error message applied to value: |
| 3068 | # |
| 3069 | # * `Malformed string`, |
| 3070 | # * `Field f not found in class C` |
| 3071 | # * `Null pointer dereference` |
| 3072 | # The message can indicate an error or informational status, and refer to |
| 3073 | # specific parts of the containing object. |
| 3074 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 3075 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 3076 | "isError": True or False, # Distinguishes errors from informational messages. |
| 3077 | "description": { # Represents a message with parameters. # Status message text. |
| 3078 | "parameters": [ # Optional parameters to be embedded into the message. |
| 3079 | "A String", |
| 3080 | ], |
| 3081 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 3082 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 3083 | # character. |
| 3084 | # |
| 3085 | # Examples: |
| 3086 | # |
| 3087 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 3088 | # is loaded. Again, $0 is very important.` |
| 3089 | # * `Please pay $$10 to use $0 instead of $1.` |
| 3090 | }, |
| 3091 | "refersTo": "A String", # Reference to which the message applies. |
| 3092 | }, |
| 3093 | "name": "A String", # Name of the variable, if any. |
| 3094 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 3095 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 3096 | # a type is agent specific. It is recommended to include the dynamic type |
| 3097 | # rather than a static type of an object. |
| 3098 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 3099 | # one variable can reference the same variable in the table. The |
| 3100 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 3101 | "value": "A String", # Simple value of the variable. |
| 3102 | }, |
| 3103 | ], |
| 3104 | "locals": [ # Set of local variables at the stack frame location. |
| 3105 | # Note that this might not be populated for all stack frames. |
| 3106 | { # Represents a variable or an argument possibly of a compound object type. |
| 3107 | # Note how the following variables are represented: |
| 3108 | # |
| 3109 | # 1) A simple variable: |
| 3110 | # |
| 3111 | # int x = 5 |
| 3112 | # |
| 3113 | # { name: "x", value: "5", type: "int" } // Captured variable |
| 3114 | # |
| 3115 | # 2) A compound object: |
| 3116 | # |
| 3117 | # struct T { |
| 3118 | # int m1; |
| 3119 | # int m2; |
| 3120 | # }; |
| 3121 | # T x = { 3, 7 }; |
| 3122 | # |
| 3123 | # { // Captured variable |
| 3124 | # name: "x", |
| 3125 | # type: "T", |
| 3126 | # members { name: "m1", value: "3", type: "int" }, |
| 3127 | # members { name: "m2", value: "7", type: "int" } |
| 3128 | # } |
| 3129 | # |
| 3130 | # 3) A pointer where the pointee was captured: |
| 3131 | # |
| 3132 | # T x = { 3, 7 }; |
| 3133 | # T* p = &x; |
| 3134 | # |
| 3135 | # { // Captured variable |
| 3136 | # name: "p", |
| 3137 | # type: "T*", |
| 3138 | # value: "0x00500500", |
| 3139 | # members { name: "m1", value: "3", type: "int" }, |
| 3140 | # members { name: "m2", value: "7", type: "int" } |
| 3141 | # } |
| 3142 | # |
| 3143 | # 4) A pointer where the pointee was not captured: |
| 3144 | # |
| 3145 | # T* p = new T; |
| 3146 | # |
| 3147 | # { // Captured variable |
| 3148 | # name: "p", |
| 3149 | # type: "T*", |
| 3150 | # value: "0x00400400" |
| 3151 | # status { is_error: true, description { format: "unavailable" } } |
| 3152 | # } |
| 3153 | # |
| 3154 | # The status should describe the reason for the missing value, |
| 3155 | # such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. |
| 3156 | # |
| 3157 | # Note that a null pointer should not have members. |
| 3158 | # |
| 3159 | # 5) An unnamed value: |
| 3160 | # |
| 3161 | # int* p = new int(7); |
| 3162 | # |
| 3163 | # { // Captured variable |
| 3164 | # name: "p", |
| 3165 | # value: "0x00500500", |
| 3166 | # type: "int*", |
| 3167 | # members { value: "7", type: "int" } } |
| 3168 | # |
| 3169 | # 6) An unnamed pointer where the pointee was not captured: |
| 3170 | # |
| 3171 | # int* p = new int(7); |
| 3172 | # int** pp = &p; |
| 3173 | # |
| 3174 | # { // Captured variable |
| 3175 | # name: "pp", |
| 3176 | # value: "0x00500500", |
| 3177 | # type: "int**", |
| 3178 | # members { |
| 3179 | # value: "0x00400400", |
| 3180 | # type: "int*" |
| 3181 | # status { |
| 3182 | # is_error: true, |
| 3183 | # description: { format: "unavailable" } } |
| 3184 | # } |
| 3185 | # } |
| 3186 | # } |
| 3187 | # |
| 3188 | # To optimize computation, memory and network traffic, variables that |
| 3189 | # repeat in the output multiple times can be stored once in a shared |
| 3190 | # variable table and be referenced using the `var_table_index` field. The |
| 3191 | # variables stored in the shared table are nameless and are essentially |
| 3192 | # a partition of the complete variable. To reconstruct the complete |
| 3193 | # variable, merge the referencing variable with the referenced variable. |
| 3194 | # |
| 3195 | # When using the shared variable table, the following variables: |
| 3196 | # |
| 3197 | # T x = { 3, 7 }; |
| 3198 | # T* p = &x; |
| 3199 | # T& r = x; |
| 3200 | # |
| 3201 | # { name: "x", var_table_index: 3, type: "T" } // Captured variables |
| 3202 | # { name: "p", value "0x00500500", type="T*", var_table_index: 3 } |
| 3203 | # { name: "r", type="T&", var_table_index: 3 } |
| 3204 | # |
| 3205 | # { // Shared variable table entry #3: |
| 3206 | # members { name: "m1", value: "3", type: "int" }, |
| 3207 | # members { name: "m2", value: "7", type: "int" } |
| 3208 | # } |
| 3209 | # |
| 3210 | # Note that the pointer address is stored with the referencing variable |
| 3211 | # and not with the referenced variable. This allows the referenced variable |
| 3212 | # to be shared between pointers and references. |
| 3213 | # |
| 3214 | # The type field is optional. The debugger agent may or may not support it. |
| 3215 | "members": [ # Members contained or pointed to by the variable. |
| 3216 | # Object with schema name: Variable |
| 3217 | ], |
| 3218 | "status": { # Represents a contextual status message. # Status associated with the variable. This field will usually stay |
| 3219 | # unset. A status of a single variable only applies to that variable or |
| 3220 | # expression. The rest of breakpoint data still remains valid. Variables |
| 3221 | # might be reported in error state even when breakpoint is not in final |
| 3222 | # state. |
| 3223 | # |
| 3224 | # The message may refer to variable name with `refers_to` set to |
| 3225 | # `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. |
| 3226 | # In either case variable value and members will be unset. |
| 3227 | # |
| 3228 | # Example of error message applied to name: `Invalid expression syntax`. |
| 3229 | # |
| 3230 | # Example of information message applied to value: `Not captured`. |
| 3231 | # |
| 3232 | # Examples of error message applied to value: |
| 3233 | # |
| 3234 | # * `Malformed string`, |
| 3235 | # * `Field f not found in class C` |
| 3236 | # * `Null pointer dereference` |
| 3237 | # The message can indicate an error or informational status, and refer to |
| 3238 | # specific parts of the containing object. |
| 3239 | # For example, the `Breakpoint.status` field can indicate an error referring |
| 3240 | # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. |
| 3241 | "isError": True or False, # Distinguishes errors from informational messages. |
| 3242 | "description": { # Represents a message with parameters. # Status message text. |
| 3243 | "parameters": [ # Optional parameters to be embedded into the message. |
| 3244 | "A String", |
| 3245 | ], |
| 3246 | "format": "A String", # Format template for the message. The `format` uses placeholders `$0`, |
| 3247 | # `$1`, etc. to reference parameters. `$$` can be used to denote the `$` |
| 3248 | # character. |
| 3249 | # |
| 3250 | # Examples: |
| 3251 | # |
| 3252 | # * `Failed to load '$0' which helps debug $1 the first time it |
| 3253 | # is loaded. Again, $0 is very important.` |
| 3254 | # * `Please pay $$10 to use $0 instead of $1.` |
| 3255 | }, |
| 3256 | "refersTo": "A String", # Reference to which the message applies. |
| 3257 | }, |
| 3258 | "name": "A String", # Name of the variable, if any. |
| 3259 | "type": "A String", # Variable type (e.g. `MyClass`). If the variable is split with |
| 3260 | # `var_table_index`, `type` goes next to `value`. The interpretation of |
| 3261 | # a type is agent specific. It is recommended to include the dynamic type |
| 3262 | # rather than a static type of an object. |
| 3263 | "varTableIndex": 42, # Reference to a variable in the shared variable table. More than |
| 3264 | # one variable can reference the same variable in the table. The |
| 3265 | # `var_table_index` field is an index into `variable_table` in Breakpoint. |
| 3266 | "value": "A String", # Simple value of the variable. |
| 3267 | }, |
| 3268 | ], |
| 3269 | "location": { # Represents a location in the source code. # Source location of the call site. |
| 3270 | "path": "A String", # Path to the source file within the source context of the target binary. |
| 3271 | "column": 42, # Column within a line. The first column in a line as the value `1`. |
| 3272 | # Agents that do not support setting breakpoints on specific columns ignore |
| 3273 | # this field. |
| 3274 | "line": 42, # Line inside the file. The first line in the file has the value `1`. |
| 3275 | }, |
| 3276 | "function": "A String", # Demangled function name at the call site. |
| 3277 | }, |
| 3278 | ], |
| 3279 | "condition": "A String", # Condition that triggers the breakpoint. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 3280 | # The condition is a compound boolean expression composed using expressions |
| 3281 | # in a programming language at the source location. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 3282 | }, |
| 3283 | }</pre> |
| 3284 | </div> |
| 3285 | |
| 3286 | </body></html> |