Skip to content

Conversation

@thorstendb-ARM
Copy link
Contributor

@thorstendb-ARM thorstendb-ARM commented May 12, 2025

Adds:

Custom Reset (configured via launch.json).
Issue: #359

Testing:

Required: eclipse-cdt-cloud/cdt-gdb-vscode#152
In a target project, launch.json, add this. The command uses pyOCD but can be any other.

    "configurations": [
        {
            "name": "pyOCD cdt-gdb-adapter",
            ...
            "customResetCommands": [
                "monitor reset halt hardware",
            ],
        },

Note:

The GUI update depends on an asynchronous event from GDB (such as Target STOPPED), likely triggered by the connected target debugger. If this event is absent (e.g. in current pyOCD), test it by performing a single step-into after pressing the Custom Reset button.

Signed-off-by: Thorsten de Buhr <[email protected]>
Signed-off-by: Thorsten de Buhr <[email protected]>
@jreineckearm
Copy link
Contributor

The functionality in the PR is complete. Still trying to make the automated tests work on our end before adding some for this PR.

@thorstendb-ARM thorstendb-ARM marked this pull request as ready for review May 20, 2025 11:58
@jreineckearm jreineckearm self-requested a review May 20, 2025 12:24
Copy link
Contributor

@jreineckearm jreineckearm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, changes look good to me! And work nicely in combination with eclipse-cdt-cloud/cdt-gdb-vscode#152 .

Makes sense to only support for gdbtarget type while having parts of the implementation in the base classes for both.
It would in theory also work for gdb type. But I don't see the use case.
Button in GUI is correctly hidden if not using customResetCommands.

Good to merge as far as I am concerned. Merging only tomorrow (CET) though to give others the chance to review (CC: @asimgunes , @jonahgraham )

Copy link
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the new code be de-duplicated? customResetCommands was added to GDBDebugSession but customResetRequest was added to GDBTargetDebugSession. That means customResetCommands is effectively unreferenced in GDBDebugSession.

Can you move all of it to GDBDebugSessionBase?

@jreineckearm jreineckearm merged commit 1a5a38d into eclipse-cdt-cloud:main May 21, 2025
4 checks passed
jonahgraham added a commit to jonahgraham/cdt-gdb-vscode that referenced this pull request May 21, 2025
  - [Add device reset](eclipse-cdt-cloud/cdt-gdb-adapter#365)
  - [Suppressing unneeded error message when hovering](eclipse-cdt-cloud/cdt-gdb-adapter#366)
jreineckearm added a commit to eclipse-cdt-cloud/cdt-gdb-vscode that referenced this pull request May 22, 2025
- [Add device reset](eclipse-cdt-cloud/cdt-gdb-adapter#365)
  - [Suppressing unneeded error message when hovering](eclipse-cdt-cloud/cdt-gdb-adapter#366)

Co-authored-by: Jens Reinecke <[email protected]>
omarArm pushed a commit to omarArm/cdt-gdb-adapter that referenced this pull request May 27, 2025
* Add Device Reset

Signed-off-by: Thorsten de Buhr <[email protected]>

---------

Signed-off-by: Thorsten de Buhr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants