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)
| 180 | |
| 181 | |
| 182 | def 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 | |
| 203 | def validate_all_data(call_graph): |