This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This sample will guide you through elements of the F# language. | |
// | |
// ******************************************************************************************************* | |
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter in Windows or | |
// Ctrl-Enter Mac, or right-click and select "Send Selection to F# Interactive". | |
// You can open the F# Interactive Window from the "View" menu. | |
// ******************************************************************************************************* | |
// For more about F#, see: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Written by pagabuc, run with the following: | |
# gdb --batch --nx -q -x extract_offsets.py ./vmlinux | |
# This script finds kernel objects that contain function pointers and with size between 1024 and 2048. | |
# Nested structure types are traversed recursively. | |
import gdb | |
import re | |
struct_regex = re.compile("(struct [a-zA-Z0-9_]*)") |
- Disable or uninstall the official
C/C++ plugin
. - Install the
clangd
plugin. - Build the kernel with
clang
:
/path/to/kernel_source$ make CC=clang defconfig
/path/to/kernel_source$ make CC=clang -j16
- Generate the
compile_commands.json
:
/path/to/kernel_source$ python ./scripts/clang-tools/gen_compile_commands.py