MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / read_manual

Function read_manual

tools/WCS.py:182–200  ·  view source on GitHub ↗

reads the manual stack useage files. :param file: the file name :param call_graph: a object used to store information about each function, results go here

(file, call_graph)

Source from the content-addressed store, hash-verified

180
181
182def read_manual(file, call_graph):
183 """
184 reads the manual stack useage files.
185 :param file: the file name
186 :param call_graph: a object used to store information about each function, results go here
187 """
188
189 for line in open(file).readlines():
190 fxn, stack_sz = line.split()
191 if fxn in call_graph:
192 raise Exception("Redeclared Function {}".format(fxn))
193 call_graph['globals'][fxn] = {'wcs': int(stack_sz),
194 'calls': set(),
195 'has_ptr_call': False,
196 'local_stack': int(stack_sz),
197 'is_manual': True,
198 'name': fxn,
199 'tu': '#MANUAL',
200 'binding': 'GLOBAL'}
201
202
203def validate_all_data(call_graph):

Callers 1

mainFunction · 0.85

Calls 2

openFunction · 0.50
setFunction · 0.50

Tested by

no test coverage detected