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_]*)") |