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

clangd invalid AST #1582

Open
jason--liu opened this issue Apr 7, 2023 · 4 comments
Open

clangd invalid AST #1582

jason--liu opened this issue Apr 7, 2023 · 4 comments

Comments

@jason--liu
Copy link

jason--liu commented Apr 7, 2023

Logs

I[15:18:57.039] Ubuntu clangd version 13.0.1-2ubuntu2~20.04.1
I[15:18:57.039] Features: linux
I[15:18:57.039] PID: 828358
I[15:18:57.039] Working directory: /work/github/minos-project/minos2
I[15:18:57.039] argv[0]: /usr/bin/clangd
I[15:18:57.039] argv[1]: -j=2
I[15:18:57.039] argv[2]: --log=verbose
I[15:18:57.039] argv[3]: --header-insertion=never
I[15:18:57.039] argv[4]: --header-insertion-decorators=0
I[15:18:57.039] argv[5]: --limit-results=20
I[15:18:57.039] argv[6]: --background-index=false
V[15:18:57.039] User config file is /home/qianyi/.config/clangd/config.yaml
I[15:18:57.039] Starting LSP over stdin/stdout
V[15:18:57.039] <<< {"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":false},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"dynamicRegistration":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit","command"]}},"completion":{"completionItem":{"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"resolveAdditionalTextEditsSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits","command"]},"snippetSupport":true},"contextSupport":true},"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"foldingRange":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"]},"implementation":{"linkSupport":true},"linkedEditingRange":null,"moniker":null,"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":true},"rangeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"signatureHelp":{"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"linkSupport":true}},"window":{"showDocument":null,"showMessage":null,"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":false},"configuration":true,"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":false},"fileOperations":{"didCreate":false,"didDelete":false,"didRename":false,"willCreate":false,"willDelete":false,"willRename":false},"symbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"emacs","version":"GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)\n of 2020-09-20"},"initializationOptions":null,"processId":null,"rootPath":"/work/github/minos-project/minos2","rootUri":"file:///work/github/minos-project/minos2","workDoneToken":"1"}}

I[15:18:57.039] <-- initialize(1)
I[15:18:57.039] --> reply:initialize(1) 0 ms
V[15:18:57.039] >>> {"id":1,"jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","dependentName","defaultLibrary","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"Ubuntu clangd version 13.0.1-2ubuntu2~20.04.1 linux x86_64-pc-linux-gnu"}}}

V[15:18:57.186] <<< {"jsonrpc":"2.0","method":"initialized","params":{}}

I[15:18:57.186] <-- initialized
V[15:18:57.187] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"c","text":"/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 as\n * published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n#include <minos/minos.h>\n#include <minos/percpu.h>\n#include <minos/irq.h>\n#include <minos/mm.h>\n#include <asm/arch.h>\n#include <minos/pm.h>\n#include <minos/init.h>\n#include <minos/sched.h>\n#include <minos/smp.h>\n#include <minos/atomic.h>\n#include <minos/softirq.h>\n#include <minos/platform.h>\n#include <config/version.h>\n#include <minos/of.h>\n#include <minos/ramdisk.h>\n\nextern void cpu_idle(void);\nextern void mm_init(void);\nextern int allsymbols_init(void);\nextern void platform_init(void);\nextern int create_idle_task(void);\n\n#ifdef CONFIG_VIRT\n#include <virt/virt.h>\n#endif\n\nvoid boot_main(void)\n{\n\tallsymbols_init();\n\tpercpu_init(0);\n\n\tpr_notice(\"Minos %s\\n\", MINOS_VERSION_STR);\n\n\tASSERT(smp_processor_id() == 0);\n\n\tmm_init();\n\n#ifdef CONFIG_DEVICE_TREE\n\tof_init_bootargs();\n#endif\n\n\tearly_init();\n\tearly_init_percpu();\n\n\tarch_init();\n\tarch_init_percpu();\n\n\tplatform_init();\n\tirq_init();\n\n#ifdef CONFIG_SMP\n\tsmp_init();\n#endif\n\tsubsys_init();\n\tsubsys_init_percpu();\n\n\tmodule_init();\n\tmodule_init_percpu();\n\n\tsched_init();\n\tlocal_sched_init();\n\n\tdevice_init();\n\tdevice_init_percpu();\n\n\tcreate_idle_task();\n\n#ifdef CONFIG_SMP\n\tsmp_cpus_up();\n#endif\n\n#ifdef CONFIG_VIRT\n\tvirt_init();\n#endif\n\tramdisk_init();\n\n\tcpu_idle();\n}\n\nvoid boot_secondary(int cpuid)\n{\n\tpr_notice(\"cpu-%d is up\\n\", cpuid);\n\n\t/*\n\t * need wait for all cpus up then excuted below\n\t * task, otherwise the mem content hold by different\n\t * cpu may be different because the cache issue\n\t *\n\t * eg: the cpu1 called create_idle_task and the\n\t * idle task is created sucessfully but at the same\n\t * time the cpu2 is powered off\n\t *\n\t * waitting for all the cpu power on\n\t */\n\twhile (!is_cpus_all_up())\n\t\tmb();\n\n\tearly_init_percpu();\n\n\tarch_init_percpu();\n\n\tirq_secondary_init();\n\n\tsubsys_init_percpu();\n\n\tmodule_init_percpu();\n\n\tlocal_sched_init();\n\n\tdevice_init_percpu();\n\n\tcreate_idle_task();\n\n\tcpu_idle();\n}\n","uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":0}}}

