summaryrefslogtreecommitdiff
path: root/examples/print_refs.py
blob: b2d9f5f3e3f7debf89fdfb990c57af198573b155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Prints the names of all symbols that reference a particular symbol. (There's
# also a method get_selected_symbols() for determining just selection
# relations.)

import kconfiglib
import sys

conf = kconfiglib.Config(sys.argv[1])

x86 = conf["X86"]
for sym in conf:
    if x86 in sym.get_referenced_symbols():
        print sym.get_name()