1
0

helpers.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. Helper classes for ABI parser
  7. """
  8. ABI_DIR = "Documentation/ABI/"
  9. class AbiDebug:
  10. """Debug levels"""
  11. WHAT_PARSING = 1 #: Enable debug parsing logic.
  12. WHAT_OPEN = 2 #: Enable debug messages on file open.
  13. DUMP_ABI_STRUCTS = 4 #: Enable debug for ABI parse data.
  14. UNDEFINED = 8 #: Enable extra undefined symbol data.
  15. REGEX = 16 #: Enable debug for what to regex conversion.
  16. SUBGROUP_MAP = 32 #: Enable debug for symbol regex subgroups
  17. SUBGROUP_DICT = 64 #: Enable debug for sysfs graph tree variable.
  18. SUBGROUP_SIZE = 128 #: Enable debug of search groups.
  19. GRAPH = 256 #: Display ref tree graph for undefined symbols.
  20. #: Helper messages for each debug variable
  21. DEBUG_HELP = """
  22. 1 - enable debug parsing logic
  23. 2 - enable debug messages on file open
  24. 4 - enable debug for ABI parse data
  25. 8 - enable extra debug information to identify troubles
  26. with ABI symbols found at the local machine that
  27. weren't found on ABI documentation (used only for
  28. undefined subcommand)
  29. 16 - enable debug for what to regex conversion
  30. 32 - enable debug for symbol regex subgroups
  31. 64 - enable debug for sysfs graph tree variable
  32. 128 - enable debug of search groups
  33. 256 - enable displaying refrence tree graphs for undefined symbols.
  34. """