I[15:18:57.187] <-- textDocument/didOpen
I[15:18:57.204] Loaded compilation database from /work/github/minos-project/minos2/compile_commands.json
I[15:18:57.204] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 0 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:18:57.204] Broadcasting compilation database from /work/github/minos-project/minos2
V[15:18:57.205] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:18:57.205] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:18:57.205] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 0
E[15:18:57.206] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 0: CreateTargetInfo() return null
E[15:18:57.206] Failed to prepare a compiler instance: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4
I[15:18:57.206] --> textDocument/publishDiagnostics
V[15:18:57.206] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":0}}

V[15:18:57.454] <<< {"id":2,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.454] <-- textDocument/documentSymbol(2)
I[15:18:57.455] --> reply:textDocument/documentSymbol(2) 0 ms, error: invalid AST
V[15:18:57.455] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":2,"jsonrpc":"2.0"}

V[15:18:57.456] <<< {"id":3,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.456] <-- textDocument/codeAction(3)
I[15:18:57.456] --> reply:textDocument/codeAction(3) 0 ms, error: invalid AST
V[15:18:57.456] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":3,"jsonrpc":"2.0"}

V[15:18:57.456] <<< {"id":4,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.456] <-- textDocument/documentLink(4)
I[15:18:57.456] --> reply:textDocument/documentLink(4) 0 ms, error: invalid AST
V[15:18:57.456] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":4,"jsonrpc":"2.0"}

V[15:18:57.457] <<< {"id":5,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.457] <-- textDocument/documentHighlight(5)
I[15:18:57.457] --> reply:textDocument/documentHighlight(5) 0 ms, error: invalid AST
V[15:18:57.457] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":5,"jsonrpc":"2.0"}

V[15:18:57.663] <<< {"id":6,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.663] <-- textDocument/documentSymbol(6)
I[15:18:57.663] --> reply:textDocument/documentSymbol(6) 0 ms, error: invalid AST
V[15:18:57.663] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":6,"jsonrpc":"2.0"}

V[15:18:57.666] <<< {"id":7,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.666] <-- textDocument/codeAction(7)
I[15:18:57.666] --> reply:textDocument/codeAction(7) 0 ms, error: invalid AST
V[15:18:57.666] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":7,"jsonrpc":"2.0"}

V[15:18:57.667] <<< {"id":8,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.667] <-- textDocument/documentLink(8)
I[15:18:57.668] --> reply:textDocument/documentLink(8) 0 ms, error: invalid AST
V[15:18:57.668] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":8,"jsonrpc":"2.0"}

V[15:18:57.670] <<< {"id":9,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:18:57.670] <-- textDocument/documentHighlight(9)
I[15:18:57.670] --> reply:textDocument/documentHighlight(9) 0 ms, error: invalid AST
V[15:18:57.670] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":9,"jsonrpc":"2.0"}

