microsoft / microsoft/vscode-cpptools
Could not load source './csu/../sysdeps/nptl/llibc_start_call_main.h': SourceRequest not supported
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
-
OS and version:
Windows 10 Pro 19045.2311 -
VS Code:
Version: 1.73.1 (user setup)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T04:27:29.066Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No -
C/C++ extension:
2.0.0 -
OS and version of remote machine (if applicable):
WSL2 Ubuntu 22.04.1 LTS -
GDB / LLDB version:
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Bug Summary and Steps to Reproduce
Bug Summary:
At the end of a debugging session when i step over the last statement of a program (i.e. return (0);) VS Code opens a window/tab saying "Could not load source './csu/../sysdeps/nptl/libc_start_call_main.h': 'SourceRequest' not supported.."
The window/tab title gives the path "./csu/../sysdeps/nptl/libc_start_call_main.h"
I have to click F10 or "Step over" again to end the debugging session.
Richt clicking on the tab an chose "Reveal in explorer" gives "Unable to open ./csu/../sysdeps/nptl/libc_start_call_main.h in the Windows explorer."
Steps to reproduce:
Windows 10, Linux in a WSL 2 environment..
Create a c++ project (e.g. helloworld) in Linux home folder.
Debug in VS Code.
Set breakpoint.
Step Over (F10) until end of program.
Produces the issue described above.
Debugger Configurations
tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "Compile",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"/home/alex/projects/helloworld/hello.cpp",
"-o",
"/home/alex/projects/helloworld/hello"
],
"options": {
"cwd": "/home/alex/projects/helloworld/"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "compiler: /usr/bin/g++"
}
],
"version": "2.0.0"
}
launch.json
{
"version": "0.2.0",
"logging": { "engineLogging": true, "trace": true, "traceResponse": true },
"configurations": [
{
"name": "Debug",
"type": "cppdbg",
"request": "launch",
"program": "/home/alex/projects/helloworld/hello",
"args": [],
"stopAtEntry": false,
"cwd": "/home/alex/projects/helloworld",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file"
}
]
}
Debugger Logs
=thread-group-added,id="i1"
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 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.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, main () at /home/alex/projects/helloworld/hello.cpp:5
5 std::cout << "Hello, world!" << std::endl;
Loaded '/lib/x86_64-linux-gnu/libstdc++.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libm.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgcc_s.so.1'. 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 7040) exited normally]
The program '/home/alex/projects/helloworld/hello' has exited with code 0 (0x00000000).
Other Extensions
WSL
CMake
CMake Tools
C/C++
C/C++ Extension Pack
C/C++ Themes
Additional Information
No response
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.
Research direction
Reproduce the failure with the supplied tasks.json and launch.json in a Windows 10, WSL2 Ubuntu environment, stepping over the final statement under GDB. Start by tracing the debugger events shown in the logs around normal process exit and the libc_start_call_main.h source request. Done means the final step ends debugging without opening an unsupported source tab.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, ubuntu, vscode
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100