0
當我試圖獲得代碼的pdg時,我得到這個無效的符號錯誤,沒有幫助的行號。 任何人都可以提出這個錯誤的含義嗎?請注意,代碼編譯並使用g ++運行 問題是如何獲取此錯誤的確切行號。執行frama-c [內核]用戶錯誤:無效的符號
命令:
frama-c -continue-annot-error -kernel-verbose 3 -no-annot -no-frama-c-stdlib -cpp-command " /usr/bin/g++ -iquote../../inc -std=c++11 fPIC -Wno-write-strings -Wno-narrowing -gdwarf-3 -o test.o -c" -pdg -pdg-dot test -pdg-print test.cpp
錯誤消息:
[kernel] computing the AST
[kernel] parsing
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing /usr/local/share/frama-c/libc/__fc_builtin_for_normalization.i to Cabs
[kernel] Parsing /usr/local/share/frama-c/libc/__fc_builtin_for_normalization.i
[kernel] Converting /usr/local/share/frama-c/libc /__fc_builtin_for_normalization.i from Cabs to CIL
[kernel] Parsing test.cpp (with preprocessing)
[kernel] Parsing /tmp/test.cppe1a338.i to Cabs
[kernel] Parsing /tmp/test.cppe1a338.i
/tmp/test.cppe1a338.i:1:[kernel] user error: Invalid symbol
[kernel] user error: stopping on file "test.cpp"
that has errors.
[kernel] Frama-C aborted: invalid user input.
-cpp-命令應該是一個預處理命令,而不是編譯。你應該使用''-C -E''而不是''-c'',而不是''-o''。 – Anne