V[15:19:03.967] <<< {"id":10,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:03.967] <-- textDocument/documentSymbol(10)
I[15:19:03.967] --> reply:textDocument/documentSymbol(10) 0 ms, error: invalid AST
V[15:19:03.967] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":10,"jsonrpc":"2.0"}

V[15:19:03.971] <<< {"id":11,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:03.971] <-- textDocument/codeAction(11)
I[15:19:03.971] --> reply:textDocument/codeAction(11) 0 ms, error: invalid AST
V[15:19:03.971] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":11,"jsonrpc":"2.0"}

V[15:19:03.972] <<< {"id":12,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:03.972] <-- textDocument/documentLink(12)
I[15:19:03.972] --> reply:textDocument/documentLink(12) 0 ms, error: invalid AST
V[15:19:03.972] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":12,"jsonrpc":"2.0"}

V[15:19:03.974] <<< {"id":13,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:03.974] <-- textDocument/documentHighlight(13)
I[15:19:03.974] --> reply:textDocument/documentHighlight(13) 0 ms, error: invalid AST
V[15:19:03.974] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":13,"jsonrpc":"2.0"}

V[15:19:03.976] <<< {"id":14,"jsonrpc":"2.0","method":"textDocument/hover","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:03.976] <-- textDocument/hover(14)
I[15:19:03.976] --> reply:textDocument/hover(14) 0 ms, error: invalid AST
V[15:19:03.976] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":14,"jsonrpc":"2.0"}

V[15:19:04.656] <<< {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":9,"line":92},"start":{"character":8,"line":92}},"rangeLength":1,"text":"E"}],"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":1}}}

I[15:19:04.656] <-- textDocument/didChange
I[15:19:04.706] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 1 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:04.707] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:19:04.708] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:04.708] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 1
E[15:19:04.708] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 1: CreateTargetInfo() return null
E[15:19:04.708] Failed to prepare a compiler instance: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4
I[15:19:04.708] --> textDocument/publishDiagnostics
V[15:19:04.708] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":1}}

V[15:19:05.180] <<< {"id":15,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:05.180] <-- textDocument/documentSymbol(15)
I[15:19:05.180] --> reply:textDocument/documentSymbol(15) 0 ms, error: invalid AST
V[15:19:05.180] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":15,"jsonrpc":"2.0"}

V[15:19:05.182] <<< {"id":16,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":9,"line":92},"start":{"character":9,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:05.182] <-- textDocument/codeAction(16)
I[15:19:05.182] --> reply:textDocument/codeAction(16) 0 ms, error: invalid AST
V[15:19:05.182] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":16,"jsonrpc":"2.0"}

V[15:19:05.183] <<< {"id":17,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:05.183] <-- textDocument/documentLink(17)
I[15:19:05.183] --> reply:textDocument/documentLink(17) 0 ms, error: invalid AST
V[15:19:05.183] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":17,"jsonrpc":"2.0"}

V[15:19:05.184] <<< {"id":18,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":9,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:05.184] <-- textDocument/documentHighlight(18)
I[15:19:05.184] --> reply:textDocument/documentHighlight(18) 0 ms, error: invalid AST
V[15:19:05.184] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":18,"jsonrpc":"2.0"}

V[15:19:05.718] <<< {"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":1}}}

I[15:19:05.718] <-- textDocument/didSave
I[15:19:05.718] File version went from 1 to 1
I[15:19:05.769] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 1 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:05.769] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:19:05.769] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:05.769] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 1
E[15:19:05.770] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 1: CreateTargetInfo() return null
I[15:19:05.770] Skipping rebuild of the AST for /work/github/minos-project/minos2/kernel/core/minos.c, inputs are the same.
I[15:19:05.770] --> textDocument/publishDiagnostics
V[15:19:05.770] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":1}}

V[15:19:06.123] <<< {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":9,"line":92},"start":{"character":8,"line":92}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":2}}}

I[15:19:06.123] <-- textDocument/didChange
V[15:19:06.125] <<< {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"rangeLength":0,"text":"e"}],"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}}

