vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Intellisense fails with both modes (64-bit and 32-bit)

Open magdumnikhil opened this issue 6 years ago • 2 comments

Type: LanguageService

Describe the bug

  • OS and Version: Ubuntu 18.04 (64-bit)
  • VS Code Version: 1.41
  • C/C++ Extension Version: 0.26.3

I really don't know if this is a bug or something is wrong with the compiler itself.

When IntelliSense mode is set to gcc_x86, it shows message "Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode." and with IntelliSense mode gcc_x64 exactly the opposite message is shown "Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode."

Below is the debug output of c/c++ extension with IntelliSense mode gcc_x86

initialized
workspace/didChangeConfiguration
IntelliSense Engine = Default.
Autocomplete is enabled.
Enhanced Colorization is enabled.
Error squiggles are enabled.
File exclude: **/.git
File exclude: **/.svn
File exclude: **/.hg
File exclude: **/CVS
File exclude: **/.DS_Store
File exclude: **/doc
File exclude: **/*.json
File exclude: **/scripts
File exclude: **/tags
File exclude: **/unit_test
File exclude: /usr/**
File exclude: **/*.QIK
File exclude: **/.vscode
Search exclude: **/node_modules
Search exclude: **/bower_components
Search exclude: **/*.code-search
Search exclude: **/doc
Search exclude: **/tegrabl_armv8a.h
Search exclude: **/*.json
Search exclude: **/*.QIK
Search exclude: **/scripts
Search exclude: **/tags
Search exclude: /usr/**
Search exclude: **/unit_test
Search exclude: **/.vscode
Attempting to get defaults from compiler found on the machine: '/usr/bin/gcc'
terminating child process: 26829
cpptools/queryCompilerDefaults: 1
Attempting to get defaults from compiler found on the machine: '/usr/bin/gcc'
terminating child process: 26831
cpptools/didChangeFolderSettings
Attempting to get defaults from compiler in "compilerPath" property: '/home/nmagdum/work/ubl-dev-main/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-gcc'
Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode.
terminating child process: 26834
Failed to query compiler. Falling back to no bitness.
terminating child process: 26835
terminating child process: 26836
Code browsing service initialized
Attempting to get defaults from compiler in "compilerPath" property: '/home/nmagdum/work/ubl-dev-main/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-gcc'
Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode.
terminating child process: 26838
Failed to query compiler. Falling back to no bitness.
terminating child process: 26839
terminating child process: 26840
terminating child process: 26841
terminating child process: 26842
terminating child process: 26843
terminating child process: 26844

and when I change the IntelliSense mode to gcc_x64, I get the following output

cpptools/didChangeFolderSettings
Attempting to get defaults from compiler in "compilerPath" property: '/home/nmagdum/work/ubl-dev-main/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-gcc'
Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode.
terminating child process: 27290
Failed to query compiler. Falling back to no bitness.
terminating child process: 27291
terminating child process: 27292
Attempting to get defaults from compiler in "compilerPath" property: '/home/nmagdum/work/ubl-dev-main/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-gcc'
Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode.
terminating child process: 27294
Failed to query compiler. Falling back to no bitness.
terminating child process: 27295
terminating child process: 27296
terminating child process: 27297
terminating child process: 27298
terminating child process: 27299
terminating child process: 27300

Default intellisense mode is set to gcc_x86

magdumnikhil avatar Jan 25 '20 18:01 magdumnikhil

Hi @magdumnikhil . This is by-design. You are seeing debug output for attempts to probe the compiler for system headers and system defines, which may vary depending on the architecture specified to the compiler. Your flavor of gcc does not accept the command-line argument to specify 32-bit or 64-bit modes, so we're falling back to probing the compiler without specifying a bitness. This process determines a default intelliSense mode bitness, but you can still set the intelliSense mode directly. Adding support for ARM intelliSense modes is on our backlog ( https://github.com/microsoft/vscode-cpptools/issues/429 https://github.com/microsoft/vscode-cpptools/issues/2506 ).

Colengms avatar Jan 25 '20 19:01 Colengms

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.0.0

sean-mcmanus avatar Sep 14 '20 21:09 sean-mcmanus