microsoft / microsoft/vscode-cpptools
Gdb problems resuming and terminating (WSL + FreeRTOS)
@pieandcakes がすでに取り組んでいます。
2019年6月7日 から。
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。