Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__attribute__((packed)) breaks intellisense #12248

Open
TracerDS opened this issue Apr 23, 2024 · 27 comments
Open

__attribute__((packed)) breaks intellisense #12248

TracerDS opened this issue Apr 23, 2024 · 27 comments
Assignees
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense investigate This issue needs to be investigated/confirmed
Projects

Comments

@TracerDS
Copy link

TracerDS commented Apr 23, 2024

Environment

  • OS and Version: Win10 22H2
  • VS Code Version: 1.88.1
  • C/C++ Extension Version: 1.19.9 (release), 1.20.2 (pre-release); 1.3.0 (Extension Pack)

Bug Summary and Steps to Reproduce

Bug Summary: __attribute__((packed)) causes syntax errors, but the code compiles just fine.
It also causes typedef struct to not be recognized.
image
image
image

Steps to reproduce:

  1. Create C file
  2. Paste this:
typedef struct {
    int abc;
} __attribute__((packed)) MyFile;
  1. Watch the intellisense getting crazy

Expected behavior:

  • Recognize __attribute__ keyword
  • Recognize typedef struct {} Struct; as a Struct type

Configuration and Logs

`c_cpp_properties.json`:

{
    "configurations": [
        {
            "name": "CrossCompiler",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/libc/include"
            ],
            "defines": [],
            "cppStandard": "c++23",
            "cStandard": "c23",
            "intelliSenseMode": "linux-gcc-x64",
            "compilerPath": "D:\\Users\\Tracer\\Desktop\\CrossCompiler\\bin\\cross\\bin\\x86_64-elf-g++"
        }
    ],
    "version": 4
}

Log Diagnostics:

