microsoft / microsoft/vscode-cpptools
Unable to attach to GDB server without exec_run
Open
@WardenGnaw is already working on this.
Since Jun 7, 2019.
debugger
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
I was trying to debug arm elf file using ocd GDB server and gdb debugger.
My scenario is that, I have to attach to the GDB server without download the binary files.
Eg:
- Run the GDB Server (server listening at :1000 port)
- gdb Image.elf
- target remote :1000
- symbol-file Image.elf
Is it possible to achieve above steps in VSCode?
My configuration is:
"name": "(GDB) Attach",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}Image.elf",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"miDebuggerServerAddress": "localhost:1000",
"stopAtEntry": false,
// "customLaunchSetupCommands": [
// {
// "description": "Load symbol files",
// "ignoreFailures": false,
// "text": "symbol-file ${workspaceRoot}/Image.elf"
// }
// ],
"logging": {"engineLogging":true},
"targetArchitecture": "arm",
"cwd": "${workspaceRoot}",
"externalConsole": true,
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
Looking at logs it seems to be debugger is executing "1: (512) <-1013-exec-run " command which essentially trying to rerun the program from beginning.
Is it possible to skip these commands ? And I tried customLaunchSetupCommands too but it didn't help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.