MCPcopy Index your code
hub / github.com/python/cpython / invoke

Method invoke

Tools/gdb/libpython.py:2141–2162  ·  view source on GitHub ↗
(self, args, from_tty)

Source from the content-addressed store, hash-verified

2139
2140
2141 def invoke(self, args, from_tty):
2142 name = str(args)
2143
2144 frame = Frame.get_selected_python_frame()
2145 if not frame:
2146 print('Unable to locate python frame')
2147 return
2148
2149 pyop_frame = frame.get_pyop()
2150 if not pyop_frame:
2151 print(UNABLE_READ_INFO_PYTHON_FRAME)
2152 return
2153
2154 pyop_var, scope = pyop_frame.get_var_by_name(name)
2155
2156 if pyop_var:
2157 print('%s %r = %s'
2158 % (scope,
2159 name,
2160 pyop_var.get_truncated_repr(MAX_OUTPUT_LEN)))
2161 else:
2162 print('%r not found' % name)
2163
2164PyPrint()
2165

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
get_pyopMethod · 0.80
get_var_by_nameMethod · 0.45
get_truncated_reprMethod · 0.45

Tested by

no test coverage detected