eclipse-cdt-cloud / eclipse-cdt-cloud/cdt-gdb-adapter

Unable to attach to remote gdbserver

Open
#261 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
39
Forks
56
Avg merge
3d 9h
Merged PRs (30d)
2

Description

When attempting to provide a config that would instruct the adapter to attach to a remote GDB server it seems to fail. I tried the following:

```
cdtDebugTargetAdapter --server=50000 --config-frozen='{"request": "attach", "target" : {"host":"x.x.x.x", "port":"yyyy"}}'
```

As well as

```
cdtDebugTargetAdapter --server=50000 --config-frozen=@config.json
```

With `config.json` having contents of:

```
{
"request": "attach",
"target" : {"host":"x.x.x.x", "port":"yyyy"}
}
```

but again, no dice. I am attempting to use the plugin with [Arm's Embedded Debugger](https://github.com/ARM-software/vscode-embedded-debug) for VSCode. When I run with the above configuration I am met with an error dialog in VSCode that simply states "arg is not iterable". From the cdt-gdb-adapter instance I see the following:

```
cdt_1 | /
cdt_1 | ::ffff:172.18.0.1: WebSocket connection
cdt_1 | ::ffff:172.18.0.1: Version undefined, subprotocol:
cdt_1 | ::ffff:172.18.0.1: connected to target
cdt_1 | >> accepted connection from client
```

On my test gdbserver instance I do not see any client connections coming in. It is somewhat unclear if the issue is in this plugin or within Arm's VSCode plugin. However, there are no examples in this repo for how to use the `attach` request so my formation of the config is somewhat contrived based on my interpretation of the sources. Other formats I tried:

```
--config-frozen='{"request": "attach", "parameters":"x.x.x.x:yyyy"}'
--config-frozen='{"request": "attach", "host":"x.x.x.x", "port":"yyyy"}'
--config-frozen='{"request": "attach", "connectCommands":"target remote x.x.x.x:yyyy"}'
```

Contributor guide

Open the contributing guide

Research direction

Start with the cdtDebugTargetAdapter handling of --config-frozen and the attach request, then compare the accepted configuration shape with the examples in the issue. Reproduce the VSCode error and verify that a corrected configuration causes a connection to the remote GDB server.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.