microsoft / microsoft/vscode-cpptools
Gdb problems resuming and terminating (WSL + FreeRTOS)
@pieandcakes ya está trabajando en esto.
Desde el 7/6/2019.
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.2k
- Forks
- 1.7k
- Merge medio
- 14 h 46 min
- PR fusionados (30 d)
- 61
Descripción
Describe the bug
- OS and Version: Windows 10 Pro 1809 with Ubuntu WSL
- VS Code Version: 1.35.0
- C/C++ Extension Version: 0.23.1
- A clear and concise description of what the bug is
I am developing a FreeRTOS project under Linux (WSL). I have followed the steps to get basic compile and run working: https://code.visualstudio.com/docs/cpp/config-wsl.
When debugging I can set a breakpoint but once hit I cannot resume. Debug console shows:
Thread 9 "AppLinux" received signal SIGTRAP, Trace/breakpoint trap.
<signal handler called>
Editor shows:

Additionally, even if I don't set any breakpoints when I try to stop debugging the process is not terminated. Both gdb and the app are still running and I need to kill them manually in task manager.
I suspect this is due to the way FreeRTOS handles interrupts. If I modify my program to avoid starting the FreeRTOS scheduler, or set a breakpoint before the scheduler is started things work fine. But I am at a loss how to resolve!
To Reproduce
Please include a code sample and launch.json configuration.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "monorepo Launch",
"type": "cppdbg",
"request": "launch",
"program": "/mnt/d/alfie/gb/monorepo/linux/app/AppLinux", // FIXME
"args": ["-fThreading"],
"stopAtEntry": false,
"cwd": "/mnt/d/alfie/gb/monorepo/linux/app", // FIXME
"environment": [],
"externalConsole": true,
"windows": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
"pipeTransport": {
"pipeCwd": "",
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
"pipeArgs": ["-c"],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/mnt/d": "D:\\", // FIXME
"/usr": "D:\\alfie" // FIXME
}
}
]
}
Steps to reproduce the behavior:
See above. I can provide a small example project including FreeRTOS if required.
Additional context
Logfile generated by starting debug with breakpoint enabled, hit breakpoint and attempt to resume.
logfile.txt
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.