-------- Diagnostics - 4/23/2024, 10:13:17 PM
Version: 1.19.9
Current Configuration:
{
    "name": "CrossCompiler",
    "includePath": [
        "d:/Users/Tracer/Desktop/NOS/**",
        "d:/Users/Tracer/Desktop/NOS/libc/include"
    ],
    "defines": [],
    "cppStandard": "c++23",
    "cStandard": "c23",
    "intelliSenseMode": "linux-gcc-x64",
    "compilerPath": "D:\\Users\\Tracer\\Desktop\\CrossCompiler\\bin\\cross\\bin\\x86_64-elf-g++",
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compilerPathInCppPropertiesJson": "D:\\Users\\Tracer\\Desktop\\CrossCompiler\\bin\\cross\\bin\\x86_64-elf-g++",
    "mergeConfigurations": false,
    "browse": {
        "path": [
            "d:/Users/Tracer/Desktop/NOS/**",
            "d:/Users/Tracer/Desktop/NOS/libc/include",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
cpptools version (native): 1.19.9.0
Translation Unit Mappings:
[ D:\Users\Tracer\Desktop\NOS\kernel\src\main.cpp - source TU]:
    D:\Users\Tracer\Desktop\NOS\kernel\include\gdt.h
Translation Unit Configurations:
[ D:\Users\Tracer\Desktop\NOS\kernel\src\main.cpp ]:
    Process ID: 12848
    Memory Usage: 52 MB
    Compiler Path: D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe
    Includes:
        D:\Users\Tracer\Desktop\NOS\libc\include
        D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include
        D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\atlmfc\include
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
        D:\Users\Tracer\Desktop\NOS\kernel\include
    Standard Version: ms_c++latest
    IntelliSense Mode: windows-msvc-x64
Total Memory Usage: 52 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 5334

LSP logs:

Unable to resolve configuration with compilerPath "D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++".  Using "cl.exe" instead.

Other Extensions

No response

Additional context

Related: #4787

I have WSL, VS2022 and MinGW installed.
I also have a crosscompiler installed that Im using in this project.

@sean-mcmanus
Copy link
Collaborator

@TracerDS The problem is caused by a failure to query your compiler, the logging Unable to resolve configuration with compilerPath "D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++". Using "cl.exe" instead..

Is that file supposed to end with an .exe? If you set C_Cpp.loggingLevel to "Debug", does the C/C++ pane logging show any more info on why querying the compiler is failing?

@sean-mcmanus sean-mcmanus self-assigned this Apr 23, 2024
@sean-mcmanus sean-mcmanus added more info needed The issue report is not actionable in its current state Feature: Configuration An issue related to configuring the extension or IntelliSense labels Apr 23, 2024
@TracerDS
Copy link
Author

@TracerDS The problem is caused by a failure to query your compiler, the logging Unable to resolve configuration with compilerPath "D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++". Using "cl.exe" instead..

Is that file supposed to end with an .exe?

Nope. The compiler doesnt have an extension (unix file type).
How would that matter though? Does the extension take defs from the compiler directly and not from included headers/C versions/internal stuff?

@sean-mcmanus
Copy link
Collaborator

@TracerDS Yes, we query the compiler for system defines and includes. Is the file executable on Windows?

@TracerDS
Copy link
Author

TracerDS commented Apr 24, 2024

@TracerDS Yes, we query the compiler for system defines and includes. Is the file executable on Windows?

Nope. The compiler is not windows compatible. It is however fully WSL (unix) compatible (ELF executable)

If you set C_Cpp.loggingLevel to "Debug", does the C/C++ pane logging show any more info on why querying the compiler is failing?

I'll send info in a moment

@TracerDS
Copy link
Author

With "C_Cpp.loggingLevel": "Debug":

[4/24/2024, 12:37:40 PM] Unable to resolve configuration with compilerPath "D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++".  Using "cl.exe" instead.
[4/24/2024, 12:37:40 PM] Unable to resolve configuration with compilerPath "D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++".  Using "cl.exe" instead.

Diagnostics:

-------- Diagnostics - 4/24/2024, 12:38:39 PM
Version: 1.19.9
Current Configuration:
{
    "name": "CrossCompiler",
    "includePath": [
        "d:/Users/Tracer/Desktop/NOS/**",
        "d:/Users/Tracer/Desktop/NOS/libc/include"
    ],
    "defines": [],
    "cppStandard": "c++23",
    "cStandard": "c23",
    "intelliSenseMode": "linux-gcc-x64",
    "compilerPath": "D:\\Users\\Tracer\\Desktop\\CrossCompiler\\bin\\cross\\bin\\x86_64-elf-g++",
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compilerPathInCppPropertiesJson": "D:\\Users\\Tracer\\Desktop\\CrossCompiler\\bin\\cross\\bin\\x86_64-elf-g++",
    "mergeConfigurations": false,
    "browse": {
        "path": [
            "d:/Users/Tracer/Desktop/NOS/**",
            "d:/Users/Tracer/Desktop/NOS/libc/include",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
cpptools version (native): 1.19.9.0
Translation Unit Mappings:
[ D:\Users\Tracer\Desktop\NOS\kernel\src\main.cpp - source TU]:
    D:\Users\Tracer\Desktop\NOS\kernel\include\gdt.h
Translation Unit Configurations:
[ D:\Users\Tracer\Desktop\NOS\kernel\src\main.cpp ]:
    Process ID: 14080
    Memory Usage: 53 MB
    Compiler Path: D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe
    Includes:
        D:\Users\Tracer\Desktop\NOS\libc\include
        D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include
        D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\atlmfc\include
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
        D:\Users\Tracer\Desktop\NOS\kernel\include
    Standard Version: ms_c++latest
    IntelliSense Mode: windows-msvc-x64
Total Memory Usage: 53 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 5334

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Apr 25, 2024

@TracerDS We're looking for the logging from the pane with name "C/C++". In particular, the logs related to the compiler querying that is failing.

@TracerDS
Copy link
Author

@TracerDS We're looking for the logging from the pane with name "C/C++". In particular, the logs related to the compiler querying that is failing.

Okay, how to get the logs from it?

@sean-mcmanus
Copy link
Collaborator

@TracerDS The same way you got the other logging:

image

@TracerDS
Copy link
Author

@TracerDS The same way you got the other logging:

image

loggingLevel: Debug
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.19.9
cpptools version (native): 1.19.9.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: (received) cpptools/didChangeCppProperties (id: 3)
LSP: (received) cpptools/queryCompilerDefaults (id: 4)
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM nul
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM /dev/null
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM nul
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM /dev/null
LSP: Sending response (id: 2)
LSP: (invoked) cpptools/didChangeCppProperties (id: 3)
enabling full-text triggers
Code browsing service initialized
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM nul
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM /dev/null
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM nul
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM /dev/null
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c++23 -m64 -Wp,-v -E -dM -x c++ nul
Failed to query compiler. Falling back to 32-bit intelliSenseMode.
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c++23 -m32 -Wp,-v -E -dM -x c++ nul
Failed to query compiler. Falling back to no bitness.
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c++23 -Wp,-v -E -dM -x c++ nul
Attempting to get defaults from C++ compiler in "compilerPath" property: 'D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++'
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM nul
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM /dev/null
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM nul
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM /dev/null
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c23 -m64 -Wp,-v -E -dM -x c nul
Failed to query compiler. Falling back to 32-bit intelliSenseMode.
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c23 -m32 -Wp,-v -E -dM -x c nul
Failed to query compiler. Falling back to no bitness.
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c23 -Wp,-v -E -dM -x c nul
Attempting to get defaults from C compiler in "compilerPath" property: 'D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++'
  Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/CPPWINRT/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/SHARED/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/UCRT/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/UM/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/WINRT/ will be indexed
  Folder: D:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/TOOLS/MSVC/14.39.33519/ATLMFC/INCLUDE/* will be indexed
  Folder: D:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/TOOLS/MSVC/14.39.33519/INCLUDE/* will be indexed
  Folder: D:/USERS/TRACER/DESKTOP/NOS/ will be indexed
LSP: Sending response (id: 3)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 4)
Discovering files...
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM nul
Querying compiler for default C++ language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c++ -E -dM /dev/null
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM nul
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM /dev/null
LSP: Sending response (id: 4)
  Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/CPPWINRT/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/SHARED/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/UCRT/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/UM/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22621.0/WINRT/
  Processing folder (non-recursive): D:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/TOOLS/MSVC/14.39.33519/ATLMFC/INCLUDE
  Processing folder (non-recursive): D:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/TOOLS/MSVC/14.39.33519/INCLUDE
  Processing folder (recursive): D:/USERS/TRACER/DESKTOP/NOS/
  Discovering files: 5336 file(s) processed
LSP: (received) cpptools/didChangeCppProperties (id: 5)
LSP: (invoked) cpptools/didChangeCppProperties (id: 5)
LSP: Sending response (id: 5)
  1 file(s) removed from database
Done discovering files.
Populating include completion cache.
Parsing remaining files...
  Parsing: 0 files(s) processed
Done parsing remaining files.
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-17
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-17
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-18
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-18
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-19
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-19
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) textDocument/didOpen: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (invoked) textDocument/didOpen: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeActiveEditor: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (received) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 6)
LSP: (invoked) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 6)
LSP: (received) cpptools/didChangeTextEditorSelection
Intellisense update pending for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (invoked) cpptools/didChangeActiveEditor: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: Sending response (id: 6)
IntelliSense update scheduled and TU acquisition started for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
Populating file name cache...
Done populating filename cache. Elapsed time: 5 ms
Resolving recursive includes...
  tag parsing file: D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\CodeAnalysis\sourceannotations.h
Done resolving recursive includes.
sending compilation args for D:\Users\Tracer\Desktop\NOS\kernel\src\gdt.cpp
  include: D:\USERS\TRACER\DESKTOP\NOS\LIBC\INCLUDE
  include: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE
  include: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\ATLMFC\INCLUDE
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UCRT
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\WINRT
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\CPPWINRT
  include: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE
  define: a__VSC_LINTER__
  stdver: ms_c++latest
  intelliSenseMode: windows-msvc-x64
LSP: (received) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 7)
LSP: (invoked) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 7)
Update IntelliSense time (sec): 0.136
LSP: Sending response (id: 7)
LSP: (received) cpptools/getFoldingRanges: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 8)
LSP: (invoked) cpptools/getFoldingRanges: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 8)
LSP: (received) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 9)
LSP: (invoked) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 9)
LSP: Sending response (id: 8)
LSP: $/cancelRequest (cpptools/getDocumentSymbols, id: 9)
  tag parsing file: D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\CodeAnalysis\sourceannotations.h
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-20
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-20
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-21
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/19532-21
LSP: (received) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 10)
LSP: (invoked) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 10)
LSP: Sending response (id: 10)
LSP: (received) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 11)
LSP: (invoked) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 11)
LSP: Sending response (id: 11)
Database safe to open.

@sean-mcmanus
Copy link
Collaborator

@TracerDS The logging shows

D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c++23 -m64 -Wp,-v -E -dM -x c++ nul
Failed to query compiler. Falling back to 32-bit intelliSenseMode.

Does your compiler support -std=c++23 and -std=c++2x? Does it support -m64 or are you using a different target argument? Can you try with 1.20.2 -- we made various fixed that could apply and the logging might be better.

@TracerDS
Copy link
Author

TracerDS commented Apr 29, 2024

Does your compiler support -std=c++23 and -std=c++2x?
Setting -std=c++23 in my CrossCompiler will set #define __cplusplus 202100L .
Setting it to -std=c++2x will error (unrecognized command-line option).
Setting it to -std=c++2b will set #define __cplusplus 202100L .

I changed it from c++23 to c++20 for my project. Hope it will make a difference

Does it support -m64

yes

or are you using a different target argument?

When I compile my C++ files, this is the command I call in the Makefile:
i686-elf-g++ -ffreestanding -Wall -Wextra -fno-exceptions -fno-rtti -I./hpp -I../libc/include -g3 -std=c++20

Can you try with 1.20.2 -- we made various fixed that could apply and the logging might be better.

Will try that later.

I have changed my configuration a little bit, but it shouldnt matter much since the compiler doesnt change. Arch doesnt matter in this case; __attribute__ is supported in both versions of gcc, especially in newest versions

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Apr 29, 2024

@TracerDS Sorry, earlier reference to -std=c++2x was meant to be -std=c2x (in reference to the usage of c23).

Is there a reason you're using a compilerPath with x86_64-elf-g++ if you're compiling with i686-elf-g++? You might try changing that. You might also try running the logged command lines to see if you're getting errors from g++ too.

The __attribute__ is broken because it's failing to query your g++ compiler and is switching over to cl.exe.

@TracerDS
Copy link
Author

You might also try running the logged command lines to see if you're getting errors from g++ too.

The files itself compile. There is no issue with the compilation process. Only intellisense is broken.

Is there a reason you're using a compilerPath with x86_64-elf-g++ if you're compiling with i686-elf-g++? You might try changing that.

Yeah I will change that to i686 and try again.

Sorry, earlier reference to -std=c++2x was meant to be -std=c2x (in reference to the usage of c23).

Yeah it is supported.

@sean-mcmanus
Copy link
Collaborator

@TracerDS Our extension adds from flags to query the compiler that aren't used during normal building. It's possible your compiler might not support those flags or may output unexpected text, i.e. the args -Wp,-v -E -dM -x c++ nul.

@TracerDS
Copy link
Author

TracerDS commented May 1, 2024

@TracerDS Our extension adds from flags to query the compiler that aren't used during normal building. It's possible your compiler might not support those flags or may output unexpected text, i.e. the args -Wp,-v -E -dM -x c++ nul.

Some cannot be supported due to the nature of bare crosscompiler. Other than that, most flags are supported
image

@sean-mcmanus
Copy link
Collaborator

@TracerDS Can you try with i686-elf-gcc -Wp,-v -E -dM -x c nul (or whatever args can make it query correctly?). Your logging above shows some errors as if you don't have the C++ libraries installed? The system include paths shown doesn't appear correct and is missing the c++ includes.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 3, 2024

@TracerDS Your use of "-ffreestanding" to compile might also be hitting #11837 . Well, it might if you need that for the code to compile correctly, it wouldn't cause compiler querying to fail.

@TracerDS
Copy link
Author

TracerDS commented May 4, 2024

@TracerDS Your use of "-ffreestanding" to compile might also be hitting #11837 . Well, it might if you need that for the code to compile correctly, it wouldn't cause compiler querying to fail.

Yes, it probably qualifies for that issue.
Its a ffreestanding env after all, so yeah. No standard C++ libs are installed in the compiler

@TracerDS
Copy link
Author

TracerDS commented May 7, 2024

In any case @sean-mcmanus is there a workaround for this issue yet?

@sean-mcmanus
Copy link
Collaborator

@TracerDS I'm not sure yet why the compiler query is failing. Does the compiler query not return any defines?

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 7, 2024

@TracerDS Temporarily setting the C_Cpp.loggingLevel to the hidden value of "7" may show more compiler querying logging (ignore the warnings about it not being a valid value), i.e. the entire query output.

@TracerDS
Copy link
Author

TracerDS commented May 7, 2024

@TracerDS I'm not sure yet why the compiler query is failing. Does the compiler query not return any defines?

if you mean #define then no, the compiler returns a valid list of defines.

Temporarily setting the C_Cpp.loggingLevel to the hidden value of "7" may show more compiler querying logging (ignore the warnings about it not being a valid value), i.e. the entire query output.

Sure

@TracerDS
Copy link
Author

TracerDS commented May 7, 2024

@TracerDS Temporarily setting the C_Cpp.loggingLevel to the hidden value of "7" may show more compiler querying logging (ignore the warnings about it not being a valid value), i.e. the entire query output.

Sorry, its quite long

LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-14
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-14
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-15
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-15
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) textDocument/didOpen: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (invoked) textDocument/didOpen: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: (invoked) cpptools/didChangeVisibleTextEditors
update_file_if_needed: D:\Users\Tracer\Desktop\NOS\kernel\include\gdt.h
  Same time stamp: 1714046279
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\STDINT.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VCRUNTIME.H
  Same time stamp: 1709152985
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\SAL.H
  Same time stamp: 1708535846
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\SAL.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VADEFS.H
  Same time stamp: 1709152985
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\CONCURRENCYSAL.H
  Same time stamp: 1708535838
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CONCURRENCYSAL.H
  Same time stamp: 1709152984
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: Sending server -> client notification: cpptools/IntelliSenseSetup
LSP: (received) cpptools/didChangeActiveEditor: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (received) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 7)
LSP: (received) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 8)
LSP: (invoked) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 8)
LSP: Sending server -> client notification: cpptools/reportStatus
update_file_if_needed: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE\GDT.H
  Same time stamp: 1714046279
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: Sending server -> client notification: cpptools/logTelemetry
Intellisense update pending for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (invoked) cpptools/didChangeActiveEditor: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: (invoked) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 7)
LSP: Sending response (id: 7)
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: Sending server -> client notification: cpptools/publishRefactorDiagnostics
LSP: Sending response (id: 8)
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\STDINT.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VCRUNTIME.H
  Same time stamp: 1709152985
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\SAL.H
  Same time stamp: 1708535846
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\SAL.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VADEFS.H
  Same time stamp: 1709152985
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\CONCURRENCYSAL.H
  Same time stamp: 1708535838
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CONCURRENCYSAL.H
  Same time stamp: 1709152984
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/publishRefactorDiagnostics
IntelliSense update scheduled and TU acquisition started for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
LSP: Sending server -> client notification: cpptools/reportStatus
Populating file name cache...
Files in filename cache: 35
Done populating filename cache. Elapsed time: 5 ms
    Memory usage delta: 1 MB
    Number of files: 35
    Number of parent/child relationships: 9
Resolving recursive includes...
LSP: Sending server -> client notification: cpptools/reportStatus
update_file_if_needed: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\SRC\GDT.CPP
  Same time stamp: 1714044157
    Resolving include: gdt.h -> D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE\GDT.H
update_file_if_needed: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE\GDT.H
  Same time stamp: 1714046279
    Resolving include: stdint.h -> D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\STDINT.H
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\STDINT.H
  Same time stamp: 1709152985
    Resolving include: vcruntime.h -> D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VCRUNTIME.H
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VCRUNTIME.H
  Same time stamp: 1709152985
    Resolving include: sal.h -> D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\SAL.H
    Resolving include: vadefs.h -> D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VADEFS.H
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\SAL.H
  Same time stamp: 1709152985
    Resolving include: CodeAnalysis/sourceannotations.h -> D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CODEANALYSIS\SOURCEANNOTATIONS.H
    Resolving include: concurrencysal.h -> D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CONCURRENCYSAL.H
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VADEFS.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CODEANALYSIS\SOURCEANNOTATIONS.H
  File added. Time stamp: 1709152984
  tag parsing file: D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\CodeAnalysis\sourceannotations.h
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CONCURRENCYSAL.H
  Same time stamp: 1709152984
LSP: Sending server -> client notification: cpptools/logTelemetry
LSP: Sending server -> client notification: cpptools/reportStatus
Done resolving recursive includes.
LSP: Sending server -> client notification: cpptools/logTelemetry
sending compilation args for D:\Users\Tracer\Desktop\NOS\kernel\src\gdt.cpp
  include: D:\USERS\TRACER\DESKTOP\NOS\LIBC\INCLUDE
  include: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE
  include: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\ATLMFC\INCLUDE
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UCRT
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\WINRT
  include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\CPPWINRT
  include: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE
  define: a__VSC_LINTER__
  stdver: ms_c++20
  intelliSenseMode: windows-msvc-x86
IntelliSense TU acquired for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h
Starting IntelliSense update for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (needs_reparse==true)
Processing partial IntelliSense update for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h [1443-1832]
LSP: Sending server -> client notification: cpptools/logTelemetry
Reporting partial IntelliSense results for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h [1438-2036]
LSP: Sending server -> client notification: cpptools/intelliSenseResult
LSP: Sending server -> client notification: cpptools/logTelemetry
Starting IntelliSense update for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (needs_reparse==false)
Processing partial IntelliSense update for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h [0-1437]
Reporting partial IntelliSense results for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h [0-1437]
LSP: Sending server -> client notification: cpptools/intelliSenseResult
Starting IntelliSense update for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (needs_reparse==false)
Processing partial IntelliSense update for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h [2037-8037]
Reporting partial IntelliSense results for: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h [2037-2000000000]
LSP: Sending server -> client notification: cpptools/intelliSenseResult
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/logTelemetry
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: (received) cpptools/getFoldingRanges: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 9)
LSP: (invoked) cpptools/getFoldingRanges: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 9)
LSP: Sending response (id: 9)
LSP: (received) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 10)
LSP: (invoked) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 10)
LSP: (received) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 11)
LSP: Sending response (id: 10)
LSP: (invoked) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 11)
LSP: Sending server -> client notification: cpptools/reportStatus
update_file_if_needed: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE\GDT.H
  Same time stamp: 1714046279
LSP: Sending server -> client notification: cpptools/logTelemetry
LSP: Sending response (id: 11)
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\STDINT.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VCRUNTIME.H
  Same time stamp: 1709152985
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\SAL.H
  Same time stamp: 1708535846
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\SAL.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VADEFS.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CODEANALYSIS\SOURCEANNOTATIONS.H
  Update time stamp. Old: 0, New: 1709152984
  tag parsing file: D:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\CodeAnalysis\sourceannotations.h
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\CONCURRENCYSAL.H
  Same time stamp: 1708535838
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CONCURRENCYSAL.H
  Same time stamp: 1709152984
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/publishRefactorDiagnostics
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-16
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-16
LSP: (received) cpptools/getFoldingRanges: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 12)
LSP: (invoked) cpptools/getFoldingRanges: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 12)
LSP: Sending response (id: 12)
LSP: (received) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-17
LSP: (invoked) cpptools/fileDeleted: file:///d%3A/Users/Tracer/Desktop/NOS/.git/fsmonitor--daemon/cookies/2188-17
LSP: (received) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 13)
LSP: (invoked) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 13)
LSP: Sending response (id: 13)
LSP: (received) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 14)
LSP: (invoked) cpptools/getDocumentSymbols: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 14)
LSP: Sending server -> client notification: cpptools/reportStatus
update_file_if_needed: D:\USERS\TRACER\DESKTOP\NOS\KERNEL\INCLUDE\GDT.H
  Same time stamp: 1714046279
LSP: Sending response (id: 14)
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\STDINT.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VCRUNTIME.H
  Same time stamp: 1709152985
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\SAL.H
  Same time stamp: 1708535846
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\SAL.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\VADEFS.H
  Same time stamp: 1709152985
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CODEANALYSIS\SOURCEANNOTATIONS.H
  Same time stamp: 1709152984
update_file_if_needed: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\CONCURRENCYSAL.H
  Same time stamp: 1708535838
update_file_if_needed: D:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\VC\TOOLS\MSVC\14.39.33519\INCLUDE\CONCURRENCYSAL.H
  Same time stamp: 1709152984
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: Sending server -> client notification: cpptools/publishRefactorDiagnostics
LSP: Sending server -> client notification: cpptools/reportStatus
LSP: (received) textDocument/hover: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 15)
LSP: (invoked) textDocument/hover: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 15)
LSP: Sending server -> client notification: cpptools/setTemporaryTextDocumentLanguage
LSP: Sending server -> client notification: cpptools/setTemporaryTextDocumentLanguage
LSP: Sending response (id: 15)
LSP: (received) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 16)
LSP: (invoked) cpptools/getCodeActions: file:///d%3A/Users/Tracer/Desktop/NOS/kernel/include/gdt.h (id: 16)
LSP: Sending response (id: 16)

@sean-mcmanus
Copy link
Collaborator

@TracerDS I'm looking for the compiler query logging. It looks like the logging you provided is after the compiler querying has already run. I'm also looking into if the lack of #defines is the cause.

The logging would include stuff like
Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM /dev/null
Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c++23 -m64 -Wp,-v -E -dM -x c++ nul
Failed to query compiler. Falling back to 32-bit intelliSenseMode.

but show more info.

@TracerDS
Copy link
Author

TracerDS commented May 7, 2024

@TracerDS I'm looking for the compiler query logging. It looks like the logging you provided is after the compiler querying has already run. I'm also looking into if the lack of #defines is the cause.

The logging would include stuff like Querying compiler for default C language standard using command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -x c -E -dM /dev/null Compiler query command line: D:\Users\Tracer\Desktop\CrossCompiler\bin\cross\bin\x86_64-elf-g++ -std=c++23 -m64 -Wp,-v -E -dM -x c++ nul Failed to query compiler. Falling back to 32-bit intelliSenseMode.

but show more info.

Thats all the info I got from the C/C++ terminal. C/C++ Configuration Warnings doesn't show anything new

@TracerDS
Copy link
Author

So... any solutions?

@sean-mcmanus sean-mcmanus removed the more info needed The issue report is not actionable in its current state label May 13, 2024
@sean-mcmanus sean-mcmanus added bug investigate This issue needs to be investigated/confirmed labels May 13, 2024
@sean-mcmanus sean-mcmanus added this to Triage in 1.21 via automation May 13, 2024
@sean-mcmanus
Copy link
Collaborator

@TracerDS Sorry, we've been pretty busy. We still need to look into what could be causing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense investigate This issue needs to be investigated/confirmed
Projects
1.21
Triage
Development

No branches or pull requests

2 participants