gdb_python_api icon indicating copy to clipboard operation
gdb_python_api copied to clipboard

libclang can't find stddef.h

Open jefftrull opened this issue 7 years ago • 2 comments

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 avatar Sep 24 '18 20:09 jefftrull

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

jefftrull avatar Sep 24 '18 20:09 jefftrull

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.

jefftrull avatar May 01 '21 05:05 jefftrull