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

Function find_demangled_fxn

tools/WCS.py:102–119  ·  view source on GitHub ↗

Looks up the dictionary associated with the function. :param tu: The translation unit in which to look for locals functions :param fxn: The function name :param call_graph: a object used to store information about each function :return: the dictionary for the given function or N

(tu, fxn, call_graph)

Source from the content-addressed store, hash-verified

100
101
102def find_demangled_fxn(tu, fxn, call_graph):
103 """
104 Looks up the dictionary associated with the function.
105 :param tu: The translation unit in which to look for locals functions
106 :param fxn: The function name
107 :param call_graph: a object used to store information about each function
108 :return: the dictionary for the given function or None
109 """
110 for f in call_graph['globals'].values():
111 if 'demangledName' in f:
112 if f['demangledName'] == fxn:
113 return f
114 for f in call_graph['locals'].values():
115 if tu in f:
116 if 'demangledName' in f[tu]:
117 if f[tu]['demangledName'] == fxn:
118 return f[tu]
119 return None
120
121
122def read_rtl(tu, call_graph):

Callers 1

read_suFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected