jefftrull / gdb_python_api

Experiments with the GDB Python API
MIT License
68 stars 14 forks source link

libclang can't find stddef.h #3

Open jefftrull opened 6 years ago

jefftrull commented 6 years ago

Usage as described in README.md is fine but more recent versions of clangd, as on my computer, fail with the following message during 'stepu':

["Lexical or Preprocessor Issue:'stddef.h' file not found"] Python Exception <class 'RuntimeError'> Failure during libclang parsing: Error occurred in Python command: Failure during libclang parsing

jefftrull commented 6 years ago

That's when you use LD_LIBRARY_PATH to point to a fresh LLVM/clang build

jefftrull commented 3 years ago

This may be related to an issue described in the docs - basically, some built-in includes are located relative to the clang binary and have to be manually added to library-using code. Hard-coding this in getASTNode seems to work around the problem.