I[15:19:06.125] <-- textDocument/didChange
V[15:19:06.125] ASTWorker skipping Update (2) for /work/github/minos-project/minos2/kernel/core/minos.c
I[15:19:06.175] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 3 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:06.177] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:19:06.177] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:06.177] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 3
E[15:19:06.177] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 3: CreateTargetInfo() return null
E[15:19:06.178] Failed to prepare a compiler instance: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4
I[15:19:06.178] --> textDocument/publishDiagnostics
V[15:19:06.178] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}

V[15:19:06.645] <<< {"id":19,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:06.645] <-- textDocument/documentSymbol(19)
I[15:19:06.645] --> reply:textDocument/documentSymbol(19) 0 ms, error: invalid AST
V[15:19:06.645] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":19,"jsonrpc":"2.0"}

V[15:19:06.647] <<< {"id":20,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:06.647] <-- textDocument/codeAction(20)
I[15:19:06.647] --> reply:textDocument/codeAction(20) 0 ms, error: invalid AST
V[15:19:06.647] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":20,"jsonrpc":"2.0"}

V[15:19:06.647] <<< {"id":21,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:06.647] <-- textDocument/documentLink(21)
I[15:19:06.647] --> reply:textDocument/documentLink(21) 0 ms, error: invalid AST
V[15:19:06.647] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":21,"jsonrpc":"2.0"}

V[15:19:06.648] <<< {"id":22,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:06.648] <-- textDocument/documentHighlight(22)
I[15:19:06.648] --> reply:textDocument/documentHighlight(22) 0 ms, error: invalid AST
V[15:19:06.648] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":22,"jsonrpc":"2.0"}

V[15:19:07.148] <<< {"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}}

I[15:19:07.148] <-- textDocument/didSave
I[15:19:07.148] File version went from 3 to 3
I[15:19:07.198] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 3 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:07.199] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:19:07.199] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:07.199] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 3
E[15:19:07.199] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 3: CreateTargetInfo() return null
I[15:19:07.199] Skipping rebuild of the AST for /work/github/minos-project/minos2/kernel/core/minos.c, inputs are the same.
I[15:19:07.199] --> textDocument/publishDiagnostics
V[15:19:07.199] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}

V[15:19:07.224] <<< {"id":23,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:07.224] <-- textDocument/documentSymbol(23)
I[15:19:07.224] --> reply:textDocument/documentSymbol(23) 0 ms, error: invalid AST
V[15:19:07.225] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":23,"jsonrpc":"2.0"}

V[15:19:07.226] <<< {"id":24,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:07.226] <-- textDocument/codeAction(24)
I[15:19:07.226] --> reply:textDocument/codeAction(24) 0 ms, error: invalid AST
V[15:19:07.226] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":24,"jsonrpc":"2.0"}

V[15:19:07.226] <<< {"id":25,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:07.226] <-- textDocument/documentLink(25)
I[15:19:07.226] --> reply:textDocument/documentLink(25) 0 ms, error: invalid AST
V[15:19:07.226] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":25,"jsonrpc":"2.0"}

V[15:19:07.227] <<< {"id":26,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:07.227] <-- textDocument/documentHighlight(26)
I[15:19:07.227] --> reply:textDocument/documentHighlight(26) 0 ms, error: invalid AST
V[15:19:07.227] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":26,"jsonrpc":"2.0"}

