I am a Linux kernel developer. I am using clangd extension to use Call hierarchy in Vscode.
I created compile_commands.py using scripts/gen_compile_commands.py and it worked fine.
I am using the Call hierarchy function as desired. However, I am not able to navigate further for functions with EXPORT_SYMBOL as shown below.
Result of using Call hierarchy in the io_schedule function
The io_schedule function is also used in the following places in a full search. However, when it encounters the EXPORT_SYMBOL code, it no longer shows the call hierarchy. I would like to know how I can solve this problem.
Other examples Bit_wait_io appears recursive when performing call hierarchy on io_schedule_finish io_schedule_finish call hierarchy
I don't know if it helps, but currently clang is printing errors for __read_mostly and EXPORT_SYMBOL syntax.
EXPORT_SYMBOL Error __read_mostly Error
I am working on MAC mini m1 and the version of the kernel code is 4.19. I am not using any C/C++ extensions and have installed the clangd extension.
This is the result of clang -version.
❯ clang --version Apple clang version 14.0.0 (clang-1400.0.29.202) Target: arm64-apple-darwin22.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I googled it and found that it's a type of code that GCC supports but Clang doesn't. I didn't find a suitable solution I used attribute_section_invalid_for_target as a search keyword.