0

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.

ShooBear
  • 1
  • 2
  • "_when it encounters the EXPORT_SYMBOL code, it no longer shows the call hierarchy_" what do you mean here? Do you mean that after the first instance of `EXPORT_SYMBOL` in the code, no symbols that should show up in the outline view show up? – starball Feb 23 '23 at 01:40
  • An example of using call hierarchy in the io_schedule_finish function shows io_schedule -> bit_wait_io. I'd like to see where bit_wait_io is called, but for the `EXPORT_SYMBOL` function, that function is recursively output. – ShooBear Feb 23 '23 at 02:03

0 Answers0