V[15:19:09.229] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"c","text":"/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 as\n * published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n#include <minos/minos.h>\n#include <minos/percpu.h>\n#include <minos/irq.h>\n#include <minos/mm.h>\n#include <asm/arch.h>\n#include <minos/pm.h>\n#include <minos/init.h>\n#include <minos/sched.h>\n#include <minos/smp.h>\n#include <minos/atomic.h>\n#include <minos/softirq.h>\n#include <minos/platform.h>\n#include <config/version.h>\n#include <minos/of.h>\n#include <minos/ramdisk.h>\n\nextern void cpu_idle(void);\nextern void mm_init(void);\nextern int allsymbols_init(void);\nextern void platform_init(void);\nextern int create_idle_task(void);\n\n#ifdef CONFIG_VIRT\n#include <virt/virt.h>\n#endif\n\nvoid boot_main(void)\n{\n\tallsymbols_init();\n\tpercpu_init(0);\n\n\tpr_notice(\"Minos %s\\n\", MINOS_VERSION_STR);\n\n\tASSERT(smp_processor_id() == 0);\n\n\tmm_init();\n\n#ifdef CONFIG_DEVICE_TREE\n\tof_init_bootargs();\n#endif\n\n\tearly_init();\n\tearly_init_percpu();\n\n\tarch_init();\n\tarch_init_percpu();\n\n\tplatform_init();\n\tirq_init();\n\n#ifdef CONFIG_SMP\n\tsmp_init();\n#endif\n\tsubsys_init();\n\tsubsys_init_percpu();\n\n\tmodule_init();\n\tmodule_init_percpu();\n\n\tsched_init();\n\tlocal_sched_init();\n\n\tdevice_init();\n\tdevice_init_percpu();\n\n\tcreate_idle_task();\n\n#ifdef CONFIG_SMP\n\tsmp_cpus_up();\n#endif\n\n#ifdef CONFIG_VIRT\n\tvirt_init();\n#endif\n\tramdisk_init();\n\n\tcpu_idle();\n}\n\nvoid boot_secondary(int cpuid)\n{\n\tpr_notice(\"cpu-%d is up\\n\", cpuid);\n\n\t/*\n\t * need wait for all cpus up then excuted below\n\t * task, otherwise the mem content hold by different\n\t * cpu may be different because the cache issue\n\t *\n\t * eg: the cpu1 called create_idle_task and the\n\t * idle task is created sucessfully but at the same\n\t * time the cpu2 is powered off\n\t *\n\t * waitting for all the cpu power on\n\t */\n\twhile (!is_cpus_all_up())\n\t\tmb();\n\n\tearly_init_percpu();\n\n\tarch_init_percpu();\n\n\tirq_secondary_init();\n\n\tsubsys_init_percpu();\n\n\tmodule_init_percpu();\n\n\tlocal_sched_init();\n\n\tdevice_init_percpu();\n\n\tcreate_idle_task();\n\n\tcpu_idle();\n}\n","uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}}

I[15:19:09.229] <-- textDocument/didOpen
I[15:19:09.229] File version went from 3 to 3
I[15:19:09.230] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 3 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:09.230] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:19:09.230] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:19:09.230] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 3
E[15:19:09.231] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 3: CreateTargetInfo() return null
I[15:19:09.231] Skipping rebuild of the AST for /work/github/minos-project/minos2/kernel/core/minos.c, inputs are the same.
I[15:19:09.231] --> textDocument/publishDiagnostics
V[15:19:09.231] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}

V[15:19:09.241] <<< {"id":27,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.241] <-- textDocument/documentSymbol(27)
I[15:19:09.241] --> reply:textDocument/documentSymbol(27) 0 ms, error: invalid AST
V[15:19:09.241] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":27,"jsonrpc":"2.0"}

V[15:19:09.242] <<< {"id":28,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.242] <-- textDocument/codeAction(28)
I[15:19:09.243] --> reply:textDocument/codeAction(28) 0 ms, error: invalid AST
V[15:19:09.243] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":28,"jsonrpc":"2.0"}

V[15:19:09.243] <<< {"id":29,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.243] <-- textDocument/documentLink(29)
I[15:19:09.243] --> reply:textDocument/documentLink(29) 0 ms, error: invalid AST
V[15:19:09.243] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":29,"jsonrpc":"2.0"}

V[15:19:09.244] <<< {"id":30,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.244] <-- textDocument/documentHighlight(30)
I[15:19:09.244] --> reply:textDocument/documentHighlight(30) 0 ms, error: invalid AST
V[15:19:09.244] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":30,"jsonrpc":"2.0"}

V[15:19:09.744] <<< {"id":31,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.744] <-- textDocument/documentSymbol(31)
I[15:19:09.744] --> reply:textDocument/documentSymbol(31) 0 ms, error: invalid AST
V[15:19:09.744] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":31,"jsonrpc":"2.0"}

