-
Notifications
You must be signed in to change notification settings - Fork 122
Description
The current way to configure the gdbserver "remote" debugging is to:
- set the
remoteboolean totrue - add necessary information in the
targetfield (e.g.,1.2.3.4:6789). -
"request": "attach", "executable": "./bin/executable", "target": "1.2.3.4:6789", "cwd": "${workspaceRoot}", "remote": true
The current way to configure the gdbserver "extended remote" debugging is to:
- set the
remoteboolean tofalse(or not at all)...which seems counter-intuitive - add necessary information in the
targetfield includingextended-remote(e.g.,extended-remote 1.2.3.4:6789) -
"request": "attach", "executable": "./bin/executable", "target": "extended-remote 1.2.3.4:6789", "cwd": "${workspaceRoot}", "remote": false
From a user perspective, it seems odd that for extended-remote debugging, you would not set the remote boolean. Additionally, having the target commands be different (where one requires the extended-remote, but the other doesn't require the remote) at the beginning is also inconsistent.
It would seem that the remote boolean could go away (i.e., deprecate the option) and that the regular remote debugging could just be specified in the same way that the extended remote is, with a remote prefix in the target property. I think, at least from a user perspective, this would seem more consistent.
Additionally, internally the paths seem to needlessly diverge since the extended-remote is processed via MI2::attach, whereas the regular remote is processed via MI2::connect. It would seem the logic for both of these could be very similar internally.
Furthermore, standardizing on this might better position the extension to support other capabilities in the future, such as loading a core file (i.e., target-select core <file>).