That is incorrect, since only the root directories should be in the search list:
The problem is LwIP provide their own implementation of err.h and errno.h which are being discovered by my application and clashing with the real c/c++ err.h and errno.h. LwIP provides a macro to avoid the clashing names, but it doesn’t quite work.
I suspect you can’t do much about it, after all you are just adding the directories that STM32CubeMx puts in the project file. I will just have to remember to remove the extra directories each time I update the project from Cube. Unless you have a better or more permanent solution?
Normally, STM32CubeMX should specify the correct include directories in the .gpdsc file, and VisualGDB should pick them up.
However, in practice, the ST’s tool often drops include paths or writes invalid file paths in the gpdsc file, so random problems do happen.
If you could attach your gpdsc file, we might be able to add a workaround to our STM32CubeMX importer plugin to add the missing include paths. Alternatively, you can try patching the plugin on your side – we provide source code for most of the plugins interacting with external tools so that our users could tweak them to their needs.