V[15:19:09.747] <<< {"id":32,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.748] <-- textDocument/codeAction(32)
I[15:19:09.748] --> reply:textDocument/codeAction(32) 0 ms, error: invalid AST
V[15:19:09.748] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":32,"jsonrpc":"2.0"}

V[15:19:09.749] <<< {"id":33,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.749] <-- textDocument/documentLink(33)
I[15:19:09.749] --> reply:textDocument/documentLink(33) 0 ms, error: invalid AST
V[15:19:09.749] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":33,"jsonrpc":"2.0"}

V[15:19:09.751] <<< {"id":34,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:19:09.751] <-- textDocument/documentHighlight(34)
I[15:19:09.751] --> reply:textDocument/documentHighlight(34) 0 ms, error: invalid AST
V[15:19:09.751] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":34,"jsonrpc":"2.0"}

V[15:22:59.314] <<< {"id":35,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.314] <-- textDocument/documentSymbol(35)
V[15:22:59.314] config note at /work/github/minos-project/minos2/.clangd:1:0: Parsing config fragment
V[15:22:59.314] config note at /work/github/minos-project/minos2/.clangd:1:0: Parsed 1 fragments from file
V[15:22:59.314] Config fragment: compiling /work/github/minos-project/minos2/.clangd:1 -> 0x00007FB9E078DEA0 (trusted=false)
I[15:22:59.316] --> textDocument/publishDiagnostics
V[15:22:59.316] Released memory via malloc_trim
V[15:22:59.316] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/.clangd"}}

I[15:22:59.316] --> reply:textDocument/documentSymbol(35) 1 ms, error: invalid AST
V[15:22:59.316] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":35,"jsonrpc":"2.0"}

V[15:22:59.316] <<< {"id":36,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.316] <-- textDocument/codeAction(36)
I[15:22:59.317] --> reply:textDocument/codeAction(36) 0 ms, error: invalid AST
V[15:22:59.317] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":36,"jsonrpc":"2.0"}

V[15:22:59.317] <<< {"id":37,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.317] <-- textDocument/documentLink(37)
I[15:22:59.317] --> reply:textDocument/documentLink(37) 0 ms, error: invalid AST
V[15:22:59.317] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":37,"jsonrpc":"2.0"}

V[15:22:59.318] <<< {"id":38,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.318] <-- textDocument/documentHighlight(38)
I[15:22:59.318] --> reply:textDocument/documentHighlight(38) 0 ms, error: invalid AST
V[15:22:59.318] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":38,"jsonrpc":"2.0"}

V[15:22:59.345] <<< {"id":39,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.345] <-- textDocument/documentSymbol(39)
I[15:22:59.345] --> reply:textDocument/documentSymbol(39) 0 ms, error: invalid AST
V[15:22:59.345] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":39,"jsonrpc":"2.0"}

V[15:22:59.346] <<< {"id":40,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.346] <-- textDocument/codeAction(40)
I[15:22:59.346] --> reply:textDocument/codeAction(40) 0 ms, error: invalid AST
V[15:22:59.346] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":40,"jsonrpc":"2.0"}

V[15:22:59.347] <<< {"id":41,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.347] <-- textDocument/documentLink(41)
I[15:22:59.347] --> reply:textDocument/documentLink(41) 0 ms, error: invalid AST
V[15:22:59.347] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":41,"jsonrpc":"2.0"}

V[15:22:59.348] <<< {"id":42,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:22:59.348] <-- textDocument/documentHighlight(42)
I[15:22:59.348] --> reply:textDocument/documentHighlight(42) 0 ms, error: invalid AST
V[15:22:59.348] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":42,"jsonrpc":"2.0"}

