Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#!/usr/bin/env python3
2# Copyright(c) 2025: Mauro Carvalho Chehab <mchehab@kernel.org>.
3# pylint: disable=R0903
4# SPDX-License-Identifier: GPL-2.0
5
6"""
7Helper classes for ABI parser
8"""
9
10ABI_DIR = "Documentation/ABI/"
11
12
13class AbiDebug:
14 """Debug levels"""
15
16 WHAT_PARSING = 1 #: Enable debug parsing logic.
17 WHAT_OPEN = 2 #: Enable debug messages on file open.
18 DUMP_ABI_STRUCTS = 4 #: Enable debug for ABI parse data.
19 UNDEFINED = 8 #: Enable extra undefined symbol data.
20 REGEX = 16 #: Enable debug for what to regex conversion.
21 SUBGROUP_MAP = 32 #: Enable debug for symbol regex subgroups
22 SUBGROUP_DICT = 64 #: Enable debug for sysfs graph tree variable.
23 SUBGROUP_SIZE = 128 #: Enable debug of search groups.
24 GRAPH = 256 #: Display ref tree graph for undefined symbols.
25
26#: Helper messages for each debug variable
27DEBUG_HELP = """
281 - enable debug parsing logic
292 - enable debug messages on file open
304 - enable debug for ABI parse data
318 - enable extra debug information to identify troubles
32 with ABI symbols found at the local machine that
33 weren't found on ABI documentation (used only for
34 undefined subcommand)
3516 - enable debug for what to regex conversion
3632 - enable debug for symbol regex subgroups
3764 - enable debug for sysfs graph tree variable
38128 - enable debug of search groups
39256 - enable displaying refrence tree graphs for undefined symbols.
40"""