eclipse-cdt-cloud / eclipse-cdt-cloud/cdt-gdb-vscode

The remote debugging connection cannot be disconnected normally

Open
#166 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
26
Forks
31
Avg merge
5d 6h
Merged PRs (30d)
2

Description

### ENV

**host**:

```shell
os: windows10

gdb: 10.2

cdt-gdb-vscode: v2.0.5
```

**target**:

```shell
arch: arm32

gdbserver: 7.6
```

I am currently using cdt-gdb-vscode for remote debugging in VS Code. Here is my configuration file:

```json
{
"version": "0.2.0",
"configurations": [
{
"name": "arm32_debug",
"type": "gdbtarget",
"request": "launch",
"gdbNonStop": true,
"gdb": "d:\\debugger_gdb\\aarch64-linux-gnu-gdb.exe",
"program": "${workspaceFolder}\\build\\app.elf",
"logFile": "${workspaceFolder}\\.vscode\\debug.log",
"verbose": true,
"cwd": "${workspaceFolder}",
"target": {
"type": "remote",
"host": "10.0.2.20",
"port": "64025",
"serverParameters": []
}
}
]
}
```

**Problem**:

1.The program executed normally and completed, but an error message appeared: `You can't do that when your target is 'exec'`; however, gdbserver exited normally.

![Image](https://github.com/user-attachments/assets/45621962-8428-4b3f-b5a7-2dc4a673c243)

2. When the debugging session is started and stops at a certain breakpoint, if 'stop' is directly used, the remote gdbserver does not terminate.

logs:
```log
gdbserver stoppedTo client: {"seq":0,"type":"response","request_seq":12,"command":"disconnect","success":true}
```
This seems to merely disconnect the connection, but it does not terminate the remote gdbserver process.

It is worth noting that I also used cpp-dbg in VSCode to remotely debug with the same environment and program, and it worked well. Moreover, when executing "stop", it first sends a "kill" command to gdbserver and then exits gdb. Is this a difference in the debugging adapter?

Do you know if there are any other restrictions? Or is there a problem with my debugging configuration? Thank you for your correction.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.