V[15:23:00.771] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"c","text":"/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 as\n * published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n#include <minos/minos.h>\n#include <minos/percpu.h>\n#include <minos/irq.h>\n#include <minos/mm.h>\n#include <asm/arch.h>\n#include <minos/pm.h>\n#include <minos/init.h>\n#include <minos/sched.h>\n#include <minos/smp.h>\n#include <minos/atomic.h>\n#include <minos/softirq.h>\n#include <minos/platform.h>\n#include <config/version.h>\n#include <minos/of.h>\n#include <minos/ramdisk.h>\n\nextern void cpu_idle(void);\nextern void mm_init(void);\nextern int allsymbols_init(void);\nextern void platform_init(void);\nextern int create_idle_task(void);\n\n#ifdef CONFIG_VIRT\n#include <virt/virt.h>\n#endif\n\nvoid boot_main(void)\n{\n\tallsymbols_init();\n\tpercpu_init(0);\n\n\tpr_notice(\"Minos %s\\n\", MINOS_VERSION_STR);\n\n\tASSERT(smp_processor_id() == 0);\n\n\tmm_init();\n\n#ifdef CONFIG_DEVICE_TREE\n\tof_init_bootargs();\n#endif\n\n\tearly_init();\n\tearly_init_percpu();\n\n\tarch_init();\n\tarch_init_percpu();\n\n\tplatform_init();\n\tirq_init();\n\n#ifdef CONFIG_SMP\n\tsmp_init();\n#endif\n\tsubsys_init();\n\tsubsys_init_percpu();\n\n\tmodule_init();\n\tmodule_init_percpu();\n\n\tsched_init();\n\tlocal_sched_init();\n\n\tdevice_init();\n\tdevice_init_percpu();\n\n\tcreate_idle_task();\n\n#ifdef CONFIG_SMP\n\tsmp_cpus_up();\n#endif\n\n#ifdef CONFIG_VIRT\n\tvirt_init();\n#endif\n\tramdisk_init();\n\n\tcpu_idle();\n}\n\nvoid boot_secondary(int cpuid)\n{\n\tpr_notice(\"cpu-%d is up\\n\", cpuid);\n\n\t/*\n\t * need wait for all cpus up then excuted below\n\t * task, otherwise the mem content hold by different\n\t * cpu may be different because the cache issue\n\t *\n\t * eg: the cpu1 called create_idle_task and the\n\t * idle task is created sucessfully but at the same\n\t * time the cpu2 is powered off\n\t *\n\t * waitting for all the cpu power on\n\t */\n\twhile (!is_cpus_all_up())\n\t\tmb();\n\n\tearly_init_percpu();\n\n\tarch_init_percpu();\n\n\tirq_secondary_init();\n\n\tsubsys_init_percpu();\n\n\tmodule_init_percpu();\n\n\tlocal_sched_init();\n\n\tdevice_init_percpu();\n\n\tcreate_idle_task();\n\n\tcpu_idle();\n}\n","uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}}

I[15:23:00.771] <-- textDocument/didOpen
I[15:23:00.771] File version went from 3 to 3
I[15:23:00.772] ASTWorker building file /work/github/minos-project/minos2/kernel/core/minos.c version 3 with command 
[/work/github/minos-project/minos2/kernel]
/usr/bin/cc -c -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -D__KERNEL__ -Wno-format-security -O2 -DBUILD_HYPERVISOR -std=gnu89 --static -nostdlib -fno-builtin -g -I./arch/aarch64/include -I./include -I./../generic/include -mgeneral-regs-only -fno-asynchronous-unwind-tables -march=armv8-a -ffixed-x18 -mlittle-endian -mcmodel=large -D__KERNEL__ -o core/minos.o -arch arm64 -resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -- /work/github/minos-project/minos2/kernel/core/minos.c
V[15:23:00.773] Ignored diagnostic. argument unused during compilation: '-ffixed-x18'
V[15:23:00.773] Ignored diagnostic. argument unused during compilation: '-arch arm64'
V[15:23:00.773] Driver produced command: cc1 -cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name minos.c -static-define -mrelocation-model static -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -mcmodel=large -target-cpu armv8-a -target-feature -x87 -target-feature -mmx -target-feature -sse -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/work/github/minos-project/minos2/kernel -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -D __KERNEL__ -D BUILD_HYPERVISOR -I ./arch/aarch64/include -I ./include -I ./../generic/include -D __KERNEL__ -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fdebug-compilation-dir=/work/github/minos-project/minos2/kernel -ferror-limit 19 -fno-builtin -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c /work/github/minos-project/minos2/kernel/core/minos.c
V[15:23:00.773] Building first preamble for /work/github/minos-project/minos2/kernel/core/minos.c version 3
E[15:23:00.773] Could not build a preamble for file /work/github/minos-project/minos2/kernel/core/minos.c version 3: CreateTargetInfo() return null
E[15:23:00.774] Failed to prepare a compiler instance: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4
I[15:23:00.774] --> textDocument/publishDiagnostics
V[15:23:00.774] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c","version":3}}

