microsoft / microsoft/vscode-cpptools
windows 使用vscode 远程debian11 gdb调试代码 遇到错误
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
Environment
- OS and version: windows 11
- VS Code: 1.102.3
- C/C++ extension: C/C++ v1.26.3
- OS and version of remote machine (if applicable): debian 11
- GDB / LLDB version: GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Bug Summary and Steps to Reproduce
Bug Summary: 无法加载源“./csu/../csu/libc-start.c”: 'SourceRequest' not supported.。
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
在main函数上打的断点,调试在最后一个‘}’ 时报错。
我已经在csdn里找了,也翻遍了类似问题的帖子,ai也问了,折腾了很久,未求得解!希望可以在此处解惑!!!
Steps to reproduce:
- In this environment...
- With this config...
- Do '...'
- See error...
Debugger Configurations
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "输入程序名称,例如 ${workspaceFolder}/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc 生成活动文件",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}
Debugger Logs
=thread-group-added,id="i1"
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
Breakpoint 1, main () at /home/maoyu/Code/Hello.c:4
4 printf("Hello world!\n");
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)
[Inferior 1 (process 19670) exited normally]
The program '/home/maoyu/Code/Hello' has exited with code 0 (0x00000000).
Other Extensions
No response
Additional Information
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Überprüfe die bereitgestellte Debugger-Konfiguration und das GDB-Log und konzentriere dich auf den SourceRequest-Fehler für ./csu/../csu/libc-start.c, nachdem main beendet wurde. Reproduziere das Problem mit dem angegebenen Setup aus Windows 11, Debian 11, VS Code 1.102.3 und GDB 10.1; die Aufgabe gilt als abgeschlossen, wenn festgestellt wurde, ob die Erweiterung oder die Konfiguration den Fehler verursacht, und ein verifizierter Fix oder Workaround dokumentiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, vscode
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100