Issue 156473
Summary lldb-dap: DataBreakpointInfoRequest handler violates specification
Labels
Assignees
Reporter Anthony-Eid
    ### Summary

The `DataBreakpiontInforRequest` handler seems to violate the DAP spec by requiring frame ID be sent in the request body. This has causes two problems. 

1. There's no way to specify a global scope for expressions
2. The handler always responds with an error when request uses a variable reference to distinguish the scope being used

### FrameId Specification 

```json
/**
   * When `name` is an _expression_, evaluate it in the scope of this stack frame.
   * If not specified, the _expression_ is evaluated in the global scope. When
   * `variablesReference` is specified, this property has no effect.
   */
  frameId?: number;
```

### Dap logs showing error (With Zed)
```json
{
  "type": "request",
  "seq": 21,
 "command": "dataBreakpointInfo",
  "arguments": {
 "variablesReference": 10,
    "name": "c",
    "asAddress": false
 }
}
// Receive
{
  "body": {
    "error": {
      "format": "invalid arguments for request 'dataBreakpointInfo': missing value at arguments.frameId\n/* error: missing value */\n{\n  \"asAddress\": false,\n  \"name\": \"c\",\n  \"variablesReference\": 10\n}",
      "id": 3,
      "showUser": true
    }
  },
 "command": "dataBreakpointInfo",
  "request_seq": 21,
  "seq": 0,
 "success": false,
  "type": "response"
}
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to