V[15:23:00.785] <<< {"id":43,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:00.785] <-- textDocument/documentSymbol(43)
I[15:23:00.785] --> reply:textDocument/documentSymbol(43) 0 ms, error: invalid AST
V[15:23:00.785] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":43,"jsonrpc":"2.0"}

V[15:23:00.786] <<< {"id":44,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:00.786] <-- textDocument/codeAction(44)
I[15:23:00.787] --> reply:textDocument/codeAction(44) 0 ms, error: invalid AST
V[15:23:00.787] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":44,"jsonrpc":"2.0"}

V[15:23:00.787] <<< {"id":45,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:00.787] <-- textDocument/documentLink(45)
I[15:23:00.787] --> reply:textDocument/documentLink(45) 0 ms, error: invalid AST
V[15:23:00.787] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":45,"jsonrpc":"2.0"}

V[15:23:00.788] <<< {"id":46,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:00.788] <-- textDocument/documentHighlight(46)
I[15:23:00.788] --> reply:textDocument/documentHighlight(46) 0 ms, error: invalid AST
V[15:23:00.788] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":46,"jsonrpc":"2.0"}

V[15:23:01.288] <<< {"id":47,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:01.288] <-- textDocument/documentSymbol(47)
I[15:23:01.288] --> reply:textDocument/documentSymbol(47) 0 ms, error: invalid AST
V[15:23:01.288] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":47,"jsonrpc":"2.0"}

V[15:23:01.291] <<< {"id":48,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":8,"line":92},"start":{"character":8,"line":92}},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:01.291] <-- textDocument/codeAction(48)
I[15:23:01.291] --> reply:textDocument/codeAction(48) 0 ms, error: invalid AST
V[15:23:01.291] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":48,"jsonrpc":"2.0"}

V[15:23:01.293] <<< {"id":49,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:01.293] <-- textDocument/documentLink(49)
I[15:23:01.293] --> reply:textDocument/documentLink(49) 0 ms, error: invalid AST
V[15:23:01.293] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":49,"jsonrpc":"2.0"}

V[15:23:01.295] <<< {"id":50,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":8,"line":92},"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}

I[15:23:01.295] <-- textDocument/documentHighlight(50)
I[15:23:01.295] --> reply:textDocument/documentHighlight(50) 0 ms, error: invalid AST
V[15:23:01.295] >>> {"error":{"code":-32001,"message":"invalid AST"},"id":50,"jsonrpc":"2.0"}

V[15:23:03.808] <<< {"id":51,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///work/github/minos-project/minos2/kernel/core/minos.c"}}}



System information

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

Output of clangd --version:

Ubuntu clangd version 13.0.1-2ubuntu2~20.04.1
Features: linux
Platform: x86_64-pc-linux-gnu

Editor/LSP plugin:

Emacs

Operating system:
Linux

@HighCommander4
Copy link

HighCommander4 commented Apr 7, 2023

It looks like clangd does not like the flag -march=armv8-a in the compile command, can you try removing it by creating a .clangd file with:

CompileFlags:
  Remove: [-march=*]

@jason--liu
Copy link
Author

@HighCommander4 Thanks, it works.

@recallmenot
Copy link

I'd like to add to this:
over on ch32v003fun, gcc is run with -march and -mabi, which results in clangd error -32001 invalid ast aswell.
It has been solved by a .clangd file containing the following:

CompileFlags:
  Remove: [-march=*, -mabi=*]

To have make generate this file, you may add to your Makefile:

	@echo "CompileFlags:" > .clangd
	@echo "  Remove: [-march=*, -mabi=*]" >> .clangd

@IsaacJT
Copy link

IsaacJT commented Apr 16, 2024

This can also be triggered by -mcpu. Adding this to the config from #1582 (comment) fixed it for me.

CompileFlags:
  Remove: [-march=*, -mabi=*, -mcpu=*]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants