MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / symbols

Function symbols

tools/python-3.11.9-amd64/Tools/scripts/nm2def.py:43–59  ·  view source on GitHub ↗
(lib=PYTHONLIB,types=('T','C','D'))

Source from the content-addressed store, hash-verified

41NM = 'nm -p -g %s' # For Linux, use "nm -g %s"
42
43def symbols(lib=PYTHONLIB,types=('T','C','D')):
44
45 with os.popen(NM % lib) as pipe:
46 lines = pipe.readlines()
47 lines = [s.strip() for s in lines]
48 symbols = {}
49 for line in lines:
50 if len(line) == 0 or ':' in line:
51 continue
52 items = line.split()
53 if len(items) != 3:
54 continue
55 address, type, name = items
56 if type not in types:
57 continue
58 symbols[name] = address,type
59 return symbols
60
61def export_list(symbols):
62

Callers 1

mainFunction · 0.85

Calls 3

stripMethod · 0.80
readlinesMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected