Support target extended-remote launch connecting to gdbserver started…#496
Support target extended-remote launch connecting to gdbserver started…#496fzuuzf wants to merge 1 commit into
Conversation
|
Thanks for the creating the PR, @fzuuzf . |
|
Yes, I tried "request": "attach". It worked with the executable specified as a gdbserver argument. |
… with the --multi option
Patch is a 'works for me' solution to
1) Manually start 'gdbserver --multi :2345' on the remote target.
2) Debug the program from vscode by the following launch entry:
{
"name": "Launch on remote target, which has gdbserver --multi :2345 running",
"type": "gdbtarget",
"request": "launch",
"program": "${workspaceFolder}/out/build/x64_clang++/program",
"gdbNonStop": true,
"openGdbConsole": true,
"target": {
"type": "extended-remote",
"parameters": [
"192.168.22.1:2345"
]
}
"initCommands": [
"set remote exec-file /target/path/to/program"
]
}
Also I renamed the startGDBAndAttachToTarget() method to startGDBAndConnectToGDBSERVER,
because attach is used in the gdb documentation for 'attach to running program' and
startGDBAndConnectToGDBSERVER() now also supports starting a program.
|
The force push better handles the false setting of |
|
I don’t know yet what the proper solution is, but I am also not convinced yet that it is this. There seems to be some overloading of what Maybe we need a new configuration option for this case, to avoid disturbing existing configurations? It probably adds to the confusion that we also seem to be a bit sloppy in our terminology regarding “attach”. Strictly speaking, as far as I understand, “attach” is what happens between stub and program. What happens between GDB and stub is called “connect”. For what it’s worth, we (Indel) use |
|
I see your point @fzuuzf . But I am also a bit reluctant to interpret Having written that, would it make sense to additionally add something like And then use the following criteria to skip launching a gdbserver
I know it's a little more effort and may require a bit more documentation about use cases. But may reduce the odds to cause regressions. |
|
These criteria still feel a bit inscrutable to me. I was thinking of something like adding a new option |
|
I'm moving this to draft until we get some more consensus on what the correct way forward on this item is. In addition @fzuuzf a signed ECA is needed. |
… with the --multi option
Patch is a 'works for me' solution to