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

Method get_selected_python_frame

Tools/gdb/libpython.py:1882–1897  ·  view source on GitHub ↗

Try to obtain the Frame for the python-related code in the selected frame, or None

(cls)

Source from the content-addressed store, hash-verified

1880
1881 @classmethod
1882 def get_selected_python_frame(cls):
1883 '''Try to obtain the Frame for the python-related code in the selected
1884 frame, or None'''
1885 try:
1886 frame = cls.get_selected_frame()
1887 except gdb.error:
1888 # No frame: Python didn't start yet
1889 return None
1890
1891 while frame:
1892 if frame.is_python_frame():
1893 return frame
1894 frame = frame.older()
1895
1896 # Not found:
1897 return None
1898
1899 @classmethod
1900 def get_selected_bytecode_frame(cls):

Callers 4

move_in_stackFunction · 0.80
print_traceback_helperFunction · 0.80
invokeMethod · 0.80
invokeMethod · 0.80

Calls 3

get_selected_frameMethod · 0.80
is_python_frameMethod · 0.80
olderMethod · 0.80

Tested by

no test coverage detected