-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a bytes
range to the DataBreakpointInfo Request
#455
Comments
Questions:
|
I agree with @gregg-miskelly about |
I agree with @kkistm that making the interface more precise makes the purpose easier to understand and its usage cleaner. |
Thanks for the feedback. How about we introduce an alternative request, like interface DataAddressBreakpointInfoArguments {
/**
* The address of the data for which to obtain breakpoint information.
* Treated as a hex value if prefixed with `0x`, or as a decimal value
* otherwise.
*/
address: string;
/**
* If passed, requests breakpoint information for an exclusive byte range
* rather than a single address. The range extends the given number of `bytes`
* from the start `address`.
*
* Treated as a hex value if prefixed with `0x`, or as a decimal value
* otherwise.
*/
bytes?: string
} The response is identical to the This covers the 'access settings' menu with the exception of the "mask" field, though that could be added as a property. Of course this comes with a capability. interface Capability {
// ... in addition to existing properties:
/**
* The debug adapter supports the `dataAdressBreakpointInfo` request.
*/
supportsDataAddressInfo?: boolean; |
@connor4312, the proposition about |
https://microsoft.github.io/debug-adapter-protocol/specification#Requests_DataBreakpointInfo says "If |
Oh, I saw the new request I prefer the original change by adding |
We don't specify that an adapter should treat a numeric return value from an expression in While a little roundabout it's possible to get the address of a variable via its |
I think it's common the pointer-type result from the name is a |
Reopening for discussion. If we were to do it that way, we'd need some additional flagging for the debugger to treat the interface DataBreakpointInfoArguments {
/**
* Reference to the variable container if the data breakpoint is requested for
* a child of the container. The `variablesReference` must have been obtained
* in the current suspended state. See 'Lifetime of Object References' in the
* Overview section for details.
*/
variablesReference?: number;
/**
* The name of the variable's child to obtain data breakpoint information for.
* If `variablesReference` isn't specified, this can be an expression.
* If `asAddress` is specified, this is a memory address: interpreted as a
* hex value if prefixed with `0x`, or a decimal value otherwise.
*/
name: string;
/**
* Clients may set this variable only if the `supportsDataBreakpointBytes`
* capability is true.
*
* Clients may pass this to request a reference to a range of memory rather
* than a single address. Data breakpoints set using the resulting data ID
* request that the debugger pauses within the range of memory extending
* `bytes` from the address or variable specified by `name`.
*
* Treated as a hex value if prefixed with `0x`, or as a decimal value
* otherwise.
*/
bytes?: number;
/**
* If `true`, the `name` is a memory address and the debugger should interpret.
*
* Clients may set this variable only if the `supportsDataBreakpointBytes`
* capability is true.
*/
asAddress?: boolean;
/**
* 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;
} Technically The downside of this is that there is less support for "address-only" properties, but otherwise it's also a nice solution and solves the issue you mention -- and practically I don't expect adapters have special behavior applicable only for a data breakpoint on a variable versus a range of addresses or vise versa. |
Do we need the extra field Given "If |
I think |
After playing around with this a bit, I prefer the new proposal in #455 (comment). I'm going to back my previous changes out of the upcoming DAP release and put a PR in with that proposal for next month's release to allow time for additional discussion. |
This creates a new "Add Data Breakpoint at Address" action in the breakpoints view when a debugger that supports the capability is available. It prompts the user to enter their address in a quickpick, and then allows them to choose appropriate data access settings. The editor side of microsoft/debug-adapter-protocol#455
This creates a new "Add Data Breakpoint at Address" action in the breakpoints view when a debugger that supports the capability is available. It prompts the user to enter their address in a quickpick, and then allows them to choose appropriate data access settings. The editor side of microsoft/debug-adapter-protocol#455
This creates a new "Add Data Breakpoint at Address" action in the breakpoints view when a debugger that supports the capability is available. It prompts the user to enter their address in a quickpick, and then allows them to choose appropriate data access settings. The editor side of microsoft/debug-adapter-protocol#455
One feature from the authors of the request include the ability to set breakpoints for a range of memory:
The "event points" map pretty well onto DAP data breakpoints, except data breakpoints can only be set for singular variables in the protocol.
To allow a range to be set, we need a corresponding capability
Then there may be an additional field in the info request, which specifies the number of bytes following the address in which the debugger should stop:
The text was updated successfully, but these errors were encountered: