microsoft / microsoft/vscode-cpptools

Could not load source './csu/../sysdeps/nptl/llibc_start_call_main.h': SourceRequest not supported

Aperta
#10,206 7 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

debugger verified
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema con i tasks.json e launch.json forniti in un ambiente Windows 10, WSL2 Ubuntu, eseguendo lo step over sull’istruzione finale sotto GDB. Inizia tracciando gli eventi del debugger mostrati nei log relativi all’uscita normale del processo e alla richiesta del codice sorgente per libc_start_call_main.h. Il lavoro è completato quando l’ultimo passaggio termina il debugging senza aprire una scheda del codice sorgente non supportata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, typescript, ubuntu, vscode
Ambito
devtools, operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.