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