Skip to content

The remote debugging connection cannot be disconnected normally #166

@dingzhou-beck

Description

@dingzhou-beck

ENV

host:

os:  windows10

gdb: 10.2

cdt-gdb-vscode: v2.0.5

target:

arch: arm32

gdbserver: 7.6

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

{
    "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

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

logs:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions