Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start debugging. Unexpected GDB output from command "-target-select remote 10.102.88.203:1223". Remote communication error. Target disconnected.: Connection reset by peer. #12262

Open
HerrCraziDev opened this issue Apr 30, 2024 · 4 comments
Labels
debugger help wanted Can be fixed in the public (open source) repo.

Comments

@HerrCraziDev
Copy link

Environment

  • OS and version: Windows 11
  • VS Code: 1.88.1
  • C/C extension: 1.19.9
  • OS and version of remote machine (if applicable): Linux (yocto) kernel 5.15.71
  • GDB / LLDB version: gdbserver 11.2

Bug Summary and Steps to Reproduce

Bug Summary:
When remotely debugging, vscode is unable to restart gdbserver when clicking the "restart" icon on the debug menu.
The remote gdbserver exits and is never relaunched. It must be relaunched manually over SSH to re-initate a debugging session.

This extension should restart gdbserver on the remote.

Steps to reproduce:

  1. Start gdbserveron the remote gdbserver :<port> <path/to/bin>
  2. Connect to gdbserver from vscode
  3. Debug
  4. Click the "Restart" button in the debugger menu
  5. gdbserver exits on the remote and vscode displays the attached error.

Unable to start debugging. Unexpected GDB output from command "-target-select remote <ip>:<port>". Remote communication error. Target disconnected.: Connection reset by peer.

image

Debugger Configurations

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "PM Debug",
      "type": "cppdbg",
      "request": "launch",
      "program": "${workspaceRoot}/bld/<bin>",
      "miDebuggerServerAddress": "${env:RBIP}:1223",
      "args": [],
      "stopAtEntry": false,
      "cwd": "/opt",
      "environment": [],
      "externalConsole": true,
      "MIMode": "gdb",
      "miDebuggerPath": "${env:SDK_PATH}/sysroots/x86_64-deysdk-linux/usr/bin/aarch64-dey-linux/aarch64-dey-linux-gdb",
      "setupCommands": [
        { "text": "set sysroot ${env:SDK_PATH}/sysroots/cortexa53-crypto-dey-linux/", "description": "set sysroot", "ignoreFailures": false },
        { "text": "handle SIG34 nostop noprint pass noignore", "description": "disable SIG34 handling", "ignoreFailures": false }
      ],
      "additionalSOLibSearchPath": "${workspaceRoot}/bld/<bin>.so",
    }
  ]
}

Debugger Logs

Kill the program being debugged? (y or n) [answered Y; input not from terminal]
[Inferior 1 (process 22216) killed]
The program '/home/<user>/<workdir>/bld/<bin>' has exited with code 0 (0x00000000).

Other Extensions

No response

Additional Information

No response

@sean-mcmanus sean-mcmanus added debugger help wanted Can be fixed in the public (open source) repo. labels Apr 30, 2024
@HerrCraziDev
Copy link
Author

Any news on this ?

@WajahatRiaz
Copy link

Did you try that bindto thing. Maybe it works for you. Specify hostname or IPv4 address on which to listen for incoming TCP/IP connections. By default, OpenOCD will listen on the loopback interface only. If your network environment is safe, bindto 0.0.0.0 can be used to cover all available interfaces. Simply add it to your config file and let me know if it works.

@sean-mcmanus
Copy link
Collaborator

@HerrCraziDev I don't have any update on this issue.

@HerrCraziDev
Copy link
Author

@HerrCraziDev I don't have any update on this issue.

Still happening here. I didn't really understand @WajahatRiaz 's comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger help wanted Can be fixed in the public (open source) repo.
Projects
None yet
Development

No branches or pull requests

3 participants