Try to obtain the Frame for the python-related code in the selected frame, or None
(cls)
| 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): |
no test coverage detected