Skip to content
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

Data breakpoints in OpenDebugAD7 #1257

Merged
merged 12 commits into from
Jan 19, 2022

Conversation

calgagi
Copy link
Contributor

@calgagi calgagi commented Jan 7, 2022

This PR implements DataBreakpointInfo and SetDataBreakpoints for OpenDebugAD7's debug session as a part of the Debug Adapter Protocol (DAP).

Notes:

  1. Caches IDebugProperty2s in VariableManager for lookup by name/VariableReference later to be used for data breakpoints. We can query for IDebugProperty160 on these to use GetDataBreakpointInfo160.
  2. Makes AD7Property.EnumChildren support filtering with the child's name (specified here with pszNameFilter)
  3. Supports BPLT_DATA_STRING in AD7BreakpointRequest (returns the proper address/size).
  4. The DataId passed to/from VS Code as part of both DAP functions is "{address},{size}"

Potential problems/things to improve:

  1. If users have too many data breakpoints, then we receive an exception that GDB can't continue the debuggee process and we display a very mysterious error message: "Debugger was unable to continue the process."
  2. If a variable size is too big to set a data breakpoint on, then we simply don't display the "Break When Value Changes" context menu item. It might be worthwhile in the future to say why it doesn't display.
  3. Add test :)

@gregg-miskelly
Copy link
Member

Otherwise LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants