Skip to content

Commit

Permalink
Add supportsEvaluateForHovers (#347)
Browse files Browse the repository at this point in the history
There is a slight concern of turning this on for GDB as it is documented
with this [requirement](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Capabilities):

> The debug adapter supports a (side effect free) `evaluate`
> request for data hovers.

Because of side-effects on read that is present in memory mapped
registers in embedded systems this can cause unexpected reads of the
target's registers.  For Eclipse CDT I don't think there is any
special code, so I think it is ok to do this here too. GDB also
has a number of settings that may be useful to prevent accidental
reads too.

Fixes eclipse-cdt-cloud/cdt-gdb-vscode#121
  • Loading branch information
jonahgraham authored Dec 16, 2024
1 parent 35ea079 commit 651a56d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gdb/GDBDebugSessionBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export abstract class GDBDebugSessionBase extends LoggingDebugSession {
os.platform() === 'linux' && this.supportsRunInTerminalRequest;
response.body = response.body || {};
response.body.supportsConfigurationDoneRequest = true;
response.body.supportsEvaluateForHovers = true;
response.body.supportsSetVariable = true;
response.body.supportsConditionalBreakpoints = true;
response.body.supportsHitConditionalBreakpoints = true;
Expand Down

0 comments on commit 651a56d

Please sign in to comment.