From 699f4fdbe112214ec3c6aea6717f8300aae49d23 Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Sat, 16 Dec 2023 15:43:27 -0300 Subject: [PATCH] wip --- .../.github/workflows/pydevd-tests-python.yml | 12 +- .../pysrc/_pydev_bundle/pydev_monkey.py | 4 +- .../pysrc/_pydevd_bundle/pydevd_api.py | 15 +- .../_pydevd_bundle/pydevd_bytecode_utils.py | 126 +- .../pydevd_bytecode_utils_py311.py | 116 + .../pysrc/_pydevd_bundle/pydevd_comm.py | 10 +- .../pysrc/_pydevd_bundle/pydevd_constants.py | 18 +- .../pysrc/_pydevd_bundle/pydevd_cython.c | 31090 ++++++++-------- .../pysrc/_pydevd_bundle/pydevd_cython.pyx | 664 +- .../_pydevd_bundle/pydevd_cython_wrapper.py | 6 + .../_pydevd_bundle/pydevd_daemon_thread.py | 4 +- .../_pydevd_bundle/pydevd_dont_trace_files.py | 25 +- .../pysrc/_pydevd_bundle/pydevd_filtering.py | 3 +- .../pysrc/_pydevd_bundle/pydevd_frame.py | 652 +- .../_pydevd_bundle/pydevd_frame_utils.py | 3 + .../pydevd_net_command_factory_xml.py | 10 +- .../_pydevd_bundle/pydevd_plugin_utils.py | 176 +- .../_pydevd_bundle/pydevd_suspended_frames.py | 4 +- .../_pydevd_bundle/pydevd_thread_lifecycle.py | 11 +- .../pysrc/_pydevd_bundle/pydevd_trace_api.py | 62 - .../_pydevd_bundle/pydevd_trace_dispatch.py | 4 + .../pydevd_trace_dispatch_regular.py | 4 +- .../pysrc/_pydevd_bundle/pydevd_vars.py | 2 +- .../pydevd_frame_evaluator.c | 254 +- .../_pydevd_frame_eval/vendored/README.txt | 2 +- .../bytecode-0.13.0.dev0.dist-info/METADATA | 77 - .../bytecode-0.13.0.dev0.dist-info/RECORD | 42 - .../direct_url.json | 1 - .../COPYING | 2 +- .../INSTALLER | 0 .../METADATA | 102 + .../RECORD | 23 + .../REQUESTED | 0 .../WHEEL | 2 +- .../direct_url.json | 1 + .../top_level.txt | 0 .../vendored/bytecode/__init__.py | 175 +- .../vendored/bytecode/bytecode.py | 238 +- .../vendored/bytecode/cfg.py | 940 +- .../vendored/bytecode/concrete.py | 1153 +- .../vendored/bytecode/flags.py | 64 +- .../vendored/bytecode/instr.py | 977 +- .../vendored/bytecode/peephole_opt.py | 491 - .../vendored/bytecode/py.typed | 0 .../vendored/bytecode/tests/__init__.py | 154 - .../vendored/bytecode/tests/test_bytecode.py | 488 - .../vendored/bytecode/tests/test_cfg.py | 836 - .../vendored/bytecode/tests/test_code.py | 93 - .../vendored/bytecode/tests/test_concrete.py | 1513 - .../vendored/bytecode/tests/test_flags.py | 159 - .../vendored/bytecode/tests/test_instr.py | 362 - .../vendored/bytecode/tests/test_misc.py | 270 - .../bytecode/tests/test_peephole_opt.py | 985 - .../bytecode/tests/util_annotation.py | 17 - .../vendored/bytecode/version.py | 19 + .../pydevd_sys_monitoring.py | 1240 +- .../pysrc/build_tools/generate_code.py | 17 +- plugins/org.python.pydev.core/pysrc/pydevd.py | 220 +- .../linux_and_mac/compile_manylinux.cmd | 0 .../pysrc/pydevd_plugins/django_debug.py | 98 +- .../pysrc/pydevd_plugins/jinja2_debug.py | 84 +- .../pysrc/pydevd_tracing.py | 12 +- .../pysrc/tests_python/debug_constants.py | 3 +- .../pysrc/tests_python/debugger_unittest.py | 4 +- .../pysrc/tests_python/performance_check.py | 66 +- .../resources/_debugger_case17a.py | 2 +- .../_debugger_case_stop_async_iteration.py | 25 +- ...ugger_case_wait_for_attach_debugpy_mode.py | 6 +- .../_debugger_case_wait_for_attach_impl.py | 7 +- .../tests_python/resources/my_code/my_code.py | 5 + .../pysrc/tests_python/test_debugger.py | 117 +- .../pysrc/tests_python/test_debugger_json.py | 50 +- .../test_smart_step_into_bytecode.py | 186 +- .../pysrc/tests_python/test_sys_monitoring.py | 95 +- .../tests_python/test_tracing_on_top_level.py | 5 +- .../pysrc/tests_python/test_utilities.py | 8 +- 76 files changed, 22173 insertions(+), 22538 deletions(-) create mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils_py311.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_api.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json rename plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/{bytecode-0.13.0.dev0.dist-info => bytecode-0.15.2.dev4+gc87faa2.dist-info}/COPYING (95%) rename plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/{bytecode-0.13.0.dev0.dist-info => bytecode-0.15.2.dev4+gc87faa2.dist-info}/INSTALLER (100%) create mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/METADATA create mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/RECORD rename plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/{bytecode-0.13.0.dev0.dist-info => bytecode-0.15.2.dev4+gc87faa2.dist-info}/REQUESTED (100%) rename plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/{bytecode-0.13.0.dev0.dist-info => bytecode-0.15.2.dev4+gc87faa2.dist-info}/WHEEL (65%) create mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/direct_url.json rename plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/{bytecode-0.13.0.dev0.dist-info => bytecode-0.15.2.dev4+gc87faa2.dist-info}/top_level.txt (100%) delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py create mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/py.typed delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py delete mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py create mode 100644 plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/version.py mode change 100644 => 100755 plugins/org.python.pydev.core/pysrc/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd diff --git a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml index 6deeab4497..585d11fa92 100644 --- a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml +++ b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml @@ -17,9 +17,9 @@ jobs: name: [ "ubuntu-pypy3", "macos-py37-cython", - "ubuntu-py38-cython-checkbin", + "ubuntu-py38-cython", "windows-py39-cython", - "windows-py310-cython", + "windows-py310-cython-checkbin", "windows-py311-cython", "ubuntu-py311-cython", "ubuntu-py312-cython", @@ -34,7 +34,7 @@ jobs: python: "3.7" os: macos-latest PYDEVD_USE_CYTHON: YES - - name: "ubuntu-py38-cython-checkbin" + - name: "ubuntu-py38-cython" python: "3.8" os: ubuntu-latest PYDEVD_USE_CYTHON: YES @@ -42,7 +42,7 @@ jobs: python: "3.9" os: windows-latest PYDEVD_USE_CYTHON: YES - - name: "windows-py310-cython" + - name: "windows-py310-cython-checkbin" python: "3.10" os: windows-latest PYDEVD_USE_CYTHON: YES @@ -88,11 +88,11 @@ jobs: pip install psutil --no-warn-script-location pip install ipython --no-warn-script-location pip install untangle --no-warn-script-location + pip install "django==4.2" --no-warn-script-location - name: Install Python 3.x deps - if: contains(matrix.name, 'py3') && !contains(matrix.name, 'pypy') && !contains(matrix.name, 'py311') && !contains(matrix.name, 'py312') + if: contains(matrix.name, 'py3') && !contains(matrix.name, 'pypy') && !contains(matrix.name, 'py312') && !contains(matrix.name, 'py311') run: | pip install PySide2 --no-warn-script-location - pip install django<=4.2 pip install cherrypy --no-warn-script-location pip install gevent greenlet - name: Install Pandas diff --git a/plugins/org.python.pydev.core/pysrc/_pydev_bundle/pydev_monkey.py b/plugins/org.python.pydev.core/pysrc/_pydev_bundle/pydev_monkey.py index 6363bae595..4afbccf679 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydev_bundle/pydev_monkey.py +++ b/plugins/org.python.pydev.core/pysrc/_pydev_bundle/pydev_monkey.py @@ -4,7 +4,7 @@ import sys from _pydev_bundle._pydev_saved_modules import threading from _pydevd_bundle.pydevd_constants import get_global_debugger, IS_WINDOWS, IS_JYTHON, get_current_thread_id, \ - sorted_dict_repr, set_global_debugger, DebugInfoHolder, USE_SYS_MONITORING + sorted_dict_repr, set_global_debugger, DebugInfoHolder, PYDEVD_USE_SYS_MONITORING from _pydev_bundle import pydev_log from contextlib import contextmanager from _pydevd_bundle import pydevd_constants, pydevd_defaults @@ -234,7 +234,7 @@ def _on_forked_process(setup_tracing=True): def _on_set_trace_for_new_thread(global_debugger): if global_debugger is not None: - if not USE_SYS_MONITORING: + if not PYDEVD_USE_SYS_MONITORING: global_debugger.enable_tracing() diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_api.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_api.py index 0b21c59b8e..abd295e9c0 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_api.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_api.py @@ -15,7 +15,8 @@ from _pydevd_bundle.pydevd_comm_constants import (CMD_THREAD_SUSPEND, file_system_encoding, CMD_STEP_INTO_MY_CODE, CMD_STOP_ON_START, CMD_SMART_STEP_INTO) from _pydevd_bundle.pydevd_constants import (get_current_thread_id, set_protocol, get_protocol, - HTTP_JSON_PROTOCOL, JSON_PROTOCOL, DebugInfoHolder, IS_WINDOWS) + HTTP_JSON_PROTOCOL, JSON_PROTOCOL, DebugInfoHolder, IS_WINDOWS, + PYDEVD_USE_SYS_MONITORING) from _pydevd_bundle.pydevd_net_command_factory_json import NetCommandFactoryJson from _pydevd_bundle.pydevd_net_command_factory_xml import NetCommandFactory import pydevd_file_utils @@ -32,6 +33,7 @@ from _pydevd_bundle.pydevd_daemon_thread import run_as_pydevd_daemon_thread from _pydevd_bundle.pydevd_thread_lifecycle import pydevd_find_thread_by_id, resume_threads import tokenize +from _pydevd_sys_monitoring import pydevd_sys_monitoring try: import dis @@ -562,7 +564,7 @@ def add_breakpoint( id_to_pybreakpoint[breakpoint_id] = added_breakpoint py_db.consolidate_breakpoints(canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) if py_db.plugin is not None: - py_db.has_plugin_line_breaks = py_db.plugin.has_line_breaks() + py_db.has_plugin_line_breaks = py_db.plugin.has_line_breaks(py_db) py_db.plugin.after_breakpoints_consolidated(py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) py_db.on_breakpoints_changed() @@ -680,7 +682,7 @@ def remove_breakpoint(self, py_db, received_filename, breakpoint_type, breakpoin del id_to_pybreakpoint[breakpoint_id] py_db.consolidate_breakpoints(canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) if py_db.plugin is not None: - py_db.has_plugin_line_breaks = py_db.plugin.has_line_breaks() + py_db.has_plugin_line_breaks = py_db.plugin.has_line_breaks(py_db) py_db.plugin.after_breakpoints_consolidated(py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) except KeyError: @@ -797,7 +799,7 @@ def add_plugins_exception_breakpoint(self, py_db, breakpoint_type, exception): supported_type = plugin.add_breakpoint('add_exception_breakpoint', py_db, breakpoint_type, exception) if supported_type: - py_db.has_plugin_exception_breaks = py_db.plugin.has_exception_breaks() + py_db.has_plugin_exception_breaks = py_db.plugin.has_exception_breaks(py_db) py_db.on_breakpoints_changed() else: raise NameError(breakpoint_type) @@ -830,7 +832,7 @@ def remove_plugins_exception_breakpoint(self, py_db, exception_type, exception): supported_type = plugin.remove_exception_breakpoint(py_db, exception_type, exception) if supported_type: - py_db.has_plugin_exception_breaks = py_db.plugin.has_exception_breaks() + py_db.has_plugin_exception_breaks = py_db.plugin.has_exception_breaks(py_db) else: pydev_log.info('No exception of type: %s was previously registered.', exception_type) @@ -924,6 +926,9 @@ def stop_on_entry(self): info = set_additional_thread_info(main_thread) info.pydev_original_step_cmd = CMD_STOP_ON_START info.pydev_step_cmd = CMD_STEP_INTO_MY_CODE + if PYDEVD_USE_SYS_MONITORING: + pydevd_sys_monitoring.update_monitor_events(suspend_requested=True) + pydevd_sys_monitoring.restart_events() def set_ignore_system_exit_codes(self, py_db, ignore_system_exit_codes): py_db.set_ignore_system_exit_codes(ignore_system_exit_codes) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils.py index e8c9f5479c..fe2ce1ea84 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils.py @@ -6,7 +6,8 @@ from _pydev_bundle import pydev_log from types import CodeType -from _pydevd_frame_eval.vendored.bytecode.instr import _Variable +from _pydevd_frame_eval.vendored.bytecode.instr import _Variable, TryBegin, \ + TryEnd, Label from _pydevd_frame_eval.vendored import bytecode from _pydevd_frame_eval.vendored.bytecode import cfg as bytecode_cfg import dis @@ -15,10 +16,13 @@ from _pydevd_bundle.pydevd_constants import KeyifyList, DebugInfoHolder, IS_PY311_OR_GREATER from bisect import bisect from collections import deque +import traceback # When True, throws errors on unknown bytecodes, when False, ignore those as if they didn't change the stack. STRICT_MODE = False +GO_INTO_INNER_CODES = True + DEBUG = False _BINARY_OPS = set([opname for opname in dis.opname if opname.startswith('BINARY_')]) @@ -54,11 +58,17 @@ class Target(object): - __slots__ = ['arg', 'lineno', 'offset', 'children_targets'] + __slots__ = ['arg', 'lineno', 'endlineno', 'startcol', 'endcol', 'offset', 'children_targets'] - def __init__(self, arg, lineno, offset, children_targets=()): + def __init__(self, arg, lineno, offset, children_targets=(), + # These are optional (only Python 3.11 onwards). + endlineno=-1, startcol=-1, endcol=-1): self.arg = arg self.lineno = lineno + self.endlineno = endlineno + self.startcol = startcol + self.endcol = endcol + self.offset = offset self.children_targets = children_targets @@ -129,6 +139,10 @@ def _getcallname(self, instr): name = name.co_qualname # Note: only available for Python 3.11 if isinstance(name, _Variable): name = name.name + if isinstance(name, tuple): + # Load attr in Python 3.12 comes with (bool, name) + if len(name) == 2 and isinstance(name[0], bool) and isinstance(name[1], str): + name = name[1] if not isinstance(name, str): return None @@ -205,7 +219,7 @@ def _handle_call_from_instr(self, func_name_instr, func_call_instr): pass # Ignore if we can't identify a name elif call_name in ('', '', '', ''): code_obj = self.func_name_id_to_code_object[_TargetIdHashable(func_name_instr)] - if code_obj is not None: + if code_obj is not None and GO_INTO_INNER_CODES: children_targets = _get_smart_step_into_targets(code_obj) if children_targets: # i.e.: we have targets inside of a or . @@ -308,6 +322,9 @@ def on_MAKE_FUNCTION(self, instr): def on_LOAD_FAST(self, instr): self._stack.append(instr) + on_LOAD_FAST_AND_CLEAR = on_LOAD_FAST + on_LOAD_FAST_CHECK = on_LOAD_FAST + def on_LOAD_ASSERTION_ERROR(self, instr): self._stack.append(instr) @@ -321,9 +338,44 @@ def on_CALL_METHOD(self, instr): func_name_instr = self._stack.pop() self._handle_call_from_instr(func_name_instr, instr) + def on_CALL(self, instr): + # pop the actual args + for _ in range(instr.arg): + self._stack.pop() + + func_name_instr = self._stack.pop() + if self._getcallname(func_name_instr) is None: + func_name_instr = self._stack.pop() + + if self._stack: + peeked = self._stack[-1] + if peeked.name == 'PUSH_NULL': + self._stack.pop() + + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL_INTRINSIC_1(self, instr): + try: + func_name_instr = self._stack.pop() + except IndexError: + return + + if self._stack: + peeked = self._stack[-1] + if peeked.name == 'PUSH_NULL': + self._stack.pop() + + self._handle_call_from_instr(func_name_instr, instr) + def on_PUSH_NULL(self, instr): self._stack.append(instr) + def on_KW_NAMES(self, instr): + return + + def on_RETURN_CONST(self, instr): + return + def on_CALL_FUNCTION(self, instr): arg = instr.arg @@ -401,9 +453,9 @@ def on_CALL_FUNCTION_EX(self, instr): func_name_instr = self._stack.pop() self._handle_call_from_instr(func_name_instr, instr) - on_YIELD_VALUE = _no_stack_change on_GET_AITER = _no_stack_change on_GET_ANEXT = _no_stack_change + on_END_FOR = _no_stack_change on_END_ASYNC_FOR = _no_stack_change on_BEFORE_ASYNC_WITH = _no_stack_change on_SETUP_ASYNC_WITH = _no_stack_change @@ -435,6 +487,13 @@ def on_JUMP_IF_NOT_EXC_MATCH(self, instr): except IndexError: return + def on_SWAP(self, instr): + i = instr.arg + try: + self._stack[-i], self._stack[-1] = self._stack[-1], self._stack[-i] + except: + pass + def on_ROT_TWO(self, instr): try: p0 = self._stack.pop() @@ -520,6 +579,7 @@ def on_BUILD_CONST_KEY_MAP(self, instr): self.on_POP_TOP(instr) # value self._stack.append(instr) + on_YIELD_VALUE = on_POP_TOP on_RETURN_VALUE = on_POP_TOP on_POP_JUMP_IF_FALSE = on_POP_TOP on_POP_JUMP_IF_TRUE = on_POP_TOP @@ -575,6 +635,8 @@ def on_RAISE_VARARGS(self, instr): on_POP_BLOCK = _no_stack_change on_JUMP_FORWARD = _no_stack_change + on_JUMP_BACKWARD = _no_stack_change + on_JUMP_BACKWARD_NO_INTERRUPT = _no_stack_change on_POP_EXCEPT = _no_stack_change on_SETUP_EXCEPT = _no_stack_change on_WITH_EXCEPT_START = _no_stack_change @@ -662,6 +724,7 @@ def on_DELETE_SUBSCR(self, instr): # some evaluation. on_PRINT_EXPR = on_POP_TOP + on_LABEL = _no_stack_change on_UNARY_POSITIVE = _no_stack_change on_UNARY_NEGATIVE = _no_stack_change on_UNARY_NOT = _no_stack_change @@ -676,7 +739,8 @@ def _get_smart_step_into_targets(code): :return list(Target) ''' b = bytecode.Bytecode.from_code(code) - cfg = bytecode_cfg.ControlFlowGraph.from_bytecode(b) + # cfg = bytecode_cfg.ControlFlowGraph.from_bytecode(b) + cfg = [b] ret = [] @@ -685,23 +749,29 @@ def _get_smart_step_into_targets(code): print('\nStart block----') stack = _StackInterpreter(block) for instr in block: + if isinstance(instr, (TryBegin, TryEnd, Label)): + # No name for these + continue try: func_name = 'on_%s' % (instr.name,) func = getattr(stack, func_name, None) - if DEBUG: - if instr.name != 'CACHE': # Filter the ones we don't want to see. - print('\nWill handle: ', instr, '>>', stack._getname(instr), '<<') - print('Current stack:') - for entry in stack._stack: - print(' arg:', stack._getname(entry), '(', entry, ')') - if func is None: if STRICT_MODE: raise AssertionError('%s not found.' % (func_name,)) else: + if DEBUG: + print('Skipping: %s.' % (func_name,)) + continue func(instr) + + if DEBUG: + if instr.name != 'CACHE': # Filter the ones we don't want to see. + print('\nHandled: ', instr, '>>', stack._getname(instr), '<<') + print('New stack:') + for entry in stack._stack: + print(' arg:', stack._getname(entry), '(', entry, ')') except: if STRICT_MODE: raise # Error in strict mode. @@ -717,6 +787,8 @@ def _get_smart_step_into_targets(code): # step into from stepping into properties). # ret.extend(stack.load_attrs.values()) + if DEBUG: + print('\nEnd block----') return ret @@ -725,12 +797,15 @@ def _get_smart_step_into_targets(code): # to inspect the parent frame for frame.f_lasti to know where we actually are (as the # caller name may not always match the new frame name). class Variant(object): - __slots__ = ['name', 'is_visited', 'line', 'offset', 'call_order', 'children_variants', 'parent'] + __slots__ = ['name', 'is_visited', 'line', 'offset', 'call_order', 'children_variants', 'parent', 'endlineno', 'startcol', 'endcol'] - def __init__(self, name, is_visited, line, offset, call_order, children_variants=None): + def __init__(self, name, is_visited, line, offset, call_order, children_variants=None, endlineno=-1, startcol=-1, endcol=-1): self.name = name self.is_visited = is_visited self.line = line + self.endlineno = endlineno + self.startcol = startcol + self.endcol = endcol self.offset = offset self.call_order = call_order self.children_variants = children_variants @@ -759,7 +834,7 @@ def __repr__(self): continue try: - ret.append('%s: %s' % (s, getattr(self, s))) + ret.append('%s= %s' % (s, getattr(self, s))) except AttributeError: ret.append('%s: ' % (s,)) return 'Variant(%s)' % ', '.join(ret) @@ -767,7 +842,7 @@ def __repr__(self): __str__ = __repr__ -def _convert_target_to_variant(target, start_line, end_line, call_order_cache, lasti, base): +def _convert_target_to_variant(target, start_line, end_line, call_order_cache: dict, lasti:int, base:int): name = target.arg if not isinstance(name, str): return @@ -787,7 +862,18 @@ def _convert_target_to_variant(target, start_line, end_line, call_order_cache, l _convert_target_to_variant(child, start_line, end_line, call_order_cache, lasti, base) for child in target.children_targets] - return Variant(name, is_visited, target.lineno - base, target.offset, call_order, children_variants) + return Variant( + name, + is_visited, + target.lineno - base, + target.offset, + call_order, + children_variants, + # Only really matter in Python 3.11 + target.endlineno - base if target.endlineno >= 0 else -1, + target.startcol, + target.endcol, + ) def calculate_smart_step_into_variants(frame, start_line, end_line, base=0): @@ -801,6 +887,10 @@ def calculate_smart_step_into_variants(frame, start_line, end_line, base=0): :note: it's guaranteed that the offsets appear in order. :raise: :py:class:`RuntimeError` if failed to parse the bytecode or if dis cannot be used. """ + if IS_PY311_OR_GREATER: + from . import pydevd_bytecode_utils_py311 + return pydevd_bytecode_utils_py311.calculate_smart_step_into_variants(frame, start_line, end_line, base) + variants = [] code = frame.f_code lasti = frame.f_lasti diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils_py311.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils_py311.py new file mode 100644 index 0000000000..f715723436 --- /dev/null +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils_py311.py @@ -0,0 +1,116 @@ +from _pydevd_bundle.pydevd_constants import IS_PY311_OR_GREATER +import dis +from types import CodeType +from collections import namedtuple +DEBUG = False + +_Pos = namedtuple('_Pos', 'lineno endlineno startcol endcol') + + +def _is_inside(item_pos:_Pos, container_pos: _Pos): + if ( + item_pos.lineno < container_pos.lineno + or item_pos.endlineno > container_pos.endlineno + ): + return False + + if item_pos.lineno == container_pos.lineno: + if item_pos.startcol < container_pos.startcol: + return False + + if item_pos.endlineno == container_pos.endlineno: + if item_pos.endcol > container_pos.endcol: + return False + + # Not outside, must be inside. + return True + + +def _get_smart_step_into_targets(code): + import linecache + from .pydevd_bytecode_utils import Target + + filename = code.co_filename + + targets_root = [] + children = [] + for instr in dis.Bytecode(code): + if instr.opname == 'LOAD_CONST': + if isinstance(instr.argval, CodeType): + children.append(_get_smart_step_into_targets(instr.argval)) + + elif instr.opname in ('CALL', 'CALL_INTRINSIC_1'): + positions = instr.positions + if positions.lineno is None: + continue + if positions.end_lineno is None: + continue + lines = [] + for lineno in range(positions.lineno, positions.end_lineno + 1): + lines.append(linecache.getline(filename, lineno)) + + startcol = positions.col_offset + endcol = positions.end_col_offset + + if positions.lineno == positions.end_lineno: + lines[0] = lines[0][startcol:endcol] + else: + lines[0] = lines[0][startcol:] + lines[-1] = lines[-1][:endcol] + + pos = _Pos(positions.lineno, positions.end_lineno, startcol, endcol) + targets_root.append(Target(''.join(lines), positions.lineno, instr.offset, [], positions.end_lineno, startcol, endcol)) + + for targets in children: + for child_target in targets: + pos = _Pos( + child_target.lineno, + child_target.endlineno, + child_target.startcol, + child_target.endcol + ) + + for outer_target in targets_root: + outer_pos = _Pos( + outer_target.lineno, + outer_target.endlineno, + outer_target.startcol, + outer_target.endcol + ) + if _is_inside(pos, outer_pos): + outer_target.children_targets.append(child_target) + break + return targets_root + + +def calculate_smart_step_into_variants(frame, start_line, end_line, base=0): + """ + Calculate smart step into variants for the given line range. + :param frame: + :type frame: :py:class:`types.FrameType` + :param start_line: + :param end_line: + :return: A list of call names from the first to the last. + :note: it's guaranteed that the offsets appear in order. + :raise: :py:class:`RuntimeError` if failed to parse the bytecode or if dis cannot be used. + """ + from .pydevd_bytecode_utils import _convert_target_to_variant + variants = [] + code = frame.f_code + lasti = frame.f_lasti + + call_order_cache = {} + if DEBUG: + print('dis.dis:') + if IS_PY311_OR_GREATER: + dis.dis(code, show_caches=False) + else: + dis.dis(code) + + for target in _get_smart_step_into_targets(code): + variant = _convert_target_to_variant(target, start_line, end_line, call_order_cache, lasti, base) + if variant is None: + continue + variants.append(variant) + + return variants diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_comm.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_comm.py index b9ac9053ea..5c9f8508c0 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_comm.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_comm.py @@ -972,21 +972,27 @@ def internal_get_smart_step_into_variants(dbg, seq, thread_id, frame_id, start_l for child_variant in variant.children_variants: # If there are child variants, the current one is just an intermediary, so, # just create variants for the child (notifying properly about the parent too). - xml += '' % ( + xml += '' % ( quote(child_variant.name), str(child_variant.is_visited).lower(), child_variant.line, variant.offset, child_variant.offset, child_variant.call_order, + variant.endlineno, + variant.startcol, + variant.endcol, ) else: - xml += '' % ( + xml += '' % ( quote(variant.name), str(variant.is_visited).lower(), variant.line, variant.offset, variant.call_order, + variant.endlineno, + variant.startcol, + variant.endcol, ) xml += "" diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_constants.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_constants.py index f244207baf..4026345807 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_constants.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_constants.py @@ -171,8 +171,8 @@ def _current_frames(): IS_PY311_OR_GREATER = sys.version_info >= (3, 11) IS_PY312_OR_GREATER = sys.version_info >= (3, 12) -USE_SYS_MONITORING = IS_PY312_OR_GREATER and hasattr(sys, 'monitoring') -# USE_SYS_MONITORING = False +# Not currently supported in Python 3.12. +SUPPORT_ATTACH_TO_PID = not IS_PY312_OR_GREATER def version_str(v): @@ -193,6 +193,18 @@ def version_str(v): ENV_TRUE_LOWER_VALUES = ('yes', 'true', '1') ENV_FALSE_LOWER_VALUES = ('no', 'false', '0') +PYDEVD_USE_SYS_MONITORING = IS_PY312_OR_GREATER and hasattr(sys, 'monitoring') +if PYDEVD_USE_SYS_MONITORING: # Default gotten, let's see if it was somehow customize by the user. + _use_sys_monitoring_env_var = os.getenv('PYDEVD_USE_SYS_MONITORING', '').lower() + if _use_sys_monitoring_env_var: + # Check if the user specified something. + if _use_sys_monitoring_env_var in ENV_FALSE_LOWER_VALUES: + PYDEVD_USE_SYS_MONITORING = False + elif _use_sys_monitoring_env_var in ENV_TRUE_LOWER_VALUES: + PYDEVD_USE_SYS_MONITORING = True + else: + raise RuntimeError('Unrecognized value for PYDEVD_USE_SYS_MONITORING: %s' % (_use_sys_monitoring_env_var,)) + def is_true_in_env(env_key): if isinstance(env_key, tuple): @@ -510,7 +522,7 @@ def iter_chars(b): return iter(b) -if IS_JYTHON or USE_SYS_MONITORING: +if IS_JYTHON or PYDEVD_USE_SYS_MONITORING: def NO_FTRACE(frame, event, arg): return None diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.c b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.c index 6ade939787..39e70da50a 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.c +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.3 */ +/* Generated by Cython 3.0.6 */ /* BEGIN: Cython Metadata { @@ -37,15 +37,15 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else -#if CYTHON_LIMITED_API +#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_3" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_6" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030003F0 +#define CYTHON_HEX_VERSION 0x030006F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -259,7 +259,7 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif -#elif defined(PY_NOGIL) +#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 @@ -588,8 +588,8 @@ END: Cython Metadata */ PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; // borrowed - #endif PyObject *py_minor_version = NULL; + #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); @@ -599,6 +599,7 @@ END: Cython Metadata */ if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; @@ -619,7 +620,6 @@ END: Cython Metadata */ Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); - Py_XDECREF(py_minor_version); if (type) { PyErr_Restore(type, value, traceback); } @@ -814,6 +814,8 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 @@ -889,7 +891,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { } #endif #endif -#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() @@ -901,7 +903,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); @@ -945,7 +947,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ - PyTypeObject *type = Py_TYPE(obj);\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ @@ -1089,6 +1091,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif +#if PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type @@ -1458,8 +1469,8 @@ static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { - "_pydevd_bundle/pydevd_cython.pyx", - "_pydevd_bundle/pydevd_cython.pxd", + "_pydevd_bundle\\\\pydevd_cython.pyx", + "_pydevd_bundle\\\\pydevd_cython.pxd", "", "type.pxd", }; @@ -1518,7 +1529,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo { }; -/* "_pydevd_bundle/pydevd_cython.pyx":256 +/* "_pydevd_bundle/pydevd_cython.pyx":257 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class _TryExceptContainerObj: # <<<<<<<<<<<<<< @@ -1531,7 +1542,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj { }; -/* "_pydevd_bundle/pydevd_cython.pyx":274 +/* "_pydevd_bundle/pydevd_cython.pyx":275 * #======================================================================================================================= * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class PyDBFrame: # <<<<<<<<<<<<<< @@ -1547,7 +1558,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame { }; -/* "_pydevd_bundle/pydevd_cython.pyx":1448 +/* "_pydevd_bundle/pydevd_cython.pyx":1451 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class SafeCallWrapper: # <<<<<<<<<<<<<< @@ -1560,7 +1571,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper { }; -/* "_pydevd_bundle/pydevd_cython.pyx":1604 +/* "_pydevd_bundle/pydevd_cython.pyx":1607 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: # <<<<<<<<<<<<<< @@ -1573,7 +1584,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhand }; -/* "_pydevd_bundle/pydevd_cython.pyx":1634 +/* "_pydevd_bundle/pydevd_cython.pyx":1637 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class TopLevelThreadTracerNoBackFrame: # <<<<<<<<<<<<<< @@ -1591,7 +1602,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFram }; -/* "_pydevd_bundle/pydevd_cython.pyx":1709 +/* "_pydevd_bundle/pydevd_cython.pyx":1712 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class ThreadTracer: # <<<<<<<<<<<<<< @@ -1605,7 +1616,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer { -/* "_pydevd_bundle/pydevd_cython.pyx":274 +/* "_pydevd_bundle/pydevd_cython.pyx":275 * #======================================================================================================================= * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class PyDBFrame: # <<<<<<<<<<<<<< @@ -1614,8 +1625,6 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer { */ struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame { - PyObject *(*_should_stop_on_exception)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *); - PyObject *(*_handle_exception)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *, PyObject *); PyObject *(*get_func_name)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *); PyObject *(*_show_return_values)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *); PyObject *(*_remove_return_values)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *); @@ -1809,7 +1818,11 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg // no-op, __Pyx_Arg_FASTCALL is direct and this needs #define __Pyx_Arg_XDECREF_FASTCALL(arg) // no-op - arg was returned from array #else @@ -2004,6 +2017,12 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr /* RaiseUnboundLocalError.proto */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + /* pyfrozenset_new.proto */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); @@ -2017,7 +2036,11 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else PyList_SET_ITEM(list, len, x); + #endif __Pyx_SET_SIZE(list, len + 1); return 0; } @@ -2033,12 +2056,6 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -/* ArgTypeTest.proto */ -#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ - ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ - __Pyx__ArgTypeTest(obj, type, name, exact)) -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); - /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ @@ -2080,14 +2097,27 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -/* GetAttr.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -/* HasAttr.proto */ -static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2)) +#endif /* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); @@ -2117,34 +2147,6 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif -/* py_dict_clear.proto */ -#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) - -/* PyDictContains.proto */ -static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { - int result = PyDict_Contains(dict, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/* SwapException.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#else -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); -#endif - -/* RaiseNoneIterError.proto */ -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); - -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); -#else -#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\ - (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2)) -#endif - /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); @@ -2172,6 +2174,12 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); +/* PyDictContains.proto */ +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); @@ -2189,6 +2197,19 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* py_dict_clear.proto */ +#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) + /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); @@ -2278,22 +2299,22 @@ static int __Pyx_MergeVtables(PyTypeObject *type); #endif /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_3 -#define __PYX_HAVE_RT_ImportType_proto_3_0_3 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_6 +#define __PYX_HAVE_RT_ImportType_proto_3_0_6 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_3(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_3(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_3 { - __Pyx_ImportType_CheckSize_Error_3_0_3 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_3 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_3 = 2 +enum __Pyx_ImportType_CheckSize_3_0_6 { + __Pyx_ImportType_CheckSize_Error_3_0_6 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_6 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_6 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_3 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size); #endif /* FetchSharedCythonModule.proto */ @@ -2518,19 +2539,17 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ -static unsigned long __Pyx_get_runtime_version(); +static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__should_stop_on_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, CYTHON_UNUSED PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto*/ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__handle_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, PyObject *__pyx_v_exception_type); /* proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame); /* proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg); /* proto*/ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_main_debugger, PyObject *__pyx_v_frame); /* proto*/ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_main_debugger, PyObject *__pyx_v_frame); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_target_frame, PyObject *__pyx_v_current_frame); /* proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, int __pyx_skip_dispatch); /* proto*/ @@ -2550,7 +2569,6 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispa /* Module declarations from "_pydevd_bundle.pydevd_cython" */ static PyObject *__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in = 0; -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception(PyObject *, PyObject *, PyObject *, int, PyObject *); /*proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBAdditionalThreadInfo__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, PyObject *); /*proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle__TryExceptContainerObj__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *, PyObject *); /*proto*/ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *); /*proto*/ @@ -2571,12 +2589,14 @@ static PyObject *__pyx_builtin_NameError; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_AttributeError; +static PyObject *__pyx_builtin_KeyboardInterrupt; static PyObject *__pyx_builtin_SystemExit; static PyObject *__pyx_builtin_GeneratorExit; -static PyObject *__pyx_builtin_KeyboardInterrupt; +static PyObject *__pyx_builtin_RuntimeError; /* #### Code section: string_decls ### */ static const char __pyx_k_[] = ""; static const char __pyx_k_1[] = "1"; +static const char __pyx_k_f[] = "f"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_j[] = "j"; static const char __pyx_k_t[] = "t"; @@ -2589,7 +2609,7 @@ static const char __pyx_k_id[] = "id"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_re[] = "re"; static const char __pyx_k_ALL[] = "ALL"; -static const char __pyx_k__26[] = "*"; +static const char __pyx_k__27[] = "*"; static const char __pyx_k_add[] = "add"; static const char __pyx_k_arg[] = "arg"; static const char __pyx_k_dis[] = "dis"; @@ -2623,6 +2643,7 @@ static const char __pyx_k_enter[] = "__enter__"; static const char __pyx_k_event[] = "event"; static const char __pyx_k_frame[] = "frame"; static const char __pyx_k_ident[] = "ident"; +static const char __pyx_k_lines[] = "lines"; static const char __pyx_k_match[] = "match"; static const char __pyx_k_py_db[] = "py_db"; static const char __pyx_k_qname[] = "qname"; @@ -2630,6 +2651,7 @@ static const char __pyx_k_rfind[] = "rfind"; static const char __pyx_k_state[] = "state"; static const char __pyx_k_trace[] = "trace"; static const char __pyx_k_utf_8[] = "utf-8"; +static const char __pyx_k_value[] = "value"; static const char __pyx_k_Thread[] = "Thread"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_args_2[] = "_args"; @@ -2643,12 +2665,14 @@ static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_kwargs[] = "kwargs"; static const char __pyx_k_lambda[] = ""; static const char __pyx_k_main_2[] = "__main__"; +static const char __pyx_k_merged[] = "merged"; static const char __pyx_k_module[] = ""; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_plugin[] = "plugin"; static const char __pyx_k_pydevd[] = "pydevd"; static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_result[] = "result"; static const char __pyx_k_return[] = "return"; static const char __pyx_k_thread[] = "thread"; static const char __pyx_k_update[] = "update"; @@ -2665,6 +2689,7 @@ static const char __pyx_k_linesep[] = "linesep"; static const char __pyx_k_os_path[] = "os.path"; static const char __pyx_k_returns[] = "returns"; static const char __pyx_k_st_size[] = "st_size"; +static const char __pyx_k_stopped[] = "stopped"; static const char __pyx_k_suspend[] = "suspend"; static const char __pyx_k_tb_next[] = "tb_next"; static const char __pyx_k_version[] = "version"; @@ -2689,10 +2714,13 @@ static const char __pyx_k_PyDBFrame[] = "PyDBFrame"; static const char __pyx_k_STATE_RUN[] = "STATE_RUN"; static const char __pyx_k_bootstrap[] = "__bootstrap"; static const char __pyx_k_condition[] = "condition"; +static const char __pyx_k_curr_stat[] = "curr_stat"; +static const char __pyx_k_exc_break[] = "exc_break"; static const char __pyx_k_exception[] = "exception"; static const char __pyx_k_f_globals[] = "f_globals"; static const char __pyx_k_func_name[] = "func_name"; static const char __pyx_k_isenabled[] = "isenabled"; +static const char __pyx_k_last_stat[] = "last_stat"; static const char __pyx_k_linecache[] = "linecache"; static const char __pyx_k_pydev_log[] = "pydev_log"; static const char __pyx_k_pydevd_py[] = "pydevd.py"; @@ -2700,10 +2728,13 @@ static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_tb_lineno[] = "tb_lineno"; static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_trace_obj[] = "trace_obj"; static const char __pyx_k_PYDEV_FILE[] = "PYDEV_FILE"; static const char __pyx_k_SystemExit[] = "SystemExit"; +static const char __pyx_k_check_excs[] = "check_excs"; static const char __pyx_k_checkcache[] = "checkcache"; static const char __pyx_k_custom_key[] = "custom_key"; +static const char __pyx_k_exc_lineno[] = "exc_lineno"; static const char __pyx_k_expression[] = "expression"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; @@ -2720,10 +2751,12 @@ static const char __pyx_k_except_line[] = "except_line"; static const char __pyx_k_f_unhandled[] = "f_unhandled"; static const char __pyx_k_is_logpoint[] = "is_logpoint"; static const char __pyx_k_just_raised[] = "just_raised"; +static const char __pyx_k_raise_lines[] = "raise_lines"; static const char __pyx_k_return_line[] = "return_line"; static const char __pyx_k_set_suspend[] = "set_suspend"; static const char __pyx_k_should_stop[] = "should_stop"; static const char __pyx_k_ForkSafeLock[] = "ForkSafeLock"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_ThreadTracer[] = "ThreadTracer"; static const char __pyx_k_initializing[] = "_initializing"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; @@ -2741,6 +2774,7 @@ static const char __pyx_k_cmd_step_over[] = "cmd_step_over"; static const char __pyx_k_container_obj[] = "container_obj"; static const char __pyx_k_get_file_type[] = "get_file_type"; static const char __pyx_k_has_condition[] = "has_condition"; +static const char __pyx_k_lines_ignored[] = "lines_ignored"; static const char __pyx_k_method_object[] = "method_object"; static const char __pyx_k_original_call[] = "_original_call"; static const char __pyx_k_pydb_disposed[] = "pydb_disposed"; @@ -2755,6 +2789,7 @@ static const char __pyx_k_TRACE_PROPERTY[] = "TRACE_PROPERTY"; static const char __pyx_k_co_firstlineno[] = "co_firstlineno"; static const char __pyx_k_current_frames[] = "_current_frames"; static const char __pyx_k_enable_tracing[] = "enable_tracing"; +static const char __pyx_k_exc_break_user[] = "exc_break_user"; static const char __pyx_k_exception_type[] = "exception_type"; static const char __pyx_k_findlinestarts[] = "findlinestarts"; static const char __pyx_k_get_breakpoint[] = "get_breakpoint"; @@ -2765,28 +2800,39 @@ static const char __pyx_k_IgnoreException[] = "[^#]*#.*@IgnoreException"; static const char __pyx_k_SafeCallWrapper[] = "SafeCallWrapper"; static const char __pyx_k_additional_info[] = "additional_info"; static const char __pyx_k_bootstrap_inner[] = "__bootstrap_inner"; +static const char __pyx_k_check_trace_obj[] = "check_trace_obj"; static const char __pyx_k_constant_to_str[] = "constant_to_str"; static const char __pyx_k_disable_tracing[] = "disable_tracing"; static const char __pyx_k_do_wait_suspend[] = "do_wait_suspend"; static const char __pyx_k_exception_break[] = "exception_break"; static const char __pyx_k_frame_cache_key[] = "frame_cache_key"; +static const char __pyx_k_from_user_input[] = "from_user_input"; static const char __pyx_k_is_thread_alive[] = "is_thread_alive"; +static const char __pyx_k_last_raise_line[] = "last_raise_line"; static const char __pyx_k_make_io_message[] = "make_io_message"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_trace_exception[] = "trace_exception"; +static const char __pyx_k_try_except_info[] = "try_except_info"; +static const char __pyx_k_was_just_raised[] = "was_just_raised"; static const char __pyx_k_DEBUG_START_PY3K[] = "DEBUG_START_PY3K"; static const char __pyx_k_current_frames_2[] = "current_frames"; +static const char __pyx_k_exc_break_caught[] = "exc_break_caught"; +static const char __pyx_k_handle_exception[] = "handle_exception"; static const char __pyx_k_in_project_scope[] = "in_project_scope"; +static const char __pyx_k_is_user_uncaught[] = "is_user_uncaught"; static const char __pyx_k_threading_active[] = "threading_active"; static const char __pyx_k_try_except_infos[] = "try_except_infos"; static const char __pyx_k_KeyboardInterrupt[] = "KeyboardInterrupt"; +static const char __pyx_k_absolute_filename[] = "absolute_filename"; static const char __pyx_k_apply_to_settrace[] = "apply_to_settrace"; static const char __pyx_k_bootstrap_inner_2[] = "_bootstrap_inner"; static const char __pyx_k_children_variants[] = "children_variants"; +static const char __pyx_k_frame_id_to_frame[] = "frame_id_to_frame"; static const char __pyx_k_frame_skips_cache[] = "frame_skips_cache"; static const char __pyx_k_get_method_object[] = "get_method_object"; static const char __pyx_k_get_topmost_frame[] = "get_topmost_frame"; +static const char __pyx_k_initial_trace_obj[] = "initial_trace_obj"; static const char __pyx_k_original_step_cmd[] = "original_step_cmd"; static const char __pyx_k_pydev_execfile_py[] = "_pydev_execfile.py"; static const char __pyx_k_pydevd_dont_trace[] = "pydevd_dont_trace"; @@ -2805,6 +2851,7 @@ static const char __pyx_k_collect_return_info[] = "collect_return_info"; static const char __pyx_k_pydev_log_exception[] = "pydev_log_exception"; static const char __pyx_k_threading_get_ident[] = "threading_get_ident"; static const char __pyx_k_IGNORE_EXCEPTION_TAG[] = "IGNORE_EXCEPTION_TAG"; +static const char __pyx_k_exception_breakpoint[] = "exception_breakpoint"; static const char __pyx_k_frame_trace_dispatch[] = "frame_trace_dispatch"; static const char __pyx_k_get_clsname_for_code[] = "get_clsname_for_code"; static const char __pyx_k_is_line_in_try_block[] = "is_line_in_try_block"; @@ -2820,12 +2867,15 @@ static const char __pyx_k_suspend_other_threads[] = "suspend_other_threads"; static const char __pyx_k_CMD_SET_FUNCTION_BREAK[] = "CMD_SET_FUNCTION_BREAK"; static const char __pyx_k_EXCEPTION_TYPE_HANDLED[] = "EXCEPTION_TYPE_HANDLED"; static const char __pyx_k_PYDEVD_IPYTHON_CONTEXT[] = "PYDEVD_IPYTHON_CONTEXT"; +static const char __pyx_k_abs_real_path_and_base[] = "abs_real_path_and_base"; static const char __pyx_k_add_exception_to_frame[] = "add_exception_to_frame"; static const char __pyx_k_has_plugin_line_breaks[] = "has_plugin_line_breaks"; static const char __pyx_k_ignore_exception_trace[] = "ignore_exception_trace"; +static const char __pyx_k_is_unhandled_exception[] = "is_unhandled_exception"; static const char __pyx_k_pydev_bundle_pydev_log[] = "_pydev_bundle.pydev_log"; static const char __pyx_k_pyx_unpickle_PyDBFrame[] = "__pyx_unpickle_PyDBFrame"; static const char __pyx_k_suspended_at_unhandled[] = "suspended_at_unhandled"; +static const char __pyx_k_valid_try_except_infos[] = "valid_try_except_infos"; static const char __pyx_k_collect_try_except_info[] = "collect_try_except_info"; static const char __pyx_k_get_trace_dispatch_func[] = "get_trace_dispatch_func"; static const char __pyx_k_ignore_system_exit_code[] = "ignore_system_exit_code"; @@ -2839,7 +2889,9 @@ static const char __pyx_k_PyDBFrame_trace_dispatch[] = "PyDBFrame.trace_dispatch static const char __pyx_k_Stop_inside_ipython_call[] = "Stop inside ipython call"; static const char __pyx_k_get_exception_breakpoint[] = "get_exception_breakpoint"; static const char __pyx_k_global_cache_frame_skips[] = "global_cache_frame_skips"; +static const char __pyx_k_should_stop_on_exception[] = "should_stop_on_exception"; static const char __pyx_k_threading_current_thread[] = "threading_current_thread"; +static const char __pyx_k_PYDEVD_USE_SYS_MONITORING[] = "PYDEVD_USE_SYS_MONITORING"; static const char __pyx_k_PyDBFrame___reduce_cython[] = "PyDBFrame.__reduce_cython__"; static const char __pyx_k_PyDBFrame_do_wait_suspend[] = "PyDBFrame.do_wait_suspend"; static const char __pyx_k_PyDBFrame_trace_exception[] = "PyDBFrame.trace_exception"; @@ -2856,15 +2908,18 @@ static const char __pyx_k_exclude_exception_by_filter[] = "exclude_exception_by_ static const char __pyx_k_force_only_unhandled_tracer[] = "force_only_unhandled_tracer"; static const char __pyx_k_handle_breakpoint_condition[] = "handle_breakpoint_condition"; static const char __pyx_k_has_plugin_exception_breaks[] = "has_plugin_exception_breaks"; +static const char __pyx_k_prev_user_uncaught_exc_info[] = "prev_user_uncaught_exc_info"; static const char __pyx_k_pydevd_bundle_pydevd_cython[] = "_pydevd_bundle.pydevd_cython"; static const char __pyx_k_remove_exception_from_frame[] = "remove_exception_from_frame"; static const char __pyx_k_send_caught_exception_stack[] = "send_caught_exception_stack"; static const char __pyx_k_stop_on_unhandled_exception[] = "stop_on_unhandled_exception"; static const char __pyx_k_ThreadTracer___reduce_cython[] = "ThreadTracer.__reduce_cython__"; static const char __pyx_k_handle_breakpoint_expression[] = "handle_breakpoint_expression"; +static const char __pyx_k_maybe_user_uncaught_exc_info[] = "maybe_user_uncaught_exc_info"; static const char __pyx_k_pyx_unpickle_SafeCallWrapper[] = "__pyx_unpickle_SafeCallWrapper"; static const char __pyx_k_EXCEPTION_TYPE_USER_UNHANDLED[] = "EXCEPTION_TYPE_USER_UNHANDLED"; static const char __pyx_k_NORM_PATHS_AND_BASE_CONTAINER[] = "NORM_PATHS_AND_BASE_CONTAINER"; +static const char __pyx_k_canonical_normalized_filename[] = "canonical_normalized_filename"; static const char __pyx_k_constructed_tid_to_last_frame[] = "constructed_tid_to_last_frame"; static const char __pyx_k_ThreadTracer___setstate_cython[] = "ThreadTracer.__setstate_cython__"; static const char __pyx_k_TryExceptContainerObj___reduce[] = "_TryExceptContainerObj.__reduce_cython__"; @@ -2874,6 +2929,7 @@ static const char __pyx_k_pyx_unpickle_TopLevelThreadTra[] = "__pyx_unpickle_Top static const char __pyx_k_pyx_unpickle__TryExceptContain[] = "__pyx_unpickle__TryExceptContainerObj"; static const char __pyx_k_Error_in_linecache_checkcache_r[] = "Error in linecache.checkcache(%r)"; static const char __pyx_k_Ignore_exception_s_in_library_s[] = "Ignore exception %s in library %s -- (%s)"; +static const char __pyx_k_Not_used_in_sys_monitoring_mode[] = "Not used in sys.monitoring mode."; static const char __pyx_k_PyDBFrame_handle_user_exception[] = "PyDBFrame.handle_user_exception"; static const char __pyx_k_SafeCallWrapper___reduce_cython[] = "SafeCallWrapper.__reduce_cython__"; static const char __pyx_k_TopLevelThreadTracerNoBackFrame[] = "TopLevelThreadTracerNoBackFrame"; @@ -2999,6 +3055,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThrea static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_8__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_thread); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2get_smart_step_into_variant_from_frame_offset(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4is_unhandled_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_container_obj, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, int __pyx_v_last_raise_line, PyObject *__pyx_v_raise_lines); /* proto */ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self); /* proto */ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ @@ -3013,14 +3070,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_us static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_in_because_of_filters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6should_stop_on_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info, PyObject *__pyx_v_frame, PyObject *__pyx_v_thread, PyObject *__pyx_v_arg, PyObject *__pyx_v_prev_user_uncaught_exc_info); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8handle_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_thread, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg, PyObject *__pyx_v_exception_type); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10notify_skipped_step_in_because_of_filters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto */ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self, PyObject *__pyx_v_method_object); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__call__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_4get_method_object(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_6__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_8__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_2trace_unhandled_exceptions(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_4get_trace_dispatch_func(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self); /* proto */ @@ -3058,14 +3117,15 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__se static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_4__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_6__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12__pyx_unpickle_PyDBAdditionalThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__pyx_unpickle__TryExceptContainerObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_16__pyx_unpickle_PyDBFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_18__pyx_unpickle_SafeCallWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle_TopLevelThreadTracerNoBackFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_ThreadTracer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_16__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_18fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_PyDBAdditionalThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle__TryExceptContainerObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_PyDBFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_26__pyx_unpickle_SafeCallWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_28__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_30__pyx_unpickle_TopLevelThreadTracerNoBackFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_32__pyx_unpickle_ThreadTracer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBFrame(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -3162,7 +3222,9 @@ typedef struct { PyObject *__pyx_n_s_NO_FTRACE; PyObject *__pyx_n_s_NameError; PyObject *__pyx_n_s_None; + PyObject *__pyx_kp_s_Not_used_in_sys_monitoring_mode; PyObject *__pyx_n_s_PYDEVD_IPYTHON_CONTEXT; + PyObject *__pyx_n_s_PYDEVD_USE_SYS_MONITORING; PyObject *__pyx_n_s_PYDEV_FILE; PyObject *__pyx_n_s_PYTHON_SUSPEND; PyObject *__pyx_n_s_PickleError; @@ -3179,6 +3241,7 @@ typedef struct { PyObject *__pyx_n_s_PyDBFrame_trace_dispatch; PyObject *__pyx_n_s_PyDBFrame_trace_exception; PyObject *__pyx_n_s_RETURN_VALUES_DICT; + PyObject *__pyx_n_s_RuntimeError; PyObject *__pyx_n_s_STATE_RUN; PyObject *__pyx_n_s_SUPPORT_GEVENT; PyObject *__pyx_n_s_SafeCallWrapper; @@ -3211,12 +3274,14 @@ typedef struct { PyObject *__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA; PyObject *__pyx_kp_s_Unable_to_get_topmost_frame_for; PyObject *__pyx_kp_s_Using_Cython_speedups; - PyObject *__pyx_n_s__26; + PyObject *__pyx_n_s__27; PyObject *__pyx_kp_s__3; PyObject *__pyx_kp_s__7; PyObject *__pyx_kp_s__8; PyObject *__pyx_kp_s__9; PyObject *__pyx_kp_u__9; + PyObject *__pyx_n_s_abs_real_path_and_base; + PyObject *__pyx_n_s_absolute_filename; PyObject *__pyx_n_s_add; PyObject *__pyx_n_s_add_command; PyObject *__pyx_n_s_add_exception_to_frame; @@ -3239,7 +3304,10 @@ typedef struct { PyObject *__pyx_n_s_call; PyObject *__pyx_n_s_call_2; PyObject *__pyx_n_s_can_skip; + PyObject *__pyx_n_s_canonical_normalized_filename; PyObject *__pyx_kp_s_cell; + PyObject *__pyx_n_s_check_excs; + PyObject *__pyx_n_s_check_trace_obj; PyObject *__pyx_n_s_checkcache; PyObject *__pyx_n_s_children_variants; PyObject *__pyx_n_s_class_getitem; @@ -3258,6 +3326,7 @@ typedef struct { PyObject *__pyx_n_s_constant_to_str; PyObject *__pyx_n_s_constructed_tid_to_last_frame; PyObject *__pyx_n_s_container_obj; + PyObject *__pyx_n_s_curr_stat; PyObject *__pyx_n_s_current_frames; PyObject *__pyx_n_s_current_frames_2; PyObject *__pyx_n_s_custom_key; @@ -3274,16 +3343,22 @@ typedef struct { PyObject *__pyx_n_s_endswith; PyObject *__pyx_n_s_enter; PyObject *__pyx_n_s_event; + PyObject *__pyx_n_s_exc_break; + PyObject *__pyx_n_s_exc_break_caught; + PyObject *__pyx_n_s_exc_break_user; PyObject *__pyx_n_s_exc_info; + PyObject *__pyx_n_s_exc_lineno; PyObject *__pyx_n_s_except_line; PyObject *__pyx_n_s_exception; PyObject *__pyx_n_s_exception_break; + PyObject *__pyx_n_s_exception_breakpoint; PyObject *__pyx_n_s_exception_type; PyObject *__pyx_n_s_exclude_exception_by_filter; PyObject *__pyx_n_s_exec; PyObject *__pyx_n_s_execfile; PyObject *__pyx_n_s_exit; PyObject *__pyx_n_s_expression; + PyObject *__pyx_n_s_f; PyObject *__pyx_n_s_f_back; PyObject *__pyx_n_s_f_code; PyObject *__pyx_n_s_f_globals; @@ -3300,8 +3375,10 @@ typedef struct { PyObject *__pyx_n_s_force_only_unhandled_tracer; PyObject *__pyx_n_s_frame; PyObject *__pyx_n_s_frame_cache_key; + PyObject *__pyx_n_s_frame_id_to_frame; PyObject *__pyx_n_s_frame_skips_cache; PyObject *__pyx_n_s_frame_trace_dispatch; + PyObject *__pyx_n_s_from_user_input; PyObject *__pyx_n_s_func_name; PyObject *__pyx_n_s_function_breakpoint_name_to_brea; PyObject *__pyx_kp_u_gc; @@ -3323,6 +3400,7 @@ typedef struct { PyObject *__pyx_n_s_global_notify_skipped_step_in_l; PyObject *__pyx_n_s_handle_breakpoint_condition; PyObject *__pyx_n_s_handle_breakpoint_expression; + PyObject *__pyx_n_s_handle_exception; PyObject *__pyx_n_s_handle_user_exception; PyObject *__pyx_n_s_has_condition; PyObject *__pyx_n_s_has_plugin_exception_breaks; @@ -3336,6 +3414,7 @@ typedef struct { PyObject *__pyx_n_s_import; PyObject *__pyx_n_s_in_project_scope; PyObject *__pyx_n_s_info; + PyObject *__pyx_n_s_initial_trace_obj; PyObject *__pyx_n_s_initializing; PyObject *__pyx_kp_s_invalid; PyObject *__pyx_n_s_is_coroutine; @@ -3344,19 +3423,27 @@ typedef struct { PyObject *__pyx_n_s_is_line_in_try_block; PyObject *__pyx_n_s_is_logpoint; PyObject *__pyx_n_s_is_thread_alive; + PyObject *__pyx_n_s_is_unhandled_exception; + PyObject *__pyx_n_s_is_user_uncaught; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_j; PyObject *__pyx_n_s_just_raised; PyObject *__pyx_n_s_kwargs; PyObject *__pyx_kp_s_lambda; + PyObject *__pyx_n_s_last_raise_line; + PyObject *__pyx_n_s_last_stat; PyObject *__pyx_n_s_line; PyObject *__pyx_n_s_linecache; + PyObject *__pyx_n_s_lines; + PyObject *__pyx_n_s_lines_ignored; PyObject *__pyx_n_s_linesep; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_main_2; PyObject *__pyx_n_s_make_console_message; PyObject *__pyx_n_s_make_io_message; PyObject *__pyx_n_s_match; + PyObject *__pyx_n_s_maybe_user_uncaught_exc_info; + PyObject *__pyx_n_s_merged; PyObject *__pyx_n_s_method_object; PyObject *__pyx_kp_s_module; PyObject *__pyx_n_s_name; @@ -3373,6 +3460,7 @@ typedef struct { PyObject *__pyx_n_s_pickle; PyObject *__pyx_n_s_plugin; PyObject *__pyx_n_s_pop; + PyObject *__pyx_n_s_prev_user_uncaught_exc_info; PyObject *__pyx_n_s_py_db; PyObject *__pyx_kp_s_pyc; PyObject *__pyx_n_s_pydb_disposed; @@ -3414,6 +3502,7 @@ typedef struct { PyObject *__pyx_n_s_pyx_vtable; PyObject *__pyx_n_s_qname; PyObject *__pyx_n_s_quitting; + PyObject *__pyx_n_s_raise_lines; PyObject *__pyx_n_s_raise_lines_in_except; PyObject *__pyx_n_s_re; PyObject *__pyx_n_s_reduce; @@ -3421,6 +3510,7 @@ typedef struct { PyObject *__pyx_n_s_reduce_ex; PyObject *__pyx_n_s_remove_exception_from_frame; PyObject *__pyx_n_s_remove_return_values_flag; + PyObject *__pyx_n_s_result; PyObject *__pyx_n_s_ret; PyObject *__pyx_n_s_return; PyObject *__pyx_n_s_return_line; @@ -3439,6 +3529,7 @@ typedef struct { PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_should_stop; + PyObject *__pyx_n_s_should_stop_on_exception; PyObject *__pyx_n_s_should_trace_hook; PyObject *__pyx_n_s_show_return_values; PyObject *__pyx_n_s_skip_on_exceptions_thrown_in_sam; @@ -3450,6 +3541,7 @@ typedef struct { PyObject *__pyx_n_s_state; PyObject *__pyx_n_s_stop; PyObject *__pyx_n_s_stop_on_unhandled_exception; + PyObject *__pyx_n_s_stopped; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_suspend; PyObject *__pyx_n_s_suspend_other_threads; @@ -3476,14 +3568,19 @@ typedef struct { PyObject *__pyx_n_s_trace_dispatch; PyObject *__pyx_n_s_trace_dispatch_and_unhandled_exc; PyObject *__pyx_n_s_trace_exception; + PyObject *__pyx_n_s_trace_obj; PyObject *__pyx_n_s_trace_unhandled_exceptions; PyObject *__pyx_n_s_try_exc_info; + PyObject *__pyx_n_s_try_except_info; PyObject *__pyx_n_s_try_except_infos; PyObject *__pyx_n_s_update; PyObject *__pyx_n_s_use_setstate; PyObject *__pyx_kp_s_utf_8; + PyObject *__pyx_n_s_valid_try_except_infos; + PyObject *__pyx_n_s_value; PyObject *__pyx_n_s_values; PyObject *__pyx_n_s_version; + PyObject *__pyx_n_s_was_just_raised; PyObject *__pyx_n_s_writer; PyObject *__pyx_int_0; PyObject *__pyx_int_1; @@ -3524,56 +3621,57 @@ typedef struct { PyObject *__pyx_tuple__16; PyObject *__pyx_tuple__17; PyObject *__pyx_tuple__18; - PyObject *__pyx_tuple__20; - PyObject *__pyx_tuple__22; - PyObject *__pyx_tuple__24; - PyObject *__pyx_tuple__27; + PyObject *__pyx_tuple__19; + PyObject *__pyx_tuple__21; + PyObject *__pyx_tuple__23; + PyObject *__pyx_tuple__25; PyObject *__pyx_tuple__28; - PyObject *__pyx_tuple__30; + PyObject *__pyx_tuple__29; PyObject *__pyx_tuple__31; PyObject *__pyx_tuple__32; - PyObject *__pyx_tuple__35; + PyObject *__pyx_tuple__33; + PyObject *__pyx_tuple__34; PyObject *__pyx_tuple__38; - PyObject *__pyx_tuple__40; - PyObject *__pyx_tuple__42; - PyObject *__pyx_tuple__46; - PyObject *__pyx_tuple__48; - PyObject *__pyx_tuple__52; - PyObject *__pyx_tuple__54; - PyObject *__pyx_tuple__56; + PyObject *__pyx_tuple__41; + PyObject *__pyx_tuple__43; + PyObject *__pyx_tuple__45; + PyObject *__pyx_tuple__49; + PyObject *__pyx_tuple__51; + PyObject *__pyx_tuple__53; + PyObject *__pyx_tuple__55; + PyObject *__pyx_tuple__59; PyObject *__pyx_tuple__61; - PyObject *__pyx_tuple__69; - PyObject *__pyx_codeobj__19; - PyObject *__pyx_codeobj__21; - PyObject *__pyx_codeobj__23; - PyObject *__pyx_codeobj__25; - PyObject *__pyx_codeobj__29; - PyObject *__pyx_codeobj__33; - PyObject *__pyx_codeobj__34; + PyObject *__pyx_tuple__63; + PyObject *__pyx_tuple__68; + PyObject *__pyx_tuple__77; + PyObject *__pyx_codeobj__20; + PyObject *__pyx_codeobj__22; + PyObject *__pyx_codeobj__24; + PyObject *__pyx_codeobj__26; + PyObject *__pyx_codeobj__30; + PyObject *__pyx_codeobj__35; PyObject *__pyx_codeobj__36; PyObject *__pyx_codeobj__37; PyObject *__pyx_codeobj__39; - PyObject *__pyx_codeobj__41; - PyObject *__pyx_codeobj__43; + PyObject *__pyx_codeobj__40; + PyObject *__pyx_codeobj__42; PyObject *__pyx_codeobj__44; - PyObject *__pyx_codeobj__45; + PyObject *__pyx_codeobj__46; PyObject *__pyx_codeobj__47; - PyObject *__pyx_codeobj__49; + PyObject *__pyx_codeobj__48; PyObject *__pyx_codeobj__50; - PyObject *__pyx_codeobj__51; - PyObject *__pyx_codeobj__53; - PyObject *__pyx_codeobj__55; + PyObject *__pyx_codeobj__52; + PyObject *__pyx_codeobj__54; + PyObject *__pyx_codeobj__56; PyObject *__pyx_codeobj__57; PyObject *__pyx_codeobj__58; - PyObject *__pyx_codeobj__59; PyObject *__pyx_codeobj__60; PyObject *__pyx_codeobj__62; - PyObject *__pyx_codeobj__63; PyObject *__pyx_codeobj__64; PyObject *__pyx_codeobj__65; PyObject *__pyx_codeobj__66; PyObject *__pyx_codeobj__67; - PyObject *__pyx_codeobj__68; + PyObject *__pyx_codeobj__69; PyObject *__pyx_codeobj__70; PyObject *__pyx_codeobj__71; PyObject *__pyx_codeobj__72; @@ -3581,6 +3679,13 @@ typedef struct { PyObject *__pyx_codeobj__74; PyObject *__pyx_codeobj__75; PyObject *__pyx_codeobj__76; + PyObject *__pyx_codeobj__78; + PyObject *__pyx_codeobj__79; + PyObject *__pyx_codeobj__80; + PyObject *__pyx_codeobj__81; + PyObject *__pyx_codeobj__82; + PyObject *__pyx_codeobj__83; + PyObject *__pyx_codeobj__84; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE @@ -3666,7 +3771,9 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_NO_FTRACE); Py_CLEAR(clear_module_state->__pyx_n_s_NameError); Py_CLEAR(clear_module_state->__pyx_n_s_None); + Py_CLEAR(clear_module_state->__pyx_kp_s_Not_used_in_sys_monitoring_mode); Py_CLEAR(clear_module_state->__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); + Py_CLEAR(clear_module_state->__pyx_n_s_PYDEVD_USE_SYS_MONITORING); Py_CLEAR(clear_module_state->__pyx_n_s_PYDEV_FILE); Py_CLEAR(clear_module_state->__pyx_n_s_PYTHON_SUSPEND); Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); @@ -3683,6 +3790,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_trace_dispatch); Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_trace_exception); Py_CLEAR(clear_module_state->__pyx_n_s_RETURN_VALUES_DICT); + Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError); Py_CLEAR(clear_module_state->__pyx_n_s_STATE_RUN); Py_CLEAR(clear_module_state->__pyx_n_s_SUPPORT_GEVENT); Py_CLEAR(clear_module_state->__pyx_n_s_SafeCallWrapper); @@ -3715,12 +3823,14 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_get_topmost_frame_for); Py_CLEAR(clear_module_state->__pyx_kp_s_Using_Cython_speedups); - Py_CLEAR(clear_module_state->__pyx_n_s__26); + Py_CLEAR(clear_module_state->__pyx_n_s__27); Py_CLEAR(clear_module_state->__pyx_kp_s__3); Py_CLEAR(clear_module_state->__pyx_kp_s__7); Py_CLEAR(clear_module_state->__pyx_kp_s__8); Py_CLEAR(clear_module_state->__pyx_kp_s__9); Py_CLEAR(clear_module_state->__pyx_kp_u__9); + Py_CLEAR(clear_module_state->__pyx_n_s_abs_real_path_and_base); + Py_CLEAR(clear_module_state->__pyx_n_s_absolute_filename); Py_CLEAR(clear_module_state->__pyx_n_s_add); Py_CLEAR(clear_module_state->__pyx_n_s_add_command); Py_CLEAR(clear_module_state->__pyx_n_s_add_exception_to_frame); @@ -3743,7 +3853,10 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_call); Py_CLEAR(clear_module_state->__pyx_n_s_call_2); Py_CLEAR(clear_module_state->__pyx_n_s_can_skip); + Py_CLEAR(clear_module_state->__pyx_n_s_canonical_normalized_filename); Py_CLEAR(clear_module_state->__pyx_kp_s_cell); + Py_CLEAR(clear_module_state->__pyx_n_s_check_excs); + Py_CLEAR(clear_module_state->__pyx_n_s_check_trace_obj); Py_CLEAR(clear_module_state->__pyx_n_s_checkcache); Py_CLEAR(clear_module_state->__pyx_n_s_children_variants); Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); @@ -3762,6 +3875,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_constant_to_str); Py_CLEAR(clear_module_state->__pyx_n_s_constructed_tid_to_last_frame); Py_CLEAR(clear_module_state->__pyx_n_s_container_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_curr_stat); Py_CLEAR(clear_module_state->__pyx_n_s_current_frames); Py_CLEAR(clear_module_state->__pyx_n_s_current_frames_2); Py_CLEAR(clear_module_state->__pyx_n_s_custom_key); @@ -3778,16 +3892,22 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_endswith); Py_CLEAR(clear_module_state->__pyx_n_s_enter); Py_CLEAR(clear_module_state->__pyx_n_s_event); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_break); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_break_caught); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_break_user); Py_CLEAR(clear_module_state->__pyx_n_s_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_lineno); Py_CLEAR(clear_module_state->__pyx_n_s_except_line); Py_CLEAR(clear_module_state->__pyx_n_s_exception); Py_CLEAR(clear_module_state->__pyx_n_s_exception_break); + Py_CLEAR(clear_module_state->__pyx_n_s_exception_breakpoint); Py_CLEAR(clear_module_state->__pyx_n_s_exception_type); Py_CLEAR(clear_module_state->__pyx_n_s_exclude_exception_by_filter); Py_CLEAR(clear_module_state->__pyx_n_s_exec); Py_CLEAR(clear_module_state->__pyx_n_s_execfile); Py_CLEAR(clear_module_state->__pyx_n_s_exit); Py_CLEAR(clear_module_state->__pyx_n_s_expression); + Py_CLEAR(clear_module_state->__pyx_n_s_f); Py_CLEAR(clear_module_state->__pyx_n_s_f_back); Py_CLEAR(clear_module_state->__pyx_n_s_f_code); Py_CLEAR(clear_module_state->__pyx_n_s_f_globals); @@ -3804,8 +3924,10 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_force_only_unhandled_tracer); Py_CLEAR(clear_module_state->__pyx_n_s_frame); Py_CLEAR(clear_module_state->__pyx_n_s_frame_cache_key); + Py_CLEAR(clear_module_state->__pyx_n_s_frame_id_to_frame); Py_CLEAR(clear_module_state->__pyx_n_s_frame_skips_cache); Py_CLEAR(clear_module_state->__pyx_n_s_frame_trace_dispatch); + Py_CLEAR(clear_module_state->__pyx_n_s_from_user_input); Py_CLEAR(clear_module_state->__pyx_n_s_func_name); Py_CLEAR(clear_module_state->__pyx_n_s_function_breakpoint_name_to_brea); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); @@ -3827,6 +3949,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_global_notify_skipped_step_in_l); Py_CLEAR(clear_module_state->__pyx_n_s_handle_breakpoint_condition); Py_CLEAR(clear_module_state->__pyx_n_s_handle_breakpoint_expression); + Py_CLEAR(clear_module_state->__pyx_n_s_handle_exception); Py_CLEAR(clear_module_state->__pyx_n_s_handle_user_exception); Py_CLEAR(clear_module_state->__pyx_n_s_has_condition); Py_CLEAR(clear_module_state->__pyx_n_s_has_plugin_exception_breaks); @@ -3840,6 +3963,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_in_project_scope); Py_CLEAR(clear_module_state->__pyx_n_s_info); + Py_CLEAR(clear_module_state->__pyx_n_s_initial_trace_obj); Py_CLEAR(clear_module_state->__pyx_n_s_initializing); Py_CLEAR(clear_module_state->__pyx_kp_s_invalid); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); @@ -3848,19 +3972,27 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_is_line_in_try_block); Py_CLEAR(clear_module_state->__pyx_n_s_is_logpoint); Py_CLEAR(clear_module_state->__pyx_n_s_is_thread_alive); + Py_CLEAR(clear_module_state->__pyx_n_s_is_unhandled_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_is_user_uncaught); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_j); Py_CLEAR(clear_module_state->__pyx_n_s_just_raised); Py_CLEAR(clear_module_state->__pyx_n_s_kwargs); Py_CLEAR(clear_module_state->__pyx_kp_s_lambda); + Py_CLEAR(clear_module_state->__pyx_n_s_last_raise_line); + Py_CLEAR(clear_module_state->__pyx_n_s_last_stat); Py_CLEAR(clear_module_state->__pyx_n_s_line); Py_CLEAR(clear_module_state->__pyx_n_s_linecache); + Py_CLEAR(clear_module_state->__pyx_n_s_lines); + Py_CLEAR(clear_module_state->__pyx_n_s_lines_ignored); Py_CLEAR(clear_module_state->__pyx_n_s_linesep); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_main_2); Py_CLEAR(clear_module_state->__pyx_n_s_make_console_message); Py_CLEAR(clear_module_state->__pyx_n_s_make_io_message); Py_CLEAR(clear_module_state->__pyx_n_s_match); + Py_CLEAR(clear_module_state->__pyx_n_s_maybe_user_uncaught_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_merged); Py_CLEAR(clear_module_state->__pyx_n_s_method_object); Py_CLEAR(clear_module_state->__pyx_kp_s_module); Py_CLEAR(clear_module_state->__pyx_n_s_name); @@ -3877,6 +4009,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_pickle); Py_CLEAR(clear_module_state->__pyx_n_s_plugin); Py_CLEAR(clear_module_state->__pyx_n_s_pop); + Py_CLEAR(clear_module_state->__pyx_n_s_prev_user_uncaught_exc_info); Py_CLEAR(clear_module_state->__pyx_n_s_py_db); Py_CLEAR(clear_module_state->__pyx_kp_s_pyc); Py_CLEAR(clear_module_state->__pyx_n_s_pydb_disposed); @@ -3918,6 +4051,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); Py_CLEAR(clear_module_state->__pyx_n_s_qname); Py_CLEAR(clear_module_state->__pyx_n_s_quitting); + Py_CLEAR(clear_module_state->__pyx_n_s_raise_lines); Py_CLEAR(clear_module_state->__pyx_n_s_raise_lines_in_except); Py_CLEAR(clear_module_state->__pyx_n_s_re); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); @@ -3925,6 +4059,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_remove_exception_from_frame); Py_CLEAR(clear_module_state->__pyx_n_s_remove_return_values_flag); + Py_CLEAR(clear_module_state->__pyx_n_s_result); Py_CLEAR(clear_module_state->__pyx_n_s_ret); Py_CLEAR(clear_module_state->__pyx_n_s_return); Py_CLEAR(clear_module_state->__pyx_n_s_return_line); @@ -3943,6 +4078,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_should_stop); + Py_CLEAR(clear_module_state->__pyx_n_s_should_stop_on_exception); Py_CLEAR(clear_module_state->__pyx_n_s_should_trace_hook); Py_CLEAR(clear_module_state->__pyx_n_s_show_return_values); Py_CLEAR(clear_module_state->__pyx_n_s_skip_on_exceptions_thrown_in_sam); @@ -3954,6 +4090,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_state); Py_CLEAR(clear_module_state->__pyx_n_s_stop); Py_CLEAR(clear_module_state->__pyx_n_s_stop_on_unhandled_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_stopped); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_suspend); Py_CLEAR(clear_module_state->__pyx_n_s_suspend_other_threads); @@ -3980,14 +4117,19 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_trace_dispatch); Py_CLEAR(clear_module_state->__pyx_n_s_trace_dispatch_and_unhandled_exc); Py_CLEAR(clear_module_state->__pyx_n_s_trace_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_obj); Py_CLEAR(clear_module_state->__pyx_n_s_trace_unhandled_exceptions); Py_CLEAR(clear_module_state->__pyx_n_s_try_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_try_except_info); Py_CLEAR(clear_module_state->__pyx_n_s_try_except_infos); Py_CLEAR(clear_module_state->__pyx_n_s_update); Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate); Py_CLEAR(clear_module_state->__pyx_kp_s_utf_8); + Py_CLEAR(clear_module_state->__pyx_n_s_valid_try_except_infos); + Py_CLEAR(clear_module_state->__pyx_n_s_value); Py_CLEAR(clear_module_state->__pyx_n_s_values); Py_CLEAR(clear_module_state->__pyx_n_s_version); + Py_CLEAR(clear_module_state->__pyx_n_s_was_just_raised); Py_CLEAR(clear_module_state->__pyx_n_s_writer); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); @@ -4028,56 +4170,57 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_tuple__16); Py_CLEAR(clear_module_state->__pyx_tuple__17); Py_CLEAR(clear_module_state->__pyx_tuple__18); - Py_CLEAR(clear_module_state->__pyx_tuple__20); - Py_CLEAR(clear_module_state->__pyx_tuple__22); - Py_CLEAR(clear_module_state->__pyx_tuple__24); - Py_CLEAR(clear_module_state->__pyx_tuple__27); + Py_CLEAR(clear_module_state->__pyx_tuple__19); + Py_CLEAR(clear_module_state->__pyx_tuple__21); + Py_CLEAR(clear_module_state->__pyx_tuple__23); + Py_CLEAR(clear_module_state->__pyx_tuple__25); Py_CLEAR(clear_module_state->__pyx_tuple__28); - Py_CLEAR(clear_module_state->__pyx_tuple__30); + Py_CLEAR(clear_module_state->__pyx_tuple__29); Py_CLEAR(clear_module_state->__pyx_tuple__31); Py_CLEAR(clear_module_state->__pyx_tuple__32); - Py_CLEAR(clear_module_state->__pyx_tuple__35); + Py_CLEAR(clear_module_state->__pyx_tuple__33); + Py_CLEAR(clear_module_state->__pyx_tuple__34); Py_CLEAR(clear_module_state->__pyx_tuple__38); - Py_CLEAR(clear_module_state->__pyx_tuple__40); - Py_CLEAR(clear_module_state->__pyx_tuple__42); - Py_CLEAR(clear_module_state->__pyx_tuple__46); - Py_CLEAR(clear_module_state->__pyx_tuple__48); - Py_CLEAR(clear_module_state->__pyx_tuple__52); - Py_CLEAR(clear_module_state->__pyx_tuple__54); - Py_CLEAR(clear_module_state->__pyx_tuple__56); + Py_CLEAR(clear_module_state->__pyx_tuple__41); + Py_CLEAR(clear_module_state->__pyx_tuple__43); + Py_CLEAR(clear_module_state->__pyx_tuple__45); + Py_CLEAR(clear_module_state->__pyx_tuple__49); + Py_CLEAR(clear_module_state->__pyx_tuple__51); + Py_CLEAR(clear_module_state->__pyx_tuple__53); + Py_CLEAR(clear_module_state->__pyx_tuple__55); + Py_CLEAR(clear_module_state->__pyx_tuple__59); Py_CLEAR(clear_module_state->__pyx_tuple__61); - Py_CLEAR(clear_module_state->__pyx_tuple__69); - Py_CLEAR(clear_module_state->__pyx_codeobj__19); - Py_CLEAR(clear_module_state->__pyx_codeobj__21); - Py_CLEAR(clear_module_state->__pyx_codeobj__23); - Py_CLEAR(clear_module_state->__pyx_codeobj__25); - Py_CLEAR(clear_module_state->__pyx_codeobj__29); - Py_CLEAR(clear_module_state->__pyx_codeobj__33); - Py_CLEAR(clear_module_state->__pyx_codeobj__34); + Py_CLEAR(clear_module_state->__pyx_tuple__63); + Py_CLEAR(clear_module_state->__pyx_tuple__68); + Py_CLEAR(clear_module_state->__pyx_tuple__77); + Py_CLEAR(clear_module_state->__pyx_codeobj__20); + Py_CLEAR(clear_module_state->__pyx_codeobj__22); + Py_CLEAR(clear_module_state->__pyx_codeobj__24); + Py_CLEAR(clear_module_state->__pyx_codeobj__26); + Py_CLEAR(clear_module_state->__pyx_codeobj__30); + Py_CLEAR(clear_module_state->__pyx_codeobj__35); Py_CLEAR(clear_module_state->__pyx_codeobj__36); Py_CLEAR(clear_module_state->__pyx_codeobj__37); Py_CLEAR(clear_module_state->__pyx_codeobj__39); - Py_CLEAR(clear_module_state->__pyx_codeobj__41); - Py_CLEAR(clear_module_state->__pyx_codeobj__43); + Py_CLEAR(clear_module_state->__pyx_codeobj__40); + Py_CLEAR(clear_module_state->__pyx_codeobj__42); Py_CLEAR(clear_module_state->__pyx_codeobj__44); - Py_CLEAR(clear_module_state->__pyx_codeobj__45); + Py_CLEAR(clear_module_state->__pyx_codeobj__46); Py_CLEAR(clear_module_state->__pyx_codeobj__47); - Py_CLEAR(clear_module_state->__pyx_codeobj__49); + Py_CLEAR(clear_module_state->__pyx_codeobj__48); Py_CLEAR(clear_module_state->__pyx_codeobj__50); - Py_CLEAR(clear_module_state->__pyx_codeobj__51); - Py_CLEAR(clear_module_state->__pyx_codeobj__53); - Py_CLEAR(clear_module_state->__pyx_codeobj__55); + Py_CLEAR(clear_module_state->__pyx_codeobj__52); + Py_CLEAR(clear_module_state->__pyx_codeobj__54); + Py_CLEAR(clear_module_state->__pyx_codeobj__56); Py_CLEAR(clear_module_state->__pyx_codeobj__57); Py_CLEAR(clear_module_state->__pyx_codeobj__58); - Py_CLEAR(clear_module_state->__pyx_codeobj__59); Py_CLEAR(clear_module_state->__pyx_codeobj__60); Py_CLEAR(clear_module_state->__pyx_codeobj__62); - Py_CLEAR(clear_module_state->__pyx_codeobj__63); Py_CLEAR(clear_module_state->__pyx_codeobj__64); Py_CLEAR(clear_module_state->__pyx_codeobj__65); Py_CLEAR(clear_module_state->__pyx_codeobj__66); Py_CLEAR(clear_module_state->__pyx_codeobj__67); - Py_CLEAR(clear_module_state->__pyx_codeobj__68); + Py_CLEAR(clear_module_state->__pyx_codeobj__69); Py_CLEAR(clear_module_state->__pyx_codeobj__70); Py_CLEAR(clear_module_state->__pyx_codeobj__71); Py_CLEAR(clear_module_state->__pyx_codeobj__72); @@ -4085,6 +4228,13 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_codeobj__74); Py_CLEAR(clear_module_state->__pyx_codeobj__75); Py_CLEAR(clear_module_state->__pyx_codeobj__76); + Py_CLEAR(clear_module_state->__pyx_codeobj__78); + Py_CLEAR(clear_module_state->__pyx_codeobj__79); + Py_CLEAR(clear_module_state->__pyx_codeobj__80); + Py_CLEAR(clear_module_state->__pyx_codeobj__81); + Py_CLEAR(clear_module_state->__pyx_codeobj__82); + Py_CLEAR(clear_module_state->__pyx_codeobj__83); + Py_CLEAR(clear_module_state->__pyx_codeobj__84); return 0; } #endif @@ -4148,7 +4298,9 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_NO_FTRACE); Py_VISIT(traverse_module_state->__pyx_n_s_NameError); Py_VISIT(traverse_module_state->__pyx_n_s_None); + Py_VISIT(traverse_module_state->__pyx_kp_s_Not_used_in_sys_monitoring_mode); Py_VISIT(traverse_module_state->__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); + Py_VISIT(traverse_module_state->__pyx_n_s_PYDEVD_USE_SYS_MONITORING); Py_VISIT(traverse_module_state->__pyx_n_s_PYDEV_FILE); Py_VISIT(traverse_module_state->__pyx_n_s_PYTHON_SUSPEND); Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); @@ -4165,6 +4317,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_trace_dispatch); Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_trace_exception); Py_VISIT(traverse_module_state->__pyx_n_s_RETURN_VALUES_DICT); + Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError); Py_VISIT(traverse_module_state->__pyx_n_s_STATE_RUN); Py_VISIT(traverse_module_state->__pyx_n_s_SUPPORT_GEVENT); Py_VISIT(traverse_module_state->__pyx_n_s_SafeCallWrapper); @@ -4197,12 +4350,14 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_get_topmost_frame_for); Py_VISIT(traverse_module_state->__pyx_kp_s_Using_Cython_speedups); - Py_VISIT(traverse_module_state->__pyx_n_s__26); + Py_VISIT(traverse_module_state->__pyx_n_s__27); Py_VISIT(traverse_module_state->__pyx_kp_s__3); Py_VISIT(traverse_module_state->__pyx_kp_s__7); Py_VISIT(traverse_module_state->__pyx_kp_s__8); Py_VISIT(traverse_module_state->__pyx_kp_s__9); Py_VISIT(traverse_module_state->__pyx_kp_u__9); + Py_VISIT(traverse_module_state->__pyx_n_s_abs_real_path_and_base); + Py_VISIT(traverse_module_state->__pyx_n_s_absolute_filename); Py_VISIT(traverse_module_state->__pyx_n_s_add); Py_VISIT(traverse_module_state->__pyx_n_s_add_command); Py_VISIT(traverse_module_state->__pyx_n_s_add_exception_to_frame); @@ -4225,7 +4380,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_call); Py_VISIT(traverse_module_state->__pyx_n_s_call_2); Py_VISIT(traverse_module_state->__pyx_n_s_can_skip); + Py_VISIT(traverse_module_state->__pyx_n_s_canonical_normalized_filename); Py_VISIT(traverse_module_state->__pyx_kp_s_cell); + Py_VISIT(traverse_module_state->__pyx_n_s_check_excs); + Py_VISIT(traverse_module_state->__pyx_n_s_check_trace_obj); Py_VISIT(traverse_module_state->__pyx_n_s_checkcache); Py_VISIT(traverse_module_state->__pyx_n_s_children_variants); Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); @@ -4244,6 +4402,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_constant_to_str); Py_VISIT(traverse_module_state->__pyx_n_s_constructed_tid_to_last_frame); Py_VISIT(traverse_module_state->__pyx_n_s_container_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_curr_stat); Py_VISIT(traverse_module_state->__pyx_n_s_current_frames); Py_VISIT(traverse_module_state->__pyx_n_s_current_frames_2); Py_VISIT(traverse_module_state->__pyx_n_s_custom_key); @@ -4260,16 +4419,22 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_endswith); Py_VISIT(traverse_module_state->__pyx_n_s_enter); Py_VISIT(traverse_module_state->__pyx_n_s_event); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_break); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_break_caught); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_break_user); Py_VISIT(traverse_module_state->__pyx_n_s_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_lineno); Py_VISIT(traverse_module_state->__pyx_n_s_except_line); Py_VISIT(traverse_module_state->__pyx_n_s_exception); Py_VISIT(traverse_module_state->__pyx_n_s_exception_break); + Py_VISIT(traverse_module_state->__pyx_n_s_exception_breakpoint); Py_VISIT(traverse_module_state->__pyx_n_s_exception_type); Py_VISIT(traverse_module_state->__pyx_n_s_exclude_exception_by_filter); Py_VISIT(traverse_module_state->__pyx_n_s_exec); Py_VISIT(traverse_module_state->__pyx_n_s_execfile); Py_VISIT(traverse_module_state->__pyx_n_s_exit); Py_VISIT(traverse_module_state->__pyx_n_s_expression); + Py_VISIT(traverse_module_state->__pyx_n_s_f); Py_VISIT(traverse_module_state->__pyx_n_s_f_back); Py_VISIT(traverse_module_state->__pyx_n_s_f_code); Py_VISIT(traverse_module_state->__pyx_n_s_f_globals); @@ -4286,8 +4451,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_force_only_unhandled_tracer); Py_VISIT(traverse_module_state->__pyx_n_s_frame); Py_VISIT(traverse_module_state->__pyx_n_s_frame_cache_key); + Py_VISIT(traverse_module_state->__pyx_n_s_frame_id_to_frame); Py_VISIT(traverse_module_state->__pyx_n_s_frame_skips_cache); Py_VISIT(traverse_module_state->__pyx_n_s_frame_trace_dispatch); + Py_VISIT(traverse_module_state->__pyx_n_s_from_user_input); Py_VISIT(traverse_module_state->__pyx_n_s_func_name); Py_VISIT(traverse_module_state->__pyx_n_s_function_breakpoint_name_to_brea); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); @@ -4309,6 +4476,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_global_notify_skipped_step_in_l); Py_VISIT(traverse_module_state->__pyx_n_s_handle_breakpoint_condition); Py_VISIT(traverse_module_state->__pyx_n_s_handle_breakpoint_expression); + Py_VISIT(traverse_module_state->__pyx_n_s_handle_exception); Py_VISIT(traverse_module_state->__pyx_n_s_handle_user_exception); Py_VISIT(traverse_module_state->__pyx_n_s_has_condition); Py_VISIT(traverse_module_state->__pyx_n_s_has_plugin_exception_breaks); @@ -4322,6 +4490,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_in_project_scope); Py_VISIT(traverse_module_state->__pyx_n_s_info); + Py_VISIT(traverse_module_state->__pyx_n_s_initial_trace_obj); Py_VISIT(traverse_module_state->__pyx_n_s_initializing); Py_VISIT(traverse_module_state->__pyx_kp_s_invalid); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); @@ -4330,19 +4499,27 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_is_line_in_try_block); Py_VISIT(traverse_module_state->__pyx_n_s_is_logpoint); Py_VISIT(traverse_module_state->__pyx_n_s_is_thread_alive); + Py_VISIT(traverse_module_state->__pyx_n_s_is_unhandled_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_is_user_uncaught); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_j); Py_VISIT(traverse_module_state->__pyx_n_s_just_raised); Py_VISIT(traverse_module_state->__pyx_n_s_kwargs); Py_VISIT(traverse_module_state->__pyx_kp_s_lambda); + Py_VISIT(traverse_module_state->__pyx_n_s_last_raise_line); + Py_VISIT(traverse_module_state->__pyx_n_s_last_stat); Py_VISIT(traverse_module_state->__pyx_n_s_line); Py_VISIT(traverse_module_state->__pyx_n_s_linecache); + Py_VISIT(traverse_module_state->__pyx_n_s_lines); + Py_VISIT(traverse_module_state->__pyx_n_s_lines_ignored); Py_VISIT(traverse_module_state->__pyx_n_s_linesep); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_main_2); Py_VISIT(traverse_module_state->__pyx_n_s_make_console_message); Py_VISIT(traverse_module_state->__pyx_n_s_make_io_message); Py_VISIT(traverse_module_state->__pyx_n_s_match); + Py_VISIT(traverse_module_state->__pyx_n_s_maybe_user_uncaught_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_merged); Py_VISIT(traverse_module_state->__pyx_n_s_method_object); Py_VISIT(traverse_module_state->__pyx_kp_s_module); Py_VISIT(traverse_module_state->__pyx_n_s_name); @@ -4359,6 +4536,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_pickle); Py_VISIT(traverse_module_state->__pyx_n_s_plugin); Py_VISIT(traverse_module_state->__pyx_n_s_pop); + Py_VISIT(traverse_module_state->__pyx_n_s_prev_user_uncaught_exc_info); Py_VISIT(traverse_module_state->__pyx_n_s_py_db); Py_VISIT(traverse_module_state->__pyx_kp_s_pyc); Py_VISIT(traverse_module_state->__pyx_n_s_pydb_disposed); @@ -4400,6 +4578,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); Py_VISIT(traverse_module_state->__pyx_n_s_qname); Py_VISIT(traverse_module_state->__pyx_n_s_quitting); + Py_VISIT(traverse_module_state->__pyx_n_s_raise_lines); Py_VISIT(traverse_module_state->__pyx_n_s_raise_lines_in_except); Py_VISIT(traverse_module_state->__pyx_n_s_re); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); @@ -4407,6 +4586,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_remove_exception_from_frame); Py_VISIT(traverse_module_state->__pyx_n_s_remove_return_values_flag); + Py_VISIT(traverse_module_state->__pyx_n_s_result); Py_VISIT(traverse_module_state->__pyx_n_s_ret); Py_VISIT(traverse_module_state->__pyx_n_s_return); Py_VISIT(traverse_module_state->__pyx_n_s_return_line); @@ -4425,6 +4605,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_should_stop); + Py_VISIT(traverse_module_state->__pyx_n_s_should_stop_on_exception); Py_VISIT(traverse_module_state->__pyx_n_s_should_trace_hook); Py_VISIT(traverse_module_state->__pyx_n_s_show_return_values); Py_VISIT(traverse_module_state->__pyx_n_s_skip_on_exceptions_thrown_in_sam); @@ -4436,6 +4617,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_state); Py_VISIT(traverse_module_state->__pyx_n_s_stop); Py_VISIT(traverse_module_state->__pyx_n_s_stop_on_unhandled_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_stopped); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_suspend); Py_VISIT(traverse_module_state->__pyx_n_s_suspend_other_threads); @@ -4462,14 +4644,19 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_trace_dispatch); Py_VISIT(traverse_module_state->__pyx_n_s_trace_dispatch_and_unhandled_exc); Py_VISIT(traverse_module_state->__pyx_n_s_trace_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_obj); Py_VISIT(traverse_module_state->__pyx_n_s_trace_unhandled_exceptions); Py_VISIT(traverse_module_state->__pyx_n_s_try_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_try_except_info); Py_VISIT(traverse_module_state->__pyx_n_s_try_except_infos); Py_VISIT(traverse_module_state->__pyx_n_s_update); Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate); Py_VISIT(traverse_module_state->__pyx_kp_s_utf_8); + Py_VISIT(traverse_module_state->__pyx_n_s_valid_try_except_infos); + Py_VISIT(traverse_module_state->__pyx_n_s_value); Py_VISIT(traverse_module_state->__pyx_n_s_values); Py_VISIT(traverse_module_state->__pyx_n_s_version); + Py_VISIT(traverse_module_state->__pyx_n_s_was_just_raised); Py_VISIT(traverse_module_state->__pyx_n_s_writer); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); @@ -4510,56 +4697,57 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_tuple__16); Py_VISIT(traverse_module_state->__pyx_tuple__17); Py_VISIT(traverse_module_state->__pyx_tuple__18); - Py_VISIT(traverse_module_state->__pyx_tuple__20); - Py_VISIT(traverse_module_state->__pyx_tuple__22); - Py_VISIT(traverse_module_state->__pyx_tuple__24); - Py_VISIT(traverse_module_state->__pyx_tuple__27); + Py_VISIT(traverse_module_state->__pyx_tuple__19); + Py_VISIT(traverse_module_state->__pyx_tuple__21); + Py_VISIT(traverse_module_state->__pyx_tuple__23); + Py_VISIT(traverse_module_state->__pyx_tuple__25); Py_VISIT(traverse_module_state->__pyx_tuple__28); - Py_VISIT(traverse_module_state->__pyx_tuple__30); + Py_VISIT(traverse_module_state->__pyx_tuple__29); Py_VISIT(traverse_module_state->__pyx_tuple__31); Py_VISIT(traverse_module_state->__pyx_tuple__32); - Py_VISIT(traverse_module_state->__pyx_tuple__35); + Py_VISIT(traverse_module_state->__pyx_tuple__33); + Py_VISIT(traverse_module_state->__pyx_tuple__34); Py_VISIT(traverse_module_state->__pyx_tuple__38); - Py_VISIT(traverse_module_state->__pyx_tuple__40); - Py_VISIT(traverse_module_state->__pyx_tuple__42); - Py_VISIT(traverse_module_state->__pyx_tuple__46); - Py_VISIT(traverse_module_state->__pyx_tuple__48); - Py_VISIT(traverse_module_state->__pyx_tuple__52); - Py_VISIT(traverse_module_state->__pyx_tuple__54); - Py_VISIT(traverse_module_state->__pyx_tuple__56); + Py_VISIT(traverse_module_state->__pyx_tuple__41); + Py_VISIT(traverse_module_state->__pyx_tuple__43); + Py_VISIT(traverse_module_state->__pyx_tuple__45); + Py_VISIT(traverse_module_state->__pyx_tuple__49); + Py_VISIT(traverse_module_state->__pyx_tuple__51); + Py_VISIT(traverse_module_state->__pyx_tuple__53); + Py_VISIT(traverse_module_state->__pyx_tuple__55); + Py_VISIT(traverse_module_state->__pyx_tuple__59); Py_VISIT(traverse_module_state->__pyx_tuple__61); - Py_VISIT(traverse_module_state->__pyx_tuple__69); - Py_VISIT(traverse_module_state->__pyx_codeobj__19); - Py_VISIT(traverse_module_state->__pyx_codeobj__21); - Py_VISIT(traverse_module_state->__pyx_codeobj__23); - Py_VISIT(traverse_module_state->__pyx_codeobj__25); - Py_VISIT(traverse_module_state->__pyx_codeobj__29); - Py_VISIT(traverse_module_state->__pyx_codeobj__33); - Py_VISIT(traverse_module_state->__pyx_codeobj__34); + Py_VISIT(traverse_module_state->__pyx_tuple__63); + Py_VISIT(traverse_module_state->__pyx_tuple__68); + Py_VISIT(traverse_module_state->__pyx_tuple__77); + Py_VISIT(traverse_module_state->__pyx_codeobj__20); + Py_VISIT(traverse_module_state->__pyx_codeobj__22); + Py_VISIT(traverse_module_state->__pyx_codeobj__24); + Py_VISIT(traverse_module_state->__pyx_codeobj__26); + Py_VISIT(traverse_module_state->__pyx_codeobj__30); + Py_VISIT(traverse_module_state->__pyx_codeobj__35); Py_VISIT(traverse_module_state->__pyx_codeobj__36); Py_VISIT(traverse_module_state->__pyx_codeobj__37); Py_VISIT(traverse_module_state->__pyx_codeobj__39); - Py_VISIT(traverse_module_state->__pyx_codeobj__41); - Py_VISIT(traverse_module_state->__pyx_codeobj__43); + Py_VISIT(traverse_module_state->__pyx_codeobj__40); + Py_VISIT(traverse_module_state->__pyx_codeobj__42); Py_VISIT(traverse_module_state->__pyx_codeobj__44); - Py_VISIT(traverse_module_state->__pyx_codeobj__45); + Py_VISIT(traverse_module_state->__pyx_codeobj__46); Py_VISIT(traverse_module_state->__pyx_codeobj__47); - Py_VISIT(traverse_module_state->__pyx_codeobj__49); + Py_VISIT(traverse_module_state->__pyx_codeobj__48); Py_VISIT(traverse_module_state->__pyx_codeobj__50); - Py_VISIT(traverse_module_state->__pyx_codeobj__51); - Py_VISIT(traverse_module_state->__pyx_codeobj__53); - Py_VISIT(traverse_module_state->__pyx_codeobj__55); + Py_VISIT(traverse_module_state->__pyx_codeobj__52); + Py_VISIT(traverse_module_state->__pyx_codeobj__54); + Py_VISIT(traverse_module_state->__pyx_codeobj__56); Py_VISIT(traverse_module_state->__pyx_codeobj__57); Py_VISIT(traverse_module_state->__pyx_codeobj__58); - Py_VISIT(traverse_module_state->__pyx_codeobj__59); Py_VISIT(traverse_module_state->__pyx_codeobj__60); Py_VISIT(traverse_module_state->__pyx_codeobj__62); - Py_VISIT(traverse_module_state->__pyx_codeobj__63); Py_VISIT(traverse_module_state->__pyx_codeobj__64); Py_VISIT(traverse_module_state->__pyx_codeobj__65); Py_VISIT(traverse_module_state->__pyx_codeobj__66); Py_VISIT(traverse_module_state->__pyx_codeobj__67); - Py_VISIT(traverse_module_state->__pyx_codeobj__68); + Py_VISIT(traverse_module_state->__pyx_codeobj__69); Py_VISIT(traverse_module_state->__pyx_codeobj__70); Py_VISIT(traverse_module_state->__pyx_codeobj__71); Py_VISIT(traverse_module_state->__pyx_codeobj__72); @@ -4567,6 +4755,13 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_codeobj__74); Py_VISIT(traverse_module_state->__pyx_codeobj__75); Py_VISIT(traverse_module_state->__pyx_codeobj__76); + Py_VISIT(traverse_module_state->__pyx_codeobj__78); + Py_VISIT(traverse_module_state->__pyx_codeobj__79); + Py_VISIT(traverse_module_state->__pyx_codeobj__80); + Py_VISIT(traverse_module_state->__pyx_codeobj__81); + Py_VISIT(traverse_module_state->__pyx_codeobj__82); + Py_VISIT(traverse_module_state->__pyx_codeobj__83); + Py_VISIT(traverse_module_state->__pyx_codeobj__84); return 0; } #endif @@ -4654,7 +4849,9 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_NO_FTRACE __pyx_mstate_global->__pyx_n_s_NO_FTRACE #define __pyx_n_s_NameError __pyx_mstate_global->__pyx_n_s_NameError #define __pyx_n_s_None __pyx_mstate_global->__pyx_n_s_None +#define __pyx_kp_s_Not_used_in_sys_monitoring_mode __pyx_mstate_global->__pyx_kp_s_Not_used_in_sys_monitoring_mode #define __pyx_n_s_PYDEVD_IPYTHON_CONTEXT __pyx_mstate_global->__pyx_n_s_PYDEVD_IPYTHON_CONTEXT +#define __pyx_n_s_PYDEVD_USE_SYS_MONITORING __pyx_mstate_global->__pyx_n_s_PYDEVD_USE_SYS_MONITORING #define __pyx_n_s_PYDEV_FILE __pyx_mstate_global->__pyx_n_s_PYDEV_FILE #define __pyx_n_s_PYTHON_SUSPEND __pyx_mstate_global->__pyx_n_s_PYTHON_SUSPEND #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError @@ -4671,6 +4868,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_PyDBFrame_trace_dispatch __pyx_mstate_global->__pyx_n_s_PyDBFrame_trace_dispatch #define __pyx_n_s_PyDBFrame_trace_exception __pyx_mstate_global->__pyx_n_s_PyDBFrame_trace_exception #define __pyx_n_s_RETURN_VALUES_DICT __pyx_mstate_global->__pyx_n_s_RETURN_VALUES_DICT +#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError #define __pyx_n_s_STATE_RUN __pyx_mstate_global->__pyx_n_s_STATE_RUN #define __pyx_n_s_SUPPORT_GEVENT __pyx_mstate_global->__pyx_n_s_SUPPORT_GEVENT #define __pyx_n_s_SafeCallWrapper __pyx_mstate_global->__pyx_n_s_SafeCallWrapper @@ -4703,12 +4901,14 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA __pyx_mstate_global->__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA #define __pyx_kp_s_Unable_to_get_topmost_frame_for __pyx_mstate_global->__pyx_kp_s_Unable_to_get_topmost_frame_for #define __pyx_kp_s_Using_Cython_speedups __pyx_mstate_global->__pyx_kp_s_Using_Cython_speedups -#define __pyx_n_s__26 __pyx_mstate_global->__pyx_n_s__26 +#define __pyx_n_s__27 __pyx_mstate_global->__pyx_n_s__27 #define __pyx_kp_s__3 __pyx_mstate_global->__pyx_kp_s__3 #define __pyx_kp_s__7 __pyx_mstate_global->__pyx_kp_s__7 #define __pyx_kp_s__8 __pyx_mstate_global->__pyx_kp_s__8 #define __pyx_kp_s__9 __pyx_mstate_global->__pyx_kp_s__9 #define __pyx_kp_u__9 __pyx_mstate_global->__pyx_kp_u__9 +#define __pyx_n_s_abs_real_path_and_base __pyx_mstate_global->__pyx_n_s_abs_real_path_and_base +#define __pyx_n_s_absolute_filename __pyx_mstate_global->__pyx_n_s_absolute_filename #define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add #define __pyx_n_s_add_command __pyx_mstate_global->__pyx_n_s_add_command #define __pyx_n_s_add_exception_to_frame __pyx_mstate_global->__pyx_n_s_add_exception_to_frame @@ -4731,7 +4931,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call #define __pyx_n_s_call_2 __pyx_mstate_global->__pyx_n_s_call_2 #define __pyx_n_s_can_skip __pyx_mstate_global->__pyx_n_s_can_skip +#define __pyx_n_s_canonical_normalized_filename __pyx_mstate_global->__pyx_n_s_canonical_normalized_filename #define __pyx_kp_s_cell __pyx_mstate_global->__pyx_kp_s_cell +#define __pyx_n_s_check_excs __pyx_mstate_global->__pyx_n_s_check_excs +#define __pyx_n_s_check_trace_obj __pyx_mstate_global->__pyx_n_s_check_trace_obj #define __pyx_n_s_checkcache __pyx_mstate_global->__pyx_n_s_checkcache #define __pyx_n_s_children_variants __pyx_mstate_global->__pyx_n_s_children_variants #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem @@ -4750,6 +4953,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_constant_to_str __pyx_mstate_global->__pyx_n_s_constant_to_str #define __pyx_n_s_constructed_tid_to_last_frame __pyx_mstate_global->__pyx_n_s_constructed_tid_to_last_frame #define __pyx_n_s_container_obj __pyx_mstate_global->__pyx_n_s_container_obj +#define __pyx_n_s_curr_stat __pyx_mstate_global->__pyx_n_s_curr_stat #define __pyx_n_s_current_frames __pyx_mstate_global->__pyx_n_s_current_frames #define __pyx_n_s_current_frames_2 __pyx_mstate_global->__pyx_n_s_current_frames_2 #define __pyx_n_s_custom_key __pyx_mstate_global->__pyx_n_s_custom_key @@ -4766,16 +4970,22 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_endswith __pyx_mstate_global->__pyx_n_s_endswith #define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter #define __pyx_n_s_event __pyx_mstate_global->__pyx_n_s_event +#define __pyx_n_s_exc_break __pyx_mstate_global->__pyx_n_s_exc_break +#define __pyx_n_s_exc_break_caught __pyx_mstate_global->__pyx_n_s_exc_break_caught +#define __pyx_n_s_exc_break_user __pyx_mstate_global->__pyx_n_s_exc_break_user #define __pyx_n_s_exc_info __pyx_mstate_global->__pyx_n_s_exc_info +#define __pyx_n_s_exc_lineno __pyx_mstate_global->__pyx_n_s_exc_lineno #define __pyx_n_s_except_line __pyx_mstate_global->__pyx_n_s_except_line #define __pyx_n_s_exception __pyx_mstate_global->__pyx_n_s_exception #define __pyx_n_s_exception_break __pyx_mstate_global->__pyx_n_s_exception_break +#define __pyx_n_s_exception_breakpoint __pyx_mstate_global->__pyx_n_s_exception_breakpoint #define __pyx_n_s_exception_type __pyx_mstate_global->__pyx_n_s_exception_type #define __pyx_n_s_exclude_exception_by_filter __pyx_mstate_global->__pyx_n_s_exclude_exception_by_filter #define __pyx_n_s_exec __pyx_mstate_global->__pyx_n_s_exec #define __pyx_n_s_execfile __pyx_mstate_global->__pyx_n_s_execfile #define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit #define __pyx_n_s_expression __pyx_mstate_global->__pyx_n_s_expression +#define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f #define __pyx_n_s_f_back __pyx_mstate_global->__pyx_n_s_f_back #define __pyx_n_s_f_code __pyx_mstate_global->__pyx_n_s_f_code #define __pyx_n_s_f_globals __pyx_mstate_global->__pyx_n_s_f_globals @@ -4792,8 +5002,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_force_only_unhandled_tracer __pyx_mstate_global->__pyx_n_s_force_only_unhandled_tracer #define __pyx_n_s_frame __pyx_mstate_global->__pyx_n_s_frame #define __pyx_n_s_frame_cache_key __pyx_mstate_global->__pyx_n_s_frame_cache_key +#define __pyx_n_s_frame_id_to_frame __pyx_mstate_global->__pyx_n_s_frame_id_to_frame #define __pyx_n_s_frame_skips_cache __pyx_mstate_global->__pyx_n_s_frame_skips_cache #define __pyx_n_s_frame_trace_dispatch __pyx_mstate_global->__pyx_n_s_frame_trace_dispatch +#define __pyx_n_s_from_user_input __pyx_mstate_global->__pyx_n_s_from_user_input #define __pyx_n_s_func_name __pyx_mstate_global->__pyx_n_s_func_name #define __pyx_n_s_function_breakpoint_name_to_brea __pyx_mstate_global->__pyx_n_s_function_breakpoint_name_to_brea #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc @@ -4815,6 +5027,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_global_notify_skipped_step_in_l __pyx_mstate_global->__pyx_n_s_global_notify_skipped_step_in_l #define __pyx_n_s_handle_breakpoint_condition __pyx_mstate_global->__pyx_n_s_handle_breakpoint_condition #define __pyx_n_s_handle_breakpoint_expression __pyx_mstate_global->__pyx_n_s_handle_breakpoint_expression +#define __pyx_n_s_handle_exception __pyx_mstate_global->__pyx_n_s_handle_exception #define __pyx_n_s_handle_user_exception __pyx_mstate_global->__pyx_n_s_handle_user_exception #define __pyx_n_s_has_condition __pyx_mstate_global->__pyx_n_s_has_condition #define __pyx_n_s_has_plugin_exception_breaks __pyx_mstate_global->__pyx_n_s_has_plugin_exception_breaks @@ -4828,6 +5041,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_in_project_scope __pyx_mstate_global->__pyx_n_s_in_project_scope #define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info +#define __pyx_n_s_initial_trace_obj __pyx_mstate_global->__pyx_n_s_initial_trace_obj #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing #define __pyx_kp_s_invalid __pyx_mstate_global->__pyx_kp_s_invalid #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine @@ -4836,19 +5050,27 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_is_line_in_try_block __pyx_mstate_global->__pyx_n_s_is_line_in_try_block #define __pyx_n_s_is_logpoint __pyx_mstate_global->__pyx_n_s_is_logpoint #define __pyx_n_s_is_thread_alive __pyx_mstate_global->__pyx_n_s_is_thread_alive +#define __pyx_n_s_is_unhandled_exception __pyx_mstate_global->__pyx_n_s_is_unhandled_exception +#define __pyx_n_s_is_user_uncaught __pyx_mstate_global->__pyx_n_s_is_user_uncaught #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j #define __pyx_n_s_just_raised __pyx_mstate_global->__pyx_n_s_just_raised #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs #define __pyx_kp_s_lambda __pyx_mstate_global->__pyx_kp_s_lambda +#define __pyx_n_s_last_raise_line __pyx_mstate_global->__pyx_n_s_last_raise_line +#define __pyx_n_s_last_stat __pyx_mstate_global->__pyx_n_s_last_stat #define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line #define __pyx_n_s_linecache __pyx_mstate_global->__pyx_n_s_linecache +#define __pyx_n_s_lines __pyx_mstate_global->__pyx_n_s_lines +#define __pyx_n_s_lines_ignored __pyx_mstate_global->__pyx_n_s_lines_ignored #define __pyx_n_s_linesep __pyx_mstate_global->__pyx_n_s_linesep #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_main_2 __pyx_mstate_global->__pyx_n_s_main_2 #define __pyx_n_s_make_console_message __pyx_mstate_global->__pyx_n_s_make_console_message #define __pyx_n_s_make_io_message __pyx_mstate_global->__pyx_n_s_make_io_message #define __pyx_n_s_match __pyx_mstate_global->__pyx_n_s_match +#define __pyx_n_s_maybe_user_uncaught_exc_info __pyx_mstate_global->__pyx_n_s_maybe_user_uncaught_exc_info +#define __pyx_n_s_merged __pyx_mstate_global->__pyx_n_s_merged #define __pyx_n_s_method_object __pyx_mstate_global->__pyx_n_s_method_object #define __pyx_kp_s_module __pyx_mstate_global->__pyx_kp_s_module #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name @@ -4865,6 +5087,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle #define __pyx_n_s_plugin __pyx_mstate_global->__pyx_n_s_plugin #define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop +#define __pyx_n_s_prev_user_uncaught_exc_info __pyx_mstate_global->__pyx_n_s_prev_user_uncaught_exc_info #define __pyx_n_s_py_db __pyx_mstate_global->__pyx_n_s_py_db #define __pyx_kp_s_pyc __pyx_mstate_global->__pyx_kp_s_pyc #define __pyx_n_s_pydb_disposed __pyx_mstate_global->__pyx_n_s_pydb_disposed @@ -4906,6 +5129,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable #define __pyx_n_s_qname __pyx_mstate_global->__pyx_n_s_qname #define __pyx_n_s_quitting __pyx_mstate_global->__pyx_n_s_quitting +#define __pyx_n_s_raise_lines __pyx_mstate_global->__pyx_n_s_raise_lines #define __pyx_n_s_raise_lines_in_except __pyx_mstate_global->__pyx_n_s_raise_lines_in_except #define __pyx_n_s_re __pyx_mstate_global->__pyx_n_s_re #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce @@ -4913,6 +5137,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_remove_exception_from_frame __pyx_mstate_global->__pyx_n_s_remove_exception_from_frame #define __pyx_n_s_remove_return_values_flag __pyx_mstate_global->__pyx_n_s_remove_return_values_flag +#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result #define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret #define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return #define __pyx_n_s_return_line __pyx_mstate_global->__pyx_n_s_return_line @@ -4931,6 +5156,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_should_stop __pyx_mstate_global->__pyx_n_s_should_stop +#define __pyx_n_s_should_stop_on_exception __pyx_mstate_global->__pyx_n_s_should_stop_on_exception #define __pyx_n_s_should_trace_hook __pyx_mstate_global->__pyx_n_s_should_trace_hook #define __pyx_n_s_show_return_values __pyx_mstate_global->__pyx_n_s_show_return_values #define __pyx_n_s_skip_on_exceptions_thrown_in_sam __pyx_mstate_global->__pyx_n_s_skip_on_exceptions_thrown_in_sam @@ -4942,6 +5168,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop #define __pyx_n_s_stop_on_unhandled_exception __pyx_mstate_global->__pyx_n_s_stop_on_unhandled_exception +#define __pyx_n_s_stopped __pyx_mstate_global->__pyx_n_s_stopped #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_suspend __pyx_mstate_global->__pyx_n_s_suspend #define __pyx_n_s_suspend_other_threads __pyx_mstate_global->__pyx_n_s_suspend_other_threads @@ -4968,14 +5195,19 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_trace_dispatch __pyx_mstate_global->__pyx_n_s_trace_dispatch #define __pyx_n_s_trace_dispatch_and_unhandled_exc __pyx_mstate_global->__pyx_n_s_trace_dispatch_and_unhandled_exc #define __pyx_n_s_trace_exception __pyx_mstate_global->__pyx_n_s_trace_exception +#define __pyx_n_s_trace_obj __pyx_mstate_global->__pyx_n_s_trace_obj #define __pyx_n_s_trace_unhandled_exceptions __pyx_mstate_global->__pyx_n_s_trace_unhandled_exceptions #define __pyx_n_s_try_exc_info __pyx_mstate_global->__pyx_n_s_try_exc_info +#define __pyx_n_s_try_except_info __pyx_mstate_global->__pyx_n_s_try_except_info #define __pyx_n_s_try_except_infos __pyx_mstate_global->__pyx_n_s_try_except_infos #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate #define __pyx_kp_s_utf_8 __pyx_mstate_global->__pyx_kp_s_utf_8 +#define __pyx_n_s_valid_try_except_infos __pyx_mstate_global->__pyx_n_s_valid_try_except_infos +#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values #define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version +#define __pyx_n_s_was_just_raised __pyx_mstate_global->__pyx_n_s_was_just_raised #define __pyx_n_s_writer __pyx_mstate_global->__pyx_n_s_writer #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 @@ -5016,56 +5248,57 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 -#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 -#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 -#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24 -#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27 +#define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19 +#define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 +#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 +#define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 -#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 +#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32 -#define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35 +#define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33 +#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34 #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 -#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 -#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 -#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46 -#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48 -#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52 -#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54 -#define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56 +#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 +#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43 +#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45 +#define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49 +#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51 +#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53 +#define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55 +#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59 #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61 -#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69 -#define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19 -#define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21 -#define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23 -#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 -#define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 -#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 -#define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34 +#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63 +#define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68 +#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77 +#define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20 +#define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22 +#define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24 +#define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26 +#define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30 +#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39 -#define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41 -#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 +#define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40 +#define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 -#define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 +#define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 -#define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49 +#define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 -#define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 -#define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53 -#define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 +#define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 +#define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 +#define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57 #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 -#define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59 #define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60 #define __pyx_codeobj__62 __pyx_mstate_global->__pyx_codeobj__62 -#define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 #define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64 #define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65 #define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66 #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 -#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68 +#define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69 #define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70 #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71 #define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 @@ -5073,6 +5306,13 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 #define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75 #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 +#define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 +#define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79 +#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 +#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 +#define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 +#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83 +#define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 /* #### Code section: module_code ### */ /* "_pydevd_bundle/pydevd_cython.pyx":67 @@ -9405,7 +9645,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_set_additional_thread return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":177 +/* "_pydevd_bundle/pydevd_cython.pyx":178 * except ImportError: * * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< @@ -9447,7 +9687,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2get_smart_step_into_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_smart_step_into_variant_from_frame_offset", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":178 + /* "_pydevd_bundle/pydevd_cython.pyx":179 * * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): * return None # <<<<<<<<<<<<<< @@ -9458,7 +9698,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2get_smart_step_into_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":177 + /* "_pydevd_bundle/pydevd_cython.pyx":178 * except ImportError: * * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< @@ -9473,15 +9713,176 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2get_smart_step_into_ return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":213 +/* "_pydevd_bundle/pydevd_cython.pyx":214 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< * # ELSE * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): */ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception(PyObject *__pyx_v_container_obj, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, int __pyx_v_last_raise_line, PyObject *__pyx_v_raise_lines) { +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5is_unhandled_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_5is_unhandled_exception = {"is_unhandled_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_5is_unhandled_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5is_unhandled_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_container_obj = 0; + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_frame = 0; + int __pyx_v_last_raise_line; + PyObject *__pyx_v_raise_lines = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_unhandled_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_container_obj,&__pyx_n_s_py_db,&__pyx_n_s_frame,&__pyx_n_s_last_raise_line,&__pyx_n_s_raise_lines,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_container_obj)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 1); __PYX_ERR(0, 214, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 2); __PYX_ERR(0, 214, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_last_raise_line)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 3); __PYX_ERR(0, 214, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_raise_lines)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 4); __PYX_ERR(0, 214, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_unhandled_exception") < 0)) __PYX_ERR(0, 214, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + } + __pyx_v_container_obj = values[0]; + __pyx_v_py_db = values[1]; + __pyx_v_frame = values[2]; + __pyx_v_last_raise_line = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_last_raise_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_raise_lines = ((PyObject*)values[4]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.is_unhandled_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_raise_lines), (&PySet_Type), 1, "raise_lines", 1))) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_4is_unhandled_exception(__pyx_self, __pyx_v_container_obj, __pyx_v_py_db, __pyx_v_frame, __pyx_v_last_raise_line, __pyx_v_raise_lines); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4is_unhandled_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_container_obj, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, int __pyx_v_last_raise_line, PyObject *__pyx_v_raise_lines) { PyObject *__pyx_v_try_except_infos = NULL; PyObject *__pyx_v_valid_try_except_infos = NULL; PyObject *__pyx_v_try_except_info = NULL; @@ -9503,24 +9904,24 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_unhandled_exception", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":217 + /* "_pydevd_bundle/pydevd_cython.pyx":218 * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): * # ENDIF * if frame.f_lineno in raise_lines: # <<<<<<<<<<<<<< * return True * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_raise_lines == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 217, __pyx_L1_error) + __PYX_ERR(0, 218, __pyx_L1_error) } - __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_1, __pyx_v_raise_lines, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_1, __pyx_v_raise_lines, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":218 + /* "_pydevd_bundle/pydevd_cython.pyx":219 * # ENDIF * if frame.f_lineno in raise_lines: * return True # <<<<<<<<<<<<<< @@ -9532,7 +9933,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_r = Py_True; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":217 + /* "_pydevd_bundle/pydevd_cython.pyx":218 * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): * # ENDIF * if frame.f_lineno in raise_lines: # <<<<<<<<<<<<<< @@ -9541,7 +9942,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":221 + /* "_pydevd_bundle/pydevd_cython.pyx":222 * * else: * try_except_infos = container_obj.try_except_infos # <<<<<<<<<<<<<< @@ -9549,12 +9950,12 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container_obj, __pyx_n_s_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container_obj, __pyx_n_s_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_try_except_infos = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":222 + /* "_pydevd_bundle/pydevd_cython.pyx":223 * else: * try_except_infos = container_obj.try_except_infos * if try_except_infos is None: # <<<<<<<<<<<<<< @@ -9564,16 +9965,16 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_2 = (__pyx_v_try_except_infos == Py_None); if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":223 + /* "_pydevd_bundle/pydevd_cython.pyx":224 * try_except_infos = container_obj.try_except_infos * if try_except_infos is None: * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) # <<<<<<<<<<<<<< * * if not try_except_infos: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_collect_try_except_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_collect_try_except_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -9594,16 +9995,16 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_container_obj, __pyx_n_s_try_except_infos, __pyx_t_1) < 0) __PYX_ERR(0, 223, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_container_obj, __pyx_n_s_try_except_infos, __pyx_t_1) < 0) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_try_except_infos, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":222 + /* "_pydevd_bundle/pydevd_cython.pyx":223 * else: * try_except_infos = container_obj.try_except_infos * if try_except_infos is None: # <<<<<<<<<<<<<< @@ -9612,18 +10013,18 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":225 + /* "_pydevd_bundle/pydevd_cython.pyx":226 * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) * * if not try_except_infos: # <<<<<<<<<<<<<< * # Consider the last exception as unhandled because there's no try..except in it. * return True */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_try_except_infos); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_try_except_infos); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 226, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_2); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":227 + /* "_pydevd_bundle/pydevd_cython.pyx":228 * if not try_except_infos: * # Consider the last exception as unhandled because there's no try..except in it. * return True # <<<<<<<<<<<<<< @@ -9635,7 +10036,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_r = Py_True; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":225 + /* "_pydevd_bundle/pydevd_cython.pyx":226 * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) * * if not try_except_infos: # <<<<<<<<<<<<<< @@ -9644,7 +10045,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":230 + /* "_pydevd_bundle/pydevd_cython.pyx":231 * else: * # Now, consider only the try..except for the raise * valid_try_except_infos = [] # <<<<<<<<<<<<<< @@ -9652,12 +10053,12 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception * if try_except_info.is_line_in_try_block(last_raise_line): */ /*else*/ { - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_valid_try_except_infos = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":231 + /* "_pydevd_bundle/pydevd_cython.pyx":232 * # Now, consider only the try..except for the raise * valid_try_except_infos = [] * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< @@ -9669,9 +10070,9 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 232, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { @@ -9679,28 +10080,28 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 232, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 232, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -9710,7 +10111,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 231, __pyx_L1_error) + else __PYX_ERR(0, 232, __pyx_L1_error) } break; } @@ -9719,16 +10120,16 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __Pyx_XDECREF_SET(__pyx_v_try_except_info, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":232 + /* "_pydevd_bundle/pydevd_cython.pyx":233 * valid_try_except_infos = [] * for try_except_info in try_except_infos: * if try_except_info.is_line_in_try_block(last_raise_line): # <<<<<<<<<<<<<< * valid_try_except_infos.append(try_except_info) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_is_line_in_try_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_is_line_in_try_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_last_raise_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_last_raise_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; __pyx_t_6 = 0; @@ -9749,24 +10150,24 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":233 + /* "_pydevd_bundle/pydevd_cython.pyx":234 * for try_except_info in try_except_infos: * if try_except_info.is_line_in_try_block(last_raise_line): * valid_try_except_infos.append(try_except_info) # <<<<<<<<<<<<<< * * if not valid_try_except_infos: */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_valid_try_except_infos, __pyx_v_try_except_info); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_valid_try_except_infos, __pyx_v_try_except_info); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 234, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":232 + /* "_pydevd_bundle/pydevd_cython.pyx":233 * valid_try_except_infos = [] * for try_except_info in try_except_infos: * if try_except_info.is_line_in_try_block(last_raise_line): # <<<<<<<<<<<<<< @@ -9775,7 +10176,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":231 + /* "_pydevd_bundle/pydevd_cython.pyx":232 * # Now, consider only the try..except for the raise * valid_try_except_infos = [] * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< @@ -9785,7 +10186,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":235 + /* "_pydevd_bundle/pydevd_cython.pyx":236 * valid_try_except_infos.append(try_except_info) * * if not valid_try_except_infos: # <<<<<<<<<<<<<< @@ -9796,7 +10197,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_2 = (!__pyx_t_7); if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":236 + /* "_pydevd_bundle/pydevd_cython.pyx":237 * * if not valid_try_except_infos: * return True # <<<<<<<<<<<<<< @@ -9808,7 +10209,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_r = Py_True; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":235 + /* "_pydevd_bundle/pydevd_cython.pyx":236 * valid_try_except_infos.append(try_except_info) * * if not valid_try_except_infos: # <<<<<<<<<<<<<< @@ -9817,7 +10218,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":243 + /* "_pydevd_bundle/pydevd_cython.pyx":244 * # where one try..except is inside the other with only a raise * # and it's gotten in the except line. * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< @@ -9830,9 +10231,9 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 244, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { @@ -9840,28 +10241,28 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -9871,7 +10272,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 243, __pyx_L1_error) + else __PYX_ERR(0, 244, __pyx_L1_error) } break; } @@ -9880,16 +10281,16 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __Pyx_XDECREF_SET(__pyx_v_try_except_info, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":244 + /* "_pydevd_bundle/pydevd_cython.pyx":245 * # and it's gotten in the except line. * for try_except_info in try_except_infos: * if try_except_info.is_line_in_except_block(frame.f_lineno): # <<<<<<<<<<<<<< * if ( * frame.f_lineno == try_except_info.except_line or */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_is_line_in_except_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_is_line_in_except_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; __pyx_t_6 = 0; @@ -9910,29 +10311,29 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":246 + /* "_pydevd_bundle/pydevd_cython.pyx":247 * if try_except_info.is_line_in_except_block(frame.f_lineno): * if ( * frame.f_lineno == try_except_info.except_line or # <<<<<<<<<<<<<< * frame.f_lineno in try_except_info.raise_lines_in_except * ): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_except_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_except_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_7) { } else { @@ -9940,24 +10341,24 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception goto __pyx_L15_bool_binop_done; } - /* "_pydevd_bundle/pydevd_cython.pyx":247 + /* "_pydevd_bundle/pydevd_cython.pyx":248 * if ( * frame.f_lineno == try_except_info.except_line or * frame.f_lineno in try_except_info.raise_lines_in_except # <<<<<<<<<<<<<< * ): * # In a raise inside a try..except block or some except which doesn't */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_raise_lines_in_except); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_raise_lines_in_except); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_7; __pyx_L15_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":245 + /* "_pydevd_bundle/pydevd_cython.pyx":246 * for try_except_info in try_except_infos: * if try_except_info.is_line_in_except_block(frame.f_lineno): * if ( # <<<<<<<<<<<<<< @@ -9966,7 +10367,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":251 + /* "_pydevd_bundle/pydevd_cython.pyx":252 * # In a raise inside a try..except block or some except which doesn't * # match the raised exception. * return True # <<<<<<<<<<<<<< @@ -9979,7 +10380,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":245 + /* "_pydevd_bundle/pydevd_cython.pyx":246 * for try_except_info in try_except_infos: * if try_except_info.is_line_in_except_block(frame.f_lineno): * if ( # <<<<<<<<<<<<<< @@ -9988,7 +10389,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":244 + /* "_pydevd_bundle/pydevd_cython.pyx":245 * # and it's gotten in the except line. * for try_except_info in try_except_infos: * if try_except_info.is_line_in_except_block(frame.f_lineno): # <<<<<<<<<<<<<< @@ -9997,7 +10398,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":243 + /* "_pydevd_bundle/pydevd_cython.pyx":244 * # where one try..except is inside the other with only a raise * # and it's gotten in the except line. * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< @@ -10010,7 +10411,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception } } - /* "_pydevd_bundle/pydevd_cython.pyx":252 + /* "_pydevd_bundle/pydevd_cython.pyx":253 * # match the raised exception. * return True * return False # <<<<<<<<<<<<<< @@ -10022,10 +10423,10 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __pyx_r = Py_False; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":213 + /* "_pydevd_bundle/pydevd_cython.pyx":214 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< * # ELSE * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): */ @@ -10038,7 +10439,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.is_unhandled_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_try_except_infos); __Pyx_XDECREF(__pyx_v_valid_try_except_infos); @@ -10048,7 +10449,7 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":258 +/* "_pydevd_bundle/pydevd_cython.pyx":259 * cdef class _TryExceptContainerObj: * cdef public list try_except_infos; * def __init__(self): # <<<<<<<<<<<<<< @@ -10085,7 +10486,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj___ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":259 + /* "_pydevd_bundle/pydevd_cython.pyx":260 * cdef public list try_except_infos; * def __init__(self): * self.try_except_infos = None # <<<<<<<<<<<<<< @@ -10098,7 +10499,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj___ __Pyx_DECREF(__pyx_v_self->try_except_infos); __pyx_v_self->try_except_infos = ((PyObject*)Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":258 + /* "_pydevd_bundle/pydevd_cython.pyx":259 * cdef class _TryExceptContainerObj: * cdef public list try_except_infos; * def __init__(self): # <<<<<<<<<<<<<< @@ -10112,7 +10513,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj___ return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":257 +/* "_pydevd_bundle/pydevd_cython.pyx":258 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class _TryExceptContainerObj: * cdef public list try_except_infos; # <<<<<<<<<<<<<< @@ -10174,7 +10575,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 257, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 258, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -10627,7 +11028,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainer return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":294 +/* "_pydevd_bundle/pydevd_cython.pyx":288 * cdef int should_skip * cdef object exc_info * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -10671,12 +11072,12 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__(PyObje (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 288, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 294, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 288, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -10687,7 +11088,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__(PyObje } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 294, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 288, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10701,7 +11102,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__(PyObje __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 294, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 288, __pyx_L1_error) __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_args); /* function exit code */ @@ -10724,7 +11125,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":295 + /* "_pydevd_bundle/pydevd_cython.pyx":289 * cdef object exc_info * def __init__(self, tuple args): * self._args = args # In the cython version we don't need to pass the frame # <<<<<<<<<<<<<< @@ -10737,7 +11138,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(struct __Pyx_DECREF(__pyx_v_self->_args); __pyx_v_self->_args = __pyx_v_args; - /* "_pydevd_bundle/pydevd_cython.pyx":296 + /* "_pydevd_bundle/pydevd_cython.pyx":290 * def __init__(self, tuple args): * self._args = args # In the cython version we don't need to pass the frame * self.should_skip = -1 # On cythonized version, put in instance. # <<<<<<<<<<<<<< @@ -10746,7 +11147,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(struct */ __pyx_v_self->should_skip = -1; - /* "_pydevd_bundle/pydevd_cython.pyx":297 + /* "_pydevd_bundle/pydevd_cython.pyx":291 * self._args = args # In the cython version we don't need to pass the frame * self.should_skip = -1 # On cythonized version, put in instance. * self.exc_info = () # <<<<<<<<<<<<<< @@ -10759,7 +11160,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(struct __Pyx_DECREF(__pyx_v_self->exc_info); __pyx_v_self->exc_info = __pyx_empty_tuple; - /* "_pydevd_bundle/pydevd_cython.pyx":294 + /* "_pydevd_bundle/pydevd_cython.pyx":288 * cdef int should_skip * cdef object exc_info * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -10773,7 +11174,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(struct return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":308 +/* "_pydevd_bundle/pydevd_cython.pyx":309 * # ENDIF * * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -10830,7 +11231,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_2set_suspe int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_suspend", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":309 + /* "_pydevd_bundle/pydevd_cython.pyx":310 * * def set_suspend(self, *args, **kwargs): * self._args[0].set_suspend(*args, **kwargs) # <<<<<<<<<<<<<< @@ -10839,22 +11240,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_2set_suspe */ if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 309, __pyx_L1_error) + __PYX_ERR(0, 310, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":308 + /* "_pydevd_bundle/pydevd_cython.pyx":309 * # ENDIF * * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -10877,7 +11278,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_2set_suspe return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":311 +/* "_pydevd_bundle/pydevd_cython.pyx":312 * self._args[0].set_suspend(*args, **kwargs) * * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -10934,7 +11335,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_4do_wait_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("do_wait_suspend", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":312 + /* "_pydevd_bundle/pydevd_cython.pyx":313 * * def do_wait_suspend(self, *args, **kwargs): * self._args[0].do_wait_suspend(*args, **kwargs) # <<<<<<<<<<<<<< @@ -10943,22 +11344,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_4do_wait_s */ if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 312, __pyx_L1_error) + __PYX_ERR(0, 313, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":311 + /* "_pydevd_bundle/pydevd_cython.pyx":312 * self._args[0].set_suspend(*args, **kwargs) * * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -10981,7 +11382,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_4do_wait_s return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":315 +/* "_pydevd_bundle/pydevd_cython.pyx":316 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< @@ -11048,7 +11449,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -11056,9 +11457,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, 1); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, 1); __PYX_ERR(0, 316, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -11066,14 +11467,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, 2); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, 2); __PYX_ERR(0, 316, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_exception") < 0)) __PYX_ERR(0, 315, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_exception") < 0)) __PYX_ERR(0, 316, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -11088,7 +11489,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 315, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 316, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11102,7 +11503,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 315, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 316, __pyx_L1_error) __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exception(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); /* function exit code */ @@ -11134,196 +11535,299 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *(*__pyx_t_6)(PyObject *); - int __pyx_t_7; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; int __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace_exception", 0); __Pyx_INCREF(__pyx_v_frame); - /* "_pydevd_bundle/pydevd_cython.pyx":321 + /* "_pydevd_bundle/pydevd_cython.pyx":322 * # def trace_exception(self, frame, event, arg): * # ENDIF * if event == 'exception': # <<<<<<<<<<<<<< - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":322 + /* "_pydevd_bundle/pydevd_cython.pyx":323 * # ENDIF * if event == 'exception': - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) # <<<<<<<<<<<<<< + * self.exc_info = exc_info * - * if should_stop: */ - __pyx_t_2 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_should_stop_on_exception(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 323, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 323, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 323, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_v_frame, __pyx_t_6, __pyx_v_arg, __pyx_v_self->exc_info}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 6+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); - __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + __pyx_t_5 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); - index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 322, __pyx_L1_error) - __pyx_t_6 = NULL; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 2; __pyx_t_5 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < 0) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) __pyx_L5_unpacking_done:; } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_v_should_stop = __pyx_t_1; - __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_v_exc_info = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":324 - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) + * if event == 'exception': + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info # <<<<<<<<<<<<<< + * + * if should_stop: + */ + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_GIVEREF(__pyx_v_exc_info); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_v_exc_info; + + /* "_pydevd_bundle/pydevd_cython.pyx":326 + * self.exc_info = exc_info * * if should_stop: # <<<<<<<<<<<<<< - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): * return self.trace_dispatch */ if (__pyx_v_should_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":325 + /* "_pydevd_bundle/pydevd_cython.pyx":327 * * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< * return self.trace_dispatch * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 325, __pyx_L1_error) - __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_handle_exception(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg, ((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 327, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 327, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_7, __pyx_t_6, __pyx_t_3, __pyx_v_frame, __pyx_v_arg, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 5+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 325, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":326 + /* "_pydevd_bundle/pydevd_cython.pyx":328 * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): * return self.trace_dispatch # <<<<<<<<<<<<<< * * elif event == 'return': */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":325 + /* "_pydevd_bundle/pydevd_cython.pyx":327 * * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< * return self.trace_dispatch * */ } - /* "_pydevd_bundle/pydevd_cython.pyx":324 - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) + /* "_pydevd_bundle/pydevd_cython.pyx":326 + * self.exc_info = exc_info * * if should_stop: # <<<<<<<<<<<<<< - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): * return self.trace_dispatch */ } - /* "_pydevd_bundle/pydevd_cython.pyx":321 + /* "_pydevd_bundle/pydevd_cython.pyx":322 * # def trace_exception(self, frame, event, arg): * # ENDIF * if event == 'exception': # <<<<<<<<<<<<<< - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info */ goto __pyx_L3; } - /* "_pydevd_bundle/pydevd_cython.pyx":328 + /* "_pydevd_bundle/pydevd_cython.pyx":330 * return self.trace_dispatch * * elif event == 'return': # <<<<<<<<<<<<<< * exc_info = self.exc_info * if exc_info and arg is None: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 330, __pyx_L1_error) if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":329 + /* "_pydevd_bundle/pydevd_cython.pyx":331 * * elif event == 'return': * exc_info = self.exc_info # <<<<<<<<<<<<<< * if exc_info and arg is None: * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] */ - if (!(likely(PyTuple_CheckExact(__pyx_v_self->exc_info))||((__pyx_v_self->exc_info) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_self->exc_info))) __PYX_ERR(0, 329, __pyx_L1_error) - __pyx_t_4 = __pyx_v_self->exc_info; - __Pyx_INCREF(__pyx_t_4); - __pyx_v_exc_info = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_v_self->exc_info))||((__pyx_v_self->exc_info) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_self->exc_info))) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_2 = __pyx_v_self->exc_info; + __Pyx_INCREF(__pyx_t_2); + __pyx_v_exc_info = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":330 + /* "_pydevd_bundle/pydevd_cython.pyx":332 * elif event == 'return': * exc_info = self.exc_info * if exc_info and arg is None: # <<<<<<<<<<<<<< * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] * custom_key = (frame_cache_key, 'try_exc_info') */ - __pyx_t_7 = (__pyx_v_exc_info != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_exc_info) != 0); - if (__pyx_t_7) { + __pyx_t_10 = (__pyx_v_exc_info != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_exc_info) != 0); + if (__pyx_t_10) { } else { - __pyx_t_1 = __pyx_t_7; + __pyx_t_1 = __pyx_t_10; goto __pyx_L9_bool_binop_done; } - __pyx_t_7 = (__pyx_v_arg == Py_None); - __pyx_t_1 = __pyx_t_7; + __pyx_t_10 = (__pyx_v_arg == Py_None); + __pyx_t_1 = __pyx_t_10; __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":331 + /* "_pydevd_bundle/pydevd_cython.pyx":333 * exc_info = self.exc_info * if exc_info and arg is None: * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] # <<<<<<<<<<<<<< @@ -11332,74 +11836,74 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc */ if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 331, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 331, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_frame_skips_cache = __pyx_t_4; - __pyx_t_4 = 0; - __pyx_v_frame_cache_key = __pyx_t_2; + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_frame_skips_cache = __pyx_t_2; __pyx_t_2 = 0; + __pyx_v_frame_cache_key = __pyx_t_5; + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":332 + /* "_pydevd_bundle/pydevd_cython.pyx":334 * if exc_info and arg is None: * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] * custom_key = (frame_cache_key, 'try_exc_info') # <<<<<<<<<<<<<< * container_obj = frame_skips_cache.get(custom_key) * if container_obj is None: */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_frame_cache_key); __Pyx_GIVEREF(__pyx_v_frame_cache_key); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 332, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 334, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_try_exc_info); __Pyx_GIVEREF(__pyx_n_s_try_exc_info); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_try_exc_info)) __PYX_ERR(0, 332, __pyx_L1_error); - __pyx_v_custom_key = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_try_exc_info)) __PYX_ERR(0, 334, __pyx_L1_error); + __pyx_v_custom_key = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":333 + /* "_pydevd_bundle/pydevd_cython.pyx":335 * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] * custom_key = (frame_cache_key, 'try_exc_info') * container_obj = frame_skips_cache.get(custom_key) # <<<<<<<<<<<<<< * if container_obj is None: * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame_skips_cache, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = NULL; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame_skips_cache, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_custom_key}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_custom_key}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_v_container_obj = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_container_obj = __pyx_t_5; + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":334 + /* "_pydevd_bundle/pydevd_cython.pyx":336 * custom_key = (frame_cache_key, 'try_exc_info') * container_obj = frame_skips_cache.get(custom_key) * if container_obj is None: # <<<<<<<<<<<<<< @@ -11409,21 +11913,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc __pyx_t_1 = (__pyx_v_container_obj == Py_None); if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":335 + /* "_pydevd_bundle/pydevd_cython.pyx":337 * container_obj = frame_skips_cache.get(custom_key) * if container_obj is None: * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() # <<<<<<<<<<<<<< * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and \ * self.handle_user_exception(frame): */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __Pyx_DECREF_SET(__pyx_v_container_obj, __pyx_t_2); - if (unlikely((PyObject_SetItem(__pyx_v_frame_skips_cache, __pyx_v_custom_key, __pyx_t_2) < 0))) __PYX_ERR(0, 335, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_container_obj, __pyx_t_5); + if (unlikely((PyObject_SetItem(__pyx_v_frame_skips_cache, __pyx_v_custom_key, __pyx_t_5) < 0))) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":334 + /* "_pydevd_bundle/pydevd_cython.pyx":336 * custom_key = (frame_cache_key, 'try_exc_info') * container_obj = frame_skips_cache.get(custom_key) * if container_obj is None: # <<<<<<<<<<<<<< @@ -11432,83 +11936,103 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc */ } - /* "_pydevd_bundle/pydevd_cython.pyx":336 + /* "_pydevd_bundle/pydevd_cython.pyx":338 * if container_obj is None: * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and \ # <<<<<<<<<<<<<< * self.handle_user_exception(frame): * return self.trace_dispatch */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_unhandled_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 336, __pyx_L1_error) + __PYX_ERR(0, 338, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_exc_info == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 336, __pyx_L1_error) + __PYX_ERR(0, 338, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_exc_info == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 336, __pyx_L1_error) + __PYX_ERR(0, 338, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (!(likely(PySet_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_4))) __PYX_ERR(0, 336, __pyx_L1_error) - __pyx_t_3 = __pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception(__pyx_v_container_obj, __pyx_t_2, __pyx_v_frame, __pyx_t_8, ((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_7) { + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_7, __pyx_v_container_obj, __pyx_t_4, __pyx_v_frame, __pyx_t_3, __pyx_t_6}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 5+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_10) { } else { - __pyx_t_1 = __pyx_t_7; + __pyx_t_1 = __pyx_t_10; goto __pyx_L13_bool_binop_done; } - /* "_pydevd_bundle/pydevd_cython.pyx":337 + /* "_pydevd_bundle/pydevd_cython.pyx":339 * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and \ * self.handle_user_exception(frame): # <<<<<<<<<<<<<< * return self.trace_dispatch * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = NULL; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_frame}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 337, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __pyx_t_7; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_10; __pyx_L13_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":336 + /* "_pydevd_bundle/pydevd_cython.pyx":338 * if container_obj is None: * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and \ # <<<<<<<<<<<<<< @@ -11517,7 +12041,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc */ if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":338 + /* "_pydevd_bundle/pydevd_cython.pyx":340 * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and \ * self.handle_user_exception(frame): * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -11525,13 +12049,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc * return self.trace_exception */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":336 + /* "_pydevd_bundle/pydevd_cython.pyx":338 * if container_obj is None: * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and \ # <<<<<<<<<<<<<< @@ -11540,7 +12064,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc */ } - /* "_pydevd_bundle/pydevd_cython.pyx":330 + /* "_pydevd_bundle/pydevd_cython.pyx":332 * elif event == 'return': * exc_info = self.exc_info * if exc_info and arg is None: # <<<<<<<<<<<<<< @@ -11549,7 +12073,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc */ } - /* "_pydevd_bundle/pydevd_cython.pyx":328 + /* "_pydevd_bundle/pydevd_cython.pyx":330 * return self.trace_dispatch * * elif event == 'return': # <<<<<<<<<<<<<< @@ -11559,21 +12083,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc } __pyx_L3:; - /* "_pydevd_bundle/pydevd_cython.pyx":340 + /* "_pydevd_bundle/pydevd_cython.pyx":342 * return self.trace_dispatch * * return self.trace_exception # <<<<<<<<<<<<<< * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_user_exception(self, frame): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":315 + /* "_pydevd_bundle/pydevd_cython.pyx":316 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< @@ -11587,6 +12111,8 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11601,6643 +12127,5889 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":343 +/* "_pydevd_bundle/pydevd_cython.pyx":344 + * return self.trace_exception * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _should_stop_on_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< - * cdef PyDBAdditionalThreadInfo info; - * cdef bint should_stop; + * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info: */ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__should_stop_on_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, CYTHON_UNUSED PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; - int __pyx_v_should_stop; - int __pyx_v_was_just_raised; - PyObject *__pyx_v_check_excs = 0; - PyObject *__pyx_v_main_debugger = NULL; - PyObject *__pyx_v_exception = NULL; - PyObject *__pyx_v_value = NULL; - PyObject *__pyx_v_trace = NULL; - PyObject *__pyx_v_exception_breakpoint = NULL; - PyObject *__pyx_v_result = NULL; - PyObject *__pyx_v_exc_break_user = NULL; - PyObject *__pyx_v_exc_break_caught = NULL; - PyObject *__pyx_v_exc_break = NULL; - PyObject *__pyx_v_is_user_uncaught = NULL; - PyObject *__pyx_v_exc_info = NULL; - PyObject *__pyx_v_lines = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception = {"handle_user_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_user_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_user_exception") < 0)) __PYX_ERR(0, 344, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_frame = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_user_exception", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 344, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_user_exception(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_user_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_exc_info = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *(*__pyx_t_6)(PyObject *); - int __pyx_t_7; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - Py_ssize_t __pyx_t_15; - int __pyx_t_16; - PyObject *__pyx_t_17 = NULL; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_should_stop_on_exception", 0); - __Pyx_INCREF(__pyx_v_frame); - - /* "_pydevd_bundle/pydevd_cython.pyx":353 - * - * # main_debugger, _filename, info, _thread = self._args - * main_debugger = self._args[0] # <<<<<<<<<<<<<< - * info = self._args[2] - * should_stop = False - */ - if (unlikely(__pyx_v_self->_args == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 353, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_main_debugger = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_RefNannySetupContext("handle_user_exception", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":354 - * # main_debugger, _filename, info, _thread = self._args - * main_debugger = self._args[0] - * info = self._args[2] # <<<<<<<<<<<<<< - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":345 * + * def handle_user_exception(self, frame): + * exc_info = self.exc_info # <<<<<<<<<<<<<< + * if exc_info: + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) */ - if (unlikely(__pyx_v_self->_args == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 354, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 354, __pyx_L1_error) - __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_1); + __pyx_t_1 = __pyx_v_self->exc_info; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_exc_info = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":355 - * main_debugger = self._args[0] - * info = self._args[2] - * should_stop = False # <<<<<<<<<<<<<< - * - * # 2 = 2 - */ - __pyx_v_should_stop = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":358 - * - * # 2 = 2 - * if info.pydev_state != 2: # and breakpoint is not None: # <<<<<<<<<<<<<< - * exception, value, trace = arg - * + /* "_pydevd_bundle/pydevd_cython.pyx":346 + * def handle_user_exception(self, frame): + * exc_info = self.exc_info + * if exc_info: # <<<<<<<<<<<<<< + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * return False */ - __pyx_t_2 = (__pyx_v_info->pydev_state != 2); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_exc_info); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":359 - * # 2 = 2 - * if info.pydev_state != 2: # and breakpoint is not None: - * exception, value, trace = arg # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":347 + * exc_info = self.exc_info + * if exc_info: + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) # <<<<<<<<<<<<<< + * return False * - * if trace is not None and hasattr(trace, 'tb_next'): */ - if ((likely(PyTuple_CheckExact(__pyx_v_arg))) || (PyList_CheckExact(__pyx_v_arg))) { - PyObject* sequence = __pyx_v_arg; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 3)) { - if (size > 3) __Pyx_RaiseTooManyValuesError(3); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 359, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); - } else { - __pyx_t_1 = PyList_GET_ITEM(sequence, 0); - __pyx_t_3 = PyList_GET_ITEM(sequence, 1); - __pyx_t_4 = PyList_GET_ITEM(sequence, 2); + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 347, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 347, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_9 = 1; } - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_v_arg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); - index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; - __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; - __Pyx_GOTREF(__pyx_t_3); - index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 359, __pyx_L1_error) - __pyx_t_6 = NULL; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L5_unpacking_done; - __pyx_L4_unpacking_failed:; + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_v_frame, __pyx_t_6, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 5+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 359, __pyx_L1_error) - __pyx_L5_unpacking_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_v_exception = __pyx_t_1; + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - __pyx_v_value = __pyx_t_3; - __pyx_t_3 = 0; - __pyx_v_trace = __pyx_t_4; - __pyx_t_4 = 0; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":361 - * exception, value, trace = arg - * - * if trace is not None and hasattr(trace, 'tb_next'): # <<<<<<<<<<<<<< - * # on jython trace is None on the first event and it may not have a tb_next. - * + /* "_pydevd_bundle/pydevd_cython.pyx":346 + * def handle_user_exception(self, frame): + * exc_info = self.exc_info + * if exc_info: # <<<<<<<<<<<<<< + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * return False */ - __pyx_t_7 = (__pyx_v_trace != Py_None); - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L7_bool_binop_done; - } - __pyx_t_7 = __Pyx_HasAttr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) - __pyx_t_2 = __pyx_t_7; - __pyx_L7_bool_binop_done:; - if (__pyx_t_2) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":364 - * # on jython trace is None on the first event and it may not have a tb_next. + /* "_pydevd_bundle/pydevd_cython.pyx":348 + * if exc_info: + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * return False # <<<<<<<<<<<<<< * - * should_stop = False # <<<<<<<<<<<<<< - * exception_breakpoint = None - * try: + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_v_should_stop = 0; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":365 + /* "_pydevd_bundle/pydevd_cython.pyx":344 + * return self.trace_exception * - * should_stop = False - * exception_breakpoint = None # <<<<<<<<<<<<<< - * try: - * if main_debugger.plugin is not None: + * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info: */ - __Pyx_INCREF(Py_None); - __pyx_v_exception_breakpoint = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":366 - * should_stop = False - * exception_breakpoint = None - * try: # <<<<<<<<<<<<<< - * if main_debugger.plugin is not None: - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "_pydevd_bundle/pydevd_cython.pyx":367 - * exception_breakpoint = None - * try: - * if main_debugger.plugin is not None: # <<<<<<<<<<<<<< - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - * if result: +/* "_pydevd_bundle/pydevd_cython.pyx":351 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef get_func_name(self, frame): # <<<<<<<<<<<<<< + * cdef str func_name + * # ELSE */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__pyx_t_4 != Py_None); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":368 - * try: - * if main_debugger.plugin is not None: - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) # <<<<<<<<<<<<<< - * if result: - * should_stop, frame = result +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_func_name = 0; + PyObject *__pyx_v_code_obj = NULL; + PyObject *__pyx_v_cls_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_func_name", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":356 + * # def get_func_name(self, frame): + * # ENDIF + * code_obj = frame.f_code # <<<<<<<<<<<<<< + * func_name = code_obj.co_name + * try: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exception_break); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_main_debugger, ((PyObject *)__pyx_v_self), __pyx_v_frame, __pyx_v_self->_args, __pyx_v_arg}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 5+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_v_result = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_code_obj = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":369 - * if main_debugger.plugin is not None: - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - * if result: # <<<<<<<<<<<<<< - * should_stop, frame = result - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":357 + * # ENDIF + * code_obj = frame.f_code + * func_name = code_obj.co_name # <<<<<<<<<<<<<< + * try: + * cls_name = get_clsname_for_code(code_obj, frame) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 369, __pyx_L9_error) - if (__pyx_t_2) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_obj, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_v_func_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":370 - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - * if result: - * should_stop, frame = result # <<<<<<<<<<<<<< - * except: - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":358 + * code_obj = frame.f_code + * func_name = code_obj.co_name + * try: # <<<<<<<<<<<<<< + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: */ - if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { - PyObject* sequence = __pyx_v_result; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 370, __pyx_L9_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_4 = PyList_GET_ITEM(sequence, 0); - __pyx_t_1 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_1); - #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } else { - Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); - index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed; - __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 370, __pyx_L9_error) - __pyx_t_6 = NULL; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L18_unpacking_done; - __pyx_L17_unpacking_failed:; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 370, __pyx_L9_error) - __pyx_L18_unpacking_done:; - } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 370, __pyx_L9_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_should_stop = __pyx_t_2; - __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_1); - __pyx_t_1 = 0; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":369 - * if main_debugger.plugin is not None: - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - * if result: # <<<<<<<<<<<<<< - * should_stop, frame = result - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":359 + * func_name = code_obj.co_name + * try: + * cls_name = get_clsname_for_code(code_obj, frame) # <<<<<<<<<<<<<< + * if cls_name is not None: + * return "%s.%s" % (cls_name, func_name) */ - } + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_code_obj, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_v_cls_name = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":367 - * exception_breakpoint = None - * try: - * if main_debugger.plugin is not None: # <<<<<<<<<<<<<< - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - * if result: + /* "_pydevd_bundle/pydevd_cython.pyx":360 + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: # <<<<<<<<<<<<<< + * return "%s.%s" % (cls_name, func_name) + * else: */ - } + __pyx_t_8 = (__pyx_v_cls_name != Py_None); + if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":366 - * should_stop = False - * exception_breakpoint = None - * try: # <<<<<<<<<<<<<< - * if main_debugger.plugin is not None: - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) + /* "_pydevd_bundle/pydevd_cython.pyx":361 + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: + * return "%s.%s" % (cls_name, func_name) # <<<<<<<<<<<<<< + * else: + * return func_name */ - } - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L14_try_end; - __pyx_L9_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cls_name); + __Pyx_GIVEREF(__pyx_v_cls_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cls_name)) __PYX_ERR(0, 361, __pyx_L3_error); + __Pyx_INCREF(__pyx_v_func_name); + __Pyx_GIVEREF(__pyx_v_func_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_func_name)) __PYX_ERR(0, 361, __pyx_L3_error); + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":371 - * if result: - * should_stop, frame = result - * except: # <<<<<<<<<<<<<< - * pydev_log.exception() - * + /* "_pydevd_bundle/pydevd_cython.pyx":360 + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: # <<<<<<<<<<<<<< + * return "%s.%s" % (cls_name, func_name) + * else: */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 371, __pyx_L11_except_error) - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_3); + } - /* "_pydevd_bundle/pydevd_cython.pyx":372 - * should_stop, frame = result - * except: - * pydev_log.exception() # <<<<<<<<<<<<<< - * - * if not should_stop: + /* "_pydevd_bundle/pydevd_cython.pyx":363 + * return "%s.%s" % (cls_name, func_name) + * else: + * return func_name # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() */ - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 372, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 372, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_13))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_13, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L10_exception_handled; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":366 - * should_stop = False - * exception_breakpoint = None - * try: # <<<<<<<<<<<<<< - * if main_debugger.plugin is not None: - * result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - */ - __pyx_L11_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L1_error; - __pyx_L10_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - __pyx_L14_try_end:; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_func_name); + __pyx_r = __pyx_v_func_name; + goto __pyx_L7_try_return; } - /* "_pydevd_bundle/pydevd_cython.pyx":374 - * pydev_log.exception() - * - * if not should_stop: # <<<<<<<<<<<<<< - * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). - * if exception == SystemExit and main_debugger.ignore_system_exit_code(value): + /* "_pydevd_bundle/pydevd_cython.pyx":358 + * code_obj = frame.f_code + * func_name = code_obj.co_name + * try: # <<<<<<<<<<<<<< + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: */ - __pyx_t_2 = (!__pyx_v_should_stop); - if (__pyx_t_2) { + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":376 - * if not should_stop: - * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). - * if exception == SystemExit and main_debugger.ignore_system_exit_code(value): # <<<<<<<<<<<<<< - * pass - * + /* "_pydevd_bundle/pydevd_cython.pyx":364 + * else: + * return func_name + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * return func_name */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_exception, __pyx_builtin_SystemExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 376, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L23_bool_binop_done; - } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_ignore_system_exit_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 376, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __pyx_t_7; - __pyx_L23_bool_binop_done:; - if (__pyx_t_2) { - goto __pyx_L22; - } + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 364, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_6); - /* "_pydevd_bundle/pydevd_cython.pyx":379 - * pass + /* "_pydevd_bundle/pydevd_cython.pyx":365 + * return func_name + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * return func_name * - * elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): # <<<<<<<<<<<<<< - * # These exceptions are control-flow related (they work as a generator - * # pause), so, we shouldn't stop on them. */ - __Pyx_INCREF(__pyx_v_exception); - __pyx_t_3 = __pyx_v_exception; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_GeneratorExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L25_bool_binop_done; - } - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_StopIteration, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L25_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_StopAsyncIteration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __pyx_t_7; - __pyx_L25_bool_binop_done:; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __pyx_t_2; - if (__pyx_t_7) { - goto __pyx_L22; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 365, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_7 = 1; } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 365, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":384 - * pass - * - * elif ignore_exception_trace(trace): # <<<<<<<<<<<<<< - * pass + /* "_pydevd_bundle/pydevd_cython.pyx":366 + * except: + * pydev_log.exception() + * return func_name # <<<<<<<<<<<<<< * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ignore_exception_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_trace}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 384, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_7) { - goto __pyx_L22; - } + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_func_name); + __pyx_r = __pyx_v_func_name; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L6_except_return; + } - /* "_pydevd_bundle/pydevd_cython.pyx":388 - * - * else: - * was_just_raised = trace.tb_next is None # <<<<<<<<<<<<<< - * - * # It was not handled by any plugin, lets check exception breakpoints. + /* "_pydevd_bundle/pydevd_cython.pyx":358 + * code_obj = frame.f_code + * func_name = code_obj.co_name + * try: # <<<<<<<<<<<<<< + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: */ - /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (__pyx_t_3 == Py_None); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_was_just_raised = __pyx_t_7; + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L7_try_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":391 - * - * # It was not handled by any plugin, lets check exception breakpoints. - * check_excs = [] # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":351 * - * # Note: check user unhandled before regular exceptions. + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef get_func_name(self, frame): # <<<<<<<<<<<<<< + * cdef str func_name + * # ELSE */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_check_excs = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":394 + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_func_name); + __Pyx_XDECREF(__pyx_v_code_obj); + __Pyx_XDECREF(__pyx_v_cls_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":369 * - * # Note: check user unhandled before regular exceptions. - * exc_break_user = main_debugger.get_exception_breakpoint( # <<<<<<<<<<<<<< - * exception, main_debugger.break_on_user_uncaught_exceptions) - * if exc_break_user is not None: + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _show_return_values(self, frame, arg): # <<<<<<<<<<<<<< + * # ELSE + * # def _show_return_values(self, frame, arg): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - /* "_pydevd_bundle/pydevd_cython.pyx":395 - * # Note: check user unhandled before regular exceptions. - * exc_break_user = main_debugger.get_exception_breakpoint( - * exception, main_debugger.break_on_user_uncaught_exceptions) # <<<<<<<<<<<<<< - * if exc_break_user is not None: - * check_excs.append((exc_break_user, True)) - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_exception, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_v_exc_break_user = __pyx_t_3; - __pyx_t_3 = 0; +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg) { + PyObject *__pyx_v_f_locals_back = NULL; + PyObject *__pyx_v_return_values_dict = NULL; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + char const *__pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_show_return_values", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":396 - * exc_break_user = main_debugger.get_exception_breakpoint( - * exception, main_debugger.break_on_user_uncaught_exceptions) - * if exc_break_user is not None: # <<<<<<<<<<<<<< - * check_excs.append((exc_break_user, True)) - * + /* "_pydevd_bundle/pydevd_cython.pyx":373 + * # def _show_return_values(self, frame, arg): + * # ENDIF + * try: # <<<<<<<<<<<<<< + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) */ - __pyx_t_7 = (__pyx_v_exc_break_user != Py_None); - if (__pyx_t_7) { + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":397 - * exception, main_debugger.break_on_user_uncaught_exceptions) - * if exc_break_user is not None: - * check_excs.append((exc_break_user, True)) # <<<<<<<<<<<<<< - * - * exc_break_caught = main_debugger.get_exception_breakpoint( + /* "_pydevd_bundle/pydevd_cython.pyx":374 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_exc_break_user); - __Pyx_GIVEREF(__pyx_v_exc_break_user); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_exc_break_user)) __PYX_ERR(0, 397, __pyx_L1_error); - __Pyx_INCREF(Py_True); - __Pyx_GIVEREF(Py_True); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 397, __pyx_L1_error); - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_check_excs, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":396 - * exc_break_user = main_debugger.get_exception_breakpoint( - * exception, main_debugger.break_on_user_uncaught_exceptions) - * if exc_break_user is not None: # <<<<<<<<<<<<<< - * check_excs.append((exc_break_user, True)) - * + /* "_pydevd_bundle/pydevd_cython.pyx":375 + * try: + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) # <<<<<<<<<<<<<< + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) */ - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_locals, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_f_locals_back = __pyx_t_5; + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":399 - * check_excs.append((exc_break_user, True)) - * - * exc_break_caught = main_debugger.get_exception_breakpoint( # <<<<<<<<<<<<<< - * exception, main_debugger.break_on_caught_exceptions) - * if exc_break_caught is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":376 + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = (__pyx_v_f_locals_back != Py_None); + if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":400 - * - * exc_break_caught = main_debugger.get_exception_breakpoint( - * exception, main_debugger.break_on_caught_exceptions) # <<<<<<<<<<<<<< - * if exc_break_caught is not None: - * check_excs.append((exc_break_caught, False)) + /* "_pydevd_bundle/pydevd_cython.pyx":377 + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + * if return_values_dict is None: + * return_values_dict = {} */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_locals_back, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; - __pyx_t_11 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 377, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_5); + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_9 = 1; } } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_exception, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_7, Py_None}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_v_exc_break_caught = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_return_values_dict = __pyx_t_5; + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":401 - * exc_break_caught = main_debugger.get_exception_breakpoint( - * exception, main_debugger.break_on_caught_exceptions) - * if exc_break_caught is not None: # <<<<<<<<<<<<<< - * check_excs.append((exc_break_caught, False)) - * + /* "_pydevd_bundle/pydevd_cython.pyx":378 + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: # <<<<<<<<<<<<<< + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict */ - __pyx_t_7 = (__pyx_v_exc_break_caught != Py_None); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_return_values_dict == Py_None); + if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":402 - * exception, main_debugger.break_on_caught_exceptions) - * if exc_break_caught is not None: - * check_excs.append((exc_break_caught, False)) # <<<<<<<<<<<<<< - * - * for exc_break, is_user_uncaught in check_excs: + /* "_pydevd_bundle/pydevd_cython.pyx":379 + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: + * return_values_dict = {} # <<<<<<<<<<<<<< + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + * name = self.get_func_name(frame) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_exc_break_caught); - __Pyx_GIVEREF(__pyx_v_exc_break_caught); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_exc_break_caught)) __PYX_ERR(0, 402, __pyx_L1_error); - __Pyx_INCREF(Py_False); - __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 402, __pyx_L1_error); - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_check_excs, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 402, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_return_values_dict, __pyx_t_5); + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":401 - * exc_break_caught = main_debugger.get_exception_breakpoint( - * exception, main_debugger.break_on_caught_exceptions) - * if exc_break_caught is not None: # <<<<<<<<<<<<<< - * check_excs.append((exc_break_caught, False)) - * + /* "_pydevd_bundle/pydevd_cython.pyx":380 + * if return_values_dict is None: + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict # <<<<<<<<<<<<<< + * name = self.get_func_name(frame) + * return_values_dict[name] = arg + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely((PyObject_SetItem(__pyx_v_f_locals_back, __pyx_t_5, __pyx_v_return_values_dict) < 0))) __PYX_ERR(0, 380, __pyx_L6_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":378 + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: # <<<<<<<<<<<<<< + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict */ } - /* "_pydevd_bundle/pydevd_cython.pyx":404 - * check_excs.append((exc_break_caught, False)) - * - * for exc_break, is_user_uncaught in check_excs: # <<<<<<<<<<<<<< - * # Initially mark that it should stop and then go into exclusions. - * should_stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":381 + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + * name = self.get_func_name(frame) # <<<<<<<<<<<<<< + * return_values_dict[name] = arg + * except: */ - __pyx_t_3 = __pyx_v_check_excs; __Pyx_INCREF(__pyx_t_3); - __pyx_t_15 = 0; - for (;;) { - { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); - #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 404, __pyx_L1_error) - #endif - if (__pyx_t_15 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 404, __pyx_L1_error) - #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { - PyObject* sequence = __pyx_t_1; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 404, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_4 = PyList_GET_ITEM(sequence, 0); - __pyx_t_5 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); - index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L32_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_13); if (unlikely(!__pyx_t_5)) goto __pyx_L32_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_13), 2) < 0) __PYX_ERR(0, 404, __pyx_L1_error) - __pyx_t_6 = NULL; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - goto __pyx_L33_unpacking_done; - __pyx_L32_unpacking_failed:; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_6 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 404, __pyx_L1_error) - __pyx_L33_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_exc_break, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_is_user_uncaught, __pyx_t_5); - __pyx_t_5 = 0; + __pyx_t_5 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->get_func_name(__pyx_v_self, __pyx_v_frame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 381, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_name = __pyx_t_5; + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":406 - * for exc_break, is_user_uncaught in check_excs: - * # Initially mark that it should stop and then go into exclusions. - * should_stop = True # <<<<<<<<<<<<<< - * - * if main_debugger.exclude_exception_by_filter(exc_break, trace): + /* "_pydevd_bundle/pydevd_cython.pyx":382 + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + * name = self.get_func_name(frame) + * return_values_dict[name] = arg # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() */ - __pyx_v_should_stop = 1; + if (unlikely((PyObject_SetItem(__pyx_v_return_values_dict, __pyx_v_name, __pyx_v_arg) < 0))) __PYX_ERR(0, 382, __pyx_L6_error) - /* "_pydevd_bundle/pydevd_cython.pyx":408 - * should_stop = True - * - * if main_debugger.exclude_exception_by_filter(exc_break, trace): # <<<<<<<<<<<<<< - * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":376 + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_exclude_exception_by_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_exc_break, __pyx_v_trace}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 408, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_7) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":409 - * - * if main_debugger.exclude_exception_by_filter(exc_break, trace): - * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) # <<<<<<<<<<<<<< - * should_stop = False - * + /* "_pydevd_bundle/pydevd_cython.pyx":374 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_exception); - __Pyx_GIVEREF(__pyx_v_exception); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_exception)) __PYX_ERR(0, 409, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_13); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_13)) __PYX_ERR(0, 409, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_12); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_12)) __PYX_ERR(0, 409, __pyx_L1_error); - __pyx_t_13 = 0; - __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_Ignore_exception_s_in_library_s, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_try_end; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":410 - * if main_debugger.exclude_exception_by_filter(exc_break, trace): - * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) - * should_stop = False # <<<<<<<<<<<<<< - * - * elif exc_break.condition is not None and \ + /* "_pydevd_bundle/pydevd_cython.pyx":383 + * name = self.get_func_name(frame) + * return_values_dict[name] = arg + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * finally: */ - __pyx_v_should_stop = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._show_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 383, __pyx_L8_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_7); - /* "_pydevd_bundle/pydevd_cython.pyx":408 - * should_stop = True - * - * if main_debugger.exclude_exception_by_filter(exc_break, trace): # <<<<<<<<<<<<<< - * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":384 + * return_values_dict[name] = arg + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * finally: + * f_locals_back = None */ - goto __pyx_L34; - } + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 384, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 384, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 384, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L7_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":412 - * should_stop = False - * - * elif exc_break.condition is not None and \ # <<<<<<<<<<<<<< - * not main_debugger.handle_breakpoint_condition(info, exc_break, frame): - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":374 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_condition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { - } else { - __pyx_t_7 = __pyx_t_2; - goto __pyx_L35_bool_binop_done; - } + __pyx_L8_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L4_error; + __pyx_L7_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L11_try_end:; + } + } - /* "_pydevd_bundle/pydevd_cython.pyx":413 - * - * elif exc_break.condition is not None and \ - * not main_debugger.handle_breakpoint_condition(info, exc_break, frame): # <<<<<<<<<<<<<< - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":386 + * pydev_log.exception() + * finally: + * f_locals_back = None # <<<<<<<<<<<<<< * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_handle_breakpoint_condition); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_12, ((PyObject *)__pyx_v_info), __pyx_v_exc_break, __pyx_v_frame}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_16 = (!__pyx_t_2); - __pyx_t_7 = __pyx_t_16; - __pyx_L35_bool_binop_done:; + /*finally:*/ { + /*normal exit:*/{ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + goto __pyx_L5; + } + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __pyx_t_9 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; + { + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + } + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; + goto __pyx_L1_error; + } + __pyx_L5:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":412 - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":369 * - * elif exc_break.condition is not None and \ # <<<<<<<<<<<<<< - * not main_debugger.handle_breakpoint_condition(info, exc_break, frame): - * should_stop = False + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _show_return_values(self, frame, arg): # <<<<<<<<<<<<<< + * # ELSE + * # def _show_return_values(self, frame, arg): */ - if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":414 - * elif exc_break.condition is not None and \ - * not main_debugger.handle_breakpoint_condition(info, exc_break, frame): - * should_stop = False # <<<<<<<<<<<<<< - * - * elif is_user_uncaught: - */ - __pyx_v_should_stop = 0; + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._show_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f_locals_back); + __Pyx_XDECREF(__pyx_v_return_values_dict); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "_pydevd_bundle/pydevd_cython.pyx":412 - * should_stop = False +/* "_pydevd_bundle/pydevd_cython.pyx":389 * - * elif exc_break.condition is not None and \ # <<<<<<<<<<<<<< - * not main_debugger.handle_breakpoint_condition(info, exc_break, frame): - * should_stop = False + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _remove_return_values(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _remove_return_values(self, py_db, frame): */ - goto __pyx_L34; - } - /* "_pydevd_bundle/pydevd_cython.pyx":416 - * should_stop = False - * - * elif is_user_uncaught: # <<<<<<<<<<<<<< - * # Note: we don't stop here, we just collect the exc_info to use later on... - * should_stop = False - */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_user_uncaught); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 416, __pyx_L1_error) - if (__pyx_t_7) { +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_f_locals_back = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + char const *__pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_remove_return_values", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":418 - * elif is_user_uncaught: - * # Note: we don't stop here, we just collect the exc_info to use later on... - * should_stop = False # <<<<<<<<<<<<<< - * if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): + /* "_pydevd_bundle/pydevd_cython.pyx":393 + * # def _remove_return_values(self, py_db, frame): + * # ENDIF + * try: # <<<<<<<<<<<<<< + * try: + * # Showing return values was turned off, we should remove them from locals dict. */ - __pyx_v_should_stop = 0; + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":419 - * # Note: we don't stop here, we just collect the exc_info to use later on... - * should_stop = False - * if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ # <<<<<<<<<<<<<< - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): - * # User uncaught means that we're currently in user code but the code + /* "_pydevd_bundle/pydevd_cython.pyx":394 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_frame, __pyx_t_5, Py_True}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = (!__pyx_t_16); - if (__pyx_t_2) { - } else { - __pyx_t_7 = __pyx_t_2; - goto __pyx_L38_bool_binop_done; - } + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":420 - * should_stop = False - * if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): # <<<<<<<<<<<<<< - * # User uncaught means that we're currently in user code but the code - * # up the stack is library code. + /* "_pydevd_bundle/pydevd_cython.pyx":397 + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one + * frame.f_locals.pop(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_t_1 == Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!__pyx_t_2) { - } else { - __pyx_t_7 = __pyx_t_2; - goto __pyx_L38_bool_binop_done; - } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_f_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_13)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_13); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_t_5, __pyx_t_12, Py_True}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 420, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_t_2; - __pyx_L38_bool_binop_done:; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, Py_None}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":419 - * # Note: we don't stop here, we just collect the exc_info to use later on... - * should_stop = False - * if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ # <<<<<<<<<<<<<< - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): - * # User uncaught means that we're currently in user code but the code + /* "_pydevd_bundle/pydevd_cython.pyx":399 + * frame.f_locals.pop(RETURN_VALUES_DICT, None) + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) # <<<<<<<<<<<<<< + * if f_locals_back is not None: + * f_locals_back.pop(RETURN_VALUES_DICT, None) */ - if (__pyx_t_7) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_locals, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_f_locals_back = __pyx_t_6; + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":423 - * # User uncaught means that we're currently in user code but the code - * # up the stack is library code. - * exc_info = self.exc_info # <<<<<<<<<<<<<< - * if not exc_info: - * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + /* "_pydevd_bundle/pydevd_cython.pyx":400 + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: */ - __pyx_t_1 = __pyx_v_self->exc_info; - __Pyx_INCREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_exc_info, __pyx_t_1); - __pyx_t_1 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":424 - * # up the stack is library code. - * exc_info = self.exc_info - * if not exc_info: # <<<<<<<<<<<<<< - * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) - * else: - */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_exc_info); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 424, __pyx_L1_error) - __pyx_t_2 = (!__pyx_t_7); - if (__pyx_t_2) { - - /* "_pydevd_bundle/pydevd_cython.pyx":425 - * exc_info = self.exc_info - * if not exc_info: - * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) # <<<<<<<<<<<<<< - * else: - * lines = exc_info[2] - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PySet_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (PySet_Add(__pyx_t_12, __pyx_t_4) < 0) __PYX_ERR(0, 425, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_arg); - __Pyx_GIVEREF(__pyx_v_arg); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arg)) __PYX_ERR(0, 425, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_12); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_12)) __PYX_ERR(0, 425, __pyx_L1_error); - __pyx_t_1 = 0; - __pyx_t_12 = 0; - __Pyx_DECREF_SET(__pyx_v_exc_info, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_9 = (__pyx_v_f_locals_back != Py_None); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":424 - * # up the stack is library code. - * exc_info = self.exc_info - * if not exc_info: # <<<<<<<<<<<<<< - * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":401 + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + * f_locals_back.pop(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() */ - goto __pyx_L41; - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_locals_back, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 401, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, Py_None}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":427 - * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) - * else: - * lines = exc_info[2] # <<<<<<<<<<<<<< - * lines.add(frame.f_lineno) - * exc_info = (arg, frame.f_lineno, lines) + /* "_pydevd_bundle/pydevd_cython.pyx":400 + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: */ - /*else*/ { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_lines, __pyx_t_4); - __pyx_t_4 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":428 - * else: - * lines = exc_info[2] - * lines.add(frame.f_lineno) # <<<<<<<<<<<<<< - * exc_info = (arg, frame.f_lineno, lines) - * self.exc_info = exc_info + /* "_pydevd_bundle/pydevd_cython.pyx":394 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_lines, __pyx_n_s_add); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 428, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_12))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_12, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_try_end; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":429 - * lines = exc_info[2] - * lines.add(frame.f_lineno) - * exc_info = (arg, frame.f_lineno, lines) # <<<<<<<<<<<<<< - * self.exc_info = exc_info - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":402 + * if f_locals_back is not None: + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * finally: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 429, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_INCREF(__pyx_v_arg); - __Pyx_GIVEREF(__pyx_v_arg); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_arg)) __PYX_ERR(0, 429, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_lines); - __Pyx_GIVEREF(__pyx_v_lines); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_lines)) __PYX_ERR(0, 429, __pyx_L1_error); - __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_exc_info, __pyx_t_12); - __pyx_t_12 = 0; - } - __pyx_L41:; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._remove_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 402, __pyx_L8_except_error) + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); - /* "_pydevd_bundle/pydevd_cython.pyx":430 - * lines.add(frame.f_lineno) - * exc_info = (arg, frame.f_lineno, lines) - * self.exc_info = exc_info # <<<<<<<<<<<<<< - * else: - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + /* "_pydevd_bundle/pydevd_cython.pyx":403 + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * finally: + * f_locals_back = None */ - __Pyx_INCREF(__pyx_v_exc_info); - __Pyx_GIVEREF(__pyx_v_exc_info); - __Pyx_GOTREF(__pyx_v_self->exc_info); - __Pyx_DECREF(__pyx_v_self->exc_info); - __pyx_v_self->exc_info = __pyx_v_exc_info; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 403, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 403, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L7_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":419 - * # Note: we don't stop here, we just collect the exc_info to use later on... - * should_stop = False - * if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ # <<<<<<<<<<<<<< - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): - * # User uncaught means that we're currently in user code but the code + /* "_pydevd_bundle/pydevd_cython.pyx":394 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one */ - } + __pyx_L8_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L4_error; + __pyx_L7_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L11_try_end:; + } + } - /* "_pydevd_bundle/pydevd_cython.pyx":416 - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":405 + * pydev_log.exception() + * finally: + * f_locals_back = None # <<<<<<<<<<<<<< * - * elif is_user_uncaught: # <<<<<<<<<<<<<< - * # Note: we don't stop here, we just collect the exc_info to use later on... - * should_stop = False + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - goto __pyx_L34; - } + /*finally:*/ { + /*normal exit:*/{ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + goto __pyx_L5; + } + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; + { + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + } + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; + goto __pyx_L1_error; + } + __pyx_L5:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":433 - * else: - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - * if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised and not just_raised(trace.tb_next): - * # In this case we never stop if it was just raised, so, to know if it was the first we + /* "_pydevd_bundle/pydevd_cython.pyx":389 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _remove_return_values(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _remove_return_values(self, py_db, frame): */ - /*else*/ { - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_notify_on_first_raise_only); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 433, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 433, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L43_bool_binop_done; - } - /* "_pydevd_bundle/pydevd_cython.pyx":434 - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - * if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ - * and not was_just_raised and not just_raised(trace.tb_next): # <<<<<<<<<<<<<< - * # In this case we never stop if it was just raised, so, to know if it was the first we - * # need to check if we're in the 2nd method. - */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 433, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._remove_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f_locals_back); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "_pydevd_bundle/pydevd_cython.pyx":433 - * else: - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - * if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised and not just_raised(trace.tb_next): - * # In this case we never stop if it was just raised, so, to know if it was the first we +/* "_pydevd_bundle/pydevd_cython.pyx":408 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _get_unfiltered_back_frame(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_unfiltered_back_frame(self, py_db, frame): */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 433, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L43_bool_binop_done; - } - /* "_pydevd_bundle/pydevd_cython.pyx":434 - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - * if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ - * and not was_just_raised and not just_raised(trace.tb_next): # <<<<<<<<<<<<<< - * # In this case we never stop if it was just raised, so, to know if it was the first we - * # need to check if we're in the 2nd method. +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_unfiltered_back_frame", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":412 + * # def _get_unfiltered_back_frame(self, py_db, frame): + * # ENDIF + * f = frame.f_back # <<<<<<<<<<<<<< + * while f is not None: + * if not py_db.is_files_filter_enabled: */ - __pyx_t_7 = (!__pyx_v_was_just_raised); - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L43_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 434, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 434, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_16 = (!__pyx_t_7); - __pyx_t_2 = __pyx_t_16; - __pyx_L43_bool_binop_done:; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":433 - * else: - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - * if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised and not just_raised(trace.tb_next): - * # In this case we never stop if it was just raised, so, to know if it was the first we + /* "_pydevd_bundle/pydevd_cython.pyx":413 + * # ENDIF + * f = frame.f_back + * while f is not None: # <<<<<<<<<<<<<< + * if not py_db.is_files_filter_enabled: + * return f */ - if (__pyx_t_2) { + while (1) { + __pyx_t_2 = (__pyx_v_f != Py_None); + if (!__pyx_t_2) break; - /* "_pydevd_bundle/pydevd_cython.pyx":437 - * # In this case we never stop if it was just raised, so, to know if it was the first we - * # need to check if we're in the 2nd method. - * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":414 + * f = frame.f_back + * while f is not None: + * if not py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * return f * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ */ - __pyx_v_should_stop = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { - /* "_pydevd_bundle/pydevd_cython.pyx":433 - * else: - * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - * if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised and not just_raised(trace.tb_next): - * # In this case we never stop if it was just raised, so, to know if it was the first we + /* "_pydevd_bundle/pydevd_cython.pyx":415 + * while f is not None: + * if not py_db.is_files_filter_enabled: + * return f # <<<<<<<<<<<<<< + * + * else: */ - goto __pyx_L42; - } + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_f); + __pyx_r = __pyx_v_f; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":439 - * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + /* "_pydevd_bundle/pydevd_cython.pyx":414 + * f = frame.f_back + * while f is not None: + * if not py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * return f * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised: - * should_stop = False # I.e.: we stop only when it was just raised */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_notify_on_first_raise_only); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 439, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 439, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_16) { - } else { - __pyx_t_2 = __pyx_t_16; - goto __pyx_L47_bool_binop_done; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":440 + /* "_pydevd_bundle/pydevd_cython.pyx":418 * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ - * and not was_just_raised: # <<<<<<<<<<<<<< - * should_stop = False # I.e.: we stop only when it was just raised + * else: + * if py_db.apply_files_filter(f, f.f_code.co_filename, False): # <<<<<<<<<<<<<< + * f = f.f_back * */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 439, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_f, __pyx_t_6, Py_False}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { - /* "_pydevd_bundle/pydevd_cython.pyx":439 - * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + /* "_pydevd_bundle/pydevd_cython.pyx":419 + * else: + * if py_db.apply_files_filter(f, f.f_code.co_filename, False): + * f = f.f_back # <<<<<<<<<<<<<< * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised: - * should_stop = False # I.e.: we stop only when it was just raised + * else: */ - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 439, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = (!__pyx_t_16); - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L47_bool_binop_done; - } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":440 + /* "_pydevd_bundle/pydevd_cython.pyx":418 * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ - * and not was_just_raised: # <<<<<<<<<<<<<< - * should_stop = False # I.e.: we stop only when it was just raised + * else: + * if py_db.apply_files_filter(f, f.f_code.co_filename, False): # <<<<<<<<<<<<<< + * f = f.f_back * */ - __pyx_t_7 = (!__pyx_v_was_just_raised); - __pyx_t_2 = __pyx_t_7; - __pyx_L47_bool_binop_done:; + goto __pyx_L6; + } - /* "_pydevd_bundle/pydevd_cython.pyx":439 - * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + /* "_pydevd_bundle/pydevd_cython.pyx":422 * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised: - * should_stop = False # I.e.: we stop only when it was just raised + * else: + * return f # <<<<<<<<<<<<<< + * + * return f */ - if (__pyx_t_2) { + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_f); + __pyx_r = __pyx_v_f; + goto __pyx_L0; + } + __pyx_L6:; + } + } - /* "_pydevd_bundle/pydevd_cython.pyx":441 - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ - * and not was_just_raised: - * should_stop = False # I.e.: we stop only when it was just raised # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":424 + * return f + * + * return f # <<<<<<<<<<<<<< * - * elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context: + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_v_should_stop = 0; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_f); + __pyx_r = __pyx_v_f; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":439 - * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + /* "_pydevd_bundle/pydevd_cython.pyx":408 * - * elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< - * and not was_just_raised: - * should_stop = False # I.e.: we stop only when it was just raised + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _get_unfiltered_back_frame(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_unfiltered_back_frame(self, py_db, frame): */ - goto __pyx_L42; - } - /* "_pydevd_bundle/pydevd_cython.pyx":443 - * should_stop = False # I.e.: we stop only when it was just raised + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._get_unfiltered_back_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":427 * - * elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context: # <<<<<<<<<<<<<< - * # Option: Don't break if an exception is caught in the same function from which it is thrown - * should_stop = False + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _is_same_frame(self, target_frame, current_frame): # <<<<<<<<<<<<<< + * cdef PyDBAdditionalThreadInfo info; + * # ELSE */ - if (__pyx_v_was_just_raised) { - } else { - __pyx_t_2 = __pyx_v_was_just_raised; - goto __pyx_L50_bool_binop_done; - } - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 443, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 443, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_2 = __pyx_t_7; - __pyx_L50_bool_binop_done:; - if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":445 - * elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context: - * # Option: Don't break if an exception is caught in the same function from which it is thrown - * should_stop = False # <<<<<<<<<<<<<< +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_target_frame, PyObject *__pyx_v_current_frame) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_is_same_frame", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":432 + * # def _is_same_frame(self, target_frame, current_frame): + * # ENDIF + * if target_frame is current_frame: # <<<<<<<<<<<<<< + * return True * - * if should_stop: */ - __pyx_v_should_stop = 0; + __pyx_t_1 = (__pyx_v_target_frame == __pyx_v_current_frame); + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":443 - * should_stop = False # I.e.: we stop only when it was just raised + /* "_pydevd_bundle/pydevd_cython.pyx":433 + * # ENDIF + * if target_frame is current_frame: + * return True # <<<<<<<<<<<<<< * - * elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context: # <<<<<<<<<<<<<< - * # Option: Don't break if an exception is caught in the same function from which it is thrown - * should_stop = False + * info = self._args[2] */ - } - __pyx_L42:; - } - __pyx_L34:; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":447 - * should_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":432 + * # def _is_same_frame(self, target_frame, current_frame): + * # ENDIF + * if target_frame is current_frame: # <<<<<<<<<<<<<< + * return True * - * if should_stop: # <<<<<<<<<<<<<< - * exception_breakpoint = exc_break - * try: */ - if (__pyx_v_should_stop) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":448 + /* "_pydevd_bundle/pydevd_cython.pyx":435 + * return True * - * if should_stop: - * exception_breakpoint = exc_break # <<<<<<<<<<<<<< - * try: - * info.pydev_message = exc_break.qname + * info = self._args[2] # <<<<<<<<<<<<<< + * if info.pydev_use_scoped_step_frame: + * # If using scoped step we don't check the target, we just need to check */ - __Pyx_INCREF(__pyx_v_exc_break); - __Pyx_DECREF_SET(__pyx_v_exception_breakpoint, __pyx_v_exc_break); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 435, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_2); + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":449 - * if should_stop: - * exception_breakpoint = exc_break - * try: # <<<<<<<<<<<<<< - * info.pydev_message = exc_break.qname - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":436 + * + * info = self._args[2] + * if info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_8); - /*try:*/ { + if (__pyx_v_info->pydev_use_scoped_step_frame) { - /* "_pydevd_bundle/pydevd_cython.pyx":450 - * exception_breakpoint = exc_break - * try: - * info.pydev_message = exc_break.qname # <<<<<<<<<<<<<< - * except: - * info.pydev_message = exc_break.qname.encode('utf-8') + /* "_pydevd_bundle/pydevd_cython.pyx":439 + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: # <<<<<<<<<<<<<< + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: + * # The co_name may be different (it may include the line number), but */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_qname); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 450, __pyx_L53_error) - __Pyx_GOTREF(__pyx_t_12); - if (!(likely(PyString_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_12))) __PYX_ERR(0, 450, __pyx_L53_error) - __Pyx_GIVEREF(__pyx_t_12); - __Pyx_GOTREF(__pyx_v_info->pydev_message); - __Pyx_DECREF(__pyx_v_info->pydev_message); - __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_12); - __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_v_target_frame != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_current_frame != Py_None); + __pyx_t_1 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":449 - * if should_stop: - * exception_breakpoint = exc_break - * try: # <<<<<<<<<<<<<< - * info.pydev_message = exc_break.qname - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":440 + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: # <<<<<<<<<<<<<< + * # The co_name may be different (it may include the line number), but + * # the filename must still be the same. */ - } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L60_try_end; - __pyx_L53_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_target_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":451 - * try: - * info.pydev_message = exc_break.qname - * except: # <<<<<<<<<<<<<< - * info.pydev_message = exc_break.qname.encode('utf-8') - * break - */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 451, __pyx_L55_except_error) - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_1); - - /* "_pydevd_bundle/pydevd_cython.pyx":452 - * info.pydev_message = exc_break.qname - * except: - * info.pydev_message = exc_break.qname.encode('utf-8') # <<<<<<<<<<<<<< - * break - * - */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_qname); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 452, __pyx_L55_except_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 452, __pyx_L55_except_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_17))) { - __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_17); - if (likely(__pyx_t_13)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); - __Pyx_INCREF(__pyx_t_13); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_17, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_kp_s_utf_8}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L55_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - } - if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 452, __pyx_L55_except_error) - __Pyx_GIVEREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_v_info->pydev_message); - __Pyx_DECREF(__pyx_v_info->pydev_message); - __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L54_exception_handled; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":449 - * if should_stop: - * exception_breakpoint = exc_break - * try: # <<<<<<<<<<<<<< - * info.pydev_message = exc_break.qname - * except: - */ - __pyx_L55_except_error:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); - goto __pyx_L1_error; - __pyx_L54_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); - __pyx_L60_try_end:; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":453 - * except: - * info.pydev_message = exc_break.qname.encode('utf-8') - * break # <<<<<<<<<<<<<< - * - * if should_stop: - */ - goto __pyx_L31_break; - - /* "_pydevd_bundle/pydevd_cython.pyx":447 - * should_stop = False - * - * if should_stop: # <<<<<<<<<<<<<< - * exception_breakpoint = exc_break - * try: + /* "_pydevd_bundle/pydevd_cython.pyx":443 + * # The co_name may be different (it may include the line number), but + * # the filename must still be the same. + * f = current_frame.f_back # <<<<<<<<<<<<<< + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back */ - } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_f = __pyx_t_2; + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":404 - * check_excs.append((exc_break_caught, False)) - * - * for exc_break, is_user_uncaught in check_excs: # <<<<<<<<<<<<<< - * # Initially mark that it should stop and then go into exclusions. - * should_stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":444 + * # the filename must still be the same. + * f = current_frame.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: */ - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L63_for_end; - __pyx_L31_break:; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L63_for_end; - __pyx_L63_for_end:; + __pyx_t_3 = (__pyx_v_f != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L10_bool_binop_done; } - __pyx_L22:; - - /* "_pydevd_bundle/pydevd_cython.pyx":374 - * pydev_log.exception() - * - * if not should_stop: # <<<<<<<<<<<<<< - * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). - * if exception == SystemExit and main_debugger.ignore_system_exit_code(value): - */ - } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L10_bool_binop_done:; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":455 - * break - * - * if should_stop: # <<<<<<<<<<<<<< - * # Always add exception to frame (must remove later after we proceed). - * add_exception_to_frame(frame, (exception, value, trace)) + /* "_pydevd_bundle/pydevd_cython.pyx":445 + * f = current_frame.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back # <<<<<<<<<<<<<< + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * return True */ - if (__pyx_v_should_stop) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_2); + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":457 - * if should_stop: - * # Always add exception to frame (must remove later after we proceed). - * add_exception_to_frame(frame, (exception, value, trace)) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":446 + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * return True * - * if exception_breakpoint is not None and exception_breakpoint.expression is not None: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_exception); - __Pyx_GIVEREF(__pyx_v_exception); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_exception)) __PYX_ERR(0, 457, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value)) __PYX_ERR(0, 457, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_trace); - __Pyx_GIVEREF(__pyx_v_trace); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_trace)) __PYX_ERR(0, 457, __pyx_L1_error); - __pyx_t_12 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; + __pyx_t_3 = (__pyx_v_f != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L13_bool_binop_done; } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_frame, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L13_bool_binop_done:; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":459 - * add_exception_to_frame(frame, (exception, value, trace)) - * - * if exception_breakpoint is not None and exception_breakpoint.expression is not None: # <<<<<<<<<<<<<< - * main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":447 + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * return True # <<<<<<<<<<<<<< * + * return False */ - __pyx_t_7 = (__pyx_v_exception_breakpoint != Py_None); - if (__pyx_t_7) { - } else { - __pyx_t_2 = __pyx_t_7; - goto __pyx_L66_bool_binop_done; - } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (__pyx_t_3 != Py_None); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __pyx_t_7; - __pyx_L66_bool_binop_done:; - if (__pyx_t_2) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":460 - * - * if exception_breakpoint is not None and exception_breakpoint.expression is not None: - * main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":446 + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * return True * - * return should_stop, frame */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_handle_breakpoint_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = NULL; - __pyx_t_11 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_exception_breakpoint, ((PyObject *)__pyx_v_info), __pyx_v_frame}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":459 - * add_exception_to_frame(frame, (exception, value, trace)) - * - * if exception_breakpoint is not None and exception_breakpoint.expression is not None: # <<<<<<<<<<<<<< - * main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame) - * + /* "_pydevd_bundle/pydevd_cython.pyx":444 + * # the filename must still be the same. + * f = current_frame.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: */ } - /* "_pydevd_bundle/pydevd_cython.pyx":455 - * break - * - * if should_stop: # <<<<<<<<<<<<<< - * # Always add exception to frame (must remove later after we proceed). - * add_exception_to_frame(frame, (exception, value, trace)) + /* "_pydevd_bundle/pydevd_cython.pyx":440 + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: # <<<<<<<<<<<<<< + * # The co_name may be different (it may include the line number), but + * # the filename must still be the same. */ } - /* "_pydevd_bundle/pydevd_cython.pyx":361 - * exception, value, trace = arg - * - * if trace is not None and hasattr(trace, 'tb_next'): # <<<<<<<<<<<<<< - * # on jython trace is None on the first event and it may not have a tb_next. - * + /* "_pydevd_bundle/pydevd_cython.pyx":439 + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: # <<<<<<<<<<<<<< + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: + * # The co_name may be different (it may include the line number), but */ } - /* "_pydevd_bundle/pydevd_cython.pyx":358 - * - * # 2 = 2 - * if info.pydev_state != 2: # and breakpoint is not None: # <<<<<<<<<<<<<< - * exception, value, trace = arg + /* "_pydevd_bundle/pydevd_cython.pyx":436 * + * info = self._args[2] + * if info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. */ } - /* "_pydevd_bundle/pydevd_cython.pyx":462 - * main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":449 + * return True * - * return should_stop, frame # <<<<<<<<<<<<<< + * return False # <<<<<<<<<<<<<< * - * def handle_user_exception(self, frame): + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_should_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_frame); - __Pyx_GIVEREF(__pyx_v_frame); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_frame)) __PYX_ERR(0, 462, __pyx_L1_error); - __pyx_t_3 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":343 + /* "_pydevd_bundle/pydevd_cython.pyx":427 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _should_stop_on_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef _is_same_frame(self, target_frame, current_frame): # <<<<<<<<<<<<<< * cdef PyDBAdditionalThreadInfo info; - * cdef bint should_stop; + * # ELSE */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_XDECREF(__pyx_t_17); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._is_same_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); - __Pyx_XDECREF(__pyx_v_check_excs); - __Pyx_XDECREF(__pyx_v_main_debugger); - __Pyx_XDECREF(__pyx_v_exception); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_v_trace); - __Pyx_XDECREF(__pyx_v_exception_breakpoint); - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XDECREF(__pyx_v_exc_break_user); - __Pyx_XDECREF(__pyx_v_exc_break_caught); - __Pyx_XDECREF(__pyx_v_exc_break); - __Pyx_XDECREF(__pyx_v_is_user_uncaught); - __Pyx_XDECREF(__pyx_v_exc_info); - __Pyx_XDECREF(__pyx_v_lines); - __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":464 - * return should_stop, frame +/* "_pydevd_bundle/pydevd_cython.pyx":452 * - * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< - * exc_info = self.exc_info - * if exc_info: + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef tuple abs_path_canonical_path_and_base; + * cdef bint is_exception_event; */ -/* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception = {"handle_user_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_frame = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("handle_user_exception (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_MACROS - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { - (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); - kw_args--; - } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 464, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_user_exception") < 0)) __PYX_ERR(0, 464, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_frame = values[0]; - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("handle_user_exception", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 464, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - { - Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); - } - } - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_user_exception(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame); - - /* function exit code */ - { - Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); - } - } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_user_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame) { +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, int __pyx_skip_dispatch) { + PyObject *__pyx_v_abs_path_canonical_path_and_base = 0; + int __pyx_v_is_exception_event; + int __pyx_v_has_exception_breakpoints; + int __pyx_v_can_skip; + int __pyx_v_stop; + int __pyx_v_stop_on_plugin_breakpoint; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + int __pyx_v_step_cmd; + int __pyx_v_line; + int __pyx_v_is_line; + int __pyx_v_is_call; + int __pyx_v_is_return; + int __pyx_v_should_stop; + PyObject *__pyx_v_breakpoints_for_file = 0; + PyObject *__pyx_v_stop_info = 0; + PyObject *__pyx_v_curr_func_name = 0; + PyObject *__pyx_v_frame_skips_cache = 0; + PyObject *__pyx_v_frame_cache_key = 0; + PyObject *__pyx_v_line_cache_key = 0; + int __pyx_v_breakpoints_in_line_cache; + int __pyx_v_breakpoints_in_frame_cache; + int __pyx_v_has_breakpoint_in_frame; + int __pyx_v_bp_line; + PyObject *__pyx_v_bp = 0; + int __pyx_v_pydev_smart_parent_offset; + int __pyx_v_pydev_smart_child_offset; + PyObject *__pyx_v_pydev_smart_step_into_variants = 0; + PyObject *__pyx_v_py_db = NULL; + PyObject *__pyx_v_thread = NULL; + PyObject *__pyx_v_plugin_manager = NULL; + PyObject *__pyx_v_stop_frame = NULL; + PyObject *__pyx_v_function_breakpoint_on_call_event = NULL; + PyObject *__pyx_v_returns_cache_key = NULL; + PyObject *__pyx_v_return_lines = NULL; + PyObject *__pyx_v_x = NULL; + PyObject *__pyx_v_f = NULL; PyObject *__pyx_v_exc_info = NULL; + PyObject *__pyx_v_func_lines = NULL; + PyObject *__pyx_v_offset_and_lineno = NULL; + PyObject *__pyx_v_breakpoint = NULL; + PyObject *__pyx_v_stop_reason = NULL; + PyObject *__pyx_v_bp_type = NULL; + PyObject *__pyx_v_new_frame = NULL; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_eval_result = NULL; + PyObject *__pyx_v_cmd = NULL; + PyObject *__pyx_v_exc = NULL; + long __pyx_v_should_skip; + PyObject *__pyx_v_plugin_stop = NULL; + PyObject *__pyx_v_force_check_project_scope = NULL; + PyObject *__pyx_v_filename = NULL; + PyObject *__pyx_v_f2 = NULL; + PyObject *__pyx_v_back = NULL; + PyObject *__pyx_v_smart_step_into_variant = NULL; + PyObject *__pyx_v_children_variants = NULL; + PyObject *__pyx_v_f_code = NULL; + PyObject *__pyx_v_back_absolute_filename = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_base = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *(*__pyx_t_14)(PyObject *); + int __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_t_19; + Py_ssize_t __pyx_t_20; + PyObject *__pyx_t_21 = NULL; + char const *__pyx_t_22; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + PyObject *__pyx_t_28 = NULL; + char const *__pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("handle_user_exception", 1); + __Pyx_RefNannySetupContext("trace_dispatch", 0); + __Pyx_INCREF(__pyx_v_frame); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } - /* "_pydevd_bundle/pydevd_cython.pyx":465 + /* "_pydevd_bundle/pydevd_cython.pyx":492 + * # generation be better split among what each part does). * - * def handle_user_exception(self, frame): - * exc_info = self.exc_info # <<<<<<<<<<<<<< - * if exc_info: - * return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * try: # <<<<<<<<<<<<<< + * # DEBUG = '_debugger_case_generator.py' in frame.f_code.co_filename + * py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args */ - __pyx_t_1 = __pyx_v_self->exc_info; - __Pyx_INCREF(__pyx_t_1); - __pyx_v_exc_info = __pyx_t_1; - __pyx_t_1 = 0; + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":466 - * def handle_user_exception(self, frame): - * exc_info = self.exc_info - * if exc_info: # <<<<<<<<<<<<<< - * return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) - * return False + /* "_pydevd_bundle/pydevd_cython.pyx":494 + * try: + * # DEBUG = '_debugger_case_generator.py' in frame.f_code.co_filename + * py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args # <<<<<<<<<<<<<< + * # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) + * info.is_tracing += 1 */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_exc_info); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 466, __pyx_L1_error) - if (__pyx_t_2) { + __pyx_t_1 = __pyx_v_self->_args; + __Pyx_INCREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 6)) { + if (size > 6) __Pyx_RaiseTooManyValuesError(6); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 494, __pyx_L4_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + #else + { + Py_ssize_t i; + PyObject** temps[6] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; + for (i=0; i < 6; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 494, __pyx_L4_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 494, __pyx_L4_error) + } + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 494, __pyx_L4_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 494, __pyx_L4_error) + if (!(likely(PyDict_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_7))) __PYX_ERR(0, 494, __pyx_L4_error) + __pyx_v_py_db = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_abs_path_canonical_path_and_base = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_thread = __pyx_t_6; + __pyx_t_6 = 0; + __pyx_v_frame_skips_cache = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + __pyx_v_frame_cache_key = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":467 - * exc_info = self.exc_info - * if exc_info: - * return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) # <<<<<<<<<<<<<< - * return False + /* "_pydevd_bundle/pydevd_cython.pyx":496 + * py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + * # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) + * info.is_tracing += 1 # <<<<<<<<<<<<<< * + * # TODO: This shouldn't be needed. The fact that frame.f_lineno */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 467, __pyx_L1_error) - __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_handle_exception(__pyx_v_self, __pyx_v_frame, __pyx_n_s_exception, __pyx_t_1, ((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; + __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing + 1); - /* "_pydevd_bundle/pydevd_cython.pyx":466 - * def handle_user_exception(self, frame): - * exc_info = self.exc_info - * if exc_info: # <<<<<<<<<<<<<< - * return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) - * return False + /* "_pydevd_bundle/pydevd_cython.pyx":501 + * # is None seems like a bug in Python 3.11. + * # Reported in: https://github.com/python/cpython/issues/94485 + * line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None # <<<<<<<<<<<<<< + * line_cache_key = (frame_cache_key, line) + * */ - } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 501, __pyx_L4_error) + if (!__pyx_t_9) { + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L4_error) + __pyx_t_5 = __pyx_t_10; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = 0; + __pyx_L6_bool_binop_done:; + __pyx_v_line = __pyx_t_5; - /* "_pydevd_bundle/pydevd_cython.pyx":468 - * if exc_info: - * return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) - * return False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":502 + * # Reported in: https://github.com/python/cpython/issues/94485 + * line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None + * line_cache_key = (frame_cache_key, line) # <<<<<<<<<<<<<< * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * if py_db.pydb_disposed: */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; - goto __pyx_L0; + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 502, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_frame_cache_key); + __Pyx_GIVEREF(__pyx_v_frame_cache_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 502, __pyx_L4_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1)) __PYX_ERR(0, 502, __pyx_L4_error); + __pyx_t_1 = 0; + __pyx_v_line_cache_key = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":464 - * return should_stop, frame + /* "_pydevd_bundle/pydevd_cython.pyx":504 + * line_cache_key = (frame_cache_key, line) + * + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == 'call' else NO_FTRACE * - * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< - * exc_info = self.exc_info - * if exc_info: */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 504, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 504, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_exc_info); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "_pydevd_bundle/pydevd_cython.pyx":471 + /* "_pydevd_bundle/pydevd_cython.pyx":505 * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _handle_exception(self, frame, str event, arg, str exception_type): # <<<<<<<<<<<<<< - * cdef bint stopped; - * cdef tuple abs_real_path_and_base; + * if py_db.pydb_disposed: + * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< + * + * plugin_manager = py_db.plugin */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 505, __pyx_L4_error) + if (__pyx_t_9) { + __Pyx_INCREF(Py_None); + __pyx_t_8 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L3_return; -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__handle_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, PyObject *__pyx_v_exception_type) { - int __pyx_v_stopped; - PyObject *__pyx_v_abs_real_path_and_base = 0; - PyObject *__pyx_v_absolute_filename = 0; - PyObject *__pyx_v_canonical_normalized_filename = 0; - PyObject *__pyx_v_filename_to_lines_where_exceptions_are_ignored = 0; - PyObject *__pyx_v_lines_ignored = 0; - PyObject *__pyx_v_frame_id_to_frame = 0; - PyObject *__pyx_v_merged = 0; - PyObject *__pyx_v_trace_obj = 0; - PyObject *__pyx_v_main_debugger = 0; - PyObject *__pyx_v_initial_trace_obj = NULL; - PyObject *__pyx_v_check_trace_obj = NULL; - PyObject *__pyx_v_curr_stat = NULL; - PyObject *__pyx_v_last_stat = NULL; - PyObject *__pyx_v_from_user_input = NULL; - PyObject *__pyx_v_exc_lineno = NULL; - PyObject *__pyx_v_line = NULL; - PyObject *__pyx_v_thread = NULL; - PyObject *__pyx_v_f = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - int __pyx_t_13; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - int __pyx_t_16; - char const *__pyx_t_17; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - PyObject *__pyx_t_22 = NULL; - PyObject *__pyx_t_23 = NULL; - int __pyx_t_24; - char const *__pyx_t_25; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_handle_exception", 0); - __Pyx_INCREF(__pyx_v_frame); - - /* "_pydevd_bundle/pydevd_cython.pyx":485 - * # def _handle_exception(self, frame, event, arg, exception_type): - * # ENDIF - * stopped = False # <<<<<<<<<<<<<< - * try: - * # print('_handle_exception', frame.f_lineno, frame.f_code.co_name) + /* "_pydevd_bundle/pydevd_cython.pyx":504 + * line_cache_key = (frame_cache_key, line) + * + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == 'call' else NO_FTRACE + * */ - __pyx_v_stopped = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":486 - * # ENDIF - * stopped = False - * try: # <<<<<<<<<<<<<< - * # print('_handle_exception', frame.f_lineno, frame.f_code.co_name) + /* "_pydevd_bundle/pydevd_cython.pyx":507 + * return None if event == 'call' else NO_FTRACE * + * plugin_manager = py_db.plugin # <<<<<<<<<<<<<< + * has_exception_breakpoints = ( + * py_db.break_on_caught_exceptions */ - /*try:*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_plugin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 507, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_plugin_manager = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":490 - * - * # We have 3 things in arg: exception type, description, traceback object - * trace_obj = arg[2] # <<<<<<<<<<<<<< - * main_debugger = self._args[0] - * + /* "_pydevd_bundle/pydevd_cython.pyx":509 + * plugin_manager = py_db.plugin + * has_exception_breakpoints = ( + * py_db.break_on_caught_exceptions # <<<<<<<<<<<<<< + * or py_db.break_on_user_uncaught_exceptions + * or py_db.has_plugin_exception_breaks) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_arg, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_trace_obj = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 509, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 509, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L9_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":491 - * # We have 3 things in arg: exception type, description, traceback object - * trace_obj = arg[2] - * main_debugger = self._args[0] # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":510 + * has_exception_breakpoints = ( + * py_db.break_on_caught_exceptions + * or py_db.break_on_user_uncaught_exceptions # <<<<<<<<<<<<<< + * or py_db.has_plugin_exception_breaks) * - * initial_trace_obj = trace_obj */ - if (unlikely(__pyx_v_self->_args == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 491, __pyx_L4_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 510, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 510, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L9_bool_binop_done; } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_main_debugger = __pyx_t_1; - __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":493 - * main_debugger = self._args[0] + /* "_pydevd_bundle/pydevd_cython.pyx":511 + * py_db.break_on_caught_exceptions + * or py_db.break_on_user_uncaught_exceptions + * or py_db.has_plugin_exception_breaks) # <<<<<<<<<<<<<< * - * initial_trace_obj = trace_obj # <<<<<<<<<<<<<< - * if trace_obj.tb_next is None and trace_obj.tb_frame is frame: - * # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + * stop_frame = info.pydev_step_stop */ - __Pyx_INCREF(__pyx_v_trace_obj); - __pyx_v_initial_trace_obj = __pyx_v_trace_obj; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 511, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 511, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_11; + __pyx_L9_bool_binop_done:; + __pyx_v_has_exception_breakpoints = __pyx_t_9; - /* "_pydevd_bundle/pydevd_cython.pyx":494 + /* "_pydevd_bundle/pydevd_cython.pyx":513 + * or py_db.has_plugin_exception_breaks) * - * initial_trace_obj = trace_obj - * if trace_obj.tb_next is None and trace_obj.tb_frame is frame: # <<<<<<<<<<<<<< - * # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). - * pass + * stop_frame = info.pydev_step_stop # <<<<<<<<<<<<<< + * step_cmd = info.pydev_step_cmd + * function_breakpoint_on_call_event = None */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__pyx_t_1 == Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_3) { - } else { - __pyx_t_2 = __pyx_t_3; - goto __pyx_L7_bool_binop_done; - } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__pyx_t_1 == __pyx_v_frame); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __pyx_t_3; - __pyx_L7_bool_binop_done:; - if (__pyx_t_2) { - goto __pyx_L6; - } + __pyx_t_8 = __pyx_v_info->pydev_step_stop; + __Pyx_INCREF(__pyx_t_8); + __pyx_v_stop_frame = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":499 - * else: - * # Get the trace_obj from where the exception was raised... - * while trace_obj.tb_next is not None: # <<<<<<<<<<<<<< - * trace_obj = trace_obj.tb_next + /* "_pydevd_bundle/pydevd_cython.pyx":514 + * + * stop_frame = info.pydev_step_stop + * step_cmd = info.pydev_step_cmd # <<<<<<<<<<<<<< + * function_breakpoint_on_call_event = None * */ - /*else*/ { - while (1) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!__pyx_t_2) break; + __pyx_t_5 = __pyx_v_info->pydev_step_cmd; + __pyx_v_step_cmd = __pyx_t_5; - /* "_pydevd_bundle/pydevd_cython.pyx":500 - * # Get the trace_obj from where the exception was raised... - * while trace_obj.tb_next is not None: - * trace_obj = trace_obj.tb_next # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":515 + * stop_frame = info.pydev_step_stop + * step_cmd = info.pydev_step_cmd + * function_breakpoint_on_call_event = None # <<<<<<<<<<<<<< * - * if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * if frame.f_code.co_flags & 0xa0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_trace_obj, __pyx_t_1); - __pyx_t_1 = 0; - } - } - __pyx_L6:; + __Pyx_INCREF(Py_None); + __pyx_v_function_breakpoint_on_call_event = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":502 - * trace_obj = trace_obj.tb_next + /* "_pydevd_bundle/pydevd_cython.pyx":517 + * function_breakpoint_on_call_event = None * - * if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: # <<<<<<<<<<<<<< - * for check_trace_obj in (initial_trace_obj, trace_obj): - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * if frame.f_code.co_flags & 0xa0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 # <<<<<<<<<<<<<< + * # Dealing with coroutines and generators: + * # When in a coroutine we change the perceived event to the debugger because */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_ignore_exceptions_thrown_in_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L4_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 502, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_160, 0xa0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 517, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":503 - * - * if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: - * for check_trace_obj in (initial_trace_obj, trace_obj): # <<<<<<<<<<<<<< - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) - * absolute_filename = abs_real_path_and_base[0] + /* "_pydevd_bundle/pydevd_cython.pyx":521 + * # When in a coroutine we change the perceived event to the debugger because + * # a call, StopIteration exception and return are usually just pausing/unpausing it. + * if event == 'line': # <<<<<<<<<<<<<< + * is_line = True + * is_call = False */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_initial_trace_obj); - __Pyx_GIVEREF(__pyx_v_initial_trace_obj); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_initial_trace_obj)) __PYX_ERR(0, 503, __pyx_L4_error); - __Pyx_INCREF(__pyx_v_trace_obj); - __Pyx_GIVEREF(__pyx_v_trace_obj); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_trace_obj)) __PYX_ERR(0, 503, __pyx_L4_error); - __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - for (;;) { - if (__pyx_t_5 >= 2) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 503, __pyx_L4_error) - #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 521, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":504 - * if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: - * for check_trace_obj in (initial_trace_obj, trace_obj): - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) # <<<<<<<<<<<<<< - * absolute_filename = abs_real_path_and_base[0] - * canonical_normalized_filename = abs_real_path_and_base[1] + /* "_pydevd_bundle/pydevd_cython.pyx":522 + * # a call, StopIteration exception and return are usually just pausing/unpausing it. + * if event == 'line': + * is_line = True # <<<<<<<<<<<<<< + * is_call = False + * is_return = False */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 504, __pyx_L4_error) - __Pyx_XDECREF_SET(__pyx_v_abs_real_path_and_base, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + __pyx_v_is_line = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":505 - * for check_trace_obj in (initial_trace_obj, trace_obj): - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) - * absolute_filename = abs_real_path_and_base[0] # <<<<<<<<<<<<<< - * canonical_normalized_filename = abs_real_path_and_base[1] - * + /* "_pydevd_bundle/pydevd_cython.pyx":523 + * if event == 'line': + * is_line = True + * is_call = False # <<<<<<<<<<<<<< + * is_return = False + * is_exception_event = False */ - if (unlikely(__pyx_v_abs_real_path_and_base == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 505, __pyx_L4_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_real_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 505, __pyx_L4_error) - __Pyx_XDECREF_SET(__pyx_v_absolute_filename, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + __pyx_v_is_call = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":506 - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) - * absolute_filename = abs_real_path_and_base[0] - * canonical_normalized_filename = abs_real_path_and_base[1] # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":524 + * is_line = True + * is_call = False + * is_return = False # <<<<<<<<<<<<<< + * is_exception_event = False * - * filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored */ - if (unlikely(__pyx_v_abs_real_path_and_base == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 506, __pyx_L4_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 506, __pyx_L4_error) - __Pyx_XDECREF_SET(__pyx_v_canonical_normalized_filename, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + __pyx_v_is_return = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":508 - * canonical_normalized_filename = abs_real_path_and_base[1] - * - * filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":525 + * is_call = False + * is_return = False + * is_exception_event = False # <<<<<<<<<<<<<< * - * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * elif event == 'return': */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 508, __pyx_L4_error) - __Pyx_XDECREF_SET(__pyx_v_filename_to_lines_where_exceptions_are_ignored, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + __pyx_v_is_exception_event = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":510 - * filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored - * - * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) # <<<<<<<<<<<<<< - * if lines_ignored is None: - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + /* "_pydevd_bundle/pydevd_cython.pyx":521 + * # When in a coroutine we change the perceived event to the debugger because + * # a call, StopIteration exception and return are usually just pausing/unpausing it. + * if event == 'line': # <<<<<<<<<<<<<< + * is_line = True + * is_call = False */ - if (unlikely(__pyx_v_filename_to_lines_where_exceptions_are_ignored == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 510, __pyx_L4_error) - } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_filename_to_lines_where_exceptions_are_ignored, __pyx_v_canonical_normalized_filename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 510, __pyx_L4_error) - __Pyx_XDECREF_SET(__pyx_v_lines_ignored, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + goto __pyx_L13; + } - /* "_pydevd_bundle/pydevd_cython.pyx":511 - * - * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - * if lines_ignored is None: # <<<<<<<<<<<<<< - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + /* "_pydevd_bundle/pydevd_cython.pyx":527 + * is_exception_event = False * + * elif event == 'return': # <<<<<<<<<<<<<< + * is_line = False + * is_call = False */ - __pyx_t_2 = (__pyx_v_lines_ignored == ((PyObject*)Py_None)); - if (__pyx_t_2) { + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 527, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":512 - * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - * if lines_ignored is None: - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":528 * - * try: + * elif event == 'return': + * is_line = False # <<<<<<<<<<<<<< + * is_call = False + * is_return = True */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_lines_ignored, __pyx_t_1); - if (unlikely(__pyx_v_filename_to_lines_where_exceptions_are_ignored == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 512, __pyx_L4_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_filename_to_lines_where_exceptions_are_ignored, __pyx_v_canonical_normalized_filename, __pyx_t_1) < 0))) __PYX_ERR(0, 512, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_is_line = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":511 - * - * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - * if lines_ignored is None: # <<<<<<<<<<<<<< - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} - * + /* "_pydevd_bundle/pydevd_cython.pyx":529 + * elif event == 'return': + * is_line = False + * is_call = False # <<<<<<<<<<<<<< + * is_return = True + * is_exception_event = False */ - } + __pyx_v_is_call = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":514 - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + /* "_pydevd_bundle/pydevd_cython.pyx":530 + * is_line = False + * is_call = False + * is_return = True # <<<<<<<<<<<<<< + * is_exception_event = False * - * try: # <<<<<<<<<<<<<< - * curr_stat = os.stat(absolute_filename) - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - /*try:*/ { + __pyx_v_is_return = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":515 + /* "_pydevd_bundle/pydevd_cython.pyx":531 + * is_call = False + * is_return = True + * is_exception_event = False # <<<<<<<<<<<<<< * - * try: - * curr_stat = os.stat(absolute_filename) # <<<<<<<<<<<<<< - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) - * except: - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 515, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_absolute_filename}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_XDECREF_SET(__pyx_v_curr_stat, __pyx_t_1); - __pyx_t_1 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":516 - * try: - * curr_stat = os.stat(absolute_filename) - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) # <<<<<<<<<<<<<< - * except: - * curr_stat = None + * returns_cache_key = (frame_cache_key, 'returns') */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_stat, __pyx_n_s_st_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_stat, __pyx_n_s_st_mtime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 516, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 516, __pyx_L15_error); - __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7)) __PYX_ERR(0, 516, __pyx_L15_error); - __pyx_t_1 = 0; - __pyx_t_7 = 0; - __Pyx_DECREF_SET(__pyx_v_curr_stat, __pyx_t_6); - __pyx_t_6 = 0; + __pyx_v_is_exception_event = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":514 - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + /* "_pydevd_bundle/pydevd_cython.pyx":533 + * is_exception_event = False * - * try: # <<<<<<<<<<<<<< - * curr_stat = os.stat(absolute_filename) - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * returns_cache_key = (frame_cache_key, 'returns') # <<<<<<<<<<<<<< + * return_lines = frame_skips_cache.get(returns_cache_key) + * if return_lines is None: */ - } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L22_try_end; - __pyx_L15_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 533, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_frame_cache_key); + __Pyx_GIVEREF(__pyx_v_frame_cache_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 533, __pyx_L4_error); + __Pyx_INCREF(__pyx_n_s_returns); + __Pyx_GIVEREF(__pyx_n_s_returns); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_returns)) __PYX_ERR(0, 533, __pyx_L4_error); + __pyx_v_returns_cache_key = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":517 - * curr_stat = os.stat(absolute_filename) - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) - * except: # <<<<<<<<<<<<<< - * curr_stat = None + /* "_pydevd_bundle/pydevd_cython.pyx":534 * + * returns_cache_key = (frame_cache_key, 'returns') + * return_lines = frame_skips_cache.get(returns_cache_key) # <<<<<<<<<<<<<< + * if return_lines is None: + * # Note: we're collecting the return lines by inspecting the bytecode as */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_1) < 0) __PYX_ERR(0, 517, __pyx_L17_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_1); + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 534, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_returns_cache_key, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_return_lines = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":518 - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) - * except: - * curr_stat = None # <<<<<<<<<<<<<< - * - * last_stat = self.filename_to_stat_info.get(absolute_filename) + /* "_pydevd_bundle/pydevd_cython.pyx":535 + * returns_cache_key = (frame_cache_key, 'returns') + * return_lines = frame_skips_cache.get(returns_cache_key) + * if return_lines is None: # <<<<<<<<<<<<<< + * # Note: we're collecting the return lines by inspecting the bytecode as + * # there are multiple returns and multiple stop iterations when awaiting and */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_curr_stat, Py_None); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L16_exception_handled; - } + __pyx_t_9 = (__pyx_v_return_lines == Py_None); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":514 - * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} - * - * try: # <<<<<<<<<<<<<< - * curr_stat = os.stat(absolute_filename) - * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + /* "_pydevd_bundle/pydevd_cython.pyx":540 + * # it doesn't give any clear indication when a coroutine or generator is + * # finishing or just pausing. + * return_lines = set() # <<<<<<<<<<<<<< + * for x in py_db.collect_return_info(frame.f_code): + * # Note: cython does not support closures in cpdefs (so we can't use */ - __pyx_L17_except_error:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L4_error; - __pyx_L16_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_L22_try_end:; - } + __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 540, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_return_lines, __pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":520 - * curr_stat = None - * - * last_stat = self.filename_to_stat_info.get(absolute_filename) # <<<<<<<<<<<<<< - * if last_stat != curr_stat: - * self.filename_to_stat_info[absolute_filename] = curr_stat + /* "_pydevd_bundle/pydevd_cython.pyx":541 + * # finishing or just pausing. + * return_lines = set() + * for x in py_db.collect_return_info(frame.f_code): # <<<<<<<<<<<<<< + * # Note: cython does not support closures in cpdefs (so we can't use + * # a list comprehension). */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename_to_stat_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 520, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 520, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_absolute_filename}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L4_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_collect_return_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_XDECREF_SET(__pyx_v_last_stat, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { + __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 541, __pyx_L4_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 541, __pyx_L4_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 541, __pyx_L4_error) + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 541, __pyx_L4_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 541, __pyx_L4_error) + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } + } else { + __pyx_t_8 = __pyx_t_13(__pyx_t_1); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 541, __pyx_L4_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":521 + /* "_pydevd_bundle/pydevd_cython.pyx":544 + * # Note: cython does not support closures in cpdefs (so we can't use + * # a list comprehension). + * return_lines.add(x.return_line) # <<<<<<<<<<<<<< * - * last_stat = self.filename_to_stat_info.get(absolute_filename) - * if last_stat != curr_stat: # <<<<<<<<<<<<<< - * self.filename_to_stat_info[absolute_filename] = curr_stat - * lines_ignored.clear() + * frame_skips_cache[returns_cache_key] = return_lines */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_last_stat, __pyx_v_curr_stat, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L4_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 521, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_return_lines, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_return_line); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 544, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":522 - * last_stat = self.filename_to_stat_info.get(absolute_filename) - * if last_stat != curr_stat: - * self.filename_to_stat_info[absolute_filename] = curr_stat # <<<<<<<<<<<<<< - * lines_ignored.clear() - * try: + /* "_pydevd_bundle/pydevd_cython.pyx":541 + * # finishing or just pausing. + * return_lines = set() + * for x in py_db.collect_return_info(frame.f_code): # <<<<<<<<<<<<<< + * # Note: cython does not support closures in cpdefs (so we can't use + * # a list comprehension). */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename_to_stat_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_absolute_filename, __pyx_v_curr_stat) < 0))) __PYX_ERR(0, 522, __pyx_L4_error) + } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":523 - * if last_stat != curr_stat: - * self.filename_to_stat_info[absolute_filename] = curr_stat - * lines_ignored.clear() # <<<<<<<<<<<<<< - * try: - * linecache.checkcache(absolute_filename) + /* "_pydevd_bundle/pydevd_cython.pyx":546 + * return_lines.add(x.return_line) + * + * frame_skips_cache[returns_cache_key] = return_lines # <<<<<<<<<<<<<< + * + * if line not in return_lines: */ - if (unlikely(__pyx_v_lines_ignored == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); - __PYX_ERR(0, 523, __pyx_L4_error) + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 546, __pyx_L4_error) } - __pyx_t_13 = __Pyx_PyDict_Clear(__pyx_v_lines_ignored); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 523, __pyx_L4_error) + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_returns_cache_key, __pyx_v_return_lines) < 0))) __PYX_ERR(0, 546, __pyx_L4_error) - /* "_pydevd_bundle/pydevd_cython.pyx":524 - * self.filename_to_stat_info[absolute_filename] = curr_stat - * lines_ignored.clear() - * try: # <<<<<<<<<<<<<< - * linecache.checkcache(absolute_filename) - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":535 + * returns_cache_key = (frame_cache_key, 'returns') + * return_lines = frame_skips_cache.get(returns_cache_key) + * if return_lines is None: # <<<<<<<<<<<<<< + * # Note: we're collecting the return lines by inspecting the bytecode as + * # there are multiple returns and multiple stop iterations when awaiting and */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { + } - /* "_pydevd_bundle/pydevd_cython.pyx":525 - * lines_ignored.clear() - * try: - * linecache.checkcache(absolute_filename) # <<<<<<<<<<<<<< - * except: - * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) + /* "_pydevd_bundle/pydevd_cython.pyx":548 + * frame_skips_cache[returns_cache_key] = return_lines + * + * if line not in return_lines: # <<<<<<<<<<<<<< + * # Not really a return (coroutine/generator paused). + * return self.trace_dispatch */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_linecache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L26_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_checkcache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 525, __pyx_L26_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_absolute_filename}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L26_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_return_lines, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 548, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":524 - * self.filename_to_stat_info[absolute_filename] = curr_stat - * lines_ignored.clear() - * try: # <<<<<<<<<<<<<< - * linecache.checkcache(absolute_filename) - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":550 + * if line not in return_lines: + * # Not really a return (coroutine/generator paused). + * return self.trace_dispatch # <<<<<<<<<<<<<< + * else: + * if self.exc_info: */ - } - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L33_try_end; - __pyx_L26_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":526 - * try: - * linecache.checkcache(absolute_filename) - * except: # <<<<<<<<<<<<<< - * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) + /* "_pydevd_bundle/pydevd_cython.pyx":548 + * frame_skips_cache[returns_cache_key] = return_lines * + * if line not in return_lines: # <<<<<<<<<<<<<< + * # Not really a return (coroutine/generator paused). + * return self.trace_dispatch */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 526, __pyx_L28_except_error) - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_6); + } - /* "_pydevd_bundle/pydevd_cython.pyx":527 - * linecache.checkcache(absolute_filename) - * except: - * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":552 + * return self.trace_dispatch + * else: + * if self.exc_info: # <<<<<<<<<<<<<< + * self.handle_user_exception(frame) + * return self.trace_dispatch + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 552, __pyx_L4_error) + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":553 + * else: + * if self.exc_info: + * self.handle_user_exception(frame) # <<<<<<<<<<<<<< + * return self.trace_dispatch * - * from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) */ - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 527, __pyx_L28_except_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_exception); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 527, __pyx_L28_except_error) - __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_15))) { - __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15); - if (likely(__pyx_t_14)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); - __Pyx_INCREF(__pyx_t_14); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_15, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_kp_s_Error_in_linecache_checkcache_r, __pyx_v_absolute_filename}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 527, __pyx_L28_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 553, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L27_exception_handled; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":524 - * self.filename_to_stat_info[absolute_filename] = curr_stat - * lines_ignored.clear() - * try: # <<<<<<<<<<<<<< - * linecache.checkcache(absolute_filename) - * except: - */ - __pyx_L28_except_error:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); - goto __pyx_L4_error; - __pyx_L27_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); - __pyx_L33_try_end:; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":521 + /* "_pydevd_bundle/pydevd_cython.pyx":554 + * if self.exc_info: + * self.handle_user_exception(frame) + * return self.trace_dispatch # <<<<<<<<<<<<<< * - * last_stat = self.filename_to_stat_info.get(absolute_filename) - * if last_stat != curr_stat: # <<<<<<<<<<<<<< - * self.filename_to_stat_info[absolute_filename] = curr_stat - * lines_ignored.clear() + * # Tricky handling: usually when we're on a frame which is about to exit */ - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":529 - * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) - * - * from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) # <<<<<<<<<<<<<< - * if from_user_input: - * merged = {} + /* "_pydevd_bundle/pydevd_cython.pyx":552 + * return self.trace_dispatch + * else: + * if self.exc_info: # <<<<<<<<<<<<<< + * self.handle_user_exception(frame) + * return self.trace_dispatch */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_9 = 1; } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_canonical_normalized_filename}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_XDECREF_SET(__pyx_v_from_user_input, __pyx_t_6); - __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":530 - * - * from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - * if from_user_input: # <<<<<<<<<<<<<< - * merged = {} - * merged.update(lines_ignored) + /* "_pydevd_bundle/pydevd_cython.pyx":572 + * # as the return shouldn't mean that we've actually completed executing a + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_user_input); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 530, __pyx_L4_error) - if (__pyx_t_2) { + __pyx_t_11 = (__pyx_v_stop_frame == __pyx_v_frame); + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L21_bool_binop_done; + } + __pyx_t_11 = (!__pyx_v_info->pydev_use_scoped_step_frame); + __pyx_t_9 = __pyx_t_11; + __pyx_L21_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":531 - * from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - * if from_user_input: - * merged = {} # <<<<<<<<<<<<<< - * merged.update(lines_ignored) - * # Override what we have with the related entries that the user entered + /* "_pydevd_bundle/pydevd_cython.pyx":573 + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: + * if step_cmd in (108, 159, 107, 144): # <<<<<<<<<<<<<< + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_v_merged, ((PyObject*)__pyx_t_6)); - __pyx_t_6 = 0; + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x9F: + case 0x6B: + case 0x90: - /* "_pydevd_bundle/pydevd_cython.pyx":532 - * if from_user_input: - * merged = {} - * merged.update(lines_ignored) # <<<<<<<<<<<<<< - * # Override what we have with the related entries that the user entered - * merged.update(from_user_input) + /* "_pydevd_bundle/pydevd_cython.pyx":574 + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) # <<<<<<<<<<<<<< + * if f is not None: + * info.pydev_step_cmd = 206 */ - __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_merged, __pyx_v_lines_ignored); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_get_unfiltered_back_frame(__pyx_v_self, __pyx_v_py_db, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":534 - * merged.update(lines_ignored) - * # Override what we have with the related entries that the user entered - * merged.update(from_user_input) # <<<<<<<<<<<<<< - * else: - * merged = lines_ignored + /* "_pydevd_bundle/pydevd_cython.pyx":575 + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 206 + * info.pydev_step_stop = f */ - __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_merged, __pyx_v_from_user_input); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = (__pyx_v_f != Py_None); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":530 - * - * from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - * if from_user_input: # <<<<<<<<<<<<<< - * merged = {} - * merged.update(lines_ignored) + /* "_pydevd_bundle/pydevd_cython.pyx":576 + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + * info.pydev_step_cmd = 206 # <<<<<<<<<<<<<< + * info.pydev_step_stop = f + * else: */ - goto __pyx_L36; - } + __pyx_v_info->pydev_step_cmd = 0xCE; - /* "_pydevd_bundle/pydevd_cython.pyx":536 - * merged.update(from_user_input) - * else: - * merged = lines_ignored # <<<<<<<<<<<<<< - * - * exc_lineno = check_trace_obj.tb_lineno + /* "_pydevd_bundle/pydevd_cython.pyx":577 + * if f is not None: + * info.pydev_step_cmd = 206 + * info.pydev_step_stop = f # <<<<<<<<<<<<<< + * else: + * if step_cmd == 108: */ - /*else*/ { - __Pyx_INCREF(__pyx_v_lines_ignored); - __Pyx_XDECREF_SET(__pyx_v_merged, __pyx_v_lines_ignored); - } - __pyx_L36:; + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = __pyx_v_f; - /* "_pydevd_bundle/pydevd_cython.pyx":538 - * merged = lines_ignored - * - * exc_lineno = check_trace_obj.tb_lineno # <<<<<<<<<<<<<< - * - * # print ('lines ignored', lines_ignored) + /* "_pydevd_bundle/pydevd_cython.pyx":575 + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 206 + * info.pydev_step_stop = f */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_lineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 538, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_v_exc_lineno, __pyx_t_6); - __pyx_t_6 = 0; + goto __pyx_L23; + } - /* "_pydevd_bundle/pydevd_cython.pyx":544 - * # print ('merged', merged, 'curr', exc_lineno) - * - * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. # <<<<<<<<<<<<<< - * try: - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + /* "_pydevd_bundle/pydevd_cython.pyx":579 + * info.pydev_step_stop = f + * else: + * if step_cmd == 108: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None */ - if (unlikely(__pyx_v_merged == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 544, __pyx_L4_error) - } - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_exc_lineno, __pyx_v_merged, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 544, __pyx_L4_error) - if (__pyx_t_2) { + /*else*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":545 + /* "_pydevd_bundle/pydevd_cython.pyx":583 + * info.pydev_step_stop = None * - * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. - * try: # <<<<<<<<<<<<<< - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - * except: - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - /*try:*/ { + * elif step_cmd == 159: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None + */ + switch (__pyx_v_step_cmd) { + case 0x6C: - /* "_pydevd_bundle/pydevd_cython.pyx":546 - * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. - * try: - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) # <<<<<<<<<<<<<< - * except: - * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) + /* "_pydevd_bundle/pydevd_cython.pyx":580 + * else: + * if step_cmd == 108: + * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None + * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_linecache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 546, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_absolute_filename, __pyx_v_exc_lineno, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_6); - __pyx_t_6 = 0; + __pyx_v_info->pydev_step_cmd = 0x6B; - /* "_pydevd_bundle/pydevd_cython.pyx":545 + /* "_pydevd_bundle/pydevd_cython.pyx":581 + * if step_cmd == 108: + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< * - * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. - * try: # <<<<<<<<<<<<<< - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - * except: + * elif step_cmd == 159: */ - } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L45_try_end; - __pyx_L38_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":547 - * try: - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - * except: # <<<<<<<<<<<<<< - * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) - * line = '' + /* "_pydevd_bundle/pydevd_cython.pyx":579 + * info.pydev_step_stop = f + * else: + * if step_cmd == 108: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 547, __pyx_L40_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_8); + break; + case 0x9F: - /* "_pydevd_bundle/pydevd_cython.pyx":548 - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - * except: - * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) # <<<<<<<<<<<<<< - * line = '' + /* "_pydevd_bundle/pydevd_cython.pyx":584 + * + * elif step_cmd == 159: + * info.pydev_step_cmd = 144 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None * */ - __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 548, __pyx_L40_except_error) - __Pyx_GOTREF(__pyx_t_15); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 548, __pyx_L40_except_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_15)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_15); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - __pyx_t_9 = 1; + __pyx_v_info->pydev_step_cmd = 0x90; + + /* "_pydevd_bundle/pydevd_cython.pyx":585 + * elif step_cmd == 159: + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * elif step_cmd == 206: + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":583 + * info.pydev_step_stop = None + * + * elif step_cmd == 159: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None + */ + break; + default: break; } } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_15, __pyx_kp_s_Error_in_linecache_getline_r_s_f, __pyx_v_absolute_filename, __pyx_v_exc_lineno}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L40_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_L23:; + + /* "_pydevd_bundle/pydevd_cython.pyx":573 + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: + * if step_cmd in (108, 159, 107, 144): # <<<<<<<<<<<<<< + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + */ + break; + case 0xCE: + + /* "_pydevd_bundle/pydevd_cython.pyx":589 + * elif step_cmd == 206: + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) # <<<<<<<<<<<<<< + * if f is not None: + * info.pydev_step_stop = f + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_get_unfiltered_back_frame(__pyx_v_self, __pyx_v_py_db, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":590 + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_stop = f + * else: + */ + __pyx_t_9 = (__pyx_v_f != Py_None); + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":591 + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + * info.pydev_step_stop = f # <<<<<<<<<<<<<< + * else: + * info.pydev_step_cmd = 107 + */ + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = __pyx_v_f; + + /* "_pydevd_bundle/pydevd_cython.pyx":590 + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_stop = f + * else: + */ + goto __pyx_L24; } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":549 - * except: - * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) - * line = '' # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":593 + * info.pydev_step_stop = f + * else: + * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None * - * if IGNORE_EXCEPTION_TAG.match(line) is not None: */ - __Pyx_INCREF(__pyx_kp_s_); - __Pyx_XDECREF_SET(__pyx_v_line, __pyx_kp_s_); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L39_exception_handled; - } + /*else*/ { + __pyx_v_info->pydev_step_cmd = 0x6B; + + /* "_pydevd_bundle/pydevd_cython.pyx":594 + * else: + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * elif event == 'exception': + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + } + __pyx_L24:; - /* "_pydevd_bundle/pydevd_cython.pyx":545 + /* "_pydevd_bundle/pydevd_cython.pyx":587 + * info.pydev_step_stop = None * - * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. - * try: # <<<<<<<<<<<<<< - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - * except: + * elif step_cmd == 206: # <<<<<<<<<<<<<< + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) + */ + break; + default: break; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":572 + * # as the return shouldn't mean that we've actually completed executing a + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) */ - __pyx_L40_except_error:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L4_error; - __pyx_L39_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_L45_try_end:; } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":527 + * is_exception_event = False + * + * elif event == 'return': # <<<<<<<<<<<<<< + * is_line = False + * is_call = False + */ + goto __pyx_L13; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":596 + * info.pydev_step_stop = None + * + * elif event == 'exception': # <<<<<<<<<<<<<< + * breakpoints_for_file = None + * if has_exception_breakpoints: + */ + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 596, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":551 - * line = '' + /* "_pydevd_bundle/pydevd_cython.pyx":597 * - * if IGNORE_EXCEPTION_TAG.match(line) is not None: # <<<<<<<<<<<<<< - * lines_ignored[exc_lineno] = 1 - * return False + * elif event == 'exception': + * breakpoints_for_file = None # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + */ + __Pyx_INCREF(Py_None); + __pyx_v_breakpoints_for_file = ((PyObject*)Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":598 + * elif event == 'exception': + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + */ + if (__pyx_v_has_exception_breakpoints) { + + /* "_pydevd_bundle/pydevd_cython.pyx":599 + * breakpoints_for_file = None + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) # <<<<<<<<<<<<<< + * self.exc_info = exc_info + * if should_stop: */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_IGNORE_EXCEPTION_TAG); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 551, __pyx_L4_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 599, __pyx_L4_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_match); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 551, __pyx_L4_error) + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 599, __pyx_L4_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_9 = 0; + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 599, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_9 = 1; + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_line}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 551, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); + PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_t_7, __pyx_t_6, __pyx_v_frame, __pyx_t_4, __pyx_v_arg, __pyx_v_self->exc_info}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __pyx_t_2 = (__pyx_t_8 != Py_None); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 599, __pyx_L4_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); + index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_4 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_6 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_7), 3) < 0) __PYX_ERR(0, 599, __pyx_L4_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L27_unpacking_done; + __pyx_L26_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 599, __pyx_L4_error) + __pyx_L27_unpacking_done:; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L4_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_2) { + __pyx_v_should_stop = __pyx_t_9; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_exc_info = __pyx_t_6; + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":552 - * - * if IGNORE_EXCEPTION_TAG.match(line) is not None: - * lines_ignored[exc_lineno] = 1 # <<<<<<<<<<<<<< - * return False - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":600 + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info # <<<<<<<<<<<<<< + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): */ - if (unlikely(__pyx_v_lines_ignored == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 552, __pyx_L4_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_lines_ignored, __pyx_v_exc_lineno, __pyx_int_1) < 0))) __PYX_ERR(0, 552, __pyx_L4_error) + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_GIVEREF(__pyx_v_exc_info); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_v_exc_info; - /* "_pydevd_bundle/pydevd_cython.pyx":553 - * if IGNORE_EXCEPTION_TAG.match(line) is not None: - * lines_ignored[exc_lineno] = 1 - * return False # <<<<<<<<<<<<<< - * else: - * # Put in the cache saying not to ignore + /* "_pydevd_bundle/pydevd_cython.pyx":601 + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L3_return; + if (__pyx_v_should_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":551 - * line = '' + /* "_pydevd_bundle/pydevd_cython.pyx":602 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch * - * if IGNORE_EXCEPTION_TAG.match(line) is not None: # <<<<<<<<<<<<<< - * lines_ignored[exc_lineno] = 1 - * return False - */ - } - - /* "_pydevd_bundle/pydevd_cython.pyx":556 - * else: - * # Put in the cache saying not to ignore - * lines_ignored[exc_lineno] = 0 # <<<<<<<<<<<<<< - * else: - * # Ok, dict has it already cached, so, let's check it... */ - /*else*/ { - if (unlikely(__pyx_v_lines_ignored == Py_None)) { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 556, __pyx_L4_error) + __PYX_ERR(0, 602, __pyx_L4_error) } - if (unlikely((PyDict_SetItem(__pyx_v_lines_ignored, __pyx_v_exc_lineno, __pyx_int_0) < 0))) __PYX_ERR(0, 556, __pyx_L4_error) - } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 602, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 602, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_t_4, __pyx_t_8, __pyx_v_frame, __pyx_v_arg, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 602, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":544 - * # print ('merged', merged, 'curr', exc_lineno) + /* "_pydevd_bundle/pydevd_cython.pyx":603 + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch # <<<<<<<<<<<<<< * - * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. # <<<<<<<<<<<<<< - * try: - * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * return self.trace_dispatch */ - goto __pyx_L37; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":559 - * else: - * # Ok, dict has it already cached, so, let's check it... - * if merged.get(exc_lineno, 0): # <<<<<<<<<<<<<< - * return False + /* "_pydevd_bundle/pydevd_cython.pyx":602 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch * */ - /*else*/ { - if (unlikely(__pyx_v_merged == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 559, __pyx_L4_error) + } + + /* "_pydevd_bundle/pydevd_cython.pyx":601 + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ } - __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_merged, __pyx_v_exc_lineno, __pyx_int_0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 559, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 559, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":560 - * # Ok, dict has it already cached, so, let's check it... - * if merged.get(exc_lineno, 0): - * return False # <<<<<<<<<<<<<< - * - * thread = self._args[3] + /* "_pydevd_bundle/pydevd_cython.pyx":598 + * elif event == 'exception': + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L3_return; + } - /* "_pydevd_bundle/pydevd_cython.pyx":559 - * else: - * # Ok, dict has it already cached, so, let's check it... - * if merged.get(exc_lineno, 0): # <<<<<<<<<<<<<< - * return False + /* "_pydevd_bundle/pydevd_cython.pyx":605 + * return self.trace_dispatch * + * return self.trace_dispatch # <<<<<<<<<<<<<< + * else: + * # event == 'call' or event == 'c_XXX' */ - } - } - __pyx_L37:; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":503 + /* "_pydevd_bundle/pydevd_cython.pyx":596 + * info.pydev_step_stop = None * - * if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: - * for check_trace_obj in (initial_trace_obj, trace_obj): # <<<<<<<<<<<<<< - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) - * absolute_filename = abs_real_path_and_base[0] + * elif event == 'exception': # <<<<<<<<<<<<<< + * breakpoints_for_file = None + * if has_exception_breakpoints: */ } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":502 - * trace_obj = trace_obj.tb_next + /* "_pydevd_bundle/pydevd_cython.pyx":608 + * else: + * # event == 'call' or event == 'c_XXX' + * return self.trace_dispatch # <<<<<<<<<<<<<< * - * if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: # <<<<<<<<<<<<<< - * for check_trace_obj in (initial_trace_obj, trace_obj): - * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * else: # Not coroutine nor generator */ - } + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + } + __pyx_L13:; - /* "_pydevd_bundle/pydevd_cython.pyx":562 - * return False - * - * thread = self._args[3] # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":517 + * function_breakpoint_on_call_event = None * - * try: + * if frame.f_code.co_flags & 0xa0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 # <<<<<<<<<<<<<< + * # Dealing with coroutines and generators: + * # When in a coroutine we change the perceived event to the debugger because */ - if (unlikely(__pyx_v_self->_args == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 562, __pyx_L4_error) + goto __pyx_L12; } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_thread = __pyx_t_4; - __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":564 - * thread = self._args[3] + /* "_pydevd_bundle/pydevd_cython.pyx":611 * - * try: # <<<<<<<<<<<<<< - * frame_id_to_frame = {} - * frame_id_to_frame[id(frame)] = frame + * else: # Not coroutine nor generator + * if event == 'line': # <<<<<<<<<<<<<< + * is_line = True + * is_call = False */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { + /*else*/ { + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 611, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":565 - * - * try: - * frame_id_to_frame = {} # <<<<<<<<<<<<<< - * frame_id_to_frame[id(frame)] = frame - * f = trace_obj.tb_frame + /* "_pydevd_bundle/pydevd_cython.pyx":612 + * else: # Not coroutine nor generator + * if event == 'line': + * is_line = True # <<<<<<<<<<<<<< + * is_call = False + * is_return = False */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_frame_id_to_frame = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_is_line = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":566 - * try: - * frame_id_to_frame = {} - * frame_id_to_frame[id(frame)] = frame # <<<<<<<<<<<<<< - * f = trace_obj.tb_frame - * while f is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":613 + * if event == 'line': + * is_line = True + * is_call = False # <<<<<<<<<<<<<< + * is_return = False + * is_exception_event = False */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyDict_SetItem(__pyx_v_frame_id_to_frame, __pyx_t_4, __pyx_v_frame) < 0))) __PYX_ERR(0, 566, __pyx_L51_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_is_call = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":567 - * frame_id_to_frame = {} - * frame_id_to_frame[id(frame)] = frame - * f = trace_obj.tb_frame # <<<<<<<<<<<<<< - * while f is not None: - * frame_id_to_frame[id(f)] = f + /* "_pydevd_bundle/pydevd_cython.pyx":614 + * is_line = True + * is_call = False + * is_return = False # <<<<<<<<<<<<<< + * is_exception_event = False + * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_f = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_is_return = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":568 - * frame_id_to_frame[id(frame)] = frame - * f = trace_obj.tb_frame - * while f is not None: # <<<<<<<<<<<<<< - * frame_id_to_frame[id(f)] = f - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":615 + * is_call = False + * is_return = False + * is_exception_event = False # <<<<<<<<<<<<<< + * + * elif event == 'return': */ - while (1) { - __pyx_t_2 = (__pyx_v_f != Py_None); - if (!__pyx_t_2) break; + __pyx_v_is_exception_event = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":569 - * f = trace_obj.tb_frame - * while f is not None: - * frame_id_to_frame[id(f)] = f # <<<<<<<<<<<<<< - * f = f.f_back - * f = None + /* "_pydevd_bundle/pydevd_cython.pyx":611 + * + * else: # Not coroutine nor generator + * if event == 'line': # <<<<<<<<<<<<<< + * is_line = True + * is_call = False */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyDict_SetItem(__pyx_v_frame_id_to_frame, __pyx_t_4, __pyx_v_f) < 0))) __PYX_ERR(0, 569, __pyx_L51_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L30; + } - /* "_pydevd_bundle/pydevd_cython.pyx":570 - * while f is not None: - * frame_id_to_frame[id(f)] = f - * f = f.f_back # <<<<<<<<<<<<<< - * f = None + /* "_pydevd_bundle/pydevd_cython.pyx":617 + * is_exception_event = False * + * elif event == 'return': # <<<<<<<<<<<<<< + * is_line = False + * is_return = True */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_4); - __pyx_t_4 = 0; - } + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 617, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":571 - * frame_id_to_frame[id(f)] = f - * f = f.f_back - * f = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":618 * - * stopped = True + * elif event == 'return': + * is_line = False # <<<<<<<<<<<<<< + * is_return = True + * is_call = False */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_f, Py_None); + __pyx_v_is_line = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":573 - * f = None - * - * stopped = True # <<<<<<<<<<<<<< - * main_debugger.send_caught_exception_stack(thread, arg, id(frame)) - * try: + /* "_pydevd_bundle/pydevd_cython.pyx":619 + * elif event == 'return': + * is_line = False + * is_return = True # <<<<<<<<<<<<<< + * is_call = False + * is_exception_event = False */ - __pyx_v_stopped = 1; + __pyx_v_is_return = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":574 + /* "_pydevd_bundle/pydevd_cython.pyx":620 + * is_line = False + * is_return = True + * is_call = False # <<<<<<<<<<<<<< + * is_exception_event = False * - * stopped = True - * main_debugger.send_caught_exception_stack(thread, arg, id(frame)) # <<<<<<<<<<<<<< - * try: - * self.set_suspend(thread, 137) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_send_caught_exception_stack); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 574, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_thread, __pyx_v_arg, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_is_call = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":575 - * stopped = True - * main_debugger.send_caught_exception_stack(thread, arg, id(frame)) - * try: # <<<<<<<<<<<<<< - * self.set_suspend(thread, 137) - * self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type) + /* "_pydevd_bundle/pydevd_cython.pyx":621 + * is_return = True + * is_call = False + * is_exception_event = False # <<<<<<<<<<<<<< + * + * # If we are in single step mode and something causes us to exit the current frame, we need to make sure we break */ - /*try:*/ { + __pyx_v_is_exception_event = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":576 - * main_debugger.send_caught_exception_stack(thread, arg, id(frame)) - * try: - * self.set_suspend(thread, 137) # <<<<<<<<<<<<<< - * self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type) - * finally: + /* "_pydevd_bundle/pydevd_cython.pyx":630 + * # @DontTrace comment. + * if ( + * stop_frame is frame and # <<<<<<<<<<<<<< + * not info.pydev_use_scoped_step_frame and is_return and + * step_cmd in (108, 109, 159, 160, 128) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 576, __pyx_L60_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_thread, __pyx_int_137}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L60_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = (__pyx_v_stop_frame == __pyx_v_frame); + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L32_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":577 - * try: - * self.set_suspend(thread, 137) - * self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type) # <<<<<<<<<<<<<< - * finally: - * main_debugger.send_caught_exception_stack_proceeded(thread) + /* "_pydevd_bundle/pydevd_cython.pyx":631 + * if ( + * stop_frame is frame and + * not info.pydev_use_scoped_step_frame and is_return and # <<<<<<<<<<<<<< + * step_cmd in (108, 109, 159, 160, 128) + * ): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L60_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 577, __pyx_L60_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_thread); - __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 577, __pyx_L60_error); - __Pyx_INCREF(__pyx_v_frame); - __Pyx_GIVEREF(__pyx_v_frame); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_frame)) __PYX_ERR(0, 577, __pyx_L60_error); - __Pyx_INCREF(__pyx_v_event); - __Pyx_GIVEREF(__pyx_v_event); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_event)) __PYX_ERR(0, 577, __pyx_L60_error); - __Pyx_INCREF(__pyx_v_arg); - __Pyx_GIVEREF(__pyx_v_arg); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_arg)) __PYX_ERR(0, 577, __pyx_L60_error); - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L60_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_exception_type, __pyx_v_exception_type) < 0) __PYX_ERR(0, 577, __pyx_L60_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L60_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_11 = (!__pyx_v_info->pydev_use_scoped_step_frame); + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L32_bool_binop_done; + } + if (__pyx_v_is_return) { + } else { + __pyx_t_9 = __pyx_v_is_return; + goto __pyx_L32_bool_binop_done; } - /* "_pydevd_bundle/pydevd_cython.pyx":579 - * self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type) - * finally: - * main_debugger.send_caught_exception_stack_proceeded(thread) # <<<<<<<<<<<<<< - * except: - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":632 + * stop_frame is frame and + * not info.pydev_use_scoped_step_frame and is_return and + * step_cmd in (108, 109, 159, 160, 128) # <<<<<<<<<<<<<< + * ): + * */ - /*finally:*/ { - /*normal exit:*/{ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_send_caught_exception_stack_proc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_9 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_thread}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L51_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L61; - } - __pyx_L60_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __Pyx_XGOTREF(__pyx_t_22); - __Pyx_XGOTREF(__pyx_t_23); - __pyx_t_9 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename; - { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_send_caught_exception_stack_proc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L63_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_24 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_24 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_thread}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_24, 1+__pyx_t_24); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L63_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); - } - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20); - __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; - __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17; - goto __pyx_L51_error; - __pyx_L63_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); - } - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; - __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; - __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; - goto __pyx_L51_error; - } - __pyx_L61:; + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x6D: + case 0x9F: + case 0xA0: + case 0x80: + __pyx_t_11 = 1; + break; + default: + __pyx_t_11 = 0; + break; } + __pyx_t_15 = __pyx_t_11; + __pyx_t_9 = __pyx_t_15; + __pyx_L32_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":629 + * # Note: this is especially troublesome when we're skipping code with the + * # @DontTrace comment. + * if ( # <<<<<<<<<<<<<< + * stop_frame is frame and + * not info.pydev_use_scoped_step_frame and is_return and + */ + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":564 - * thread = self._args[3] + /* "_pydevd_bundle/pydevd_cython.pyx":635 + * ): * - * try: # <<<<<<<<<<<<<< - * frame_id_to_frame = {} - * frame_id_to_frame[id(frame)] = frame + * if step_cmd in (108, 109, 128): # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * else: */ - } - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L56_try_end; - __pyx_L51_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x6D: + case 0x80: - /* "_pydevd_bundle/pydevd_cython.pyx":580 - * finally: - * main_debugger.send_caught_exception_stack_proceeded(thread) - * except: # <<<<<<<<<<<<<< - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":636 * + * if step_cmd in (108, 109, 128): + * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< + * else: + * info.pydev_step_cmd = 144 */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 580, __pyx_L53_except_error) - __Pyx_XGOTREF(__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_8); + __pyx_v_info->pydev_step_cmd = 0x6B; - /* "_pydevd_bundle/pydevd_cython.pyx":581 - * main_debugger.send_caught_exception_stack_proceeded(thread) - * except: - * pydev_log.exception() # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":635 + * ): * - * main_debugger.set_trace_for_frame_and_parents(frame) + * if step_cmd in (108, 109, 128): # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L53_except_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 581, __pyx_L53_except_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - __pyx_t_16 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - __pyx_t_16 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_16, 0+__pyx_t_16); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L53_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L52_exception_handled; - } + break; + default: - /* "_pydevd_bundle/pydevd_cython.pyx":564 - * thread = self._args[3] + /* "_pydevd_bundle/pydevd_cython.pyx":638 + * info.pydev_step_cmd = 107 + * else: + * info.pydev_step_cmd = 144 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None * - * try: # <<<<<<<<<<<<<< - * frame_id_to_frame = {} - * frame_id_to_frame[id(frame)] = frame */ - __pyx_L53_except_error:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); - goto __pyx_L4_error; - __pyx_L52_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); - __pyx_L56_try_end:; - } + __pyx_v_info->pydev_step_cmd = 0x90; + break; + } - /* "_pydevd_bundle/pydevd_cython.pyx":583 - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":639 + * else: + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< * - * main_debugger.set_trace_for_frame_and_parents(frame) # <<<<<<<<<<<<<< - * finally: - * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * if self.exc_info: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_16 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_16 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 583, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":586 - * finally: - * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. - * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< - * # Clear some local variables... - * frame = None + /* "_pydevd_bundle/pydevd_cython.pyx":629 + * # Note: this is especially troublesome when we're skipping code with the + * # @DontTrace comment. + * if ( # <<<<<<<<<<<<<< + * stop_frame is frame and + * not info.pydev_use_scoped_step_frame and is_return and */ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_16 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_16 = 1; } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":588 - * remove_exception_from_frame(frame) - * # Clear some local variables... - * frame = None # <<<<<<<<<<<<<< - * trace_obj = None - * initial_trace_obj = None + /* "_pydevd_bundle/pydevd_cython.pyx":641 + * info.pydev_step_stop = None + * + * if self.exc_info: # <<<<<<<<<<<<<< + * if self.handle_user_exception(frame): + * return self.trace_dispatch */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_frame, Py_None); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 641, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":589 - * # Clear some local variables... - * frame = None - * trace_obj = None # <<<<<<<<<<<<<< - * initial_trace_obj = None - * check_trace_obj = None + /* "_pydevd_bundle/pydevd_cython.pyx":642 + * + * if self.exc_info: + * if self.handle_user_exception(frame): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_trace_obj, Py_None); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 642, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":590 - * frame = None - * trace_obj = None - * initial_trace_obj = None # <<<<<<<<<<<<<< - * check_trace_obj = None - * f = None + /* "_pydevd_bundle/pydevd_cython.pyx":643 + * if self.exc_info: + * if self.handle_user_exception(frame): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * elif event == 'call': */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_initial_trace_obj, Py_None); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":591 - * trace_obj = None - * initial_trace_obj = None - * check_trace_obj = None # <<<<<<<<<<<<<< - * f = None - * frame_id_to_frame = None + /* "_pydevd_bundle/pydevd_cython.pyx":642 + * + * if self.exc_info: + * if self.handle_user_exception(frame): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + } - /* "_pydevd_bundle/pydevd_cython.pyx":592 - * initial_trace_obj = None - * check_trace_obj = None - * f = None # <<<<<<<<<<<<<< - * frame_id_to_frame = None - * main_debugger = None + /* "_pydevd_bundle/pydevd_cython.pyx":641 + * info.pydev_step_stop = None + * + * if self.exc_info: # <<<<<<<<<<<<<< + * if self.handle_user_exception(frame): + * return self.trace_dispatch */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + } - /* "_pydevd_bundle/pydevd_cython.pyx":593 - * check_trace_obj = None - * f = None - * frame_id_to_frame = None # <<<<<<<<<<<<<< - * main_debugger = None - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":617 + * is_exception_event = False + * + * elif event == 'return': # <<<<<<<<<<<<<< + * is_line = False + * is_return = True */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); + goto __pyx_L30; + } - /* "_pydevd_bundle/pydevd_cython.pyx":594 - * f = None - * frame_id_to_frame = None - * main_debugger = None # <<<<<<<<<<<<<< - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":645 + * return self.trace_dispatch * + * elif event == 'call': # <<<<<<<<<<<<<< + * is_line = False + * is_call = True */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_main_debugger, Py_None); + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 645, __pyx_L4_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":595 - * frame_id_to_frame = None - * main_debugger = None - * thread = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":646 * - * return stopped - */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_thread, Py_None); - goto __pyx_L5; - } - __pyx_L4_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_23); - __Pyx_XGOTREF(__pyx_t_22); - __Pyx_XGOTREF(__pyx_t_21); - __pyx_t_16 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_25 = __pyx_filename; - { + * elif event == 'call': + * is_line = False # <<<<<<<<<<<<<< + * is_call = True + * is_return = False + */ + __pyx_v_is_line = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":586 - * finally: - * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. - * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< - * # Clear some local variables... - * frame = None + /* "_pydevd_bundle/pydevd_cython.pyx":647 + * elif event == 'call': + * is_line = False + * is_call = True # <<<<<<<<<<<<<< + * is_return = False + * is_exception_event = False + */ + __pyx_v_is_call = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":648 + * is_line = False + * is_call = True + * is_return = False # <<<<<<<<<<<<<< + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + */ + __pyx_v_is_return = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":649 + * is_call = True + * is_return = False + * is_exception_event = False # <<<<<<<<<<<<<< + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + */ + __pyx_v_is_exception_event = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":650 + * is_return = False + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. # <<<<<<<<<<<<<< + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L67_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_24 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_24 = 1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 650, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":651 + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) # <<<<<<<<<<<<<< + * + * elif event == 'exception': + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_function_breakpoint_name_to_brea); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 651, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } + __Pyx_DECREF_SET(__pyx_v_function_breakpoint_on_call_event, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":650 + * is_return = False + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. # <<<<<<<<<<<<<< + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + */ } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_24, 1+__pyx_t_24); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L67_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":645 + * return self.trace_dispatch + * + * elif event == 'call': # <<<<<<<<<<<<<< + * is_line = False + * is_call = True + */ + goto __pyx_L30; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":653 + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + * elif event == 'exception': # <<<<<<<<<<<<<< + * is_exception_event = True + * breakpoints_for_file = None + */ + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 653, __pyx_L4_error) + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":654 + * + * elif event == 'exception': + * is_exception_event = True # <<<<<<<<<<<<<< + * breakpoints_for_file = None + * if has_exception_breakpoints: + */ + __pyx_v_is_exception_event = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":655 + * elif event == 'exception': + * is_exception_event = True + * breakpoints_for_file = None # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + */ + __Pyx_INCREF(Py_None); + __pyx_v_breakpoints_for_file = ((PyObject*)Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":656 + * is_exception_event = True + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + */ + if (__pyx_v_has_exception_breakpoints) { + + /* "_pydevd_bundle/pydevd_cython.pyx":657 + * breakpoints_for_file = None + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) # <<<<<<<<<<<<<< + * self.exc_info = exc_info + * if should_stop: + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 657, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 657, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 657, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 657, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_t_8, __pyx_t_1, __pyx_v_frame, __pyx_t_4, __pyx_v_arg, __pyx_v_self->exc_info}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { + PyObject* sequence = __pyx_t_7; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 657, __pyx_L4_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_1 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 657, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L40_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_4 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L40_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_1 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L40_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_8), 3) < 0) __PYX_ERR(0, 657, __pyx_L4_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L41_unpacking_done; + __pyx_L40_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 657, __pyx_L4_error) + __pyx_L41_unpacking_done:; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 657, __pyx_L4_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_should_stop = __pyx_t_9; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_exc_info = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":588 - * remove_exception_from_frame(frame) - * # Clear some local variables... - * frame = None # <<<<<<<<<<<<<< - * trace_obj = None - * initial_trace_obj = None + /* "_pydevd_bundle/pydevd_cython.pyx":658 + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info # <<<<<<<<<<<<<< + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_frame, Py_None); + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_GIVEREF(__pyx_v_exc_info); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_v_exc_info; - /* "_pydevd_bundle/pydevd_cython.pyx":589 - * # Clear some local variables... - * frame = None - * trace_obj = None # <<<<<<<<<<<<<< - * initial_trace_obj = None - * check_trace_obj = None + /* "_pydevd_bundle/pydevd_cython.pyx":659 + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_trace_obj, Py_None); + if (__pyx_v_should_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":590 - * frame = None - * trace_obj = None - * initial_trace_obj = None # <<<<<<<<<<<<<< - * check_trace_obj = None - * f = None + /* "_pydevd_bundle/pydevd_cython.pyx":660 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * is_line = False */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_initial_trace_obj, Py_None); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 660, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 660, __pyx_L4_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_t_4, __pyx_t_6, __pyx_v_frame, __pyx_v_arg, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 660, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":591 - * trace_obj = None - * initial_trace_obj = None - * check_trace_obj = None # <<<<<<<<<<<<<< - * f = None - * frame_id_to_frame = None + /* "_pydevd_bundle/pydevd_cython.pyx":661 + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * is_line = False + * is_return = False */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 661, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":592 - * initial_trace_obj = None - * check_trace_obj = None - * f = None # <<<<<<<<<<<<<< - * frame_id_to_frame = None - * main_debugger = None + /* "_pydevd_bundle/pydevd_cython.pyx":660 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * is_line = False */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + } - /* "_pydevd_bundle/pydevd_cython.pyx":593 - * check_trace_obj = None - * f = None - * frame_id_to_frame = None # <<<<<<<<<<<<<< - * main_debugger = None - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":659 + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); + } - /* "_pydevd_bundle/pydevd_cython.pyx":594 - * f = None - * frame_id_to_frame = None - * main_debugger = None # <<<<<<<<<<<<<< - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":656 + * is_exception_event = True + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":662 + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + * is_line = False # <<<<<<<<<<<<<< + * is_return = False + * is_call = False + */ + __pyx_v_is_line = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":663 + * return self.trace_dispatch + * is_line = False + * is_return = False # <<<<<<<<<<<<<< + * is_call = False * */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_main_debugger, Py_None); + __pyx_v_is_return = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":595 - * frame_id_to_frame = None - * main_debugger = None - * thread = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":664 + * is_line = False + * is_return = False + * is_call = False # <<<<<<<<<<<<<< * - * return stopped + * else: */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_thread, Py_None); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21); + __pyx_v_is_call = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":653 + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + * elif event == 'exception': # <<<<<<<<<<<<<< + * is_exception_event = True + * breakpoints_for_file = None + */ + goto __pyx_L30; } - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; - __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_25; - goto __pyx_L1_error; - __pyx_L67_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21); + + /* "_pydevd_bundle/pydevd_cython.pyx":668 + * else: + * # Unexpected: just keep the same trace func (i.e.: event == 'c_XXX'). + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * if not is_exception_event: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; - goto __pyx_L1_error; + __pyx_L30:; } - __pyx_L3_return: { - __pyx_t_21 = __pyx_r; - __pyx_r = 0; + __pyx_L12:; - /* "_pydevd_bundle/pydevd_cython.pyx":586 - * finally: - * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. - * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< - * # Clear some local variables... - * frame = None + /* "_pydevd_bundle/pydevd_cython.pyx":670 + * return self.trace_dispatch + * + * if not is_exception_event: # <<<<<<<<<<<<<< + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_9 = 0; + __pyx_t_9 = (!__pyx_v_is_exception_event); + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":671 + * + * if not is_exception_event: + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) # <<<<<<<<<<<<<< + * + * can_skip = False + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_breakpoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 671, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_9 = 1; + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 671, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":588 - * remove_exception_from_frame(frame) - * # Clear some local variables... - * frame = None # <<<<<<<<<<<<<< - * trace_obj = None - * initial_trace_obj = None - */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_frame, Py_None); + if (!(likely(PyDict_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_7))) __PYX_ERR(0, 671, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_breakpoints_for_file, ((PyObject*)__pyx_t_7)); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":589 - * # Clear some local variables... - * frame = None - * trace_obj = None # <<<<<<<<<<<<<< - * initial_trace_obj = None - * check_trace_obj = None + /* "_pydevd_bundle/pydevd_cython.pyx":673 + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + * + * can_skip = False # <<<<<<<<<<<<<< + * + * if info.pydev_state == 1: # 1 = 1 */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_trace_obj, Py_None); + __pyx_v_can_skip = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":590 - * frame = None - * trace_obj = None - * initial_trace_obj = None # <<<<<<<<<<<<<< - * check_trace_obj = None - * f = None + /* "_pydevd_bundle/pydevd_cython.pyx":675 + * can_skip = False + * + * if info.pydev_state == 1: # 1 = 1 # <<<<<<<<<<<<<< + * # we can skip if: + * # - we have no stop marked */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_initial_trace_obj, Py_None); + __pyx_t_9 = (__pyx_v_info->pydev_state == 1); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":591 - * trace_obj = None - * initial_trace_obj = None - * check_trace_obj = None # <<<<<<<<<<<<<< - * f = None - * frame_id_to_frame = None + /* "_pydevd_bundle/pydevd_cython.pyx":680 + * # - we should make a step return/step over and we're not in the current frame + * # - we're stepping into a coroutine context and we're not in that context + * if step_cmd == -1: # <<<<<<<<<<<<<< + * can_skip = True + * */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + __pyx_t_9 = (__pyx_v_step_cmd == -1L); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":592 - * initial_trace_obj = None - * check_trace_obj = None - * f = None # <<<<<<<<<<<<<< - * frame_id_to_frame = None - * main_debugger = None + /* "_pydevd_bundle/pydevd_cython.pyx":681 + * # - we're stepping into a coroutine context and we're not in that context + * if step_cmd == -1: + * can_skip = True # <<<<<<<<<<<<<< + * + * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + __pyx_v_can_skip = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":593 - * check_trace_obj = None - * f = None - * frame_id_to_frame = None # <<<<<<<<<<<<<< - * main_debugger = None - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":680 + * # - we should make a step return/step over and we're not in the current frame + * # - we're stepping into a coroutine context and we're not in that context + * if step_cmd == -1: # <<<<<<<<<<<<<< + * can_skip = True + * */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); + goto __pyx_L46; + } - /* "_pydevd_bundle/pydevd_cython.pyx":594 - * f = None - * frame_id_to_frame = None - * main_debugger = None # <<<<<<<<<<<<<< - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":683 + * can_skip = True + * + * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): # <<<<<<<<<<<<<< + * can_skip = True * */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_main_debugger, Py_None); + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x6D: + case 0x9F: + case 0xA0: + __pyx_t_15 = 1; + break; + default: + __pyx_t_15 = 0; + break; + } + __pyx_t_11 = __pyx_t_15; + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L47_bool_binop_done; + } + __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 683, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_15 = (!__pyx_t_11); + __pyx_t_9 = __pyx_t_15; + __pyx_L47_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":595 - * frame_id_to_frame = None - * main_debugger = None - * thread = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":684 + * + * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): + * can_skip = True # <<<<<<<<<<<<<< * - * return stopped + * elif step_cmd == 128 and ( */ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_thread, Py_None); - __pyx_r = __pyx_t_21; - __pyx_t_21 = 0; - goto __pyx_L0; - } - __pyx_L5:; - } + __pyx_v_can_skip = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":597 - * thread = None + /* "_pydevd_bundle/pydevd_cython.pyx":683 + * can_skip = True * - * return stopped # <<<<<<<<<<<<<< + * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): # <<<<<<<<<<<<<< + * can_skip = True * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_stopped); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 597, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_r = __pyx_t_8; - __pyx_t_8 = 0; - goto __pyx_L0; + goto __pyx_L46; + } - /* "_pydevd_bundle/pydevd_cython.pyx":471 + /* "_pydevd_bundle/pydevd_cython.pyx":686 + * can_skip = True * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _handle_exception(self, frame, str event, arg, str exception_type): # <<<<<<<<<<<<<< - * cdef bint stopped; - * cdef tuple abs_real_path_and_base; + * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< + * stop_frame is not None and + * stop_frame is not frame and */ + __pyx_t_15 = (__pyx_v_step_cmd == 0x80); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L49_bool_binop_done; + } - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_14); - __Pyx_XDECREF(__pyx_t_15); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_abs_real_path_and_base); - __Pyx_XDECREF(__pyx_v_absolute_filename); - __Pyx_XDECREF(__pyx_v_canonical_normalized_filename); - __Pyx_XDECREF(__pyx_v_filename_to_lines_where_exceptions_are_ignored); - __Pyx_XDECREF(__pyx_v_lines_ignored); - __Pyx_XDECREF(__pyx_v_frame_id_to_frame); - __Pyx_XDECREF(__pyx_v_merged); - __Pyx_XDECREF(__pyx_v_trace_obj); - __Pyx_XDECREF(__pyx_v_main_debugger); - __Pyx_XDECREF(__pyx_v_initial_trace_obj); - __Pyx_XDECREF(__pyx_v_check_trace_obj); - __Pyx_XDECREF(__pyx_v_curr_stat); - __Pyx_XDECREF(__pyx_v_last_stat); - __Pyx_XDECREF(__pyx_v_from_user_input); - __Pyx_XDECREF(__pyx_v_exc_lineno); - __Pyx_XDECREF(__pyx_v_line); - __Pyx_XDECREF(__pyx_v_thread); - __Pyx_XDECREF(__pyx_v_f); - __Pyx_XDECREF(__pyx_v_frame); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "_pydevd_bundle/pydevd_cython.pyx":600 + /* "_pydevd_bundle/pydevd_cython.pyx":687 * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef get_func_name(self, frame): # <<<<<<<<<<<<<< - * cdef str func_name - * # ELSE - */ - -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame) { - PyObject *__pyx_v_func_name = 0; - PyObject *__pyx_v_code_obj = NULL; - PyObject *__pyx_v_cls_name = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_func_name", 1); - - /* "_pydevd_bundle/pydevd_cython.pyx":605 - * # def get_func_name(self, frame): - * # ENDIF - * code_obj = frame.f_code # <<<<<<<<<<<<<< - * func_name = code_obj.co_name - * try: + * elif step_cmd == 128 and ( + * stop_frame is not None and # <<<<<<<<<<<<<< + * stop_frame is not frame and + * stop_frame is not frame.f_back and */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_code_obj = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_15 = (__pyx_v_stop_frame != Py_None); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L49_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":606 - * # ENDIF - * code_obj = frame.f_code - * func_name = code_obj.co_name # <<<<<<<<<<<<<< - * try: - * cls_name = get_clsname_for_code(code_obj, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":688 + * elif step_cmd == 128 and ( + * stop_frame is not None and + * stop_frame is not frame and # <<<<<<<<<<<<<< + * stop_frame is not frame.f_back and + * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_obj, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 606, __pyx_L1_error) - __pyx_v_func_name = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_15 = (__pyx_v_stop_frame != __pyx_v_frame); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L49_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":607 - * code_obj = frame.f_code - * func_name = code_obj.co_name - * try: # <<<<<<<<<<<<<< - * cls_name = get_clsname_for_code(code_obj, frame) - * if cls_name is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":689 + * stop_frame is not None and + * stop_frame is not frame and + * stop_frame is not frame.f_back and # <<<<<<<<<<<<<< + * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): + * can_skip = True */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_4); - /*try:*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = (__pyx_v_stop_frame != __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L49_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":608 - * func_name = code_obj.co_name - * try: - * cls_name = get_clsname_for_code(code_obj, frame) # <<<<<<<<<<<<<< - * if cls_name is not None: - * return "%s.%s" % (cls_name, func_name) + /* "_pydevd_bundle/pydevd_cython.pyx":690 + * stop_frame is not frame and + * stop_frame is not frame.f_back and + * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): # <<<<<<<<<<<<<< + * can_skip = True + * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - __pyx_t_7 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_7 = 1; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = (__pyx_t_7 == Py_None); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L49_bool_binop_done; } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_code_obj, __pyx_v_frame}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_v_cls_name = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_15 = (__pyx_v_stop_frame != __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L49_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":609 - * try: - * cls_name = get_clsname_for_code(code_obj, frame) - * if cls_name is not None: # <<<<<<<<<<<<<< - * return "%s.%s" % (cls_name, func_name) - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":686 + * can_skip = True + * + * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< + * stop_frame is not None and + * stop_frame is not frame and */ - __pyx_t_8 = (__pyx_v_cls_name != Py_None); - if (__pyx_t_8) { + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":610 - * cls_name = get_clsname_for_code(code_obj, frame) - * if cls_name is not None: - * return "%s.%s" % (cls_name, func_name) # <<<<<<<<<<<<<< - * else: - * return func_name + /* "_pydevd_bundle/pydevd_cython.pyx":691 + * stop_frame is not frame.f_back and + * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): + * can_skip = True # <<<<<<<<<<<<<< + * + * elif step_cmd == 144: */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_cls_name); - __Pyx_GIVEREF(__pyx_v_cls_name); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cls_name)) __PYX_ERR(0, 610, __pyx_L3_error); - __Pyx_INCREF(__pyx_v_func_name); - __Pyx_GIVEREF(__pyx_v_func_name); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_func_name)) __PYX_ERR(0, 610, __pyx_L3_error); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; - goto __pyx_L7_try_return; + __pyx_v_can_skip = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":609 - * try: - * cls_name = get_clsname_for_code(code_obj, frame) - * if cls_name is not None: # <<<<<<<<<<<<<< - * return "%s.%s" % (cls_name, func_name) - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":686 + * can_skip = True + * + * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< + * stop_frame is not None and + * stop_frame is not frame and */ - } + goto __pyx_L46; + } - /* "_pydevd_bundle/pydevd_cython.pyx":612 - * return "%s.%s" % (cls_name, func_name) - * else: - * return func_name # <<<<<<<<<<<<<< - * except: - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":693 + * can_skip = True + * + * elif step_cmd == 144: # <<<<<<<<<<<<<< + * if ( + * py_db.apply_files_filter(frame, frame.f_code.co_filename, True) */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_func_name); - __pyx_r = __pyx_v_func_name; - goto __pyx_L7_try_return; - } + __pyx_t_9 = (__pyx_v_step_cmd == 0x90); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":607 - * code_obj = frame.f_code - * func_name = code_obj.co_name - * try: # <<<<<<<<<<<<<< - * cls_name = get_clsname_for_code(code_obj, frame) - * if cls_name is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":695 + * elif step_cmd == 144: + * if ( + * py_db.apply_files_filter(frame, frame.f_code.co_filename, True) # <<<<<<<<<<<<<< + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) + * ): */ - } - __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_frame, __pyx_t_6, Py_True}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 695, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 695, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L56_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":613 - * else: - * return func_name - * except: # <<<<<<<<<<<<<< - * pydev_log.exception() - * return func_name + /* "_pydevd_bundle/pydevd_cython.pyx":696 + * if ( + * py_db.apply_files_filter(frame, frame.f_code.co_filename, True) + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) # <<<<<<<<<<<<<< + * ): + * can_skip = True */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 613, __pyx_L5_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = (__pyx_t_8 == Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_6, __pyx_t_1, Py_True}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 696, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L56_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":614 - * return func_name - * except: - * pydev_log.exception() # <<<<<<<<<<<<<< - * return func_name + /* "_pydevd_bundle/pydevd_cython.pyx":694 * + * elif step_cmd == 144: + * if ( # <<<<<<<<<<<<<< + * py_db.apply_files_filter(frame, frame.f_code.co_filename, True) + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 614, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 614, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = NULL; - __pyx_t_7 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_11))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); - __Pyx_INCREF(__pyx_t_10); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_7 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 614, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - } - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":615 - * except: - * pydev_log.exception() - * return func_name # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":698 + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) + * ): + * can_skip = True # <<<<<<<<<<<<<< * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * elif step_cmd == 206: */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_func_name); - __pyx_r = __pyx_v_func_name; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L6_except_return; - } + __pyx_v_can_skip = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":607 - * code_obj = frame.f_code - * func_name = code_obj.co_name - * try: # <<<<<<<<<<<<<< - * cls_name = get_clsname_for_code(code_obj, frame) - * if cls_name is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":694 + * + * elif step_cmd == 144: + * if ( # <<<<<<<<<<<<<< + * py_db.apply_files_filter(frame, frame.f_code.co_filename, True) + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) */ - __pyx_L5_except_error:; - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); - goto __pyx_L1_error; - __pyx_L7_try_return:; - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); - goto __pyx_L0; - __pyx_L6_except_return:; - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); - goto __pyx_L0; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":600 + /* "_pydevd_bundle/pydevd_cython.pyx":693 + * can_skip = True * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef get_func_name(self, frame): # <<<<<<<<<<<<<< - * cdef str func_name - * # ELSE + * elif step_cmd == 144: # <<<<<<<<<<<<<< + * if ( + * py_db.apply_files_filter(frame, frame.f_code.co_filename, True) */ + goto __pyx_L46; + } - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XDECREF(__pyx_v_code_obj); - __Pyx_XDECREF(__pyx_v_cls_name); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "_pydevd_bundle/pydevd_cython.pyx":618 + /* "_pydevd_bundle/pydevd_cython.pyx":700 + * can_skip = True * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _show_return_values(self, frame, arg): # <<<<<<<<<<<<<< - * # ELSE - * # def _show_return_values(self, frame, arg): + * elif step_cmd == 206: # <<<<<<<<<<<<<< + * f = frame + * while f is not None: */ + __pyx_t_9 = (__pyx_v_step_cmd == 0xCE); + if (__pyx_t_9) { -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg) { - PyObject *__pyx_v_f_locals_back = NULL; - PyObject *__pyx_v_return_values_dict = NULL; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; - char const *__pyx_t_13; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - PyObject *__pyx_t_16 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_show_return_values", 1); - - /* "_pydevd_bundle/pydevd_cython.pyx":622 - * # def _show_return_values(self, frame, arg): - * # ENDIF - * try: # <<<<<<<<<<<<<< - * try: - * f_locals_back = getattr(frame.f_back, "f_locals", None) + /* "_pydevd_bundle/pydevd_cython.pyx":701 + * + * elif step_cmd == 206: + * f = frame # <<<<<<<<<<<<<< + * while f is not None: + * if self._is_same_frame(stop_frame, f): */ - /*try:*/ { + __Pyx_INCREF(__pyx_v_frame); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_v_frame); - /* "_pydevd_bundle/pydevd_cython.pyx":623 - * # ENDIF - * try: - * try: # <<<<<<<<<<<<<< - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":702 + * elif step_cmd == 206: + * f = frame + * while f is not None: # <<<<<<<<<<<<<< + * if self._is_same_frame(stop_frame, f): + * break */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { + while (1) { + __pyx_t_9 = (__pyx_v_f != Py_None); + if (!__pyx_t_9) break; - /* "_pydevd_bundle/pydevd_cython.pyx":624 - * try: - * try: - * f_locals_back = getattr(frame.f_back, "f_locals", None) # <<<<<<<<<<<<<< - * if f_locals_back is not None: - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + /* "_pydevd_bundle/pydevd_cython.pyx":703 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_locals, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_f_locals_back = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_f); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 703, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 703, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":625 - * try: - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: # <<<<<<<<<<<<<< - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) - * if return_values_dict is None: + /* "_pydevd_bundle/pydevd_cython.pyx":704 + * while f is not None: + * if self._is_same_frame(stop_frame, f): + * break # <<<<<<<<<<<<<< + * f = f.f_back + * else: */ - __pyx_t_6 = (__pyx_v_f_locals_back != Py_None); - if (__pyx_t_6) { + goto __pyx_L60_break; - /* "_pydevd_bundle/pydevd_cython.pyx":626 - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< - * if return_values_dict is None: - * return_values_dict = {} + /* "_pydevd_bundle/pydevd_cython.pyx":703 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_locals_back, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 626, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_9 = 1; } + + /* "_pydevd_bundle/pydevd_cython.pyx":705 + * if self._is_same_frame(stop_frame, f): + * break + * f = f.f_back # <<<<<<<<<<<<<< + * else: + * can_skip = True + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_8); + __pyx_t_8 = 0; } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_7, Py_None}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":707 + * f = f.f_back + * else: + * can_skip = True # <<<<<<<<<<<<<< + * + * if can_skip: + */ + /*else*/ { + __pyx_v_can_skip = 1; } - __pyx_v_return_values_dict = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_L60_break:; - /* "_pydevd_bundle/pydevd_cython.pyx":627 - * if f_locals_back is not None: - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) - * if return_values_dict is None: # <<<<<<<<<<<<<< - * return_values_dict = {} - * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + /* "_pydevd_bundle/pydevd_cython.pyx":700 + * can_skip = True + * + * elif step_cmd == 206: # <<<<<<<<<<<<<< + * f = frame + * while f is not None: */ - __pyx_t_6 = (__pyx_v_return_values_dict == Py_None); - if (__pyx_t_6) { + } + __pyx_L46:; - /* "_pydevd_bundle/pydevd_cython.pyx":628 - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) - * if return_values_dict is None: - * return_values_dict = {} # <<<<<<<<<<<<<< - * f_locals_back[RETURN_VALUES_DICT] = return_values_dict - * name = self.get_func_name(frame) + /* "_pydevd_bundle/pydevd_cython.pyx":709 + * can_skip = True + * + * if can_skip: # <<<<<<<<<<<<<< + * if plugin_manager is not None and ( + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF_SET(__pyx_v_return_values_dict, __pyx_t_5); - __pyx_t_5 = 0; + if (__pyx_v_can_skip) { - /* "_pydevd_bundle/pydevd_cython.pyx":629 - * if return_values_dict is None: - * return_values_dict = {} - * f_locals_back[RETURN_VALUES_DICT] = return_values_dict # <<<<<<<<<<<<<< - * name = self.get_func_name(frame) - * return_values_dict[name] = arg + /* "_pydevd_bundle/pydevd_cython.pyx":710 + * + * if can_skip: + * if plugin_manager is not None and ( # <<<<<<<<<<<<<< + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - if (unlikely((PyObject_SetItem(__pyx_v_f_locals_back, __pyx_t_5, __pyx_v_return_values_dict) < 0))) __PYX_ERR(0, 629, __pyx_L6_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_15 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L64_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":627 - * if f_locals_back is not None: - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) - * if return_values_dict is None: # <<<<<<<<<<<<<< - * return_values_dict = {} - * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + /* "_pydevd_bundle/pydevd_cython.pyx":711 + * if can_skip: + * if plugin_manager is not None and ( + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): # <<<<<<<<<<<<<< + * can_skip = plugin_manager.can_skip(py_db, frame) + * */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 711, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 711, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L64_bool_binop_done; } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 711, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 711, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L64_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":630 - * return_values_dict = {} - * f_locals_back[RETURN_VALUES_DICT] = return_values_dict - * name = self.get_func_name(frame) # <<<<<<<<<<<<<< - * return_values_dict[name] = arg - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":710 + * + * if can_skip: + * if plugin_manager is not None and ( # <<<<<<<<<<<<<< + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) */ - __pyx_t_5 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->get_func_name(__pyx_v_self, __pyx_v_frame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_name = __pyx_t_5; - __pyx_t_5 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":631 - * f_locals_back[RETURN_VALUES_DICT] = return_values_dict - * name = self.get_func_name(frame) - * return_values_dict[name] = arg # <<<<<<<<<<<<<< - * except: - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":712 + * if plugin_manager is not None and ( + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) # <<<<<<<<<<<<<< + * + * if can_skip and py_db.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): */ - if (unlikely((PyObject_SetItem(__pyx_v_return_values_dict, __pyx_v_name, __pyx_v_arg) < 0))) __PYX_ERR(0, 631, __pyx_L6_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_py_db, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 712, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_can_skip = __pyx_t_9; - /* "_pydevd_bundle/pydevd_cython.pyx":625 - * try: - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: # <<<<<<<<<<<<<< - * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) - * if return_values_dict is None: + /* "_pydevd_bundle/pydevd_cython.pyx":710 + * + * if can_skip: + * if plugin_manager is not None and ( # <<<<<<<<<<<<<< + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) */ - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":623 - * # ENDIF - * try: - * try: # <<<<<<<<<<<<<< - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":714 + * can_skip = plugin_manager.can_skip(py_db, frame) + * + * if can_skip and py_db.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): # <<<<<<<<<<<<<< + * # trace function for showing return values after step over + * can_skip = False */ - } - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L11_try_end; - __pyx_L6_error:; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_v_can_skip) { + } else { + __pyx_t_9 = __pyx_v_can_skip; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 714, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L68_bool_binop_done; + } + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6C: + case 0x9F: + __pyx_t_15 = 1; + break; + default: + __pyx_t_15 = 0; + break; + } + __pyx_t_11 = __pyx_t_15; + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 714, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 714, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __pyx_t_11; + __pyx_L68_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":632 - * name = self.get_func_name(frame) - * return_values_dict[name] = arg - * except: # <<<<<<<<<<<<<< - * pydev_log.exception() - * finally: + /* "_pydevd_bundle/pydevd_cython.pyx":716 + * if can_skip and py_db.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): + * # trace function for showing return values after step over + * can_skip = False # <<<<<<<<<<<<<< + * + * # Let's check to see if we are in a function that has a breakpoint. If we don't have a breakpoint, */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._show_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 632, __pyx_L8_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_7); + __pyx_v_can_skip = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":633 - * return_values_dict[name] = arg - * except: - * pydev_log.exception() # <<<<<<<<<<<<<< - * finally: - * f_locals_back = None + /* "_pydevd_bundle/pydevd_cython.pyx":714 + * can_skip = plugin_manager.can_skip(py_db, frame) + * + * if can_skip and py_db.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): # <<<<<<<<<<<<<< + * # trace function for showing return values after step over + * can_skip = False */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 633, __pyx_L8_except_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 633, __pyx_L8_except_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = NULL; - __pyx_t_9 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_11))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); - __Pyx_INCREF(__pyx_t_10); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 633, __pyx_L8_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L7_exception_handled; - } - /* "_pydevd_bundle/pydevd_cython.pyx":623 - * # ENDIF - * try: - * try: # <<<<<<<<<<<<<< - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":709 + * can_skip = True + * + * if can_skip: # <<<<<<<<<<<<<< + * if plugin_manager is not None and ( + * py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): */ - __pyx_L8_except_error:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - goto __pyx_L4_error; - __pyx_L7_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - __pyx_L11_try_end:; - } - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":635 - * pydev_log.exception() - * finally: - * f_locals_back = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":675 + * can_skip = False * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * if info.pydev_state == 1: # 1 = 1 # <<<<<<<<<<<<<< + * # we can skip if: + * # - we have no stop marked */ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); - goto __pyx_L5; - } - __pyx_L4_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_16); - __pyx_t_9 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; - { - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); - __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; - goto __pyx_L1_error; - } - __pyx_L5:; - } - /* "_pydevd_bundle/pydevd_cython.pyx":618 + /* "_pydevd_bundle/pydevd_cython.pyx":723 + * # so, that's why the additional checks are there. + * + * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< + * pass # Do nothing here (just keep on going as we can't skip it). * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _show_return_values(self, frame, arg): # <<<<<<<<<<<<<< - * # ELSE - * # def _show_return_values(self, frame, arg): */ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint_on_call_event); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 723, __pyx_L4_error) + if (__pyx_t_9) { + goto __pyx_L72; + } - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._show_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_f_locals_back); - __Pyx_XDECREF(__pyx_v_return_values_dict); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "_pydevd_bundle/pydevd_cython.pyx":726 + * pass # Do nothing here (just keep on going as we can't skip it). + * + * elif not breakpoints_for_file: # <<<<<<<<<<<<<< + * if can_skip: + * if has_exception_breakpoints: + */ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoints_for_file); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 726, __pyx_L4_error) + __pyx_t_11 = (!__pyx_t_9); + if (__pyx_t_11) { -/* "_pydevd_bundle/pydevd_cython.pyx":638 + /* "_pydevd_bundle/pydevd_cython.pyx":727 * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _remove_return_values(self, main_debugger, frame): # <<<<<<<<<<<<<< - * # ELSE - * # def _remove_return_values(self, main_debugger, frame): + * elif not breakpoints_for_file: + * if can_skip: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception */ + if (__pyx_v_can_skip) { -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_main_debugger, PyObject *__pyx_v_frame) { - PyObject *__pyx_v_f_locals_back = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; - char const *__pyx_t_13; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - PyObject *__pyx_t_16 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_remove_return_values", 1); + /* "_pydevd_bundle/pydevd_cython.pyx":728 + * elif not breakpoints_for_file: + * if can_skip: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: + */ + if (__pyx_v_has_exception_breakpoints) { - /* "_pydevd_bundle/pydevd_cython.pyx":642 - * # def _remove_return_values(self, main_debugger, frame): - * # ENDIF - * try: # <<<<<<<<<<<<<< - * try: - * # Showing return values was turned off, we should remove them from locals dict. + /* "_pydevd_bundle/pydevd_cython.pyx":729 + * if can_skip: + * if has_exception_breakpoints: + * return self.trace_exception # <<<<<<<<<<<<<< + * else: + * return None if is_call else NO_FTRACE */ - /*try:*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 729, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":643 - * # ENDIF - * try: - * try: # <<<<<<<<<<<<<< - * # Showing return values was turned off, we should remove them from locals dict. - * # The values can be in the current frame or in the back one + /* "_pydevd_bundle/pydevd_cython.pyx":728 + * elif not breakpoints_for_file: + * if can_skip: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { + } - /* "_pydevd_bundle/pydevd_cython.pyx":646 - * # Showing return values was turned off, we should remove them from locals dict. - * # The values can be in the current frame or in the back one - * frame.f_locals.pop(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":731 + * return self.trace_exception + * else: + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * - * f_locals_back = getattr(frame.f_back, "f_locals", None) + * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_8 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, Py_None}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":648 - * frame.f_locals.pop(RETURN_VALUES_DICT, None) - * - * f_locals_back = getattr(frame.f_back, "f_locals", None) # <<<<<<<<<<<<<< - * if f_locals_back is not None: - * f_locals_back.pop(RETURN_VALUES_DICT, None) - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_locals, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 648, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_f_locals_back = __pyx_t_6; - __pyx_t_6 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":649 - * - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: # <<<<<<<<<<<<<< - * f_locals_back.pop(RETURN_VALUES_DICT, None) - * except: - */ - __pyx_t_9 = (__pyx_v_f_locals_back != Py_None); - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":650 - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: - * f_locals_back.pop(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< - * except: - * pydev_log.exception() - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_locals_back, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_8 = 1; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_7 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 731, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; } + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, Py_None}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":649 + /* "_pydevd_bundle/pydevd_cython.pyx":727 * - * f_locals_back = getattr(frame.f_back, "f_locals", None) - * if f_locals_back is not None: # <<<<<<<<<<<<<< - * f_locals_back.pop(RETURN_VALUES_DICT, None) - * except: + * elif not breakpoints_for_file: + * if can_skip: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception */ } - /* "_pydevd_bundle/pydevd_cython.pyx":643 - * # ENDIF - * try: - * try: # <<<<<<<<<<<<<< - * # Showing return values was turned off, we should remove them from locals dict. - * # The values can be in the current frame or in the back one + /* "_pydevd_bundle/pydevd_cython.pyx":726 + * pass # Do nothing here (just keep on going as we can't skip it). + * + * elif not breakpoints_for_file: # <<<<<<<<<<<<<< + * if can_skip: + * if has_exception_breakpoints: */ + goto __pyx_L72; } - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L11_try_end; - __pyx_L6_error:; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":651 - * if f_locals_back is not None: - * f_locals_back.pop(RETURN_VALUES_DICT, None) - * except: # <<<<<<<<<<<<<< - * pydev_log.exception() - * finally: + /* "_pydevd_bundle/pydevd_cython.pyx":735 + * else: + * # When cached, 0 means we don't have a breakpoint and 1 means we have. + * if can_skip: # <<<<<<<<<<<<<< + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._remove_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 651, __pyx_L8_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_5); + /*else*/ { + if (__pyx_v_can_skip) { - /* "_pydevd_bundle/pydevd_cython.pyx":652 - * f_locals_back.pop(RETURN_VALUES_DICT, None) - * except: - * pydev_log.exception() # <<<<<<<<<<<<<< - * finally: - * f_locals_back = None + /* "_pydevd_bundle/pydevd_cython.pyx":736 + * # When cached, 0 means we don't have a breakpoint and 1 means we have. + * if can_skip: + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) # <<<<<<<<<<<<<< + * if breakpoints_in_line_cache == 0: + * return self.trace_dispatch */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 652, __pyx_L8_except_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L8_except_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = NULL; - __pyx_t_8 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_11))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); - __Pyx_INCREF(__pyx_t_10); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_8 = 1; + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 736, __pyx_L4_error) } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 652, __pyx_L8_except_error) + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_line_cache_key, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 736, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L7_exception_handled; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":643 - * # ENDIF - * try: - * try: # <<<<<<<<<<<<<< - * # Showing return values was turned off, we should remove them from locals dict. - * # The values can be in the current frame or in the back one - */ - __pyx_L8_except_error:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - goto __pyx_L4_error; - __pyx_L7_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - __pyx_L11_try_end:; - } - } - - /* "_pydevd_bundle/pydevd_cython.pyx":654 - * pydev_log.exception() - * finally: - * f_locals_back = None # <<<<<<<<<<<<<< - * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - */ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); - goto __pyx_L5; - } - __pyx_L4_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_16); - __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; - { - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); - } - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); - __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; - goto __pyx_L1_error; - } - __pyx_L5:; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":638 - * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _remove_return_values(self, main_debugger, frame): # <<<<<<<<<<<<<< - * # ELSE - * # def _remove_return_values(self, main_debugger, frame): - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._remove_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_f_locals_back); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_breakpoints_in_line_cache = __pyx_t_5; -/* "_pydevd_bundle/pydevd_cython.pyx":657 + /* "_pydevd_bundle/pydevd_cython.pyx":737 + * if can_skip: + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: # <<<<<<<<<<<<<< + * return self.trace_dispatch * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _get_unfiltered_back_frame(self, main_debugger, frame): # <<<<<<<<<<<<<< - * # ELSE - * # def _get_unfiltered_back_frame(self, main_debugger, frame): - */ - -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_main_debugger, PyObject *__pyx_v_frame) { - PyObject *__pyx_v_f = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_get_unfiltered_back_frame", 1); - - /* "_pydevd_bundle/pydevd_cython.pyx":661 - * # def _get_unfiltered_back_frame(self, main_debugger, frame): - * # ENDIF - * f = frame.f_back # <<<<<<<<<<<<<< - * while f is not None: - * if not main_debugger.is_files_filter_enabled: - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_f = __pyx_t_1; - __pyx_t_1 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":662 - * # ENDIF - * f = frame.f_back - * while f is not None: # <<<<<<<<<<<<<< - * if not main_debugger.is_files_filter_enabled: - * return f */ - while (1) { - __pyx_t_2 = (__pyx_v_f != Py_None); - if (!__pyx_t_2) break; + __pyx_t_11 = (__pyx_v_breakpoints_in_line_cache == 0); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":663 - * f = frame.f_back - * while f is not None: - * if not main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * return f + /* "_pydevd_bundle/pydevd_cython.pyx":738 + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: + * return self.trace_dispatch # <<<<<<<<<<<<<< * + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 663, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (!__pyx_t_2); - if (__pyx_t_3) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":664 - * while f is not None: - * if not main_debugger.is_files_filter_enabled: - * return f # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":737 + * if can_skip: + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: # <<<<<<<<<<<<<< + * return self.trace_dispatch * - * else: */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_f); - __pyx_r = __pyx_v_f; - goto __pyx_L0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":663 - * f = frame.f_back - * while f is not None: - * if not main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * return f - * + /* "_pydevd_bundle/pydevd_cython.pyx":735 + * else: + * # When cached, 0 means we don't have a breakpoint and 1 means we have. + * if can_skip: # <<<<<<<<<<<<<< + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: */ - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":667 - * - * else: - * if main_debugger.apply_files_filter(f, f.f_code.co_filename, False): # <<<<<<<<<<<<<< - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":740 + * return self.trace_dispatch * + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) # <<<<<<<<<<<<<< + * if breakpoints_in_frame_cache != -1: + * # Gotten from cache. */ - /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_7 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_7 = 1; + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 740, __pyx_L4_error) } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_f, __pyx_t_6, Py_False}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_3) { + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_breakpoints_in_frame_cache = __pyx_t_5; - /* "_pydevd_bundle/pydevd_cython.pyx":668 - * else: - * if main_debugger.apply_files_filter(f, f.f_code.co_filename, False): - * f = f.f_back # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":741 * - * else: + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + * if breakpoints_in_frame_cache != -1: # <<<<<<<<<<<<<< + * # Gotten from cache. + * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_11 = (__pyx_v_breakpoints_in_frame_cache != -1L); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":667 - * - * else: - * if main_debugger.apply_files_filter(f, f.f_code.co_filename, False): # <<<<<<<<<<<<<< - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":743 + * if breakpoints_in_frame_cache != -1: + * # Gotten from cache. + * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 # <<<<<<<<<<<<<< * + * else: */ - goto __pyx_L6; - } + __pyx_v_has_breakpoint_in_frame = (__pyx_v_breakpoints_in_frame_cache == 1); - /* "_pydevd_bundle/pydevd_cython.pyx":671 + /* "_pydevd_bundle/pydevd_cython.pyx":741 * - * else: - * return f # <<<<<<<<<<<<<< - * - * return f + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + * if breakpoints_in_frame_cache != -1: # <<<<<<<<<<<<<< + * # Gotten from cache. + * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_f); - __pyx_r = __pyx_v_f; - goto __pyx_L0; - } - __pyx_L6:; - } - } + goto __pyx_L77; + } - /* "_pydevd_bundle/pydevd_cython.pyx":673 - * return f + /* "_pydevd_bundle/pydevd_cython.pyx":746 * - * return f # <<<<<<<<<<<<<< - * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_f); - __pyx_r = __pyx_v_f; - goto __pyx_L0; - - /* "_pydevd_bundle/pydevd_cython.pyx":657 + * else: + * has_breakpoint_in_frame = False # <<<<<<<<<<<<<< * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _get_unfiltered_back_frame(self, main_debugger, frame): # <<<<<<<<<<<<<< - * # ELSE - * # def _get_unfiltered_back_frame(self, main_debugger, frame): + * try: */ + /*else*/ { + __pyx_v_has_breakpoint_in_frame = 0; - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._get_unfiltered_back_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_f); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "_pydevd_bundle/pydevd_cython.pyx":676 + /* "_pydevd_bundle/pydevd_cython.pyx":748 + * has_breakpoint_in_frame = False * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _is_same_frame(self, target_frame, current_frame): # <<<<<<<<<<<<<< - * cdef PyDBAdditionalThreadInfo info; - * # ELSE + * try: # <<<<<<<<<<<<<< + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + /*try:*/ { -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_target_frame, PyObject *__pyx_v_current_frame) { - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; - PyObject *__pyx_v_f = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_is_same_frame", 1); - - /* "_pydevd_bundle/pydevd_cython.pyx":681 - * # def _is_same_frame(self, target_frame, current_frame): - * # ENDIF - * if target_frame is current_frame: # <<<<<<<<<<<<<< - * return True + /* "_pydevd_bundle/pydevd_cython.pyx":749 * + * try: + * func_lines = set() # <<<<<<<<<<<<<< + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * func_lines.add(offset_and_lineno[1]) */ - __pyx_t_1 = (__pyx_v_target_frame == __pyx_v_current_frame); - if (__pyx_t_1) { + __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_func_lines = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":682 - * # ENDIF - * if target_frame is current_frame: - * return True # <<<<<<<<<<<<<< - * - * info = self._args[2] + /* "_pydevd_bundle/pydevd_cython.pyx":750 + * try: + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): # <<<<<<<<<<<<<< + * func_lines.add(offset_and_lineno[1]) + * except: */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_True); - __pyx_r = Py_True; - goto __pyx_L0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_dis); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_findlinestarts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { + __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 750, __pyx_L78_error) + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 750, __pyx_L78_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 750, __pyx_L78_error) + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 750, __pyx_L78_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 750, __pyx_L78_error) + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } + } else { + __pyx_t_7 = __pyx_t_13(__pyx_t_1); + if (unlikely(!__pyx_t_7)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 750, __pyx_L78_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_XDECREF_SET(__pyx_v_offset_and_lineno, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":681 - * # def _is_same_frame(self, target_frame, current_frame): - * # ENDIF - * if target_frame is current_frame: # <<<<<<<<<<<<<< - * return True - * + /* "_pydevd_bundle/pydevd_cython.pyx":751 + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * func_lines.add(offset_and_lineno[1]) # <<<<<<<<<<<<<< + * except: + * # This is a fallback for implementations where we can't get the function */ - } + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_offset_and_lineno, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 751, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_19 = PySet_Add(__pyx_v_func_lines, __pyx_t_7); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 751, __pyx_L78_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":684 - * return True + /* "_pydevd_bundle/pydevd_cython.pyx":750 + * try: + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): # <<<<<<<<<<<<<< + * func_lines.add(offset_and_lineno[1]) + * except: + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":748 + * has_breakpoint_in_frame = False * - * info = self._args[2] # <<<<<<<<<<<<<< - * if info.pydev_use_scoped_step_frame: - * # If using scoped step we don't check the target, we just need to check + * try: # <<<<<<<<<<<<<< + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): */ - if (unlikely(__pyx_v_self->_args == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 684, __pyx_L1_error) - } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 684, __pyx_L1_error) - __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_2); - __pyx_t_2 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":771 + * break + * else: + * for bp_line in breakpoints_for_file: # iterate on keys # <<<<<<<<<<<<<< + * if bp_line in func_lines: + * has_breakpoint_in_frame = True + */ + /*else:*/ { + __pyx_t_12 = 0; + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 771, __pyx_L80_except_error) + } + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_breakpoints_for_file, 1, ((PyObject *)NULL), (&__pyx_t_20), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_20, &__pyx_t_12, &__pyx_t_7, NULL, NULL, __pyx_t_5); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 771, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L80_except_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_bp_line = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":772 + * else: + * for bp_line in breakpoints_for_file: # iterate on keys + * if bp_line in func_lines: # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_bp_line); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = (__Pyx_PySet_ContainsTF(__pyx_t_7, __pyx_v_func_lines, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 772, __pyx_L80_except_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":685 + /* "_pydevd_bundle/pydevd_cython.pyx":773 + * for bp_line in breakpoints_for_file: # iterate on keys + * if bp_line in func_lines: + * has_breakpoint_in_frame = True # <<<<<<<<<<<<<< + * break * - * info = self._args[2] - * if info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * # If using scoped step we don't check the target, we just need to check - * # if the current matches the same heuristic where the target was defined. */ - if (__pyx_v_info->pydev_use_scoped_step_frame) { + __pyx_v_has_breakpoint_in_frame = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":688 - * # If using scoped step we don't check the target, we just need to check - * # if the current matches the same heuristic where the target was defined. - * if target_frame is not None and current_frame is not None: # <<<<<<<<<<<<<< - * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: - * # The co_name may be different (it may include the line number), but + /* "_pydevd_bundle/pydevd_cython.pyx":774 + * if bp_line in func_lines: + * has_breakpoint_in_frame = True + * break # <<<<<<<<<<<<<< + * + * # Cache the value (1 or 0 or -1 for default because of cython). */ - __pyx_t_3 = (__pyx_v_target_frame != Py_None); - if (__pyx_t_3) { - } else { - __pyx_t_1 = __pyx_t_3; - goto __pyx_L6_bool_binop_done; - } - __pyx_t_3 = (__pyx_v_current_frame != Py_None); - __pyx_t_1 = __pyx_t_3; - __pyx_L6_bool_binop_done:; - if (__pyx_t_1) { + goto __pyx_L88_break; - /* "_pydevd_bundle/pydevd_cython.pyx":689 - * # if the current matches the same heuristic where the target was defined. - * if target_frame is not None and current_frame is not None: - * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: # <<<<<<<<<<<<<< - * # The co_name may be different (it may include the line number), but - * # the filename must still be the same. + /* "_pydevd_bundle/pydevd_cython.pyx":772 + * else: + * for bp_line in breakpoints_for_file: # iterate on keys + * if bp_line in func_lines: # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_target_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 689, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_1) { + } + } + __pyx_L88_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + goto __pyx_L83_try_end; + __pyx_L78_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":692 - * # The co_name may be different (it may include the line number), but - * # the filename must still be the same. - * f = current_frame.f_back # <<<<<<<<<<<<<< - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":752 + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * func_lines.add(offset_and_lineno[1]) + * except: # <<<<<<<<<<<<<< + * # This is a fallback for implementations where we can't get the function + * # lines -- i.e.: jython (in this case clients need to provide the function */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_f = __pyx_t_2; - __pyx_t_2 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 752, __pyx_L80_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); - /* "_pydevd_bundle/pydevd_cython.pyx":693 - * # the filename must still be the same. - * f = current_frame.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< - * f = f.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + /* "_pydevd_bundle/pydevd_cython.pyx":759 + * + * # Checks the breakpoint to see if there is a context match in some function. + * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< + * + * # global context is set with an empty name */ - __pyx_t_3 = (__pyx_v_f != Py_None); - if (__pyx_t_3) { - } else { - __pyx_t_1 = __pyx_t_3; - goto __pyx_L10_bool_binop_done; - } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __pyx_t_3; - __pyx_L10_bool_binop_done:; - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 759, __pyx_L80_except_error) + __pyx_v_curr_func_name = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":694 - * f = current_frame.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f = f.f_back # <<<<<<<<<<<<<< - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: - * return True + /* "_pydevd_bundle/pydevd_cython.pyx":762 + * + * # global context is set with an empty name + * if curr_func_name in ('?', '', ''): # <<<<<<<<<<<<<< + * curr_func_name = '' + * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v_curr_func_name); + __pyx_t_21 = __pyx_v_curr_func_name; + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s__3, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 762, __pyx_L80_except_error) + if (!__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L93_bool_binop_done; + } + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 762, __pyx_L80_except_error) + if (!__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L93_bool_binop_done; + } + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s_lambda, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 762, __pyx_L80_except_error) + __pyx_t_11 = __pyx_t_9; + __pyx_L93_bool_binop_done:; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_9 = __pyx_t_11; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":695 - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f = f.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< - * return True + /* "_pydevd_bundle/pydevd_cython.pyx":763 + * # global context is set with an empty name + * if curr_func_name in ('?', '', ''): + * curr_func_name = '' # <<<<<<<<<<<<<< * + * for bp in breakpoints_for_file.values(): */ - __pyx_t_3 = (__pyx_v_f != Py_None); - if (__pyx_t_3) { - } else { - __pyx_t_1 = __pyx_t_3; - goto __pyx_L13_bool_binop_done; - } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __pyx_t_3; - __pyx_L13_bool_binop_done:; - if (__pyx_t_1) { + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); - /* "_pydevd_bundle/pydevd_cython.pyx":696 - * f = f.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: - * return True # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":762 + * + * # global context is set with an empty name + * if curr_func_name in ('?', '', ''): # <<<<<<<<<<<<<< + * curr_func_name = '' * - * return False */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_True); - __pyx_r = Py_True; - goto __pyx_L0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":695 - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f = f.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< - * return True + /* "_pydevd_bundle/pydevd_cython.pyx":765 + * curr_func_name = '' * + * for bp in breakpoints_for_file.values(): # <<<<<<<<<<<<<< + * # will match either global or some function + * if bp.func_name in ('None', curr_func_name): */ - } + __pyx_t_20 = 0; + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 765, __pyx_L80_except_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_breakpoints_for_file, 1, __pyx_n_s_values, (&__pyx_t_12), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); + __pyx_t_4 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_12, &__pyx_t_20, NULL, &__pyx_t_6, NULL, __pyx_t_5); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 765, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_bp, __pyx_t_6); + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":693 - * # the filename must still be the same. - * f = current_frame.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< - * f = f.f_back - * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + /* "_pydevd_bundle/pydevd_cython.pyx":767 + * for bp in breakpoints_for_file.values(): + * # will match either global or some function + * if bp.func_name in ('None', curr_func_name): # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break */ - } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bp, __pyx_n_s_func_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_None, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 767, __pyx_L80_except_error) + if (!__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L99_bool_binop_done; + } + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_v_curr_func_name, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 767, __pyx_L80_except_error) + __pyx_t_9 = __pyx_t_11; + __pyx_L99_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = __pyx_t_9; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":689 - * # if the current matches the same heuristic where the target was defined. - * if target_frame is not None and current_frame is not None: - * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: # <<<<<<<<<<<<<< - * # The co_name may be different (it may include the line number), but - * # the filename must still be the same. + /* "_pydevd_bundle/pydevd_cython.pyx":768 + * # will match either global or some function + * if bp.func_name in ('None', curr_func_name): + * has_breakpoint_in_frame = True # <<<<<<<<<<<<<< + * break + * else: */ - } + __pyx_v_has_breakpoint_in_frame = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":688 - * # If using scoped step we don't check the target, we just need to check - * # if the current matches the same heuristic where the target was defined. - * if target_frame is not None and current_frame is not None: # <<<<<<<<<<<<<< - * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: - * # The co_name may be different (it may include the line number), but + /* "_pydevd_bundle/pydevd_cython.pyx":769 + * if bp.func_name in ('None', curr_func_name): + * has_breakpoint_in_frame = True + * break # <<<<<<<<<<<<<< + * else: + * for bp_line in breakpoints_for_file: # iterate on keys */ - } + goto __pyx_L97_break; - /* "_pydevd_bundle/pydevd_cython.pyx":685 - * - * info = self._args[2] - * if info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * # If using scoped step we don't check the target, we just need to check - * # if the current matches the same heuristic where the target was defined. + /* "_pydevd_bundle/pydevd_cython.pyx":767 + * for bp in breakpoints_for_file.values(): + * # will match either global or some function + * if bp.func_name in ('None', curr_func_name): # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break */ - } + } + } + __pyx_L97_break:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L79_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":698 - * return True + /* "_pydevd_bundle/pydevd_cython.pyx":748 + * has_breakpoint_in_frame = False * - * return False # <<<<<<<<<<<<<< + * try: # <<<<<<<<<<<<<< + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + */ + __pyx_L80_except_error:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + goto __pyx_L4_error; + __pyx_L79_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __pyx_L83_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":777 * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * # Cache the value (1 or 0 or -1 for default because of cython). + * if has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * frame_skips_cache[frame_cache_key] = 1 + * else: */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; - goto __pyx_L0; + if (__pyx_v_has_breakpoint_in_frame) { + + /* "_pydevd_bundle/pydevd_cython.pyx":778 + * # Cache the value (1 or 0 or -1 for default because of cython). + * if has_breakpoint_in_frame: + * frame_skips_cache[frame_cache_key] = 1 # <<<<<<<<<<<<<< + * else: + * frame_skips_cache[frame_cache_key] = 0 + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 778, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 778, __pyx_L4_error) - /* "_pydevd_bundle/pydevd_cython.pyx":676 + /* "_pydevd_bundle/pydevd_cython.pyx":777 * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cdef _is_same_frame(self, target_frame, current_frame): # <<<<<<<<<<<<<< - * cdef PyDBAdditionalThreadInfo info; - * # ELSE + * # Cache the value (1 or 0 or -1 for default because of cython). + * if has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * frame_skips_cache[frame_cache_key] = 1 + * else: */ + goto __pyx_L101; + } - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._is_same_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_info); - __Pyx_XDECREF(__pyx_v_f); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "_pydevd_bundle/pydevd_cython.pyx":780 + * frame_skips_cache[frame_cache_key] = 1 + * else: + * frame_skips_cache[frame_cache_key] = 0 # <<<<<<<<<<<<<< + * + * if can_skip and not has_breakpoint_in_frame: + */ + /*else*/ { + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 780, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_0) < 0))) __PYX_ERR(0, 780, __pyx_L4_error) + } + __pyx_L101:; + } + __pyx_L77:; -/* "_pydevd_bundle/pydevd_cython.pyx":701 + /* "_pydevd_bundle/pydevd_cython.pyx":782 + * frame_skips_cache[frame_cache_key] = 0 * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< - * cdef tuple abs_path_canonical_path_and_base; - * cdef bint is_exception_event; + * if can_skip and not has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception */ + if (__pyx_v_can_skip) { + } else { + __pyx_t_11 = __pyx_v_can_skip; + goto __pyx_L103_bool_binop_done; + } + __pyx_t_9 = (!__pyx_v_has_breakpoint_in_frame); + __pyx_t_11 = __pyx_t_9; + __pyx_L103_bool_binop_done:; + if (__pyx_t_11) { -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, int __pyx_skip_dispatch) { - PyObject *__pyx_v_abs_path_canonical_path_and_base = 0; - int __pyx_v_is_exception_event; - int __pyx_v_has_exception_breakpoints; - int __pyx_v_can_skip; - int __pyx_v_stop; - int __pyx_v_stop_on_plugin_breakpoint; - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; - int __pyx_v_step_cmd; - int __pyx_v_line; - int __pyx_v_is_line; - int __pyx_v_is_call; - int __pyx_v_is_return; - int __pyx_v_should_stop; - PyObject *__pyx_v_breakpoints_for_file = 0; - PyObject *__pyx_v_stop_info = 0; - PyObject *__pyx_v_curr_func_name = 0; - PyObject *__pyx_v_frame_skips_cache = 0; - PyObject *__pyx_v_frame_cache_key = 0; - PyObject *__pyx_v_line_cache_key = 0; - int __pyx_v_breakpoints_in_line_cache; - int __pyx_v_breakpoints_in_frame_cache; - int __pyx_v_has_breakpoint_in_frame; - int __pyx_v_bp_line; - PyObject *__pyx_v_bp = 0; - int __pyx_v_pydev_smart_parent_offset; - int __pyx_v_pydev_smart_child_offset; - PyObject *__pyx_v_pydev_smart_step_into_variants = 0; - PyObject *__pyx_v_main_debugger = NULL; - PyObject *__pyx_v_thread = NULL; - PyObject *__pyx_v_plugin_manager = NULL; - PyObject *__pyx_v_stop_frame = NULL; - PyObject *__pyx_v_function_breakpoint_on_call_event = NULL; - PyObject *__pyx_v_returns_cache_key = NULL; - PyObject *__pyx_v_return_lines = NULL; - PyObject *__pyx_v_x = NULL; - PyObject *__pyx_v_f = NULL; - PyObject *__pyx_v_func_lines = NULL; - PyObject *__pyx_v_offset_and_lineno = NULL; - PyObject *__pyx_v_breakpoint = NULL; - PyObject *__pyx_v_stop_reason = NULL; - PyObject *__pyx_v_bp_type = NULL; - PyObject *__pyx_v_new_frame = NULL; - PyObject *__pyx_v_result = NULL; - PyObject *__pyx_v_eval_result = NULL; - PyObject *__pyx_v_cmd = NULL; - PyObject *__pyx_v_exc = NULL; - long __pyx_v_should_skip; - PyObject *__pyx_v_plugin_stop = NULL; - PyObject *__pyx_v_force_check_project_scope = NULL; - PyObject *__pyx_v_filename = NULL; - PyObject *__pyx_v_f2 = NULL; - PyObject *__pyx_v_back = NULL; - PyObject *__pyx_v_smart_step_into_variant = NULL; - PyObject *__pyx_v_children_variants = NULL; - PyObject *__pyx_v_f_code = NULL; - CYTHON_UNUSED PyObject *__pyx_v_stopped_on_plugin = NULL; - PyObject *__pyx_v_back_absolute_filename = NULL; - CYTHON_UNUSED PyObject *__pyx_v__ = NULL; - PyObject *__pyx_v_base = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - int __pyx_t_10; - int __pyx_t_11; - Py_ssize_t __pyx_t_12; - PyObject *(*__pyx_t_13)(PyObject *); - PyObject *(*__pyx_t_14)(PyObject *); - int __pyx_t_15; - PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - int __pyx_t_19; - Py_ssize_t __pyx_t_20; - PyObject *__pyx_t_21 = NULL; - char const *__pyx_t_22; - PyObject *__pyx_t_23 = NULL; - PyObject *__pyx_t_24 = NULL; - PyObject *__pyx_t_25 = NULL; - PyObject *__pyx_t_26 = NULL; - PyObject *__pyx_t_27 = NULL; - PyObject *__pyx_t_28 = NULL; - char const *__pyx_t_29; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("trace_dispatch", 0); - __Pyx_INCREF(__pyx_v_frame); - /* Check if called by wrapper */ - if (unlikely(__pyx_skip_dispatch)) ; - /* Check if overridden in Python */ - else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS - static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; - if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { - PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); - #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; - } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS - __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); - __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); - if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { - __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; - } - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS - } - #endif - } - - /* "_pydevd_bundle/pydevd_cython.pyx":741 - * # generation be better split among what each part does). - * - * try: # <<<<<<<<<<<<<< - * # DEBUG = '_debugger_case_generator.py' in frame.f_code.co_filename - * main_debugger, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args - */ - /*try:*/ { - - /* "_pydevd_bundle/pydevd_cython.pyx":743 - * try: - * # DEBUG = '_debugger_case_generator.py' in frame.f_code.co_filename - * main_debugger, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args # <<<<<<<<<<<<<< - * # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) - * info.is_tracing += 1 - */ - __pyx_t_1 = __pyx_v_self->_args; - __Pyx_INCREF(__pyx_t_1); - if (likely(__pyx_t_1 != Py_None)) { - PyObject* sequence = __pyx_t_1; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 6)) { - if (size > 6) __Pyx_RaiseTooManyValuesError(6); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 743, __pyx_L4_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - #else - { - Py_ssize_t i; - PyObject** temps[6] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; - for (i=0; i < 6; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 743, __pyx_L4_error) - __Pyx_GOTREF(item); - *(temps[i]) = item; - } - } - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 743, __pyx_L4_error) - } - if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 743, __pyx_L4_error) - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 743, __pyx_L4_error) - if (!(likely(PyDict_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_7))) __PYX_ERR(0, 743, __pyx_L4_error) - __pyx_v_main_debugger = __pyx_t_2; - __pyx_t_2 = 0; - __pyx_v_abs_path_canonical_path_and_base = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; - __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_4); - __pyx_t_4 = 0; - __pyx_v_thread = __pyx_t_6; - __pyx_t_6 = 0; - __pyx_v_frame_skips_cache = ((PyObject*)__pyx_t_7); - __pyx_t_7 = 0; - __pyx_v_frame_cache_key = __pyx_t_8; - __pyx_t_8 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":745 - * main_debugger, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args - * # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) - * info.is_tracing += 1 # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":783 * - * # TODO: This shouldn't be needed. The fact that frame.f_lineno + * if can_skip and not has_breakpoint_in_frame: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: */ - __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing + 1); + if (__pyx_v_has_exception_breakpoints) { - /* "_pydevd_bundle/pydevd_cython.pyx":750 - * # is None seems like a bug in Python 3.11. - * # Reported in: https://github.com/python/cpython/issues/94485 - * line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None # <<<<<<<<<<<<<< - * line_cache_key = (frame_cache_key, line) - * + /* "_pydevd_bundle/pydevd_cython.pyx":784 + * if can_skip and not has_breakpoint_in_frame: + * if has_exception_breakpoints: + * return self.trace_exception # <<<<<<<<<<<<<< + * else: + * return None if is_call else NO_FTRACE */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 750, __pyx_L4_error) - if (!__pyx_t_9) { - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L4_error) - __pyx_t_5 = __pyx_t_10; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L6_bool_binop_done; - } - __pyx_t_5 = 0; - __pyx_L6_bool_binop_done:; - __pyx_v_line = __pyx_t_5; + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":751 - * # Reported in: https://github.com/python/cpython/issues/94485 - * line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None - * line_cache_key = (frame_cache_key, line) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":783 * - * if main_debugger.pydb_disposed: + * if can_skip and not has_breakpoint_in_frame: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 751, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_frame_cache_key); - __Pyx_GIVEREF(__pyx_v_frame_cache_key); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 751, __pyx_L4_error); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1)) __PYX_ERR(0, 751, __pyx_L4_error); - __pyx_t_1 = 0; - __pyx_v_line_cache_key = ((PyObject*)__pyx_t_8); - __pyx_t_8 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":753 - * line_cache_key = (frame_cache_key, line) - * - * if main_debugger.pydb_disposed: # <<<<<<<<<<<<<< - * return None if event == 'call' else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":786 + * return self.trace_exception + * else: + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * + * # We may have hit a breakpoint or we are already in step mode. Either way, let's check what we should do in this frame */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 753, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 753, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_9) { + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_8 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L3_return; + } - /* "_pydevd_bundle/pydevd_cython.pyx":754 - * - * if main_debugger.pydb_disposed: - * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":782 + * frame_skips_cache[frame_cache_key] = 0 * - * plugin_manager = main_debugger.plugin + * if can_skip and not has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 754, __pyx_L4_error) - if (__pyx_t_9) { - __Pyx_INCREF(Py_None); - __pyx_t_8 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __pyx_t_1; - __pyx_t_1 = 0; + } } - __pyx_r = __pyx_t_8; - __pyx_t_8 = 0; - goto __pyx_L3_return; + __pyx_L72:; - /* "_pydevd_bundle/pydevd_cython.pyx":753 - * line_cache_key = (frame_cache_key, line) + /* "_pydevd_bundle/pydevd_cython.pyx":670 + * return self.trace_dispatch * - * if main_debugger.pydb_disposed: # <<<<<<<<<<<<<< - * return None if event == 'call' else NO_FTRACE + * if not is_exception_event: # <<<<<<<<<<<<<< + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) * */ } - /* "_pydevd_bundle/pydevd_cython.pyx":756 - * return None if event == 'call' else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":791 + * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) * - * plugin_manager = main_debugger.plugin # <<<<<<<<<<<<<< - * has_exception_breakpoints = ( - * main_debugger.break_on_caught_exceptions - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 756, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_v_plugin_manager = __pyx_t_8; - __pyx_t_8 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":758 - * plugin_manager = main_debugger.plugin - * has_exception_breakpoints = ( - * main_debugger.break_on_caught_exceptions # <<<<<<<<<<<<<< - * or main_debugger.break_on_user_uncaught_exceptions - * or main_debugger.has_plugin_exception_breaks) + * try: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 758, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 758, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L9_bool_binop_done; - } + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":759 - * has_exception_breakpoints = ( - * main_debugger.break_on_caught_exceptions - * or main_debugger.break_on_user_uncaught_exceptions # <<<<<<<<<<<<<< - * or main_debugger.has_plugin_exception_breaks) + /* "_pydevd_bundle/pydevd_cython.pyx":792 * + * try: + * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + * # (one for the line and the other for the return). */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 759, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 759, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L9_bool_binop_done; - } + __pyx_v_stop_on_plugin_breakpoint = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":760 - * main_debugger.break_on_caught_exceptions - * or main_debugger.break_on_user_uncaught_exceptions - * or main_debugger.has_plugin_exception_breaks) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":796 + * # (one for the line and the other for the return). * - * stop_frame = info.pydev_step_stop + * stop_info = {} # <<<<<<<<<<<<<< + * breakpoint = None + * stop = False */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 760, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 760, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __pyx_t_11; - __pyx_L9_bool_binop_done:; - __pyx_v_has_exception_breakpoints = __pyx_t_9; + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 796, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_stop_info = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":762 - * or main_debugger.has_plugin_exception_breaks) + /* "_pydevd_bundle/pydevd_cython.pyx":797 * - * stop_frame = info.pydev_step_stop # <<<<<<<<<<<<<< - * step_cmd = info.pydev_step_cmd - * function_breakpoint_on_call_event = None + * stop_info = {} + * breakpoint = None # <<<<<<<<<<<<<< + * stop = False + * stop_reason = 111 */ - __pyx_t_8 = __pyx_v_info->pydev_step_stop; - __Pyx_INCREF(__pyx_t_8); - __pyx_v_stop_frame = __pyx_t_8; - __pyx_t_8 = 0; + __Pyx_INCREF(Py_None); + __pyx_v_breakpoint = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":763 - * - * stop_frame = info.pydev_step_stop - * step_cmd = info.pydev_step_cmd # <<<<<<<<<<<<<< - * function_breakpoint_on_call_event = None - * + /* "_pydevd_bundle/pydevd_cython.pyx":798 + * stop_info = {} + * breakpoint = None + * stop = False # <<<<<<<<<<<<<< + * stop_reason = 111 + * bp_type = None */ - __pyx_t_5 = __pyx_v_info->pydev_step_cmd; - __pyx_v_step_cmd = __pyx_t_5; + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":764 - * stop_frame = info.pydev_step_stop - * step_cmd = info.pydev_step_cmd - * function_breakpoint_on_call_event = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":799 + * breakpoint = None + * stop = False + * stop_reason = 111 # <<<<<<<<<<<<<< + * bp_type = None * - * if frame.f_code.co_flags & 0xa0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 */ - __Pyx_INCREF(Py_None); - __pyx_v_function_breakpoint_on_call_event = Py_None; + __Pyx_INCREF(__pyx_int_111); + __pyx_v_stop_reason = __pyx_int_111; - /* "_pydevd_bundle/pydevd_cython.pyx":766 - * function_breakpoint_on_call_event = None + /* "_pydevd_bundle/pydevd_cython.pyx":800 + * stop = False + * stop_reason = 111 + * bp_type = None # <<<<<<<<<<<<<< * - * if frame.f_code.co_flags & 0xa0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 # <<<<<<<<<<<<<< - * # Dealing with coroutines and generators: - * # When in a coroutine we change the perceived event to the debugger because - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_160, 0xa0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 766, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":770 - * # When in a coroutine we change the perceived event to the debugger because - * # a call, StopIteration exception and return are usually just pausing/unpausing it. - * if event == 'line': # <<<<<<<<<<<<<< - * is_line = True - * is_call = False - */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 770, __pyx_L4_error) - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":771 - * # a call, StopIteration exception and return are usually just pausing/unpausing it. - * if event == 'line': - * is_line = True # <<<<<<<<<<<<<< - * is_call = False - * is_return = False - */ - __pyx_v_is_line = 1; - - /* "_pydevd_bundle/pydevd_cython.pyx":772 - * if event == 'line': - * is_line = True - * is_call = False # <<<<<<<<<<<<<< - * is_return = False - * is_exception_event = False + * if function_breakpoint_on_call_event: */ - __pyx_v_is_call = 0; + __Pyx_INCREF(Py_None); + __pyx_v_bp_type = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":773 - * is_line = True - * is_call = False - * is_return = False # <<<<<<<<<<<<<< - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":802 + * bp_type = None * + * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< + * breakpoint = function_breakpoint_on_call_event + * stop = True */ - __pyx_v_is_return = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint_on_call_event); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 802, __pyx_L106_error) + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":774 - * is_call = False - * is_return = False - * is_exception_event = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":803 * - * elif event == 'return': + * if function_breakpoint_on_call_event: + * breakpoint = function_breakpoint_on_call_event # <<<<<<<<<<<<<< + * stop = True + * new_frame = frame */ - __pyx_v_is_exception_event = 0; + __Pyx_INCREF(__pyx_v_function_breakpoint_on_call_event); + __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_v_function_breakpoint_on_call_event); - /* "_pydevd_bundle/pydevd_cython.pyx":770 - * # When in a coroutine we change the perceived event to the debugger because - * # a call, StopIteration exception and return are usually just pausing/unpausing it. - * if event == 'line': # <<<<<<<<<<<<<< - * is_line = True - * is_call = False + /* "_pydevd_bundle/pydevd_cython.pyx":804 + * if function_breakpoint_on_call_event: + * breakpoint = function_breakpoint_on_call_event + * stop = True # <<<<<<<<<<<<<< + * new_frame = frame + * stop_reason = CMD_SET_FUNCTION_BREAK */ - goto __pyx_L13; - } + __pyx_v_stop = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":776 - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":805 + * breakpoint = function_breakpoint_on_call_event + * stop = True + * new_frame = frame # <<<<<<<<<<<<<< + * stop_reason = CMD_SET_FUNCTION_BREAK * - * elif event == 'return': # <<<<<<<<<<<<<< - * is_line = False - * is_call = False */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 776, __pyx_L4_error) - if (__pyx_t_9) { + __Pyx_INCREF(__pyx_v_frame); + __pyx_v_new_frame = __pyx_v_frame; - /* "_pydevd_bundle/pydevd_cython.pyx":777 + /* "_pydevd_bundle/pydevd_cython.pyx":806 + * stop = True + * new_frame = frame + * stop_reason = CMD_SET_FUNCTION_BREAK # <<<<<<<<<<<<<< * - * elif event == 'return': - * is_line = False # <<<<<<<<<<<<<< - * is_call = False - * is_return = True - */ - __pyx_v_is_line = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":778 - * elif event == 'return': - * is_line = False - * is_call = False # <<<<<<<<<<<<<< - * is_return = True - * is_exception_event = False + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: */ - __pyx_v_is_call = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CMD_SET_FUNCTION_BREAK); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 806, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_stop_reason, __pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":779 - * is_line = False - * is_call = False - * is_return = True # <<<<<<<<<<<<<< - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":802 + * bp_type = None * + * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< + * breakpoint = function_breakpoint_on_call_event + * stop = True */ - __pyx_v_is_return = 1; + goto __pyx_L112; + } - /* "_pydevd_bundle/pydevd_cython.pyx":780 - * is_call = False - * is_return = True - * is_exception_event = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":808 + * stop_reason = CMD_SET_FUNCTION_BREAK * - * returns_cache_key = (frame_cache_key, 'returns') + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: # <<<<<<<<<<<<<< + * breakpoint = breakpoints_for_file[line] + * new_frame = frame */ - __pyx_v_is_exception_event = 0; + if (__pyx_v_is_line) { + } else { + __pyx_t_11 = __pyx_v_is_line; + goto __pyx_L113_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_info->pydev_state != 2); + if (__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L113_bool_binop_done; + } + if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 808, __pyx_L106_error) } + __pyx_t_9 = (__pyx_v_breakpoints_for_file != ((PyObject*)Py_None)); + if (__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L113_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 808, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 808, __pyx_L106_error) } + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 808, __pyx_L106_error) + } + __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_t_8, __pyx_v_breakpoints_for_file, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 808, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __pyx_t_9; + __pyx_L113_bool_binop_done:; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":782 - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":809 * - * returns_cache_key = (frame_cache_key, 'returns') # <<<<<<<<<<<<<< - * return_lines = frame_skips_cache.get(returns_cache_key) - * if return_lines is None: + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + * breakpoint = breakpoints_for_file[line] # <<<<<<<<<<<<<< + * new_frame = frame + * stop = True */ - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 782, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_frame_cache_key); - __Pyx_GIVEREF(__pyx_v_frame_cache_key); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 782, __pyx_L4_error); - __Pyx_INCREF(__pyx_n_s_returns); - __Pyx_GIVEREF(__pyx_n_s_returns); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_returns)) __PYX_ERR(0, 782, __pyx_L4_error); - __pyx_v_returns_cache_key = ((PyObject*)__pyx_t_8); - __pyx_t_8 = 0; + if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 809, __pyx_L106_error) } + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 809, __pyx_L106_error) + } + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 809, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_breakpoints_for_file, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":783 + /* "_pydevd_bundle/pydevd_cython.pyx":810 + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + * breakpoint = breakpoints_for_file[line] + * new_frame = frame # <<<<<<<<<<<<<< + * stop = True * - * returns_cache_key = (frame_cache_key, 'returns') - * return_lines = frame_skips_cache.get(returns_cache_key) # <<<<<<<<<<<<<< - * if return_lines is None: - * # Note: we're collecting the return lines by inspecting the bytecode as */ - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 783, __pyx_L4_error) + __Pyx_INCREF(__pyx_v_frame); + __pyx_v_new_frame = __pyx_v_frame; + + /* "_pydevd_bundle/pydevd_cython.pyx":811 + * breakpoint = breakpoints_for_file[line] + * new_frame = frame + * stop = True # <<<<<<<<<<<<<< + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":808 + * stop_reason = CMD_SET_FUNCTION_BREAK + * + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: # <<<<<<<<<<<<<< + * breakpoint = breakpoints_for_file[line] + * new_frame = frame + */ + goto __pyx_L112; } - __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_returns_cache_key, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 783, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_v_return_lines = __pyx_t_8; - __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":784 - * returns_cache_key = (frame_cache_key, 'returns') - * return_lines = frame_skips_cache.get(returns_cache_key) - * if return_lines is None: # <<<<<<<<<<<<<< - * # Note: we're collecting the return lines by inspecting the bytecode as - * # there are multiple returns and multiple stop iterations when awaiting and + /* "_pydevd_bundle/pydevd_cython.pyx":813 + * stop = True + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: # <<<<<<<<<<<<<< + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: */ - __pyx_t_9 = (__pyx_v_return_lines == Py_None); + __pyx_t_9 = (__pyx_v_plugin_manager != Py_None); if (__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L117_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 813, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_11 = __pyx_t_9; + __pyx_L117_bool_binop_done:; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":789 - * # it doesn't give any clear indication when a coroutine or generator is - * # finishing or just pausing. - * return_lines = set() # <<<<<<<<<<<<<< - * for x in main_debugger.collect_return_info(frame.f_code): - * # Note: cython does not support closures in cpdefs (so we can't use + /* "_pydevd_bundle/pydevd_cython.pyx":814 + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) # <<<<<<<<<<<<<< + * if result: + * stop_on_plugin_breakpoint = True */ - __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L4_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_get_breakpoint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 814, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF_SET(__pyx_v_return_lines, __pyx_t_8); - __pyx_t_8 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":790 - * # finishing or just pausing. - * return_lines = set() - * for x in main_debugger.collect_return_info(frame.f_code): # <<<<<<<<<<<<<< - * # Note: cython does not support closures in cpdefs (so we can't use - * # a list comprehension). - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_collect_return_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L4_error) + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 814, __pyx_L106_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_5 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 790, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); + PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_1}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 814, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { - __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); - __pyx_t_12 = 0; - __pyx_t_13 = NULL; - } else { - __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 790, __pyx_L4_error) - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - for (;;) { - if (likely(!__pyx_t_13)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); - #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 790, __pyx_L4_error) - #endif - if (__pyx_t_12 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 790, __pyx_L4_error) - #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 790, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - } else { - { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); - #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 790, __pyx_L4_error) - #endif - if (__pyx_t_12 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 790, __pyx_L4_error) - #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 790, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - } - } else { - __pyx_t_8 = __pyx_t_13(__pyx_t_1); - if (unlikely(!__pyx_t_8)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 790, __pyx_L4_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_8); - } - __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8); - __pyx_t_8 = 0; + __pyx_v_result = __pyx_t_7; + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":793 - * # Note: cython does not support closures in cpdefs (so we can't use - * # a list comprehension). - * return_lines.add(x.return_line) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":815 + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = True + * breakpoint, new_frame, bp_type = result + */ + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 815, __pyx_L106_error) + if (__pyx_t_11) { + + /* "_pydevd_bundle/pydevd_cython.pyx":816 + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: + * stop_on_plugin_breakpoint = True # <<<<<<<<<<<<<< + * breakpoint, new_frame, bp_type = result * - * frame_skips_cache[returns_cache_key] = return_lines */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_return_lines, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_return_line); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_5 = 1; + __pyx_v_stop_on_plugin_breakpoint = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":817 + * if result: + * stop_on_plugin_breakpoint = True + * breakpoint, new_frame, bp_type = result # <<<<<<<<<<<<<< + * + * if breakpoint: + */ + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 817, __pyx_L106_error) } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L4_error) + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + __pyx_t_1 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + #else + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 817, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 817, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_7 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L120_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L120_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_1 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L120_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_4), 3) < 0) __PYX_ERR(0, 817, __pyx_L106_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L121_unpacking_done; + __pyx_L120_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 817, __pyx_L106_error) + __pyx_L121_unpacking_done:; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_v_new_frame = __pyx_t_8; + __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_bp_type, __pyx_t_1); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":790 - * # finishing or just pausing. - * return_lines = set() - * for x in main_debugger.collect_return_info(frame.f_code): # <<<<<<<<<<<<<< - * # Note: cython does not support closures in cpdefs (so we can't use - * # a list comprehension). + /* "_pydevd_bundle/pydevd_cython.pyx":815 + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = True + * breakpoint, new_frame, bp_type = result */ } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":795 - * return_lines.add(x.return_line) - * - * frame_skips_cache[returns_cache_key] = return_lines # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":813 + * stop = True * - * if line not in return_lines: - */ - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 795, __pyx_L4_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_returns_cache_key, __pyx_v_return_lines) < 0))) __PYX_ERR(0, 795, __pyx_L4_error) - - /* "_pydevd_bundle/pydevd_cython.pyx":784 - * returns_cache_key = (frame_cache_key, 'returns') - * return_lines = frame_skips_cache.get(returns_cache_key) - * if return_lines is None: # <<<<<<<<<<<<<< - * # Note: we're collecting the return lines by inspecting the bytecode as - * # there are multiple returns and multiple stop iterations when awaiting and + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: # <<<<<<<<<<<<<< + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: */ } + __pyx_L112:; - /* "_pydevd_bundle/pydevd_cython.pyx":797 - * frame_skips_cache[returns_cache_key] = return_lines + /* "_pydevd_bundle/pydevd_cython.pyx":819 + * breakpoint, new_frame, bp_type = result * - * if line not in return_lines: # <<<<<<<<<<<<<< - * # Not really a return (coroutine/generator paused). - * return self.trace_dispatch - */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_return_lines, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 797, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":799 - * if line not in return_lines: - * # Not really a return (coroutine/generator paused). - * return self.trace_dispatch # <<<<<<<<<<<<<< - * else: - * if self.exc_info: + * if breakpoint: # <<<<<<<<<<<<<< + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L3_return; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 819, __pyx_L106_error) + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":797 - * frame_skips_cache[returns_cache_key] = return_lines + /* "_pydevd_bundle/pydevd_cython.pyx":822 + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here + * if breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) * - * if line not in return_lines: # <<<<<<<<<<<<<< - * # Not really a return (coroutine/generator paused). - * return self.trace_dispatch - */ - } - - /* "_pydevd_bundle/pydevd_cython.pyx":801 - * return self.trace_dispatch - * else: - * if self.exc_info: # <<<<<<<<<<<<<< - * self.handle_user_exception(frame) - * return self.trace_dispatch */ - /*else*/ { - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 801, __pyx_L4_error) - if (__pyx_t_9) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":802 - * else: - * if self.exc_info: - * self.handle_user_exception(frame) # <<<<<<<<<<<<<< - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":823 + * # lets do the conditional stuff here + * if breakpoint.expression is not None: + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) # <<<<<<<<<<<<<< * + * if stop or stop_on_plugin_breakpoint: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L4_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_expression); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 823, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); __PYX_ERR(0, 823, __pyx_L106_error) } __pyx_t_7 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS @@ -18253,4174 +18025,4529 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispa } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_breakpoint, ((PyObject *)__pyx_v_info), __pyx_v_new_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L4_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":803 - * if self.exc_info: - * self.handle_user_exception(frame) - * return self.trace_dispatch # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":822 + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here + * if breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) * - * # Tricky handling: usually when we're on a frame which is about to exit - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L3_return; - - /* "_pydevd_bundle/pydevd_cython.pyx":801 - * return self.trace_dispatch - * else: - * if self.exc_info: # <<<<<<<<<<<<<< - * self.handle_user_exception(frame) - * return self.trace_dispatch */ } - /* "_pydevd_bundle/pydevd_cython.pyx":821 - * # as the return shouldn't mean that we've actually completed executing a - * # frame in this case). - * if stop_frame is frame and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * if step_cmd in (108, 159, 107, 144): - * f = self._get_unfiltered_back_frame(main_debugger, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":825 + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + * + * if stop or stop_on_plugin_breakpoint: # <<<<<<<<<<<<<< + * eval_result = False + * if breakpoint.has_condition: */ - __pyx_t_11 = (__pyx_v_stop_frame == __pyx_v_frame); - if (__pyx_t_11) { + if (!__pyx_v_stop) { } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L21_bool_binop_done; + __pyx_t_11 = __pyx_v_stop; + goto __pyx_L125_bool_binop_done; } - __pyx_t_11 = (!__pyx_v_info->pydev_use_scoped_step_frame); - __pyx_t_9 = __pyx_t_11; - __pyx_L21_bool_binop_done:; - if (__pyx_t_9) { + __pyx_t_11 = __pyx_v_stop_on_plugin_breakpoint; + __pyx_L125_bool_binop_done:; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":822 - * # frame in this case). - * if stop_frame is frame and not info.pydev_use_scoped_step_frame: - * if step_cmd in (108, 159, 107, 144): # <<<<<<<<<<<<<< - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":826 + * + * if stop or stop_on_plugin_breakpoint: + * eval_result = False # <<<<<<<<<<<<<< + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) */ - switch (__pyx_v_step_cmd) { - case 0x6C: - case 0x9F: - case 0x6B: - case 0x90: + __Pyx_INCREF(Py_False); + __pyx_v_eval_result = Py_False; - /* "_pydevd_bundle/pydevd_cython.pyx":823 - * if stop_frame is frame and not info.pydev_use_scoped_step_frame: - * if step_cmd in (108, 159, 107, 144): - * f = self._get_unfiltered_back_frame(main_debugger, frame) # <<<<<<<<<<<<<< - * if f is not None: - * info.pydev_step_cmd = 206 + /* "_pydevd_bundle/pydevd_cython.pyx":827 + * if stop or stop_on_plugin_breakpoint: + * eval_result = False + * if breakpoint.has_condition: # <<<<<<<<<<<<<< + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_get_unfiltered_back_frame(__pyx_v_self, __pyx_v_main_debugger, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_f = __pyx_t_1; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_has_condition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 827, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_11) { + + /* "_pydevd_bundle/pydevd_cython.pyx":828 + * eval_result = False + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) # <<<<<<<<<<<<<< + * if not eval_result: + * stop = False + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_condition); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 828, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); __PYX_ERR(0, 828, __pyx_L106_error) } + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, ((PyObject *)__pyx_v_info), __pyx_v_breakpoint, __pyx_v_new_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF_SET(__pyx_v_eval_result, __pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":824 - * if step_cmd in (108, 159, 107, 144): - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 206 - * info.pydev_step_stop = f + /* "_pydevd_bundle/pydevd_cython.pyx":829 + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: # <<<<<<<<<<<<<< + * stop = False + * stop_on_plugin_breakpoint = False */ - __pyx_t_9 = (__pyx_v_f != Py_None); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_eval_result); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 829, __pyx_L106_error) + __pyx_t_9 = (!__pyx_t_11); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":825 - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: - * info.pydev_step_cmd = 206 # <<<<<<<<<<<<<< - * info.pydev_step_stop = f - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":830 + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: + * stop = False # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * */ - __pyx_v_info->pydev_step_cmd = 0xCE; + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":826 - * if f is not None: - * info.pydev_step_cmd = 206 - * info.pydev_step_stop = f # <<<<<<<<<<<<<< - * else: - * if step_cmd == 108: + /* "_pydevd_bundle/pydevd_cython.pyx":831 + * if not eval_result: + * stop = False + * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< + * + * if is_call and (frame.f_code.co_name in ('', '') or (line == 1 and frame.f_code.co_name.startswith('pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = __pyx_v_f; + __pyx_v_stop_on_plugin_breakpoint = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":824 - * if step_cmd in (108, 159, 107, 144): - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 206 - * info.pydev_step_stop = f + /* "_pydevd_bundle/pydevd_cython.pyx":829 + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: # <<<<<<<<<<<<<< + * stop = False + * stop_on_plugin_breakpoint = False */ - goto __pyx_L23; } - /* "_pydevd_bundle/pydevd_cython.pyx":828 - * info.pydev_step_stop = f - * else: - * if step_cmd == 108: # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 107 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":827 + * if stop or stop_on_plugin_breakpoint: + * eval_result = False + * if breakpoint.has_condition: # <<<<<<<<<<<<<< + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: */ - /*else*/ { + } - /* "_pydevd_bundle/pydevd_cython.pyx":832 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":825 + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) * - * elif step_cmd == 159: # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 144 - * info.pydev_step_stop = None + * if stop or stop_on_plugin_breakpoint: # <<<<<<<<<<<<<< + * eval_result = False + * if breakpoint.has_condition: */ - switch (__pyx_v_step_cmd) { - case 0x6C: + } - /* "_pydevd_bundle/pydevd_cython.pyx":829 - * else: - * if step_cmd == 108: - * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":833 + * stop_on_plugin_breakpoint = False * + * if is_call and (frame.f_code.co_name in ('', '') or (line == 1 and frame.f_code.co_name.startswith('pydev_step_cmd = 0x6B; - - /* "_pydevd_bundle/pydevd_cython.pyx":830 - * if step_cmd == 108: - * info.pydev_step_cmd = 107 - * info.pydev_step_stop = None # <<<<<<<<<<<<<< + if (__pyx_v_is_call) { + } else { + __pyx_t_9 = __pyx_v_is_call; + goto __pyx_L130_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_kp_s_lambda, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 833, __pyx_L106_error) + if (!__pyx_t_15) { + } else { + __pyx_t_11 = __pyx_t_15; + goto __pyx_L133_bool_binop_done; + } + __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 833, __pyx_L106_error) + __pyx_t_11 = __pyx_t_15; + __pyx_L133_bool_binop_done:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = __pyx_t_11; + if (!__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L130_bool_binop_done; + } + __pyx_t_15 = (__pyx_v_line == 1); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L130_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_s_cell}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 833, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L130_bool_binop_done:; + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":845 + * # module, so it's the same case as . * - * elif step_cmd == 159: + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * # Handle logpoint (on a logpoint we should never stop). */ - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = Py_None; + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 845, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L110_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":828 - * info.pydev_step_stop = f - * else: - * if step_cmd == 108: # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 107 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":833 + * stop_on_plugin_breakpoint = False + * + * if is_call and (frame.f_code.co_name in ('', '') or (line == 1 and frame.f_code.co_name.startswith('pydev_step_cmd = 0x90; + if (!__pyx_v_stop) { + } else { + goto __pyx_L138_next_and; + } + if (__pyx_v_stop_on_plugin_breakpoint) { + } else { + __pyx_t_9 = __pyx_v_stop_on_plugin_breakpoint; + goto __pyx_L137_bool_binop_done; + } + __pyx_L138_next_and:; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_is_logpoint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 848, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L137_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":834 - * elif step_cmd == 159: - * info.pydev_step_cmd = 144 - * info.pydev_step_stop = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":849 + * # Handle logpoint (on a logpoint we should never stop). + * if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: + * stop = False # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False * - * elif step_cmd == 206: */ - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = Py_None; + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":832 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":850 + * if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: + * stop = False + * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< * - * elif step_cmd == 159: # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 144 - * info.pydev_step_stop = None + * if info.pydev_message is not None and len(info.pydev_message) > 0: */ - break; - default: break; - } - } - __pyx_L23:; + __pyx_v_stop_on_plugin_breakpoint = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":822 - * # frame in this case). - * if stop_frame is frame and not info.pydev_use_scoped_step_frame: - * if step_cmd in (108, 159, 107, 144): # <<<<<<<<<<<<<< - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":852 + * stop_on_plugin_breakpoint = False + * + * if info.pydev_message is not None and len(info.pydev_message) > 0: # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') + * py_db.writer.add_command(cmd) */ - break; - case 0xCE: + __pyx_t_15 = (__pyx_v_info->pydev_message != ((PyObject*)Py_None)); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L141_bool_binop_done; + } + __pyx_t_8 = __pyx_v_info->pydev_message; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_12 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 852, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = (__pyx_t_12 > 0); + __pyx_t_9 = __pyx_t_15; + __pyx_L141_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":838 - * elif step_cmd == 206: - * # We're exiting this one, so, mark the new coroutine context. - * f = self._get_unfiltered_back_frame(main_debugger, frame) # <<<<<<<<<<<<<< - * if f is not None: - * info.pydev_step_stop = f + /* "_pydevd_bundle/pydevd_cython.pyx":853 + * + * if info.pydev_message is not None and len(info.pydev_message) > 0: + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') # <<<<<<<<<<<<<< + * py_db.writer.add_command(cmd) + * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_get_unfiltered_back_frame(__pyx_v_self, __pyx_v_main_debugger, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L4_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_v_f = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_make_io_message); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_linesep); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Add(__pyx_v_info->pydev_message, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_kp_s_1}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 853, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_v_cmd = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":839 - * # We're exiting this one, so, mark the new coroutine context. - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: # <<<<<<<<<<<<<< - * info.pydev_step_stop = f - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":854 + * if info.pydev_message is not None and len(info.pydev_message) > 0: + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') + * py_db.writer.add_command(cmd) # <<<<<<<<<<<<<< + * + * if py_db.show_return_values: */ - __pyx_t_9 = (__pyx_v_f != Py_None); - if (__pyx_t_9) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_writer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 854, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add_command); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_cmd}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":840 - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: - * info.pydev_step_stop = f # <<<<<<<<<<<<<< - * else: - * info.pydev_step_cmd = 107 + /* "_pydevd_bundle/pydevd_cython.pyx":852 + * stop_on_plugin_breakpoint = False + * + * if info.pydev_message is not None and len(info.pydev_message) > 0: # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') + * py_db.writer.add_command(cmd) */ - __Pyx_INCREF(__pyx_v_f); - __Pyx_GIVEREF(__pyx_v_f); - __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = __pyx_v_f; + } - /* "_pydevd_bundle/pydevd_cython.pyx":839 - * # We're exiting this one, so, mark the new coroutine context. - * f = self._get_unfiltered_back_frame(main_debugger, frame) - * if f is not None: # <<<<<<<<<<<<<< - * info.pydev_step_stop = f - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":848 + * + * # Handle logpoint (on a logpoint we should never stop). + * if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: # <<<<<<<<<<<<<< + * stop = False + * stop_on_plugin_breakpoint = False */ - goto __pyx_L24; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":842 - * info.pydev_step_stop = f - * else: - * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":819 + * breakpoint, new_frame, bp_type = result * + * if breakpoint: # <<<<<<<<<<<<<< + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here */ - /*else*/ { - __pyx_v_info->pydev_step_cmd = 0x6B; + } - /* "_pydevd_bundle/pydevd_cython.pyx":843 - * else: - * info.pydev_step_cmd = 107 - * info.pydev_step_stop = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":856 + * py_db.writer.add_command(cmd) * - * elif event == 'exception': + * if py_db.show_return_values: # <<<<<<<<<<<<<< + * if is_return and ( + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or */ - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = Py_None; - } - __pyx_L24:; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 856, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":836 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":857 * - * elif step_cmd == 206: # <<<<<<<<<<<<<< - * # We're exiting this one, so, mark the new coroutine context. - * f = self._get_unfiltered_back_frame(main_debugger, frame) + * if py_db.show_return_values: + * if is_return and ( # <<<<<<<<<<<<<< + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or */ - break; - default: break; - } + if (__pyx_v_is_return) { + } else { + __pyx_t_9 = __pyx_v_is_return; + goto __pyx_L145_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":821 - * # as the return shouldn't mean that we've actually completed executing a - * # frame in this case). - * if stop_frame is frame and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * if step_cmd in (108, 159, 107, 144): - * f = self._get_unfiltered_back_frame(main_debugger, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":858 + * if py_db.show_return_values: + * if is_return and ( + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or # <<<<<<<<<<<<<< + * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or + * (info.pydev_step_cmd in (107, 206)) or */ + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6C: + case 0x9F: + case 0x80: + __pyx_t_15 = 1; + break; + default: + __pyx_t_15 = 0; + break; } - } + __pyx_t_11 = __pyx_t_15; + if (!__pyx_t_11) { + goto __pyx_L147_next_or; + } else { + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 858, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L145_bool_binop_done; + } + __pyx_L147_next_or:; - /* "_pydevd_bundle/pydevd_cython.pyx":776 - * is_exception_event = False - * - * elif event == 'return': # <<<<<<<<<<<<<< - * is_line = False - * is_call = False + /* "_pydevd_bundle/pydevd_cython.pyx":859 + * if is_return and ( + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or # <<<<<<<<<<<<<< + * (info.pydev_step_cmd in (107, 206)) or + * ( */ - goto __pyx_L13; - } + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6D: + case 0xA0: + __pyx_t_11 = 1; + break; + default: + __pyx_t_11 = 0; + break; + } + __pyx_t_15 = __pyx_t_11; + if (!__pyx_t_15) { + goto __pyx_L149_next_or; + } else { + } + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 859, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L145_bool_binop_done; + } + __pyx_L149_next_or:; - /* "_pydevd_bundle/pydevd_cython.pyx":845 - * info.pydev_step_stop = None - * - * elif event == 'exception': # <<<<<<<<<<<<<< - * breakpoints_for_file = None - * if has_exception_breakpoints: + /* "_pydevd_bundle/pydevd_cython.pyx":860 + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or + * (info.pydev_step_cmd in (107, 206)) or # <<<<<<<<<<<<<< + * ( + * info.pydev_step_cmd == 144 */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 845, __pyx_L4_error) - if (__pyx_t_9) { + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6B: + case 0xCE: + __pyx_t_15 = 1; + break; + default: + __pyx_t_15 = 0; + break; + } + __pyx_t_11 = __pyx_t_15; + if (!__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L145_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":846 - * - * elif event == 'exception': - * breakpoints_for_file = None # <<<<<<<<<<<<<< - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) + /* "_pydevd_bundle/pydevd_cython.pyx":862 + * (info.pydev_step_cmd in (107, 206)) or + * ( + * info.pydev_step_cmd == 144 # <<<<<<<<<<<<<< + * and frame.f_back is not None + * and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) */ - __Pyx_INCREF(Py_None); - __pyx_v_breakpoints_for_file = ((PyObject*)Py_None); + __pyx_t_11 = (__pyx_v_info->pydev_step_cmd == 0x90); + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L145_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":847 - * elif event == 'exception': - * breakpoints_for_file = None - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: + /* "_pydevd_bundle/pydevd_cython.pyx":863 + * ( + * info.pydev_step_cmd == 144 + * and frame.f_back is not None # <<<<<<<<<<<<<< + * and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ) */ - if (__pyx_v_has_exception_breakpoints) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L145_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":848 - * breakpoints_for_file = None - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) # <<<<<<<<<<<<<< - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + /* "_pydevd_bundle/pydevd_cython.pyx":864 + * info.pydev_step_cmd == 144 + * and frame.f_back is not None + * and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) # <<<<<<<<<<<<<< + * ) + * ): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_should_stop_on_exception(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { - PyObject* sequence = __pyx_t_1; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 848, __pyx_L4_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_8 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; } - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); - index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L26_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - index = 1; __pyx_t_7 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L26_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 848, __pyx_L4_error) - __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L27_unpacking_done; - __pyx_L26_unpacking_failed:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_14 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 848, __pyx_L4_error) - __pyx_L27_unpacking_done:; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_should_stop = __pyx_t_9; - __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_7); - __pyx_t_7 = 0; + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_7, __pyx_t_4, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 864, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_15 = (!__pyx_t_11); + __pyx_t_9 = __pyx_t_15; + __pyx_L145_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":849 - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: # <<<<<<<<<<<<<< - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":857 + * + * if py_db.show_return_values: + * if is_return and ( # <<<<<<<<<<<<<< + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or */ - if (__pyx_v_should_stop) { + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":850 - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":867 + * ) + * ): + * self._show_return_values(frame, arg) # <<<<<<<<<<<<<< * + * elif py_db.remove_return_values_flag: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L4_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_show_return_values(__pyx_v_self, __pyx_v_frame, __pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 850, __pyx_L4_error) - __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_handle_exception(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 850, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 850, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":851 - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":857 * - * return self.trace_dispatch - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 851, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; - goto __pyx_L3_return; - - /* "_pydevd_bundle/pydevd_cython.pyx":850 - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< - * return self.trace_dispatch - * - */ - } - - /* "_pydevd_bundle/pydevd_cython.pyx":849 - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: # <<<<<<<<<<<<<< - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch + * if py_db.show_return_values: + * if is_return and ( # <<<<<<<<<<<<<< + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or */ } - /* "_pydevd_bundle/pydevd_cython.pyx":847 - * elif event == 'exception': - * breakpoints_for_file = None - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: - */ - } - - /* "_pydevd_bundle/pydevd_cython.pyx":853 - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":856 + * py_db.writer.add_command(cmd) * - * return self.trace_dispatch # <<<<<<<<<<<<<< - * else: - * # event == 'call' or event == 'c_XXX' + * if py_db.show_return_values: # <<<<<<<<<<<<<< + * if is_return and ( + * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; - goto __pyx_L3_return; + goto __pyx_L143; + } - /* "_pydevd_bundle/pydevd_cython.pyx":845 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":869 + * self._show_return_values(frame, arg) * - * elif event == 'exception': # <<<<<<<<<<<<<< - * breakpoints_for_file = None - * if has_exception_breakpoints: + * elif py_db.remove_return_values_flag: # <<<<<<<<<<<<<< + * try: + * self._remove_return_values(py_db, frame) */ - } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 869, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":856 - * else: - * # event == 'call' or event == 'c_XXX' - * return self.trace_dispatch # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":870 * - * else: # Not coroutine nor generator + * elif py_db.remove_return_values_flag: + * try: # <<<<<<<<<<<<<< + * self._remove_return_values(py_db, frame) + * finally: */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; - goto __pyx_L3_return; - } - __pyx_L13:; + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":766 - * function_breakpoint_on_call_event = None - * - * if frame.f_code.co_flags & 0xa0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 # <<<<<<<<<<<<<< - * # Dealing with coroutines and generators: - * # When in a coroutine we change the perceived event to the debugger because + /* "_pydevd_bundle/pydevd_cython.pyx":871 + * elif py_db.remove_return_values_flag: + * try: + * self._remove_return_values(py_db, frame) # <<<<<<<<<<<<<< + * finally: + * py_db.remove_return_values_flag = False */ - goto __pyx_L12; - } + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_remove_return_values(__pyx_v_self, __pyx_v_py_db, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L155_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":859 + /* "_pydevd_bundle/pydevd_cython.pyx":873 + * self._remove_return_values(py_db, frame) + * finally: + * py_db.remove_return_values_flag = False # <<<<<<<<<<<<<< * - * else: # Not coroutine nor generator - * if event == 'line': # <<<<<<<<<<<<<< - * is_line = True - * is_call = False - */ - /*else*/ { - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 859, __pyx_L4_error) - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":860 - * else: # Not coroutine nor generator - * if event == 'line': - * is_line = True # <<<<<<<<<<<<<< - * is_call = False - * is_return = False - */ - __pyx_v_is_line = 1; - - /* "_pydevd_bundle/pydevd_cython.pyx":861 - * if event == 'line': - * is_line = True - * is_call = False # <<<<<<<<<<<<<< - * is_return = False - * is_exception_event = False + * if stop: */ - __pyx_v_is_call = 0; + /*finally:*/ { + /*normal exit:*/{ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_py_db, __pyx_n_s_remove_return_values_flag, Py_False) < 0) __PYX_ERR(0, 873, __pyx_L106_error) + goto __pyx_L156; + } + __pyx_L155_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_28); + __pyx_t_5 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_22 = __pyx_filename; + { + if (__Pyx_PyObject_SetAttrStr(__pyx_v_py_db, __pyx_n_s_remove_return_values_flag, Py_False) < 0) __PYX_ERR(0, 873, __pyx_L158_error) + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28); + } + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25); + __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; + __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_22; + goto __pyx_L106_error; + __pyx_L158_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28); + } + __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; + __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; + goto __pyx_L106_error; + } + __pyx_L156:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":862 - * is_line = True - * is_call = False - * is_return = False # <<<<<<<<<<<<<< - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":869 + * self._show_return_values(frame, arg) * + * elif py_db.remove_return_values_flag: # <<<<<<<<<<<<<< + * try: + * self._remove_return_values(py_db, frame) */ - __pyx_v_is_return = 0; + } + __pyx_L143:; - /* "_pydevd_bundle/pydevd_cython.pyx":863 - * is_call = False - * is_return = False - * is_exception_event = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":875 + * py_db.remove_return_values_flag = False * - * elif event == 'return': + * if stop: # <<<<<<<<<<<<<< + * self.set_suspend( + * thread, */ - __pyx_v_is_exception_event = 0; + if (__pyx_v_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":859 + /* "_pydevd_bundle/pydevd_cython.pyx":876 * - * else: # Not coroutine nor generator - * if event == 'line': # <<<<<<<<<<<<<< - * is_line = True - * is_call = False + * if stop: + * self.set_suspend( # <<<<<<<<<<<<<< + * thread, + * stop_reason, */ - goto __pyx_L30; - } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_1); - /* "_pydevd_bundle/pydevd_cython.pyx":865 - * is_exception_event = False - * - * elif event == 'return': # <<<<<<<<<<<<<< - * is_line = False - * is_return = True + /* "_pydevd_bundle/pydevd_cython.pyx":878 + * self.set_suspend( + * thread, + * stop_reason, # <<<<<<<<<<<<<< + * suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", + * ) */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 865, __pyx_L4_error) - if (__pyx_t_9) { + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 876, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 876, __pyx_L106_error); + __Pyx_INCREF(__pyx_v_stop_reason); + __Pyx_GIVEREF(__pyx_v_stop_reason); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_stop_reason)) __PYX_ERR(0, 876, __pyx_L106_error); - /* "_pydevd_bundle/pydevd_cython.pyx":866 + /* "_pydevd_bundle/pydevd_cython.pyx":879 + * thread, + * stop_reason, + * suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", # <<<<<<<<<<<<<< + * ) * - * elif event == 'return': - * is_line = False # <<<<<<<<<<<<<< - * is_return = True - * is_call = False - */ - __pyx_v_is_line = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":867 - * elif event == 'return': - * is_line = False - * is_return = True # <<<<<<<<<<<<<< - * is_call = False - * is_exception_event = False */ - __pyx_v_is_return = 1; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 879, __pyx_L106_error) + if (__pyx_t_9) { + } else { + __Pyx_INCREF(__pyx_v_breakpoint); + __pyx_t_7 = __pyx_v_breakpoint; + goto __pyx_L160_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_suspend_policy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_n_s_ALL, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L160_bool_binop_done:; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_suspend_other_threads, __pyx_t_7) < 0) __PYX_ERR(0, 879, __pyx_L106_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":868 - * is_line = False - * is_return = True - * is_call = False # <<<<<<<<<<<<<< - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":876 * + * if stop: + * self.set_suspend( # <<<<<<<<<<<<<< + * thread, + * stop_reason, */ - __pyx_v_is_call = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 876, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":869 - * is_return = True - * is_call = False - * is_exception_event = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":875 + * py_db.remove_return_values_flag = False * - * # If we are in single step mode and something causes us to exit the current frame, we need to make sure we break - */ - __pyx_v_is_exception_event = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":878 - * # @DontTrace comment. - * if ( - * stop_frame is frame and # <<<<<<<<<<<<<< - * not info.pydev_use_scoped_step_frame and is_return and - * step_cmd in (108, 109, 159, 160, 128) - */ - __pyx_t_11 = (__pyx_v_stop_frame == __pyx_v_frame); - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L32_bool_binop_done; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":879 - * if ( - * stop_frame is frame and - * not info.pydev_use_scoped_step_frame and is_return and # <<<<<<<<<<<<<< - * step_cmd in (108, 109, 159, 160, 128) - * ): + * if stop: # <<<<<<<<<<<<<< + * self.set_suspend( + * thread, */ - __pyx_t_11 = (!__pyx_v_info->pydev_use_scoped_step_frame); - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L32_bool_binop_done; - } - if (__pyx_v_is_return) { - } else { - __pyx_t_9 = __pyx_v_is_return; - goto __pyx_L32_bool_binop_done; + goto __pyx_L159; } - /* "_pydevd_bundle/pydevd_cython.pyx":880 - * stop_frame is frame and - * not info.pydev_use_scoped_step_frame and is_return and - * step_cmd in (108, 109, 159, 160, 128) # <<<<<<<<<<<<<< - * ): + /* "_pydevd_bundle/pydevd_cython.pyx":882 + * ) * + * elif stop_on_plugin_breakpoint and plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: */ - switch (__pyx_v_step_cmd) { - case 0x6C: - case 0x6D: - case 0x9F: - case 0xA0: - case 0x80: - __pyx_t_11 = 1; - break; - default: - __pyx_t_11 = 0; - break; + if (__pyx_v_stop_on_plugin_breakpoint) { + } else { + __pyx_t_9 = __pyx_v_stop_on_plugin_breakpoint; + goto __pyx_L162_bool_binop_done; } - __pyx_t_15 = __pyx_t_11; + __pyx_t_15 = (__pyx_v_plugin_manager != Py_None); __pyx_t_9 = __pyx_t_15; - __pyx_L32_bool_binop_done:; - - /* "_pydevd_bundle/pydevd_cython.pyx":877 - * # Note: this is especially troublesome when we're skipping code with the - * # @DontTrace comment. - * if ( # <<<<<<<<<<<<<< - * stop_frame is frame and - * not info.pydev_use_scoped_step_frame and is_return and - */ + __pyx_L162_bool_binop_done:; if (__pyx_t_9) { /* "_pydevd_bundle/pydevd_cython.pyx":883 - * ): * - * if step_cmd in (108, 109, 128): # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 107 - * else: + * elif stop_on_plugin_breakpoint and plugin_manager is not None: + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) # <<<<<<<<<<<<<< + * if result: + * frame = result */ - switch (__pyx_v_step_cmd) { - case 0x6C: - case 0x6D: - case 0x80: + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_py_db, __pyx_v_thread, __pyx_v_frame, __pyx_v_bp_type}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":884 + /* "_pydevd_bundle/pydevd_cython.pyx":884 + * elif stop_on_plugin_breakpoint and plugin_manager is not None: + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: # <<<<<<<<<<<<<< + * frame = result * - * if step_cmd in (108, 109, 128): - * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< - * else: - * info.pydev_step_cmd = 144 */ - __pyx_v_info->pydev_step_cmd = 0x6B; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 884, __pyx_L106_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":883 - * ): + /* "_pydevd_bundle/pydevd_cython.pyx":885 + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: + * frame = result # <<<<<<<<<<<<<< * - * if step_cmd in (108, 109, 128): # <<<<<<<<<<<<<< - * info.pydev_step_cmd = 107 - * else: + * # if thread has a suspend flag, we suspend with a busy wait */ - break; - default: + __Pyx_INCREF(__pyx_v_result); + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_v_result); - /* "_pydevd_bundle/pydevd_cython.pyx":886 - * info.pydev_step_cmd = 107 - * else: - * info.pydev_step_cmd = 144 # <<<<<<<<<<<<<< - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":884 + * elif stop_on_plugin_breakpoint and plugin_manager is not None: + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: # <<<<<<<<<<<<<< + * frame = result * */ - __pyx_v_info->pydev_step_cmd = 0x90; - break; } - /* "_pydevd_bundle/pydevd_cython.pyx":887 - * else: - * info.pydev_step_cmd = 144 - * info.pydev_step_stop = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":882 + * ) * - * if self.exc_info: - */ - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = Py_None; - - /* "_pydevd_bundle/pydevd_cython.pyx":877 - * # Note: this is especially troublesome when we're skipping code with the - * # @DontTrace comment. - * if ( # <<<<<<<<<<<<<< - * stop_frame is frame and - * not info.pydev_use_scoped_step_frame and is_return and + * elif stop_on_plugin_breakpoint and plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: */ } + __pyx_L159:; - /* "_pydevd_bundle/pydevd_cython.pyx":889 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":888 * - * if self.exc_info: # <<<<<<<<<<<<<< - * if self.handle_user_exception(frame): - * return self.trace_dispatch + * # if thread has a suspend flag, we suspend with a busy wait + * if info.pydev_state == 2: # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, frame, event, arg) + * return self.trace_dispatch */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 889, __pyx_L4_error) + __pyx_t_9 = (__pyx_v_info->pydev_state == 2); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":890 - * - * if self.exc_info: - * if self.handle_user_exception(frame): # <<<<<<<<<<<<<< - * return self.trace_dispatch - * + /* "_pydevd_bundle/pydevd_cython.pyx":889 + * # if thread has a suspend flag, we suspend with a busy wait + * if info.pydev_state == 2: + * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< + * return self.trace_dispatch + * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; - __pyx_t_5 = 0; + __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_5 = 1; + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_frame}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_thread, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 890, __pyx_L4_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 889, __pyx_L106_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 890, __pyx_L4_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":891 - * if self.exc_info: - * if self.handle_user_exception(frame): - * return self.trace_dispatch # <<<<<<<<<<<<<< - * - * elif event == 'call': - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; - goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":890 - * - * if self.exc_info: - * if self.handle_user_exception(frame): # <<<<<<<<<<<<<< - * return self.trace_dispatch - * + /* "_pydevd_bundle/pydevd_cython.pyx":890 + * if info.pydev_state == 2: + * self.do_wait_suspend(thread, frame, event, arg) + * return self.trace_dispatch # <<<<<<<<<<<<<< + * else: + * if not breakpoint and is_line: */ - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 890, __pyx_L106_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L110_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":889 - * info.pydev_step_stop = None + /* "_pydevd_bundle/pydevd_cython.pyx":888 * - * if self.exc_info: # <<<<<<<<<<<<<< - * if self.handle_user_exception(frame): - * return self.trace_dispatch + * # if thread has a suspend flag, we suspend with a busy wait + * if info.pydev_state == 2: # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, frame, event, arg) + * return self.trace_dispatch */ } - /* "_pydevd_bundle/pydevd_cython.pyx":865 - * is_exception_event = False - * - * elif event == 'return': # <<<<<<<<<<<<<< - * is_line = False - * is_return = True + /* "_pydevd_bundle/pydevd_cython.pyx":892 + * return self.trace_dispatch + * else: + * if not breakpoint and is_line: # <<<<<<<<<<<<<< + * # No stop from anyone and no breakpoint found in line (cache that). + * frame_skips_cache[line_cache_key] = 0 */ - goto __pyx_L30; - } + /*else*/ { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 892, __pyx_L106_error) + __pyx_t_11 = (!__pyx_t_15); + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L167_bool_binop_done; + } + __pyx_t_9 = __pyx_v_is_line; + __pyx_L167_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":893 - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":894 + * if not breakpoint and is_line: + * # No stop from anyone and no breakpoint found in line (cache that). + * frame_skips_cache[line_cache_key] = 0 # <<<<<<<<<<<<<< * - * elif event == 'call': # <<<<<<<<<<<<<< - * is_line = False - * is_call = True + * except: */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 893, __pyx_L4_error) - if (__pyx_t_9) { + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 894, __pyx_L106_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_line_cache_key, __pyx_int_0) < 0))) __PYX_ERR(0, 894, __pyx_L106_error) - /* "_pydevd_bundle/pydevd_cython.pyx":894 + /* "_pydevd_bundle/pydevd_cython.pyx":892 + * return self.trace_dispatch + * else: + * if not breakpoint and is_line: # <<<<<<<<<<<<<< + * # No stop from anyone and no breakpoint found in line (cache that). + * frame_skips_cache[line_cache_key] = 0 + */ + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":791 + * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) * - * elif event == 'call': - * is_line = False # <<<<<<<<<<<<<< - * is_call = True - * is_return = False + * try: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case */ - __pyx_v_is_line = 0; + } + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + goto __pyx_L111_try_end; + __pyx_L106_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":895 - * elif event == 'call': - * is_line = False - * is_call = True # <<<<<<<<<<<<<< - * is_return = False - * is_exception_event = False + /* "_pydevd_bundle/pydevd_cython.pyx":896 + * frame_skips_cache[line_cache_key] = 0 + * + * except: # <<<<<<<<<<<<<< + * # Unfortunately Python itself stops the tracing when it originates from + * # the tracing function, so, we can't do much about it (just let the user know). */ - __pyx_v_is_call = 1; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_8) < 0) __PYX_ERR(0, 896, __pyx_L108_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_8); - /* "_pydevd_bundle/pydevd_cython.pyx":896 - * is_line = False - * is_call = True - * is_return = False # <<<<<<<<<<<<<< - * is_exception_event = False - * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + /* "_pydevd_bundle/pydevd_cython.pyx":899 + * # Unfortunately Python itself stops the tracing when it originates from + * # the tracing function, so, we can't do much about it (just let the user know). + * exc = sys.exc_info()[0] # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_console_message( + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) */ - __pyx_v_is_return = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_exc = __pyx_t_6; + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":897 - * is_call = True - * is_return = False - * is_exception_event = False # <<<<<<<<<<<<<< - * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. - * function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + /* "_pydevd_bundle/pydevd_cython.pyx":900 + * # the tracing function, so, we can't do much about it (just let the user know). + * exc = sys.exc_info()[0] + * cmd = py_db.cmd_factory.make_console_message( # <<<<<<<<<<<<<< + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) + * py_db.writer.add_command(cmd) */ - __pyx_v_is_exception_event = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_make_console_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":898 - * is_return = False - * is_exception_event = False - * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. # <<<<<<<<<<<<<< - * function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) - * + /* "_pydevd_bundle/pydevd_cython.pyx":901 + * exc = sys.exc_info()[0] + * cmd = py_db.cmd_factory.make_console_message( + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) # <<<<<<<<<<<<<< + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L4_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L108_except_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L4_error) + __Pyx_INCREF(__pyx_v_exc); + __Pyx_GIVEREF(__pyx_v_exc); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_exc)) __PYX_ERR(0, 901, __pyx_L108_except_error); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_thread)) __PYX_ERR(0, 901, __pyx_L108_except_error); + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_raised_from_within_the_callba, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 898, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_9) { + __pyx_t_1 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_cmd, __pyx_t_6); + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":899 - * is_exception_event = False - * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. - * function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) # <<<<<<<<<<<<<< - * - * elif event == 'exception': + /* "_pydevd_bundle/pydevd_cython.pyx":902 + * cmd = py_db.cmd_factory.make_console_message( + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) + * py_db.writer.add_command(cmd) # <<<<<<<<<<<<<< + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_function_breakpoint_name_to_brea); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_command); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cmd}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L108_except_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":903 + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * + */ + __pyx_t_9 = PyObject_IsSubclass(__pyx_v_exc, __pyx_tuple__4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 903, __pyx_L108_except_error) + __pyx_t_11 = (!__pyx_t_9); + if (__pyx_t_11) { + + /* "_pydevd_bundle/pydevd_cython.pyx":904 + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() # <<<<<<<<<<<<<< + * + * raise + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_5 = 1; + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_10 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L108_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __Pyx_DECREF_SET(__pyx_v_function_breakpoint_on_call_event, __pyx_t_8); - __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":898 - * is_return = False - * is_exception_event = False - * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. # <<<<<<<<<<<<<< - * function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + /* "_pydevd_bundle/pydevd_cython.pyx":903 + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() * */ } - /* "_pydevd_bundle/pydevd_cython.pyx":893 - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":906 + * pydev_log.exception() * - * elif event == 'call': # <<<<<<<<<<<<<< - * is_line = False - * is_call = True + * raise # <<<<<<<<<<<<<< + * + * # step handling. We stop when we hit the right frame */ - goto __pyx_L30; + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_8); + __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_8 = 0; + __PYX_ERR(0, 906, __pyx_L108_except_error) } - /* "_pydevd_bundle/pydevd_cython.pyx":901 - * function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + /* "_pydevd_bundle/pydevd_cython.pyx":791 + * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) * - * elif event == 'exception': # <<<<<<<<<<<<<< - * is_exception_event = True - * breakpoints_for_file = None + * try: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 901, __pyx_L4_error) - if (__pyx_t_9) { + __pyx_L108_except_error:; + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16); + goto __pyx_L4_error; + __pyx_L110_try_return:; + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16); + goto __pyx_L3_return; + __pyx_L111_try_end:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":902 + /* "_pydevd_bundle/pydevd_cython.pyx":909 * - * elif event == 'exception': - * is_exception_event = True # <<<<<<<<<<<<<< - * breakpoints_for_file = None - * if has_exception_breakpoints: + * # step handling. We stop when we hit the right frame + * try: # <<<<<<<<<<<<<< + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: */ - __pyx_v_is_exception_event = 1; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":903 - * elif event == 'exception': - * is_exception_event = True - * breakpoints_for_file = None # <<<<<<<<<<<<<< - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) + /* "_pydevd_bundle/pydevd_cython.pyx":910 + * # step handling. We stop when we hit the right frame + * try: + * should_skip = 0 # <<<<<<<<<<<<<< + * if pydevd_dont_trace.should_trace_hook is not None: + * if self.should_skip == -1: */ - __Pyx_INCREF(Py_None); - __pyx_v_breakpoints_for_file = ((PyObject*)Py_None); + __pyx_v_should_skip = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":904 - * is_exception_event = True - * breakpoints_for_file = None - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: + /* "_pydevd_bundle/pydevd_cython.pyx":911 + * try: + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if self.should_skip == -1: + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). */ - if (__pyx_v_has_exception_breakpoints) { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 911, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = (__pyx_t_4 != Py_None); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":905 - * breakpoints_for_file = None - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) # <<<<<<<<<<<<<< - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + /* "_pydevd_bundle/pydevd_cython.pyx":912 + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + * if self.should_skip == -1: # <<<<<<<<<<<<<< + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code */ - __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_should_stop_on_exception(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { - PyObject* sequence = __pyx_t_8; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 905, __pyx_L4_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_1 = PyList_GET_ITEM(sequence, 0); - __pyx_t_6 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); - #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - #endif - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L4_error) + __pyx_t_11 = (__pyx_v_self->should_skip == -1L); + if (__pyx_t_11) { + + /* "_pydevd_bundle/pydevd_cython.pyx":916 + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + * # Which will be handled by this frame is read-only, so, we can cache it safely. + * if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< + * # -1, 0, 1 to be Cython-friendly + * should_skip = self.should_skip = 1 + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 916, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L172_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); - index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L40_unpacking_failed; - __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L40_unpacking_failed; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 916, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 916, __pyx_L172_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L172_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_7), 2) < 0) __PYX_ERR(0, 905, __pyx_L4_error) - __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L41_unpacking_done; - __pyx_L40_unpacking_failed:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 905, __pyx_L4_error) - __pyx_L41_unpacking_done:; - } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_should_stop = __pyx_t_9; - __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_6); - __pyx_t_6 = 0; + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_8, __pyx_t_6}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 916, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (!__pyx_t_11); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":906 - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: # <<<<<<<<<<<<<< - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":918 + * if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): + * # -1, 0, 1 to be Cython-friendly + * should_skip = self.should_skip = 1 # <<<<<<<<<<<<<< + * else: + * should_skip = self.should_skip = 0 */ - if (__pyx_v_should_stop) { + __pyx_v_should_skip = 1; + __pyx_v_self->should_skip = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":907 - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< - * return self.trace_dispatch - * is_line = False + /* "_pydevd_bundle/pydevd_cython.pyx":916 + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + * # Which will be handled by this frame is read-only, so, we can cache it safely. + * if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< + * # -1, 0, 1 to be Cython-friendly + * should_skip = self.should_skip = 1 */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 907, __pyx_L4_error) - __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_handle_exception(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg, ((PyObject*)__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 907, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_9) { + goto __pyx_L180; + } - /* "_pydevd_bundle/pydevd_cython.pyx":908 - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch # <<<<<<<<<<<<<< - * is_line = False - * is_return = False + /* "_pydevd_bundle/pydevd_cython.pyx":920 + * should_skip = self.should_skip = 1 + * else: + * should_skip = self.should_skip = 0 # <<<<<<<<<<<<<< + * else: + * should_skip = self.should_skip */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L3_return; + /*else*/ { + __pyx_v_should_skip = 0; + __pyx_v_self->should_skip = 0; + } + __pyx_L180:; - /* "_pydevd_bundle/pydevd_cython.pyx":907 - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< - * return self.trace_dispatch - * is_line = False + /* "_pydevd_bundle/pydevd_cython.pyx":912 + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + * if self.should_skip == -1: # <<<<<<<<<<<<<< + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code */ - } + goto __pyx_L179; + } - /* "_pydevd_bundle/pydevd_cython.pyx":906 - * if has_exception_breakpoints: - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: # <<<<<<<<<<<<<< - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":922 + * should_skip = self.should_skip = 0 + * else: + * should_skip = self.should_skip # <<<<<<<<<<<<<< + * + * plugin_stop = False */ + /*else*/ { + __pyx_t_10 = __pyx_v_self->should_skip; + __pyx_v_should_skip = __pyx_t_10; } + __pyx_L179:; - /* "_pydevd_bundle/pydevd_cython.pyx":904 - * is_exception_event = True - * breakpoints_for_file = None - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * should_stop, frame = self._should_stop_on_exception(frame, event, arg) - * if should_stop: + /* "_pydevd_bundle/pydevd_cython.pyx":911 + * try: + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if self.should_skip == -1: + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). */ } - /* "_pydevd_bundle/pydevd_cython.pyx":909 - * if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): - * return self.trace_dispatch - * is_line = False # <<<<<<<<<<<<<< - * is_return = False - * is_call = False + /* "_pydevd_bundle/pydevd_cython.pyx":924 + * should_skip = self.should_skip + * + * plugin_stop = False # <<<<<<<<<<<<<< + * if should_skip: + * stop = False */ - __pyx_v_is_line = 0; + __Pyx_INCREF(Py_False); + __pyx_v_plugin_stop = Py_False; - /* "_pydevd_bundle/pydevd_cython.pyx":910 - * return self.trace_dispatch - * is_line = False - * is_return = False # <<<<<<<<<<<<<< - * is_call = False + /* "_pydevd_bundle/pydevd_cython.pyx":925 + * + * plugin_stop = False + * if should_skip: # <<<<<<<<<<<<<< + * stop = False * */ - __pyx_v_is_return = 0; + __pyx_t_9 = (__pyx_v_should_skip != 0); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":911 - * is_line = False - * is_return = False - * is_call = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":926 + * plugin_stop = False + * if should_skip: + * stop = False # <<<<<<<<<<<<<< * - * else: + * elif step_cmd in (107, 144, 206): */ - __pyx_v_is_call = 0; + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":901 - * function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + /* "_pydevd_bundle/pydevd_cython.pyx":925 + * + * plugin_stop = False + * if should_skip: # <<<<<<<<<<<<<< + * stop = False * - * elif event == 'exception': # <<<<<<<<<<<<<< - * is_exception_event = True - * breakpoints_for_file = None */ - goto __pyx_L30; - } + goto __pyx_L181; + } - /* "_pydevd_bundle/pydevd_cython.pyx":915 - * else: - * # Unexpected: just keep the same trace func (i.e.: event == 'c_XXX'). - * return self.trace_dispatch # <<<<<<<<<<<<<< - * - * if not is_exception_event: - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L3_return; - } - __pyx_L30:; - } - __pyx_L12:; - - /* "_pydevd_bundle/pydevd_cython.pyx":917 - * return self.trace_dispatch - * - * if not is_exception_event: # <<<<<<<<<<<<<< - * breakpoints_for_file = main_debugger.breakpoints.get(abs_path_canonical_path_and_base[1]) - * - */ - __pyx_t_9 = (!__pyx_v_is_exception_event); - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":918 - * - * if not is_exception_event: - * breakpoints_for_file = main_debugger.breakpoints.get(abs_path_canonical_path_and_base[1]) # <<<<<<<<<<<<<< - * - * can_skip = False - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_breakpoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 918, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 918, __pyx_L4_error) - } - __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 918, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 918, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - if (!(likely(PyDict_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_6))) __PYX_ERR(0, 918, __pyx_L4_error) - __Pyx_XDECREF_SET(__pyx_v_breakpoints_for_file, ((PyObject*)__pyx_t_6)); - __pyx_t_6 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":920 - * breakpoints_for_file = main_debugger.breakpoints.get(abs_path_canonical_path_and_base[1]) - * - * can_skip = False # <<<<<<<<<<<<<< - * - * if info.pydev_state == 1: # 1 = 1 - */ - __pyx_v_can_skip = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":922 - * can_skip = False - * - * if info.pydev_state == 1: # 1 = 1 # <<<<<<<<<<<<<< - * # we can skip if: - * # - we have no stop marked - */ - __pyx_t_9 = (__pyx_v_info->pydev_state == 1); - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":927 - * # - we should make a step return/step over and we're not in the current frame - * # - we're stepping into a coroutine context and we're not in that context - * if step_cmd == -1: # <<<<<<<<<<<<<< - * can_skip = True - * - */ - __pyx_t_9 = (__pyx_v_step_cmd == -1L); - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":928 - * # - we're stepping into a coroutine context and we're not in that context - * if step_cmd == -1: - * can_skip = True # <<<<<<<<<<<<<< - * - * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): - */ - __pyx_v_can_skip = 1; - - /* "_pydevd_bundle/pydevd_cython.pyx":927 - * # - we should make a step return/step over and we're not in the current frame - * # - we're stepping into a coroutine context and we're not in that context - * if step_cmd == -1: # <<<<<<<<<<<<<< - * can_skip = True - * - */ - goto __pyx_L46; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":930 - * can_skip = True - * - * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): # <<<<<<<<<<<<<< - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":928 + * stop = False * + * elif step_cmd in (107, 144, 206): # <<<<<<<<<<<<<< + * force_check_project_scope = step_cmd == 144 + * if is_line: */ switch (__pyx_v_step_cmd) { - case 0x6C: - case 0x6D: - case 0x9F: - case 0xA0: - __pyx_t_15 = 1; + case 0x6B: + case 0x90: + case 0xCE: + __pyx_t_9 = 1; break; default: - __pyx_t_15 = 0; + __pyx_t_9 = 0; break; } - __pyx_t_11 = __pyx_t_15; + __pyx_t_11 = __pyx_t_9; if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L47_bool_binop_done; - } - __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 930, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 930, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = (!__pyx_t_11); - __pyx_t_9 = __pyx_t_15; - __pyx_L47_bool_binop_done:; - if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":931 + /* "_pydevd_bundle/pydevd_cython.pyx":929 * - * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): - * can_skip = True # <<<<<<<<<<<<<< - * - * elif step_cmd == 128 and ( + * elif step_cmd in (107, 144, 206): + * force_check_project_scope = step_cmd == 144 # <<<<<<<<<<<<<< + * if is_line: + * if not info.pydev_use_scoped_step_frame: */ - __pyx_v_can_skip = 1; + __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_step_cmd == 0x90)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_force_check_project_scope = __pyx_t_4; + __pyx_t_4 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":930 - * can_skip = True - * - * elif step_cmd in (108, 109, 159, 160) and not self._is_same_frame(stop_frame, frame): # <<<<<<<<<<<<<< - * can_skip = True - * + * elif step_cmd in (107, 144, 206): + * force_check_project_scope = step_cmd == 144 + * if is_line: # <<<<<<<<<<<<<< + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: */ - goto __pyx_L46; - } + if (__pyx_v_is_line) { - /* "_pydevd_bundle/pydevd_cython.pyx":933 - * can_skip = True - * - * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< - * stop_frame is not None and - * stop_frame is not frame and + /* "_pydevd_bundle/pydevd_cython.pyx":931 + * force_check_project_scope = step_cmd == 144 + * if is_line: + * if not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) */ - __pyx_t_15 = (__pyx_v_step_cmd == 0x80); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L49_bool_binop_done; - } + __pyx_t_11 = (!__pyx_v_info->pydev_use_scoped_step_frame); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":934 - * - * elif step_cmd == 128 and ( - * stop_frame is not None and # <<<<<<<<<<<<<< - * stop_frame is not frame and - * stop_frame is not frame.f_back and + /* "_pydevd_bundle/pydevd_cython.pyx":932 + * if is_line: + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + * else: */ - __pyx_t_15 = (__pyx_v_stop_frame != Py_None); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L49_bool_binop_done; - } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 932, __pyx_L172_error) + if (!__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L185_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 932, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = __pyx_t_9; + __pyx_L185_bool_binop_done:; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":935 - * elif step_cmd == 128 and ( - * stop_frame is not None and - * stop_frame is not frame and # <<<<<<<<<<<<<< - * stop_frame is not frame.f_back and - * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): + /* "_pydevd_bundle/pydevd_cython.pyx":933 + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) # <<<<<<<<<<<<<< + * else: + * stop = True */ - __pyx_t_15 = (__pyx_v_stop_frame != __pyx_v_frame); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L49_bool_binop_done; - } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 933, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 933, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_frame, __pyx_t_8, __pyx_v_force_check_project_scope}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 933, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 933, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_stop = (!__pyx_t_11); - /* "_pydevd_bundle/pydevd_cython.pyx":936 - * stop_frame is not None and - * stop_frame is not frame and - * stop_frame is not frame.f_back and # <<<<<<<<<<<<<< - * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":932 + * if is_line: + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + * else: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 936, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_15 = (__pyx_v_stop_frame != __pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L49_bool_binop_done; - } + goto __pyx_L184; + } - /* "_pydevd_bundle/pydevd_cython.pyx":937 - * stop_frame is not frame and - * stop_frame is not frame.f_back and - * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): # <<<<<<<<<<<<<< - * can_skip = True - * + /* "_pydevd_bundle/pydevd_cython.pyx":935 + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + * else: + * stop = True # <<<<<<<<<<<<<< + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_15 = (__pyx_t_6 == Py_None); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L49_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = (__pyx_v_stop_frame != __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __pyx_t_15; - __pyx_L49_bool_binop_done:; + /*else*/ { + __pyx_v_stop = 1; + } + __pyx_L184:; - /* "_pydevd_bundle/pydevd_cython.pyx":933 - * can_skip = True - * - * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< - * stop_frame is not None and - * stop_frame is not frame and + /* "_pydevd_bundle/pydevd_cython.pyx":931 + * force_check_project_scope = step_cmd == 144 + * if is_line: + * if not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) */ - if (__pyx_t_9) { + goto __pyx_L183; + } - /* "_pydevd_bundle/pydevd_cython.pyx":938 - * stop_frame is not frame.f_back and - * (frame.f_back is None or stop_frame is not frame.f_back.f_back)): - * can_skip = True # <<<<<<<<<<<<<< - * - * elif step_cmd == 144: + /* "_pydevd_bundle/pydevd_cython.pyx":937 + * stop = True + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): */ - __pyx_v_can_skip = 1; + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 937, __pyx_L172_error) + if (!__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L188_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 937, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = __pyx_t_9; + __pyx_L188_bool_binop_done:; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":933 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":939 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE * - * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< - * stop_frame is not None and - * stop_frame is not frame and */ - goto __pyx_L46; - } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 939, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 939, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_frame, __pyx_t_6, __pyx_v_force_check_project_scope}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 939, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (!(!__pyx_t_11)); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":940 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":940 + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * - * elif step_cmd == 144: # <<<<<<<<<<<<<< - * if ( - * main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) - */ - __pyx_t_9 = (__pyx_v_step_cmd == 0x90); - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":942 - * elif step_cmd == 144: - * if ( - * main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) # <<<<<<<<<<<<<< - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) - * ): - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 942, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 942, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_frame, __pyx_t_7, Py_True}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 942, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L56_bool_binop_done; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":943 - * if ( - * main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) # <<<<<<<<<<<<<< - * ): - * can_skip = True + * # We can only stop inside the ipython call. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = (__pyx_t_1 == Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L56_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_7, __pyx_t_8, Py_True}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 943, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __pyx_t_15; - __pyx_L56_bool_binop_done:; + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 940, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":941 + /* "_pydevd_bundle/pydevd_cython.pyx":939 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE * - * elif step_cmd == 144: - * if ( # <<<<<<<<<<<<<< - * main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) */ - if (__pyx_t_9) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":945 - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) - * ): - * can_skip = True # <<<<<<<<<<<<<< - * - * elif step_cmd == 206: + /* "_pydevd_bundle/pydevd_cython.pyx":937 + * stop = True + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): */ - __pyx_v_can_skip = 1; + } - /* "_pydevd_bundle/pydevd_cython.pyx":941 + /* "_pydevd_bundle/pydevd_cython.pyx":943 * - * elif step_cmd == 144: - * if ( # <<<<<<<<<<<<<< - * main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) - * and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) + * # We can only stop inside the ipython call. + * filename = frame.f_code.co_filename # <<<<<<<<<<<<<< + * if filename.endswith('.pyc'): + * filename = filename[:-1] */ - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 943, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_filename = __pyx_t_7; + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":940 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":944 + * # We can only stop inside the ipython call. + * filename = frame.f_code.co_filename + * if filename.endswith('.pyc'): # <<<<<<<<<<<<<< + * filename = filename[:-1] * - * elif step_cmd == 144: # <<<<<<<<<<<<<< - * if ( - * main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) */ - goto __pyx_L46; - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_pyc}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 944, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":947 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":945 + * filename = frame.f_code.co_filename + * if filename.endswith('.pyc'): + * filename = filename[:-1] # <<<<<<<<<<<<<< * - * elif step_cmd == 206: # <<<<<<<<<<<<<< - * f = frame - * while f is not None: + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): */ - __pyx_t_9 = (__pyx_v_step_cmd == 0xCE); - if (__pyx_t_9) { + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, -1L, NULL, NULL, &__pyx_slice__5, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":948 + /* "_pydevd_bundle/pydevd_cython.pyx":944 + * # We can only stop inside the ipython call. + * filename = frame.f_code.co_filename + * if filename.endswith('.pyc'): # <<<<<<<<<<<<<< + * filename = filename[:-1] * - * elif step_cmd == 206: - * f = frame # <<<<<<<<<<<<<< - * while f is not None: - * if self._is_same_frame(stop_frame, f): */ - __Pyx_INCREF(__pyx_v_frame); - __Pyx_XDECREF_SET(__pyx_v_f, __pyx_v_frame); + } - /* "_pydevd_bundle/pydevd_cython.pyx":949 - * elif step_cmd == 206: - * f = frame - * while f is not None: # <<<<<<<<<<<<<< - * if self._is_same_frame(stop_frame, f): - * break + /* "_pydevd_bundle/pydevd_cython.pyx":947 + * filename = filename[:-1] + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): # <<<<<<<<<<<<<< + * f = frame.f_back + * while f is not None: */ - while (1) { - __pyx_t_9 = (__pyx_v_f != Py_None); - if (!__pyx_t_9) break; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 947, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 947, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 947, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_11 = (!__pyx_t_9); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":950 - * f = frame - * while f is not None: - * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< - * break - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":948 + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + * f = frame.f_back # <<<<<<<<<<<<<< + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 950, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_9) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 948, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":951 - * while f is not None: - * if self._is_same_frame(stop_frame, f): - * break # <<<<<<<<<<<<<< - * f = f.f_back - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":949 + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + * f = frame.f_back + * while f is not None: # <<<<<<<<<<<<<< + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back */ - goto __pyx_L60_break; + while (1) { + __pyx_t_11 = (__pyx_v_f != Py_None); + if (!__pyx_t_11) break; - /* "_pydevd_bundle/pydevd_cython.pyx":950 - * f = frame - * while f is not None: - * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< - * break - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":950 + * f = frame.f_back + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: */ - } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 950, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 950, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":952 - * if self._is_same_frame(stop_frame, f): - * break - * f = f.f_back # <<<<<<<<<<<<<< - * else: - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":951 + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back # <<<<<<<<<<<<<< + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * pydev_log.debug('Stop inside ipython call') */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); - __pyx_t_1 = 0; - } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 951, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_f2, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":954 - * f = f.f_back - * else: - * can_skip = True # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":952 + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * pydev_log.debug('Stop inside ipython call') + * stop = True + */ + __pyx_t_9 = (__pyx_v_f2 != Py_None); + if (__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L197_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 952, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 952, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_11 = __pyx_t_9; + __pyx_L197_bool_binop_done:; + if (__pyx_t_11) { + + /* "_pydevd_bundle/pydevd_cython.pyx":953 + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * pydev_log.debug('Stop inside ipython call') # <<<<<<<<<<<<<< + * stop = True + * break + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 953, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Stop_inside_ipython_call}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 953, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":954 + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * pydev_log.debug('Stop inside ipython call') + * stop = True # <<<<<<<<<<<<<< + * break + * f = f.f_back + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":955 + * pydev_log.debug('Stop inside ipython call') + * stop = True + * break # <<<<<<<<<<<<<< + * f = f.f_back * - * if can_skip: */ - /*else*/ { - __pyx_v_can_skip = 1; - } - __pyx_L60_break:; + goto __pyx_L194_break; - /* "_pydevd_bundle/pydevd_cython.pyx":947 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":952 + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * pydev_log.debug('Stop inside ipython call') + * stop = True + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":950 + * f = frame.f_back + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":956 + * stop = True + * break + * f = f.f_back # <<<<<<<<<<<<<< * - * elif step_cmd == 206: # <<<<<<<<<<<<<< - * f = frame - * while f is not None: + * del f */ - } - __pyx_L46:; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_7); + __pyx_t_7 = 0; + } + __pyx_L194_break:; - /* "_pydevd_bundle/pydevd_cython.pyx":956 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":958 + * f = f.f_back * - * if can_skip: # <<<<<<<<<<<<<< - * if plugin_manager is not None and ( - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): + * del f # <<<<<<<<<<<<<< + * + * if not stop: */ - if (__pyx_v_can_skip) { + __Pyx_DECREF(__pyx_v_f); __pyx_v_f = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":957 + /* "_pydevd_bundle/pydevd_cython.pyx":947 + * filename = filename[:-1] * - * if can_skip: - * if plugin_manager is not None and ( # <<<<<<<<<<<<<< - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): - * can_skip = plugin_manager.can_skip(main_debugger, frame) + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): # <<<<<<<<<<<<<< + * f = frame.f_back + * while f is not None: */ - __pyx_t_15 = (__pyx_v_plugin_manager != Py_None); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L64_bool_binop_done; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":958 - * if can_skip: - * if plugin_manager is not None and ( - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): # <<<<<<<<<<<<<< - * can_skip = plugin_manager.can_skip(main_debugger, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":960 + * del f * + * if not stop: # <<<<<<<<<<<<<< + * # In scoped mode if step in didn't work in this context it won't work + * # afterwards anyways. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 958, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L64_bool_binop_done; - } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 958, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __pyx_t_15; - __pyx_L64_bool_binop_done:; + __pyx_t_11 = (!__pyx_v_stop); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":957 + /* "_pydevd_bundle/pydevd_cython.pyx":963 + * # In scoped mode if step in didn't work in this context it won't work + * # afterwards anyways. + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * - * if can_skip: - * if plugin_manager is not None and ( # <<<<<<<<<<<<<< - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): - * can_skip = plugin_manager.can_skip(main_debugger, frame) + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: */ - if (__pyx_t_9) { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_7 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 963, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":959 - * if plugin_manager is not None and ( - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): - * can_skip = plugin_manager.can_skip(main_debugger, frame) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":960 + * del f * - * if can_skip and main_debugger.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): + * if not stop: # <<<<<<<<<<<<<< + * # In scoped mode if step in didn't work in this context it won't work + * # afterwards anyways. */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 959, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_5 = 1; } } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_main_debugger, __pyx_v_frame}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_can_skip = __pyx_t_9; + __pyx_L183:; - /* "_pydevd_bundle/pydevd_cython.pyx":957 - * - * if can_skip: - * if plugin_manager is not None and ( # <<<<<<<<<<<<<< - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): - * can_skip = plugin_manager.can_skip(main_debugger, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":930 + * elif step_cmd in (107, 144, 206): + * force_check_project_scope = step_cmd == 144 + * if is_line: # <<<<<<<<<<<<<< + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: */ + goto __pyx_L182; } - /* "_pydevd_bundle/pydevd_cython.pyx":961 - * can_skip = plugin_manager.can_skip(main_debugger, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":965 + * return None if is_call else NO_FTRACE * - * if can_skip and main_debugger.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): # <<<<<<<<<<<<<< - * # trace function for showing return values after step over - * can_skip = False + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False */ - if (__pyx_v_can_skip) { + if (__pyx_v_is_return) { } else { - __pyx_t_9 = __pyx_v_can_skip; - goto __pyx_L68_bool_binop_done; + __pyx_t_11 = __pyx_v_is_return; + goto __pyx_L200_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 961, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_15) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = (__pyx_t_7 != Py_None); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_9) { } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L68_bool_binop_done; - } - switch (__pyx_v_info->pydev_step_cmd) { - case 0x6C: - case 0x9F: - __pyx_t_15 = 1; - break; - default: - __pyx_t_15 = 0; - break; + __pyx_t_11 = __pyx_t_9; + goto __pyx_L200_bool_binop_done; } - __pyx_t_11 = __pyx_t_15; + __pyx_t_9 = (!__pyx_v_info->pydev_use_scoped_step_frame); + __pyx_t_11 = __pyx_t_9; + __pyx_L200_bool_binop_done:; if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L68_bool_binop_done; - } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 961, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __pyx_t_11; - __pyx_L68_bool_binop_done:; - if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":963 - * if can_skip and main_debugger.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): - * # trace function for showing return values after step over - * can_skip = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":966 * - * # Let's check to see if we are in a function that has a breakpoint. If we don't have a breakpoint, + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False + * else: */ - __pyx_v_can_skip = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 966, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 966, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 966, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":961 - * can_skip = plugin_manager.can_skip(main_debugger, frame) - * - * if can_skip and main_debugger.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): # <<<<<<<<<<<<<< - * # trace function for showing return values after step over - * can_skip = False + /* "_pydevd_bundle/pydevd_cython.pyx":967 + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False # <<<<<<<<<<<<<< + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: */ - } + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":956 - * can_skip = True + /* "_pydevd_bundle/pydevd_cython.pyx":966 * - * if can_skip: # <<<<<<<<<<<<<< - * if plugin_manager is not None and ( - * main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False + * else: */ - } + goto __pyx_L203; + } - /* "_pydevd_bundle/pydevd_cython.pyx":922 - * can_skip = False - * - * if info.pydev_state == 1: # 1 = 1 # <<<<<<<<<<<<<< - * # we can skip if: - * # - we have no stop marked + /* "_pydevd_bundle/pydevd_cython.pyx":969 + * stop = False + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) + * if stop: */ - } + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 969, __pyx_L172_error) + if (!__pyx_t_9) { + } else { + __pyx_t_11 = __pyx_t_9; + goto __pyx_L205_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 969, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = __pyx_t_9; + __pyx_L205_bool_binop_done:; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":970 - * # so, that's why the additional checks are there. - * - * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< - * pass # Do nothing here (just keep on going as we can't skip it). - * + /* "_pydevd_bundle/pydevd_cython.pyx":970 + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) # <<<<<<<<<<<<<< + * if stop: + * # Prevent stopping in a return to the same location we were initially */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint_on_call_event); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 970, __pyx_L4_error) - if (__pyx_t_9) { - goto __pyx_L72; - } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_6, __pyx_v_force_check_project_scope}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 970, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_stop = (!__pyx_t_11); - /* "_pydevd_bundle/pydevd_cython.pyx":973 - * pass # Do nothing here (just keep on going as we can't skip it). - * - * elif not breakpoints_for_file: # <<<<<<<<<<<<<< - * if can_skip: - * if has_exception_breakpoints: + /* "_pydevd_bundle/pydevd_cython.pyx":971 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) + * if stop: # <<<<<<<<<<<<<< + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoints_for_file); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 973, __pyx_L4_error) - __pyx_t_11 = (!__pyx_t_9); - if (__pyx_t_11) { + if (__pyx_v_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":974 - * - * elif not breakpoints_for_file: - * if can_skip: # <<<<<<<<<<<<<< - * if has_exception_breakpoints: - * return self.trace_exception + /* "_pydevd_bundle/pydevd_cython.pyx":974 + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). + * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): # <<<<<<<<<<<<<< + * stop = False + * else: */ - if (__pyx_v_can_skip) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 974, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 974, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 974, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 974, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 974, __pyx_L172_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 974, __pyx_L172_error); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_v_info->step_in_initial_location, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 974, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 974, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":975 - * elif not breakpoints_for_file: - * if can_skip: - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * return self.trace_exception - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":975 + * # (i.e.: double-stop at the same place due to some filtering). + * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): + * stop = False # <<<<<<<<<<<<<< + * else: + * stop = True */ - if (__pyx_v_has_exception_breakpoints) { + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":976 - * if can_skip: - * if has_exception_breakpoints: - * return self.trace_exception # <<<<<<<<<<<<<< - * else: - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":974 + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). + * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): # <<<<<<<<<<<<<< + * stop = False + * else: */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L3_return; + } - /* "_pydevd_bundle/pydevd_cython.pyx":975 - * elif not breakpoints_for_file: - * if can_skip: - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * return self.trace_exception - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":971 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) + * if stop: # <<<<<<<<<<<<<< + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). */ - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":978 - * return self.trace_exception + /* "_pydevd_bundle/pydevd_cython.pyx":969 + * stop = False * else: - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< - * - * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) + * if stop: */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_6 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __pyx_t_1; - __pyx_t_1 = 0; - } - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L3_return; + goto __pyx_L204; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":977 + * stop = False + * else: + * stop = True # <<<<<<<<<<<<<< + * else: + * stop = False + */ + /*else*/ { + __pyx_v_stop = 1; + } + __pyx_L204:; + } + __pyx_L203:; + + /* "_pydevd_bundle/pydevd_cython.pyx":965 + * return None if is_call else NO_FTRACE + * + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False + */ + goto __pyx_L182; } - /* "_pydevd_bundle/pydevd_cython.pyx":974 + /* "_pydevd_bundle/pydevd_cython.pyx":979 + * stop = True + * else: + * stop = False # <<<<<<<<<<<<<< * - * elif not breakpoints_for_file: - * if can_skip: # <<<<<<<<<<<<<< - * if has_exception_breakpoints: - * return self.trace_exception + * if stop: */ - } + /*else*/ { + __pyx_v_stop = 0; + } + __pyx_L182:; - /* "_pydevd_bundle/pydevd_cython.pyx":973 - * pass # Do nothing here (just keep on going as we can't skip it). + /* "_pydevd_bundle/pydevd_cython.pyx":981 + * stop = False * - * elif not breakpoints_for_file: # <<<<<<<<<<<<<< - * if can_skip: - * if has_exception_breakpoints: + * if stop: # <<<<<<<<<<<<<< + * if step_cmd == 206: + * # i.e.: Check if we're stepping into the proper context. */ - goto __pyx_L72; - } + if (__pyx_v_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":982 - * else: - * # When cached, 0 means we don't have a breakpoint and 1 means we have. - * if can_skip: # <<<<<<<<<<<<<< - * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) - * if breakpoints_in_line_cache == 0: + /* "_pydevd_bundle/pydevd_cython.pyx":982 + * + * if stop: + * if step_cmd == 206: # <<<<<<<<<<<<<< + * # i.e.: Check if we're stepping into the proper context. + * f = frame */ - /*else*/ { - if (__pyx_v_can_skip) { + __pyx_t_11 = (__pyx_v_step_cmd == 0xCE); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":983 - * # When cached, 0 means we don't have a breakpoint and 1 means we have. - * if can_skip: - * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) # <<<<<<<<<<<<<< - * if breakpoints_in_line_cache == 0: - * return self.trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":984 + * if step_cmd == 206: + * # i.e.: Check if we're stepping into the proper context. + * f = frame # <<<<<<<<<<<<<< + * while f is not None: + * if self._is_same_frame(stop_frame, f): */ - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 983, __pyx_L4_error) - } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_line_cache_key, __pyx_int_neg_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 983, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_breakpoints_in_line_cache = __pyx_t_5; + __Pyx_INCREF(__pyx_v_frame); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_v_frame); - /* "_pydevd_bundle/pydevd_cython.pyx":984 - * if can_skip: - * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) - * if breakpoints_in_line_cache == 0: # <<<<<<<<<<<<<< - * return self.trace_dispatch - * + /* "_pydevd_bundle/pydevd_cython.pyx":985 + * # i.e.: Check if we're stepping into the proper context. + * f = frame + * while f is not None: # <<<<<<<<<<<<<< + * if self._is_same_frame(stop_frame, f): + * break */ - __pyx_t_11 = (__pyx_v_breakpoints_in_line_cache == 0); - if (__pyx_t_11) { + while (1) { + __pyx_t_11 = (__pyx_v_f != Py_None); + if (!__pyx_t_11) break; - /* "_pydevd_bundle/pydevd_cython.pyx":985 - * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) - * if breakpoints_in_line_cache == 0: - * return self.trace_dispatch # <<<<<<<<<<<<<< - * - * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + /* "_pydevd_bundle/pydevd_cython.pyx":986 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 985, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L3_return; + __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_f); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 986, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 986, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":984 - * if can_skip: - * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) - * if breakpoints_in_line_cache == 0: # <<<<<<<<<<<<<< - * return self.trace_dispatch - * + /* "_pydevd_bundle/pydevd_cython.pyx":987 + * while f is not None: + * if self._is_same_frame(stop_frame, f): + * break # <<<<<<<<<<<<<< + * f = f.f_back + * else: */ - } + goto __pyx_L212_break; - /* "_pydevd_bundle/pydevd_cython.pyx":982 - * else: - * # When cached, 0 means we don't have a breakpoint and 1 means we have. - * if can_skip: # <<<<<<<<<<<<<< - * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) - * if breakpoints_in_line_cache == 0: + /* "_pydevd_bundle/pydevd_cython.pyx":986 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back */ - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":987 - * return self.trace_dispatch - * - * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) # <<<<<<<<<<<<<< - * if breakpoints_in_frame_cache != -1: - * # Gotten from cache. + /* "_pydevd_bundle/pydevd_cython.pyx":988 + * if self._is_same_frame(stop_frame, f): + * break + * f = f.f_back # <<<<<<<<<<<<<< + * else: + * stop = False */ - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 987, __pyx_L4_error) - } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_neg_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 987, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_breakpoints_in_frame_cache = __pyx_t_5; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 988, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_6); + __pyx_t_6 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":988 + /* "_pydevd_bundle/pydevd_cython.pyx":990 + * f = f.f_back + * else: + * stop = False # <<<<<<<<<<<<<< * - * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) - * if breakpoints_in_frame_cache != -1: # <<<<<<<<<<<<<< - * # Gotten from cache. - * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 + * if plugin_manager is not None: */ - __pyx_t_11 = (__pyx_v_breakpoints_in_frame_cache != -1L); - if (__pyx_t_11) { + /*else*/ { + __pyx_v_stop = 0; + } + __pyx_L212_break:; - /* "_pydevd_bundle/pydevd_cython.pyx":990 - * if breakpoints_in_frame_cache != -1: - * # Gotten from cache. - * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":982 * - * else: + * if stop: + * if step_cmd == 206: # <<<<<<<<<<<<<< + * # i.e.: Check if we're stepping into the proper context. + * f = frame */ - __pyx_v_has_breakpoint_in_frame = (__pyx_v_breakpoints_in_frame_cache == 1); + } - /* "_pydevd_bundle/pydevd_cython.pyx":988 + /* "_pydevd_bundle/pydevd_cython.pyx":981 + * stop = False * - * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) - * if breakpoints_in_frame_cache != -1: # <<<<<<<<<<<<<< - * # Gotten from cache. - * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 + * if stop: # <<<<<<<<<<<<<< + * if step_cmd == 206: + * # i.e.: Check if we're stepping into the proper context. */ - goto __pyx_L77; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":993 - * - * else: - * has_breakpoint_in_frame = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":992 + * stop = False * - * try: + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: */ - /*else*/ { - __pyx_v_has_breakpoint_in_frame = 0; + __pyx_t_11 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":995 - * has_breakpoint_in_frame = False + /* "_pydevd_bundle/pydevd_cython.pyx":993 * - * try: # <<<<<<<<<<<<<< - * func_lines = set() - * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) # <<<<<<<<<<<<<< + * if result: + * stop, plugin_stop = result */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - /*try:*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_into); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 993, __pyx_L172_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 993, __pyx_L172_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 993, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[8] = {__pyx_t_2, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_4, __pyx_t_7, __pyx_v_stop_info, __pyx_t_3}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 7+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_6); + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":996 + /* "_pydevd_bundle/pydevd_cython.pyx":994 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result * - * try: - * func_lines = set() # <<<<<<<<<<<<<< - * for offset_and_lineno in dis.findlinestarts(frame.f_code): - * func_lines.add(offset_and_lineno[1]) */ - __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 996, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_func_lines = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 994, __pyx_L172_error) + if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":997 - * try: - * func_lines = set() - * for offset_and_lineno in dis.findlinestarts(frame.f_code): # <<<<<<<<<<<<<< - * func_lines.add(offset_and_lineno[1]) - * except: + /* "_pydevd_bundle/pydevd_cython.pyx":995 + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + * stop, plugin_stop = result # <<<<<<<<<<<<<< + * + * elif step_cmd in (108, 159): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_dis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_findlinestarts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 997, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_5 = 1; + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 995, __pyx_L172_error) } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L78_error) + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 995, __pyx_L172_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { - __pyx_t_8 = __pyx_t_6; __Pyx_INCREF(__pyx_t_8); - __pyx_t_12 = 0; - __pyx_t_13 = NULL; + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 995, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + #endif } else { - __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 997, __pyx_L78_error) + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L216_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_8)) goto __pyx_L216_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 997, __pyx_L78_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 2) < 0) __PYX_ERR(0, 995, __pyx_L172_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L217_unpacking_done; + __pyx_L216_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 995, __pyx_L172_error) + __pyx_L217_unpacking_done:; } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L172_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - for (;;) { - if (likely(!__pyx_t_13)) { - if (likely(PyList_CheckExact(__pyx_t_8))) { - { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); - #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 997, __pyx_L78_error) - #endif - if (__pyx_t_12 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 997, __pyx_L78_error) - #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_6); - #endif - } else { - { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); - #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 997, __pyx_L78_error) - #endif - if (__pyx_t_12 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 997, __pyx_L78_error) - #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_6); - #endif - } - } else { - __pyx_t_6 = __pyx_t_13(__pyx_t_8); - if (unlikely(!__pyx_t_6)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 997, __pyx_L78_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_6); - } - __Pyx_XDECREF_SET(__pyx_v_offset_and_lineno, __pyx_t_6); - __pyx_t_6 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":998 - * func_lines = set() - * for offset_and_lineno in dis.findlinestarts(frame.f_code): - * func_lines.add(offset_and_lineno[1]) # <<<<<<<<<<<<<< - * except: - * # This is a fallback for implementations where we can't get the function - */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_offset_and_lineno, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 998, __pyx_L78_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_19 = PySet_Add(__pyx_v_func_lines, __pyx_t_6); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 998, __pyx_L78_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":997 - * try: - * func_lines = set() - * for offset_and_lineno in dis.findlinestarts(frame.f_code): # <<<<<<<<<<<<<< - * func_lines.add(offset_and_lineno[1]) - * except: - */ - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_stop = __pyx_t_11; + __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":995 - * has_breakpoint_in_frame = False + /* "_pydevd_bundle/pydevd_cython.pyx":994 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result * - * try: # <<<<<<<<<<<<<< - * func_lines = set() - * for offset_and_lineno in dis.findlinestarts(frame.f_code): */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1018 - * break - * else: - * for bp_line in breakpoints_for_file: # iterate on keys # <<<<<<<<<<<<<< - * if bp_line in func_lines: - * has_breakpoint_in_frame = True - */ - /*else:*/ { - __pyx_t_12 = 0; - if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1018, __pyx_L80_except_error) - } - __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_breakpoints_for_file, 1, ((PyObject *)NULL), (&__pyx_t_20), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1018, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); - __pyx_t_8 = __pyx_t_6; - __pyx_t_6 = 0; - while (1) { - __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_20, &__pyx_t_12, &__pyx_t_6, NULL, NULL, __pyx_t_5); - if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1018, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L80_except_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_bp_line = __pyx_t_10; - - /* "_pydevd_bundle/pydevd_cython.pyx":1019 - * else: - * for bp_line in breakpoints_for_file: # iterate on keys - * if bp_line in func_lines: # <<<<<<<<<<<<<< - * has_breakpoint_in_frame = True - * break - */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_bp_line); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1019, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = (__Pyx_PySet_ContainsTF(__pyx_t_6, __pyx_v_func_lines, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1019, __pyx_L80_except_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_11) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1020 - * for bp_line in breakpoints_for_file: # iterate on keys - * if bp_line in func_lines: - * has_breakpoint_in_frame = True # <<<<<<<<<<<<<< - * break + /* "_pydevd_bundle/pydevd_cython.pyx":992 + * stop = False * + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: */ - __pyx_v_has_breakpoint_in_frame = 1; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1021 - * if bp_line in func_lines: - * has_breakpoint_in_frame = True - * break # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":928 + * stop = False * - * # Cache the value (1 or 0 or -1 for default because of cython). + * elif step_cmd in (107, 144, 206): # <<<<<<<<<<<<<< + * force_check_project_scope = step_cmd == 144 + * if is_line: */ - goto __pyx_L88_break; + goto __pyx_L181; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1019 - * else: - * for bp_line in breakpoints_for_file: # iterate on keys - * if bp_line in func_lines: # <<<<<<<<<<<<<< - * has_breakpoint_in_frame = True - * break + /* "_pydevd_bundle/pydevd_cython.pyx":997 + * stop, plugin_stop = result + * + * elif step_cmd in (108, 159): # <<<<<<<<<<<<<< + * # Note: when dealing with a step over my code it's the same as a step over (the + * # difference is that when we return from a frame in one we go to regular step */ - } - } - __pyx_L88_break:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - goto __pyx_L83_try_end; - __pyx_L78_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x9F: + __pyx_t_11 = 1; + break; + default: + __pyx_t_11 = 0; + break; + } + __pyx_t_9 = __pyx_t_11; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":999 - * for offset_and_lineno in dis.findlinestarts(frame.f_code): - * func_lines.add(offset_and_lineno[1]) - * except: # <<<<<<<<<<<<<< - * # This is a fallback for implementations where we can't get the function - * # lines -- i.e.: jython (in this case clients need to provide the function + /* "_pydevd_bundle/pydevd_cython.pyx":1001 + * # difference is that when we return from a frame in one we go to regular step + * # into and in the other we go to a step into my code). + * stop = self._is_same_frame(stop_frame, frame) and is_line # <<<<<<<<<<<<<< + * # Note: don't stop on a return for step over, only for line events + * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. */ - /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 999, __pyx_L80_except_error) - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1001, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1001, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L218_bool_binop_done; + } + __pyx_t_9 = __pyx_v_is_line; + __pyx_L218_bool_binop_done:; + __pyx_v_stop = __pyx_t_9; - /* "_pydevd_bundle/pydevd_cython.pyx":1006 - * - * # Checks the breakpoint to see if there is a context match in some function. - * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1005 + * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. * - * # global context is set with an empty name + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 1006, __pyx_L80_except_error) - __pyx_v_curr_func_name = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_9 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1009 - * - * # global context is set with an empty name - * if curr_func_name in ('?', '', ''): # <<<<<<<<<<<<<< - * curr_func_name = '' + /* "_pydevd_bundle/pydevd_cython.pyx":1006 * + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) # <<<<<<<<<<<<<< + * if result: + * stop, plugin_stop = result */ - __Pyx_INCREF(__pyx_v_curr_func_name); - __pyx_t_21 = __pyx_v_curr_func_name; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s__3, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1009, __pyx_L80_except_error) - if (!__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L93_bool_binop_done; - } - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1009, __pyx_L80_except_error) - if (!__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L93_bool_binop_done; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_over); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1006, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1006, __pyx_L172_error) + } + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1006, __pyx_L172_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_stop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; } - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s_lambda, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1009, __pyx_L80_except_error) - __pyx_t_11 = __pyx_t_9; - __pyx_L93_bool_binop_done:; - __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; - __pyx_t_9 = __pyx_t_11; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1010 - * # global context is set with an empty name - * if curr_func_name in ('?', '', ''): - * curr_func_name = '' # <<<<<<<<<<<<<< - * - * for bp in breakpoints_for_file.values(): - */ - __Pyx_INCREF(__pyx_kp_s_); - __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); + } + #endif + { + PyObject *__pyx_callargs[8] = {__pyx_t_2, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_3, __pyx_t_7, __pyx_v_stop_info, __pyx_t_4}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 7+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1006, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1009 - * - * # global context is set with an empty name - * if curr_func_name in ('?', '', ''): # <<<<<<<<<<<<<< - * curr_func_name = '' + /* "_pydevd_bundle/pydevd_cython.pyx":1007 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result * */ - } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1007, __pyx_L172_error) + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1012 - * curr_func_name = '' + /* "_pydevd_bundle/pydevd_cython.pyx":1008 + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + * stop, plugin_stop = result # <<<<<<<<<<<<<< * - * for bp in breakpoints_for_file.values(): # <<<<<<<<<<<<<< - * # will match either global or some function - * if bp.func_name in ('None', curr_func_name): - */ - __pyx_t_20 = 0; - if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 1012, __pyx_L80_except_error) - } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_breakpoints_for_file, 1, __pyx_n_s_values, (&__pyx_t_12), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1012, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_4); - __pyx_t_4 = __pyx_t_7; - __pyx_t_7 = 0; - while (1) { - __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_12, &__pyx_t_20, NULL, &__pyx_t_7, NULL, __pyx_t_5); - if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1012, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_XDECREF_SET(__pyx_v_bp, __pyx_t_7); - __pyx_t_7 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1014 - * for bp in breakpoints_for_file.values(): - * # will match either global or some function - * if bp.func_name in ('None', curr_func_name): # <<<<<<<<<<<<<< - * has_breakpoint_in_frame = True - * break + * elif step_cmd == 128: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_bp, __pyx_n_s_func_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L80_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_None, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1014, __pyx_L80_except_error) - if (!__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L99_bool_binop_done; + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1008, __pyx_L172_error) } - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_v_curr_func_name, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1014, __pyx_L80_except_error) - __pyx_t_9 = __pyx_t_11; - __pyx_L99_bool_binop_done:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __pyx_t_9; - if (__pyx_t_11) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1015 - * # will match either global or some function - * if bp.func_name in ('None', curr_func_name): - * has_breakpoint_in_frame = True # <<<<<<<<<<<<<< - * break - * else: - */ - __pyx_v_has_breakpoint_in_frame = 1; - - /* "_pydevd_bundle/pydevd_cython.pyx":1016 - * if bp.func_name in ('None', curr_func_name): - * has_breakpoint_in_frame = True - * break # <<<<<<<<<<<<<< - * else: - * for bp_line in breakpoints_for_file: # iterate on keys - */ - goto __pyx_L97_break; - - /* "_pydevd_bundle/pydevd_cython.pyx":1014 - * for bp in breakpoints_for_file.values(): - * # will match either global or some function - * if bp.func_name in ('None', curr_func_name): # <<<<<<<<<<<<<< - * has_breakpoint_in_frame = True - * break - */ + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1008, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1008, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L222_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L222_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1008, __pyx_L172_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L223_unpacking_done; + __pyx_L222_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1008, __pyx_L172_error) + __pyx_L223_unpacking_done:; } - __pyx_L97_break:; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L79_exception_handled; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":995 - * has_breakpoint_in_frame = False - * - * try: # <<<<<<<<<<<<<< - * func_lines = set() - * for offset_and_lineno in dis.findlinestarts(frame.f_code): - */ - __pyx_L80_except_error:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); - goto __pyx_L4_error; - __pyx_L79_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); - __pyx_L83_try_end:; - } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1008, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_stop = __pyx_t_9; + __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_6); + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1024 + /* "_pydevd_bundle/pydevd_cython.pyx":1007 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result * - * # Cache the value (1 or 0 or -1 for default because of cython). - * if has_breakpoint_in_frame: # <<<<<<<<<<<<<< - * frame_skips_cache[frame_cache_key] = 1 - * else: */ - if (__pyx_v_has_breakpoint_in_frame) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1025 - * # Cache the value (1 or 0 or -1 for default because of cython). - * if has_breakpoint_in_frame: - * frame_skips_cache[frame_cache_key] = 1 # <<<<<<<<<<<<<< - * else: - * frame_skips_cache[frame_cache_key] = 0 - */ - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1025, __pyx_L4_error) } - if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1025, __pyx_L4_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1024 + /* "_pydevd_bundle/pydevd_cython.pyx":1005 + * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. * - * # Cache the value (1 or 0 or -1 for default because of cython). - * if has_breakpoint_in_frame: # <<<<<<<<<<<<<< - * frame_skips_cache[frame_cache_key] = 1 - * else: + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: */ - goto __pyx_L101; } - /* "_pydevd_bundle/pydevd_cython.pyx":1027 - * frame_skips_cache[frame_cache_key] = 1 - * else: - * frame_skips_cache[frame_cache_key] = 0 # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":997 + * stop, plugin_stop = result * - * if can_skip and not has_breakpoint_in_frame: + * elif step_cmd in (108, 159): # <<<<<<<<<<<<<< + * # Note: when dealing with a step over my code it's the same as a step over (the + * # difference is that when we return from a frame in one we go to regular step */ - /*else*/ { - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1027, __pyx_L4_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_0) < 0))) __PYX_ERR(0, 1027, __pyx_L4_error) - } - __pyx_L101:; + goto __pyx_L181; } - __pyx_L77:; - /* "_pydevd_bundle/pydevd_cython.pyx":1029 - * frame_skips_cache[frame_cache_key] = 0 + /* "_pydevd_bundle/pydevd_cython.pyx":1010 + * stop, plugin_stop = result * - * if can_skip and not has_breakpoint_in_frame: # <<<<<<<<<<<<<< - * if has_exception_breakpoints: - * return self.trace_exception + * elif step_cmd == 128: # <<<<<<<<<<<<<< + * stop = False + * back = frame.f_back */ - if (__pyx_v_can_skip) { - } else { - __pyx_t_11 = __pyx_v_can_skip; - goto __pyx_L103_bool_binop_done; - } - __pyx_t_9 = (!__pyx_v_has_breakpoint_in_frame); - __pyx_t_11 = __pyx_t_9; - __pyx_L103_bool_binop_done:; - if (__pyx_t_11) { + __pyx_t_9 = (__pyx_v_step_cmd == 0x80); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1030 + /* "_pydevd_bundle/pydevd_cython.pyx":1011 * - * if can_skip and not has_breakpoint_in_frame: - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * return self.trace_exception - * else: + * elif step_cmd == 128: + * stop = False # <<<<<<<<<<<<<< + * back = frame.f_back + * if self._is_same_frame(stop_frame, frame) and is_return: */ - if (__pyx_v_has_exception_breakpoints) { + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1031 - * if can_skip and not has_breakpoint_in_frame: - * if has_exception_breakpoints: - * return self.trace_exception # <<<<<<<<<<<<<< - * else: - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":1012 + * elif step_cmd == 128: + * stop = False + * back = frame.f_back # <<<<<<<<<<<<<< + * if self._is_same_frame(stop_frame, frame) and is_return: + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L3_return; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1012, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_back = __pyx_t_6; + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1030 - * - * if can_skip and not has_breakpoint_in_frame: - * if has_exception_breakpoints: # <<<<<<<<<<<<<< - * return self.trace_exception - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1013 + * stop = False + * back = frame.f_back + * if self._is_same_frame(stop_frame, frame) and is_return: # <<<<<<<<<<<<<< + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + * stop = True */ + __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1013, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L225_bool_binop_done; } + __pyx_t_9 = __pyx_v_is_return; + __pyx_L225_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1033 - * return self.trace_exception - * else: - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1015 + * if self._is_same_frame(stop_frame, frame) and is_return: + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + * stop = True # <<<<<<<<<<<<<< * - * # We may have hit a breakpoint or we are already in step mode. Either way, let's check what we should do in this frame + * elif self._is_same_frame(stop_frame, back) and is_line: */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_1 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1033, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __pyx_t_6; - __pyx_t_6 = 0; - } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L3_return; + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1013 + * stop = False + * back = frame.f_back + * if self._is_same_frame(stop_frame, frame) and is_return: # <<<<<<<<<<<<<< + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + * stop = True + */ + goto __pyx_L224; } - /* "_pydevd_bundle/pydevd_cython.pyx":1029 - * frame_skips_cache[frame_cache_key] = 0 + /* "_pydevd_bundle/pydevd_cython.pyx":1017 + * stop = True * - * if can_skip and not has_breakpoint_in_frame: # <<<<<<<<<<<<<< - * if has_exception_breakpoints: - * return self.trace_exception + * elif self._is_same_frame(stop_frame, back) and is_line: # <<<<<<<<<<<<<< + * if info.pydev_smart_child_offset != -1: + * # i.e.: in this case, we're not interested in the pause in the parent, rather */ - } - } - __pyx_L72:; + __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1017, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1017, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L227_bool_binop_done; + } + __pyx_t_9 = __pyx_v_is_line; + __pyx_L227_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":917 - * return self.trace_dispatch - * - * if not is_exception_event: # <<<<<<<<<<<<<< - * breakpoints_for_file = main_debugger.breakpoints.get(abs_path_canonical_path_and_base[1]) + /* "_pydevd_bundle/pydevd_cython.pyx":1018 * + * elif self._is_same_frame(stop_frame, back) and is_line: + * if info.pydev_smart_child_offset != -1: # <<<<<<<<<<<<<< + * # i.e.: in this case, we're not interested in the pause in the parent, rather + * # we're interested in the pause in the child (when the parent is at the proper place). */ - } + __pyx_t_9 = (__pyx_v_info->pydev_smart_child_offset != -1L); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1038 - * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + /* "_pydevd_bundle/pydevd_cython.pyx":1021 + * # i.e.: in this case, we're not interested in the pause in the parent, rather + * # we're interested in the pause in the child (when the parent is at the proper place). + * stop = False # <<<<<<<<<<<<<< * - * try: # <<<<<<<<<<<<<< - * stop_on_plugin_breakpoint = False - * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + * else: */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_16); - /*try:*/ { + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1039 + /* "_pydevd_bundle/pydevd_cython.pyx":1018 * - * try: - * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< - * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case - * # (one for the line and the other for the return). + * elif self._is_same_frame(stop_frame, back) and is_line: + * if info.pydev_smart_child_offset != -1: # <<<<<<<<<<<<<< + * # i.e.: in this case, we're not interested in the pause in the parent, rather + * # we're interested in the pause in the child (when the parent is at the proper place). */ - __pyx_v_stop_on_plugin_breakpoint = 0; + goto __pyx_L229; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1043 - * # (one for the line and the other for the return). + /* "_pydevd_bundle/pydevd_cython.pyx":1024 * - * stop_info = {} # <<<<<<<<<<<<<< - * breakpoint = None - * stop = False + * else: + * pydev_smart_parent_offset = info.pydev_smart_parent_offset # <<<<<<<<<<<<<< + * + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_stop_info = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + /*else*/ { + __pyx_t_10 = __pyx_v_info->pydev_smart_parent_offset; + __pyx_v_pydev_smart_parent_offset = __pyx_t_10; - /* "_pydevd_bundle/pydevd_cython.pyx":1044 + /* "_pydevd_bundle/pydevd_cython.pyx":1026 + * pydev_smart_parent_offset = info.pydev_smart_parent_offset * - * stop_info = {} - * breakpoint = None # <<<<<<<<<<<<<< - * stop = False - * stop_reason = 111 + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + * # Preferred mode (when the smart step into variants are available */ - __Pyx_INCREF(Py_None); - __pyx_v_breakpoint = Py_None; + __pyx_t_6 = __pyx_v_info->pydev_smart_step_into_variants; + __Pyx_INCREF(__pyx_t_6); + __pyx_v_pydev_smart_step_into_variants = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1045 - * stop_info = {} - * breakpoint = None - * stop = False # <<<<<<<<<<<<<< - * stop_reason = 111 - * bp_type = None + /* "_pydevd_bundle/pydevd_cython.pyx":1027 + * + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Preferred mode (when the smart step into variants are available + * # and the offset is set). */ - __pyx_v_stop = 0; + __pyx_t_11 = (__pyx_v_pydev_smart_parent_offset >= 0); + if (__pyx_t_11) { + } else { + __pyx_t_9 = __pyx_t_11; + goto __pyx_L231_bool_binop_done; + } + __pyx_t_11 = (__pyx_v_pydev_smart_step_into_variants != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_pydev_smart_step_into_variants) != 0); + __pyx_t_9 = __pyx_t_11; + __pyx_L231_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1046 - * breakpoint = None - * stop = False - * stop_reason = 111 # <<<<<<<<<<<<<< - * bp_type = None + /* "_pydevd_bundle/pydevd_cython.pyx":1030 + * # Preferred mode (when the smart step into variants are available + * # and the offset is set). + * stop = get_smart_step_into_variant_from_frame_offset(back.f_lasti, pydev_smart_step_into_variants) is \ # <<<<<<<<<<<<<< + * get_smart_step_into_variant_from_frame_offset(pydev_smart_parent_offset, pydev_smart_step_into_variants) * */ - __Pyx_INCREF(__pyx_int_111); - __pyx_v_stop_reason = __pyx_int_111; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1030, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_lasti); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_4, __pyx_v_pydev_smart_step_into_variants}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1047 - * stop = False - * stop_reason = 111 - * bp_type = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1031 + * # and the offset is set). + * stop = get_smart_step_into_variant_from_frame_offset(back.f_lasti, pydev_smart_step_into_variants) is \ + * get_smart_step_into_variant_from_frame_offset(pydev_smart_parent_offset, pydev_smart_step_into_variants) # <<<<<<<<<<<<<< * - * if function_breakpoint_on_call_event: + * else: */ - __Pyx_INCREF(Py_None); - __pyx_v_bp_type = Py_None; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_parent_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1031, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_v_pydev_smart_step_into_variants}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_9 = (__pyx_t_6 == __pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_stop = __pyx_t_9; - /* "_pydevd_bundle/pydevd_cython.pyx":1049 - * bp_type = None + /* "_pydevd_bundle/pydevd_cython.pyx":1027 * - * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< - * breakpoint = function_breakpoint_on_call_event - * stop = True + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Preferred mode (when the smart step into variants are available + * # and the offset is set). */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint_on_call_event); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1049, __pyx_L106_error) - if (__pyx_t_11) { + goto __pyx_L230; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1050 + /* "_pydevd_bundle/pydevd_cython.pyx":1035 + * else: + * # Only the name/line is available, so, check that. + * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< * - * if function_breakpoint_on_call_event: - * breakpoint = function_breakpoint_on_call_event # <<<<<<<<<<<<<< - * stop = True - * new_frame = frame + * # global context is set with an empty name */ - __Pyx_INCREF(__pyx_v_function_breakpoint_on_call_event); - __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_v_function_breakpoint_on_call_event); + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1035, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_6))) __PYX_ERR(0, 1035, __pyx_L172_error) + __Pyx_XDECREF_SET(__pyx_v_curr_func_name, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1051 - * if function_breakpoint_on_call_event: - * breakpoint = function_breakpoint_on_call_event - * stop = True # <<<<<<<<<<<<<< - * new_frame = frame - * stop_reason = CMD_SET_FUNCTION_BREAK + /* "_pydevd_bundle/pydevd_cython.pyx":1038 + * + * # global context is set with an empty name + * if curr_func_name in ('?', '') or curr_func_name is None: # <<<<<<<<<<<<<< + * curr_func_name = '' + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: */ - __pyx_v_stop = 1; + __Pyx_INCREF(__pyx_v_curr_func_name); + __pyx_t_21 = __pyx_v_curr_func_name; + __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s__3, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1038, __pyx_L172_error) + if (!__pyx_t_15) { + } else { + __pyx_t_11 = __pyx_t_15; + goto __pyx_L236_bool_binop_done; + } + __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1038, __pyx_L172_error) + __pyx_t_11 = __pyx_t_15; + __pyx_L236_bool_binop_done:; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_15 = __pyx_t_11; + if (!__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L234_bool_binop_done; + } + __pyx_t_15 = (__pyx_v_curr_func_name == ((PyObject*)Py_None)); + __pyx_t_9 = __pyx_t_15; + __pyx_L234_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1052 - * breakpoint = function_breakpoint_on_call_event - * stop = True - * new_frame = frame # <<<<<<<<<<<<<< - * stop_reason = CMD_SET_FUNCTION_BREAK - * + /* "_pydevd_bundle/pydevd_cython.pyx":1039 + * # global context is set with an empty name + * if curr_func_name in ('?', '') or curr_func_name is None: + * curr_func_name = '' # <<<<<<<<<<<<<< + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + * stop = True */ - __Pyx_INCREF(__pyx_v_frame); - __pyx_v_new_frame = __pyx_v_frame; + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); - /* "_pydevd_bundle/pydevd_cython.pyx":1053 - * stop = True - * new_frame = frame - * stop_reason = CMD_SET_FUNCTION_BREAK # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1038 * - * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + * # global context is set with an empty name + * if curr_func_name in ('?', '') or curr_func_name is None: # <<<<<<<<<<<<<< + * curr_func_name = '' + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CMD_SET_FUNCTION_BREAK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_stop_reason, __pyx_t_1); - __pyx_t_1 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1049 - * bp_type = None + /* "_pydevd_bundle/pydevd_cython.pyx":1040 + * if curr_func_name in ('?', '') or curr_func_name is None: + * curr_func_name = '' + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: # <<<<<<<<<<<<<< + * stop = True * - * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< - * breakpoint = function_breakpoint_on_call_event - * stop = True */ - goto __pyx_L112; - } + __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1040, __pyx_L172_error) + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L239_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stop_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1040, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_next_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1040, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1040, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L239_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1055 - * stop_reason = CMD_SET_FUNCTION_BREAK + /* "_pydevd_bundle/pydevd_cython.pyx":1041 + * curr_func_name = '' + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + * stop = True # <<<<<<<<<<<<<< * - * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: # <<<<<<<<<<<<<< - * breakpoint = breakpoints_for_file[line] - * new_frame = frame + * if not stop: */ - if (__pyx_v_is_line) { - } else { - __pyx_t_11 = __pyx_v_is_line; - goto __pyx_L113_bool_binop_done; - } - __pyx_t_9 = (__pyx_v_info->pydev_state != 2); - if (__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L113_bool_binop_done; - } - if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 1055, __pyx_L106_error) } - __pyx_t_9 = (__pyx_v_breakpoints_for_file != ((PyObject*)Py_None)); - if (__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L113_bool_binop_done; - } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 1055, __pyx_L106_error) } - if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1055, __pyx_L106_error) - } - __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_breakpoints_for_file, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1055, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __pyx_t_9; - __pyx_L113_bool_binop_done:; - if (__pyx_t_11) { + __pyx_v_stop = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":1056 + /* "_pydevd_bundle/pydevd_cython.pyx":1040 + * if curr_func_name in ('?', '') or curr_func_name is None: + * curr_func_name = '' + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: # <<<<<<<<<<<<<< + * stop = True * - * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: - * breakpoint = breakpoints_for_file[line] # <<<<<<<<<<<<<< - * new_frame = frame - * stop = True */ - if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 1056, __pyx_L106_error) } - if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1056, __pyx_L106_error) - } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_breakpoints_for_file, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1056, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_6); - __pyx_t_6 = 0; + } + } + __pyx_L230:; + } + __pyx_L229:; - /* "_pydevd_bundle/pydevd_cython.pyx":1057 - * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: - * breakpoint = breakpoints_for_file[line] - * new_frame = frame # <<<<<<<<<<<<<< - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1043 + * stop = True * + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. */ - __Pyx_INCREF(__pyx_v_frame); - __pyx_v_new_frame = __pyx_v_frame; + __pyx_t_9 = (!__pyx_v_stop); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1058 - * breakpoint = breakpoints_for_file[line] - * new_frame = frame - * stop = True # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1046 + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * - * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: + * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: */ - __pyx_v_stop = 1; + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1046, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1055 - * stop_reason = CMD_SET_FUNCTION_BREAK + /* "_pydevd_bundle/pydevd_cython.pyx":1043 + * stop = True * - * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: # <<<<<<<<<<<<<< - * breakpoint = breakpoints_for_file[line] - * new_frame = frame + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. */ - goto __pyx_L112; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":1060 - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1017 + * stop = True * - * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: # <<<<<<<<<<<<<< - * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) - * if result: + * elif self._is_same_frame(stop_frame, back) and is_line: # <<<<<<<<<<<<<< + * if info.pydev_smart_child_offset != -1: + * # i.e.: in this case, we're not interested in the pause in the parent, rather */ - __pyx_t_9 = (__pyx_v_plugin_manager != Py_None); - if (__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L117_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1060, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __pyx_t_9; - __pyx_L117_bool_binop_done:; - if (__pyx_t_11) { + goto __pyx_L224; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1061 + /* "_pydevd_bundle/pydevd_cython.pyx":1048 + * return None if is_call else NO_FTRACE * - * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: - * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) # <<<<<<<<<<<<<< - * if result: - * stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result + * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: # <<<<<<<<<<<<<< + * # Ok, we have to track 2 stops at this point, the parent and the child offset. + * # This happens when handling a step into which targets a function inside a list comprehension */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_get_breakpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_5 = 1; - } + __pyx_t_15 = (__pyx_v_back != Py_None); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L242_bool_binop_done; } - #endif - { - PyObject *__pyx_callargs[6] = {__pyx_t_8, __pyx_v_main_debugger, ((PyObject *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_self->_args}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1048, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1048, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L242_bool_binop_done; } - __pyx_v_result = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_t_9 = __pyx_v_is_line; + __pyx_L242_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1062 - * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: - * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) - * if result: # <<<<<<<<<<<<<< - * stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result - * + /* "_pydevd_bundle/pydevd_cython.pyx":1052 + * # This happens when handling a step into which targets a function inside a list comprehension + * # or generator (in which case an intermediary frame is created due to an internal function call). + * pydev_smart_parent_offset = info.pydev_smart_parent_offset # <<<<<<<<<<<<<< + * pydev_smart_child_offset = info.pydev_smart_child_offset + * # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1062, __pyx_L106_error) - if (__pyx_t_11) { + __pyx_t_10 = __pyx_v_info->pydev_smart_parent_offset; + __pyx_v_pydev_smart_parent_offset = __pyx_t_10; - /* "_pydevd_bundle/pydevd_cython.pyx":1063 - * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) - * if result: - * stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1053 + * # or generator (in which case an intermediary frame is created due to an internal function call). + * pydev_smart_parent_offset = info.pydev_smart_parent_offset + * pydev_smart_child_offset = info.pydev_smart_child_offset # <<<<<<<<<<<<<< + * # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) + * # print('parent f_lasti', back.f_back.f_lasti) + */ + __pyx_t_10 = __pyx_v_info->pydev_smart_child_offset; + __pyx_v_pydev_smart_child_offset = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":1057 + * # print('parent f_lasti', back.f_back.f_lasti) + * # print('child f_lasti', back.f_lasti) + * stop = False # <<<<<<<<<<<<<< + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1058 + * # print('child f_lasti', back.f_lasti) + * stop = False + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: # <<<<<<<<<<<<<< + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants * - * if breakpoint: */ - if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { - PyObject* sequence = __pyx_v_result; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 4)) { - if (size > 4) __Pyx_RaiseTooManyValuesError(4); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1063, __pyx_L106_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); - } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_1 = PyList_GET_ITEM(sequence, 1); - __pyx_t_8 = PyList_GET_ITEM(sequence, 2); - __pyx_t_4 = PyList_GET_ITEM(sequence, 3); - } - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_4); - #else - { - Py_ssize_t i; - PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_1,&__pyx_t_8,&__pyx_t_4}; - for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1063, __pyx_L106_error) - __Pyx_GOTREF(item); - *(temps[i]) = item; - } - } - #endif + __pyx_t_15 = (__pyx_v_pydev_smart_child_offset >= 0); + if (__pyx_t_15) { } else { - Py_ssize_t index = -1; - PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_1,&__pyx_t_8,&__pyx_t_4}; - __pyx_t_7 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1063, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); - for (index=0; index < 4; index++) { - PyObject* item = __pyx_t_14(__pyx_t_7); if (unlikely(!item)) goto __pyx_L120_unpacking_failed; - __Pyx_GOTREF(item); - *(temps[index]) = item; - } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_7), 4) < 0) __PYX_ERR(0, 1063, __pyx_L106_error) - __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L121_unpacking_done; - __pyx_L120_unpacking_failed:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1063, __pyx_L106_error) - __pyx_L121_unpacking_done:; + __pyx_t_9 = __pyx_t_15; + goto __pyx_L246_bool_binop_done; } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1063, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_stop_on_plugin_breakpoint = __pyx_t_11; - __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_v_new_frame = __pyx_t_8; - __pyx_t_8 = 0; - __Pyx_DECREF_SET(__pyx_v_bp_type, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_15 = (__pyx_v_pydev_smart_child_offset >= 0); + __pyx_t_9 = __pyx_t_15; + __pyx_L246_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1062 - * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: - * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) - * if result: # <<<<<<<<<<<<<< - * stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result + /* "_pydevd_bundle/pydevd_cython.pyx":1059 + * stop = False + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants # <<<<<<<<<<<<<< * + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: */ - } + __pyx_t_8 = __pyx_v_info->pydev_smart_step_into_variants; + __Pyx_INCREF(__pyx_t_8); + __pyx_v_pydev_smart_step_into_variants = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1060 - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1061 + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants * - * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: # <<<<<<<<<<<<<< - * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) - * if result: + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Note that we don't really check the parent offset, only the offset of + * # the child (because this is a generator, the parent may have moved forward */ - } - __pyx_L112:; + __pyx_t_15 = (__pyx_v_pydev_smart_parent_offset >= 0); + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L249_bool_binop_done; + } + __pyx_t_15 = (__pyx_v_pydev_smart_step_into_variants != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_pydev_smart_step_into_variants) != 0); + __pyx_t_9 = __pyx_t_15; + __pyx_L249_bool_binop_done:; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1065 - * stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result - * - * if breakpoint: # <<<<<<<<<<<<<< - * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint - * # lets do the conditional stuff here + /* "_pydevd_bundle/pydevd_cython.pyx":1066 + * # already -- and that's ok, so, we just check that the parent frame + * # matches in this case). + * smart_step_into_variant = get_smart_step_into_variant_from_frame_offset(pydev_smart_parent_offset, pydev_smart_step_into_variants) # <<<<<<<<<<<<<< + * # print('matched parent offset', pydev_smart_parent_offset) + * # Ok, now, check the child variant */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1065, __pyx_L106_error) - if (__pyx_t_11) { + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1066, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_parent_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1066, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_pydev_smart_step_into_variants}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1066, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_v_smart_step_into_variant = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1068 - * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint - * # lets do the conditional stuff here - * if breakpoint.expression is not None: # <<<<<<<<<<<<<< - * main_debugger.handle_breakpoint_expression(breakpoint, info, new_frame) - * + /* "_pydevd_bundle/pydevd_cython.pyx":1069 + * # print('matched parent offset', pydev_smart_parent_offset) + * # Ok, now, check the child variant + * children_variants = smart_step_into_variant.children_variants # <<<<<<<<<<<<<< + * stop = children_variants and ( + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = (__pyx_t_4 != Py_None); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_11) { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_smart_step_into_variant, __pyx_n_s_children_variants); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_children_variants = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1069 - * # lets do the conditional stuff here - * if breakpoint.expression is not None: - * main_debugger.handle_breakpoint_expression(breakpoint, info, new_frame) # <<<<<<<<<<<<<< - * - * if stop or stop_on_plugin_breakpoint: + /* "_pydevd_bundle/pydevd_cython.pyx":1070 + * # Ok, now, check the child variant + * children_variants = smart_step_into_variant.children_variants + * stop = children_variants and ( # <<<<<<<<<<<<<< + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ + * get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_handle_breakpoint_expression); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); __PYX_ERR(0, 1069, __pyx_L106_error) } - __pyx_t_1 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_breakpoint, ((PyObject *)__pyx_v_info), __pyx_v_new_frame}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_children_variants); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1070, __pyx_L172_error) + if (__pyx_t_15) { + } else { + __pyx_t_9 = __pyx_t_15; + goto __pyx_L251_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1068 - * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint - * # lets do the conditional stuff here - * if breakpoint.expression is not None: # <<<<<<<<<<<<<< - * main_debugger.handle_breakpoint_expression(breakpoint, info, new_frame) - * + /* "_pydevd_bundle/pydevd_cython.pyx":1071 + * children_variants = smart_step_into_variant.children_variants + * stop = children_variants and ( + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ # <<<<<<<<<<<<<< + * get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) + * ) */ - } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_lasti); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1071, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_children_variants}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1071, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1071 - * main_debugger.handle_breakpoint_expression(breakpoint, info, new_frame) - * - * if stop or stop_on_plugin_breakpoint: # <<<<<<<<<<<<<< - * eval_result = False - * if breakpoint.has_condition: + /* "_pydevd_bundle/pydevd_cython.pyx":1072 + * stop = children_variants and ( + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ + * get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) # <<<<<<<<<<<<<< + * ) + * # print('stop at child', stop) */ - if (!__pyx_v_stop) { - } else { - __pyx_t_11 = __pyx_v_stop; - goto __pyx_L125_bool_binop_done; - } - __pyx_t_11 = __pyx_v_stop_on_plugin_breakpoint; - __pyx_L125_bool_binop_done:; - if (__pyx_t_11) { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1072, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_child_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1072, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_v_children_variants}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_15 = (__pyx_t_8 == __pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __pyx_t_15; + __pyx_L251_bool_binop_done:; + __pyx_v_stop = __pyx_t_9; - /* "_pydevd_bundle/pydevd_cython.pyx":1072 + /* "_pydevd_bundle/pydevd_cython.pyx":1061 + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants * - * if stop or stop_on_plugin_breakpoint: - * eval_result = False # <<<<<<<<<<<<<< - * if breakpoint.has_condition: - * eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Note that we don't really check the parent offset, only the offset of + * # the child (because this is a generator, the parent may have moved forward */ - __Pyx_INCREF(Py_False); - __pyx_v_eval_result = Py_False; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1073 - * if stop or stop_on_plugin_breakpoint: - * eval_result = False - * if breakpoint.has_condition: # <<<<<<<<<<<<<< - * eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) - * if not eval_result: + /* "_pydevd_bundle/pydevd_cython.pyx":1058 + * # print('child f_lasti', back.f_lasti) + * stop = False + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: # <<<<<<<<<<<<<< + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_has_condition); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1073, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1073, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_11) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":1074 - * eval_result = False - * if breakpoint.has_condition: - * eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) # <<<<<<<<<<<<<< - * if not eval_result: - * stop = False - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_handle_breakpoint_condition); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1074, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); __PYX_ERR(0, 1074, __pyx_L106_error) } - __pyx_t_1 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_1, ((PyObject *)__pyx_v_info), __pyx_v_breakpoint, __pyx_v_new_frame}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1074, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF_SET(__pyx_v_eval_result, __pyx_t_4); - __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1075 - * if breakpoint.has_condition: - * eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) - * if not eval_result: # <<<<<<<<<<<<<< - * stop = False - * stop_on_plugin_breakpoint = False + /* "_pydevd_bundle/pydevd_cython.pyx":1076 + * # print('stop at child', stop) + * + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_eval_result); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1075, __pyx_L106_error) - __pyx_t_9 = (!__pyx_t_11); - if (__pyx_t_9) { + __pyx_t_9 = (!__pyx_v_stop); + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1076 - * eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) - * if not eval_result: - * stop = False # <<<<<<<<<<<<<< - * stop_on_plugin_breakpoint = False + /* "_pydevd_bundle/pydevd_cython.pyx":1079 + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * + * elif step_cmd in (109, 160): */ - __pyx_v_stop = 0; + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1077 - * if not eval_result: - * stop = False - * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1076 + * # print('stop at child', stop) * - * if is_call and (frame.f_code.co_name in ('', '') or (line == 1 and frame.f_code.co_name.startswith('', '') or (line == 1 and frame.f_code.co_name.startswith('__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L172_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1082, __pyx_L172_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_cell}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1079, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __pyx_t_15; - __pyx_L130_bool_binop_done:; - if (__pyx_t_9) { + __pyx_t_15 = __pyx_t_9; + __pyx_L254_bool_binop_done:; + __pyx_v_stop = __pyx_t_15; - /* "_pydevd_bundle/pydevd_cython.pyx":1091 - * # module, so it's the same case as . + /* "_pydevd_bundle/pydevd_cython.pyx":1081 + * return None if is_call else NO_FTRACE * - * return self.trace_dispatch # <<<<<<<<<<<<<< + * elif step_cmd in (109, 160): # <<<<<<<<<<<<<< + * stop = is_return and self._is_same_frame(stop_frame, frame) * - * # Handle logpoint (on a logpoint we should never stop). */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1091, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_r = __pyx_t_8; - __pyx_t_8 = 0; - goto __pyx_L110_try_return; + goto __pyx_L181; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1079 - * stop_on_plugin_breakpoint = False + /* "_pydevd_bundle/pydevd_cython.pyx":1085 * - * if is_call and (frame.f_code.co_name in ('', '') or (line == 1 and frame.f_code.co_name.startswith(' 0: + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * f_code = getattr(frame.f_back, 'f_code', None) # <<<<<<<<<<<<<< + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: */ - __pyx_v_stop_on_plugin_breakpoint = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_code, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1088, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_f_code = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1098 - * stop_on_plugin_breakpoint = False - * - * if info.pydev_message is not None and len(info.pydev_message) > 0: # <<<<<<<<<<<<<< - * cmd = main_debugger.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') - * main_debugger.writer.add_command(cmd) + /* "_pydevd_bundle/pydevd_cython.pyx":1089 + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * f_code = getattr(frame.f_back, 'f_code', None) + * if f_code is not None: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False */ - __pyx_t_15 = (__pyx_v_info->pydev_message != ((PyObject*)Py_None)); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L141_bool_binop_done; - } - __pyx_t_8 = __pyx_v_info->pydev_message; - __Pyx_INCREF(__pyx_t_8); - __pyx_t_12 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1098, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_15 = (__pyx_t_12 > 0); - __pyx_t_9 = __pyx_t_15; - __pyx_L141_bool_binop_done:; - if (__pyx_t_9) { + __pyx_t_15 = (__pyx_v_f_code != Py_None); + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1099 - * - * if info.pydev_message is not None and len(info.pydev_message) > 0: - * cmd = main_debugger.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') # <<<<<<<<<<<<<< - * main_debugger.writer.add_command(cmd) + /* "_pydevd_bundle/pydevd_cython.pyx":1090 + * f_code = getattr(frame.f_back, 'f_code', None) + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_make_io_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_linesep); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1099, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_v_info->pydev_message, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_4, __pyx_kp_s_1}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1090, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; } - __pyx_v_cmd = __pyx_t_8; - __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1090, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1090, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1090, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1100 - * if info.pydev_message is not None and len(info.pydev_message) > 0: - * cmd = main_debugger.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') - * main_debugger.writer.add_command(cmd) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1091 + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False # <<<<<<<<<<<<<< * - * if main_debugger.show_return_values: + * if plugin_stop: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add_command); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_cmd}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1098 - * stop_on_plugin_breakpoint = False + /* "_pydevd_bundle/pydevd_cython.pyx":1090 + * f_code = getattr(frame.f_back, 'f_code', None) + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False * - * if info.pydev_message is not None and len(info.pydev_message) > 0: # <<<<<<<<<<<<<< - * cmd = main_debugger.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') - * main_debugger.writer.add_command(cmd) */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1094 - * - * # Handle logpoint (on a logpoint we should never stop). - * if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: # <<<<<<<<<<<<<< - * stop = False - * stop_on_plugin_breakpoint = False + /* "_pydevd_bundle/pydevd_cython.pyx":1089 + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * f_code = getattr(frame.f_back, 'f_code', None) + * if f_code is not None: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1065 - * stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result + /* "_pydevd_bundle/pydevd_cython.pyx":1087 + * stop = False * - * if breakpoint: # <<<<<<<<<<<<<< - * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint - * # lets do the conditional stuff here + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): # <<<<<<<<<<<<<< + * f_code = getattr(frame.f_back, 'f_code', None) + * if f_code is not None: */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1102 - * main_debugger.writer.add_command(cmd) + /* "_pydevd_bundle/pydevd_cython.pyx":1093 + * stop = False * - * if main_debugger.show_return_values: # <<<<<<<<<<<<<< - * if is_return and ( - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + * if plugin_stop: # <<<<<<<<<<<<<< + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1102, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1102, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_9) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_plugin_stop); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1093, __pyx_L172_error) + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1103 + /* "_pydevd_bundle/pydevd_cython.pyx":1094 * - * if main_debugger.show_return_values: - * if is_return and ( # <<<<<<<<<<<<<< - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or - * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or - */ - if (__pyx_v_is_return) { - } else { - __pyx_t_9 = __pyx_v_is_return; - goto __pyx_L145_bool_binop_done; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":1104 - * if main_debugger.show_return_values: - * if is_return and ( - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or # <<<<<<<<<<<<<< - * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or - * (info.pydev_step_cmd in (107, 206)) or + * if plugin_stop: + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) # <<<<<<<<<<<<<< + * elif stop: + * if is_line: */ - switch (__pyx_v_info->pydev_step_cmd) { - case 0x6C: - case 0x9F: - case 0x80: - __pyx_t_15 = 1; - break; - default: - __pyx_t_15 = 0; - break; - } - __pyx_t_11 = __pyx_t_15; - if (!__pyx_t_11) { - goto __pyx_L147_next_or; - } else { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_stop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1094, __pyx_L172_error) } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L106_error) + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L172_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1104, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L145_bool_binop_done; + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1094, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } } - __pyx_L147_next_or:; + #endif + { + PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_8, __pyx_v_stop_info, __pyx_v_arg, __pyx_t_7}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 7+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1094, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1105 - * if is_return and ( - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or - * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or # <<<<<<<<<<<<<< - * (info.pydev_step_cmd in (107, 206)) or - * ( + /* "_pydevd_bundle/pydevd_cython.pyx":1093 + * stop = False + * + * if plugin_stop: # <<<<<<<<<<<<<< + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: */ - switch (__pyx_v_info->pydev_step_cmd) { - case 0x6D: - case 0xA0: - __pyx_t_11 = 1; - break; - default: - __pyx_t_11 = 0; - break; - } - __pyx_t_15 = __pyx_t_11; - if (!__pyx_t_15) { - goto __pyx_L149_next_or; - } else { - } - __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1105, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L145_bool_binop_done; - } - __pyx_L149_next_or:; + goto __pyx_L263; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1106 - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or - * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or - * (info.pydev_step_cmd in (107, 206)) or # <<<<<<<<<<<<<< - * ( - * info.pydev_step_cmd == 144 + /* "_pydevd_bundle/pydevd_cython.pyx":1095 + * if plugin_stop: + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: # <<<<<<<<<<<<<< + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) */ - switch (__pyx_v_info->pydev_step_cmd) { - case 0x6B: - case 0xCE: - __pyx_t_15 = 1; - break; - default: - __pyx_t_15 = 0; - break; - } - __pyx_t_11 = __pyx_t_15; - if (!__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L145_bool_binop_done; - } + if (__pyx_v_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":1108 - * (info.pydev_step_cmd in (107, 206)) or - * ( - * info.pydev_step_cmd == 144 # <<<<<<<<<<<<<< - * and frame.f_back is not None - * and not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + /* "_pydevd_bundle/pydevd_cython.pyx":1096 + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: + * if is_line: # <<<<<<<<<<<<<< + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) */ - __pyx_t_11 = (__pyx_v_info->pydev_step_cmd == 0x90); - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L145_bool_binop_done; - } + if (__pyx_v_is_line) { - /* "_pydevd_bundle/pydevd_cython.pyx":1109 - * ( - * info.pydev_step_cmd == 144 - * and frame.f_back is not None # <<<<<<<<<<<<<< - * and not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) - * ) + /* "_pydevd_bundle/pydevd_cython.pyx":1097 + * elif stop: + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1109, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = (__pyx_t_4 != Py_None); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L145_bool_binop_done; - } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_thread)) __PYX_ERR(0, 1097, __pyx_L172_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L172_error); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_original_step_cmd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_original_step_cmd, __pyx_t_8) < 0) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1110 - * info.pydev_step_cmd == 144 - * and frame.f_back is not None - * and not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) # <<<<<<<<<<<<<< - * ) - * ): + /* "_pydevd_bundle/pydevd_cython.pyx":1098 + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< + * elif is_return: # return event + * back = frame.f_back */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_1, __pyx_t_6, Py_True}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L106_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L172_error) __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_v_thread, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1110, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_15 = (!__pyx_t_11); - __pyx_t_9 = __pyx_t_15; - __pyx_L145_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":1103 - * - * if main_debugger.show_return_values: - * if is_return and ( # <<<<<<<<<<<<<< - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or - * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or + /* "_pydevd_bundle/pydevd_cython.pyx":1096 + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: + * if is_line: # <<<<<<<<<<<<<< + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) */ - if (__pyx_t_9) { + goto __pyx_L264; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1113 - * ) - * ): - * self._show_return_values(frame, arg) # <<<<<<<<<<<<<< - * - * elif main_debugger.remove_return_values_flag: + /* "_pydevd_bundle/pydevd_cython.pyx":1099 + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event # <<<<<<<<<<<<<< + * back = frame.f_back + * if back is not None: */ - __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_show_return_values(__pyx_v_self, __pyx_v_frame, __pyx_v_arg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1113, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_v_is_return) { - /* "_pydevd_bundle/pydevd_cython.pyx":1103 - * - * if main_debugger.show_return_values: - * if is_return and ( # <<<<<<<<<<<<<< - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or - * (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or + /* "_pydevd_bundle/pydevd_cython.pyx":1100 + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event + * back = frame.f_back # <<<<<<<<<<<<<< + * if back is not None: + * # When we get to the pydevd run function, the debugging has actually finished for the main thread */ - } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_back, __pyx_t_8); + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1102 - * main_debugger.writer.add_command(cmd) - * - * if main_debugger.show_return_values: # <<<<<<<<<<<<<< - * if is_return and ( - * (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or + /* "_pydevd_bundle/pydevd_cython.pyx":1101 + * elif is_return: # return event + * back = frame.f_back + * if back is not None: # <<<<<<<<<<<<<< + * # When we get to the pydevd run function, the debugging has actually finished for the main thread + * # (note that it can still go on for other threads, but for this one, we just make it finish) */ - goto __pyx_L143; - } + __pyx_t_15 = (__pyx_v_back != Py_None); + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1115 - * self._show_return_values(frame, arg) - * - * elif main_debugger.remove_return_values_flag: # <<<<<<<<<<<<<< - * try: - * self._remove_return_values(main_debugger, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":1105 + * # (note that it can still go on for other threads, but for this one, we just make it finish) + * # So, just setting it to None should be OK + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) # <<<<<<<<<<<<<< + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): + * back = None */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1115, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1115, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_9) { + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_back}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { + PyObject* sequence = __pyx_t_8; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1105, __pyx_L172_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1105, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1105, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1105, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L266_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_7 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L266_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 2; __pyx_t_6 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L266_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 3) < 0) __PYX_ERR(0, 1105, __pyx_L172_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L267_unpacking_done; + __pyx_L266_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1105, __pyx_L172_error) + __pyx_L267_unpacking_done:; + } + __pyx_v_back_absolute_filename = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v__ = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_v_base = __pyx_t_6; + __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1116 + /* "_pydevd_bundle/pydevd_cython.pyx":1106 + * # So, just setting it to None should be OK + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): # <<<<<<<<<<<<<< + * back = None * - * elif main_debugger.remove_return_values_flag: - * try: # <<<<<<<<<<<<<< - * self._remove_return_values(main_debugger, frame) - * finally: */ - /*try:*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_base); + __Pyx_GIVEREF(__pyx_v_base); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_base)) __PYX_ERR(0, 1106, __pyx_L172_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L172_error); + __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_9) { + } else { + __pyx_t_15 = __pyx_t_9; + goto __pyx_L269_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1106, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_15 = __pyx_t_9; + __pyx_L269_bool_binop_done:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __pyx_t_15; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1117 - * elif main_debugger.remove_return_values_flag: - * try: - * self._remove_return_values(main_debugger, frame) # <<<<<<<<<<<<<< - * finally: - * main_debugger.remove_return_values_flag = False + /* "_pydevd_bundle/pydevd_cython.pyx":1107 + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): + * back = None # <<<<<<<<<<<<<< + * + * elif base == TRACE_PROPERTY: */ - __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_remove_return_values(__pyx_v_self, __pyx_v_main_debugger, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L155_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_back, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":1119 - * self._remove_return_values(main_debugger, frame) - * finally: - * main_debugger.remove_return_values_flag = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1106 + * # So, just setting it to None should be OK + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): # <<<<<<<<<<<<<< + * back = None * - * if stop: */ - /*finally:*/ { - /*normal exit:*/{ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag, Py_False) < 0) __PYX_ERR(0, 1119, __pyx_L106_error) - goto __pyx_L156; - } - __pyx_L155_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); - __Pyx_XGOTREF(__pyx_t_23); - __Pyx_XGOTREF(__pyx_t_24); - __Pyx_XGOTREF(__pyx_t_25); - __Pyx_XGOTREF(__pyx_t_26); - __Pyx_XGOTREF(__pyx_t_27); - __Pyx_XGOTREF(__pyx_t_28); - __pyx_t_5 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_22 = __pyx_filename; - { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag, Py_False) < 0) __PYX_ERR(0, 1119, __pyx_L158_error) - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_26); - __Pyx_XGIVEREF(__pyx_t_27); - __Pyx_XGIVEREF(__pyx_t_28); - __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28); - } - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_XGIVEREF(__pyx_t_24); - __Pyx_XGIVEREF(__pyx_t_25); - __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25); - __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; - __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_22; - goto __pyx_L106_error; - __pyx_L158_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_26); - __Pyx_XGIVEREF(__pyx_t_27); - __Pyx_XGIVEREF(__pyx_t_28); - __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28); + goto __pyx_L268; } - __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; - __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; - __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; - __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; - goto __pyx_L106_error; - } - __pyx_L156:; - } - /* "_pydevd_bundle/pydevd_cython.pyx":1115 - * self._show_return_values(frame, arg) + /* "_pydevd_bundle/pydevd_cython.pyx":1109 + * back = None * - * elif main_debugger.remove_return_values_flag: # <<<<<<<<<<<<<< - * try: - * self._remove_return_values(main_debugger, frame) + * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< + * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + * # if we're in a return, we want it to appear to the user in the previous frame! */ - } - __pyx_L143:; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_TRACE_PROPERTY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_base, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1109, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1109, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1121 - * main_debugger.remove_return_values_flag = False + /* "_pydevd_bundle/pydevd_cython.pyx":1112 + * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + * # if we're in a return, we want it to appear to the user in the previous frame! + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * - * if stop: # <<<<<<<<<<<<<< - * self.set_suspend( - * thread, + * elif pydevd_dont_trace.should_trace_hook is not None: */ - if (__pyx_v_stop) { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_6 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1112, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1122 + /* "_pydevd_bundle/pydevd_cython.pyx":1109 + * back = None * - * if stop: - * self.set_suspend( # <<<<<<<<<<<<<< - * thread, - * stop_reason, + * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< + * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + * # if we're in a return, we want it to appear to the user in the previous frame! */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_4); + } - /* "_pydevd_bundle/pydevd_cython.pyx":1124 - * self.set_suspend( - * thread, - * stop_reason, # <<<<<<<<<<<<<< - * suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", - * ) + /* "_pydevd_bundle/pydevd_cython.pyx":1114 + * return None if is_call else NO_FTRACE + * + * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): + * # In this case, we'll have to skip the previous one because it shouldn't be traced. */ - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1122, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_thread); - __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 1122, __pyx_L106_error); - __Pyx_INCREF(__pyx_v_stop_reason); - __Pyx_GIVEREF(__pyx_v_stop_reason); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_stop_reason)) __PYX_ERR(0, 1122, __pyx_L106_error); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1125 - * thread, - * stop_reason, - * suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", # <<<<<<<<<<<<<< - * ) + /* "_pydevd_bundle/pydevd_cython.pyx":1115 * + * elif pydevd_dont_trace.should_trace_hook is not None: + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): # <<<<<<<<<<<<<< + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + * # Also, we have to reset the tracing, because if the parent's parent (or some */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1125, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1125, __pyx_L106_error) - if (__pyx_t_9) { - } else { - __Pyx_INCREF(__pyx_v_breakpoint); - __pyx_t_1 = __pyx_v_breakpoint; - goto __pyx_L160_bool_binop_done; - } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_suspend_policy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_n_s_ALL, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_t_3; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_L160_bool_binop_done:; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_suspend_other_threads, __pyx_t_1) < 0) __PYX_ERR(0, 1125, __pyx_L106_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1115, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1115, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1115, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_back_absolute_filename}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1115, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1115, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = (!__pyx_t_9); + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1122 + /* "_pydevd_bundle/pydevd_cython.pyx":1121 + * # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). + * # Related test: _debugger_case17a.py + * py_db.set_trace_for_frame_and_parents(thread.ident, back) # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE * - * if stop: - * self.set_suspend( # <<<<<<<<<<<<<< - * thread, - * stop_reason, */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1121, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1121, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_back}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1121, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1121 - * main_debugger.remove_return_values_flag = False + /* "_pydevd_bundle/pydevd_cython.pyx":1122 + * # Related test: _debugger_case17a.py + * py_db.set_trace_for_frame_and_parents(thread.ident, back) + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< * - * if stop: # <<<<<<<<<<<<<< - * self.set_suspend( - * thread, + * if back is not None: */ - goto __pyx_L159; - } + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_8 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1128 - * ) + /* "_pydevd_bundle/pydevd_cython.pyx":1115 * - * elif stop_on_plugin_breakpoint and plugin_manager is not None: # <<<<<<<<<<<<<< - * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) - * if result: + * elif pydevd_dont_trace.should_trace_hook is not None: + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): # <<<<<<<<<<<<<< + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + * # Also, we have to reset the tracing, because if the parent's parent (or some */ - if (__pyx_v_stop_on_plugin_breakpoint) { - } else { - __pyx_t_9 = __pyx_v_stop_on_plugin_breakpoint; - goto __pyx_L162_bool_binop_done; - } - __pyx_t_15 = (__pyx_v_plugin_manager != Py_None); - __pyx_t_9 = __pyx_t_15; - __pyx_L162_bool_binop_done:; - if (__pyx_t_9) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":1129 + /* "_pydevd_bundle/pydevd_cython.pyx":1114 + * return None if is_call else NO_FTRACE * - * elif stop_on_plugin_breakpoint and plugin_manager is not None: - * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) # <<<<<<<<<<<<<< - * if result: - * frame = result + * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + */ + } + __pyx_L268:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1101 + * elif is_return: # return event + * back = frame.f_back + * if back is not None: # <<<<<<<<<<<<<< + * # When we get to the pydevd run function, the debugging has actually finished for the main thread + * # (note that it can still go on for other threads, but for this one, we just make it finish) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_suspend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1129, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; } - } - #endif - { - PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_main_debugger, __pyx_v_thread, __pyx_v_frame, __pyx_v_bp_type}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_1); - __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1130 - * elif stop_on_plugin_breakpoint and plugin_manager is not None: - * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) - * if result: # <<<<<<<<<<<<<< - * frame = result + /* "_pydevd_bundle/pydevd_cython.pyx":1124 + * return None if is_call else NO_FTRACE * + * if back is not None: # <<<<<<<<<<<<<< + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1130, __pyx_L106_error) - if (__pyx_t_9) { + __pyx_t_15 = (__pyx_v_back != Py_None); + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1131 - * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) - * if result: - * frame = result # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1126 + * if back is not None: + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, back, event, arg) + * else: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_thread)) __PYX_ERR(0, 1126, __pyx_L172_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L172_error); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_original_step_cmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_original_step_cmd, __pyx_t_4) < 0) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1127 + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, back, event, arg) # <<<<<<<<<<<<<< + * else: + * # in jython we may not have a back frame + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1127, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_thread, __pyx_v_back, __pyx_v_event, __pyx_v_arg}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1124 + * return None if is_call else NO_FTRACE * - * # if thread has a suspend flag, we suspend with a busy wait + * if back is not None: # <<<<<<<<<<<<<< + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) */ - __Pyx_INCREF(__pyx_v_result); - __Pyx_DECREF_SET(__pyx_v_frame, __pyx_v_result); + goto __pyx_L272; + } /* "_pydevd_bundle/pydevd_cython.pyx":1130 - * elif stop_on_plugin_breakpoint and plugin_manager is not None: - * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) - * if result: # <<<<<<<<<<<<<< - * frame = result - * + * else: + * # in jython we may not have a back frame + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * info.pydev_original_step_cmd = -1 + * info.pydev_step_cmd = -1 */ - } + /*else*/ { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":1128 - * ) - * - * elif stop_on_plugin_breakpoint and plugin_manager is not None: # <<<<<<<<<<<<<< - * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) - * if result: + /* "_pydevd_bundle/pydevd_cython.pyx":1131 + * # in jython we may not have a back frame + * info.pydev_step_stop = None + * info.pydev_original_step_cmd = -1 # <<<<<<<<<<<<<< + * info.pydev_step_cmd = -1 + * info.pydev_state = 1 */ - } - __pyx_L159:; + __pyx_v_info->pydev_original_step_cmd = -1; - /* "_pydevd_bundle/pydevd_cython.pyx":1134 + /* "_pydevd_bundle/pydevd_cython.pyx":1132 + * info.pydev_step_stop = None + * info.pydev_original_step_cmd = -1 + * info.pydev_step_cmd = -1 # <<<<<<<<<<<<<< + * info.pydev_state = 1 * - * # if thread has a suspend flag, we suspend with a busy wait - * if info.pydev_state == 2: # <<<<<<<<<<<<<< - * self.do_wait_suspend(thread, frame, event, arg) - * return self.trace_dispatch */ - __pyx_t_9 = (__pyx_v_info->pydev_state == 2); - if (__pyx_t_9) { + __pyx_v_info->pydev_step_cmd = -1; - /* "_pydevd_bundle/pydevd_cython.pyx":1135 - * # if thread has a suspend flag, we suspend with a busy wait - * if info.pydev_state == 2: - * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< - * return self.trace_dispatch - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1133 + * info.pydev_original_step_cmd = -1 + * info.pydev_step_cmd = -1 + * info.pydev_state = 1 # <<<<<<<<<<<<<< + * + * # if we are quitting, let's stop the tracing */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1135, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; + __pyx_v_info->pydev_state = 1; } + __pyx_L272:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1099 + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event # <<<<<<<<<<<<<< + * back = frame.f_back + * if back is not None: + */ } - #endif - { - PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_thread, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_L264:; - /* "_pydevd_bundle/pydevd_cython.pyx":1136 - * if info.pydev_state == 2: - * self.do_wait_suspend(thread, frame, event, arg) - * return self.trace_dispatch # <<<<<<<<<<<<<< - * else: - * if not breakpoint and is_line: + /* "_pydevd_bundle/pydevd_cython.pyx":1095 + * if plugin_stop: + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: # <<<<<<<<<<<<<< + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L106_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L110_try_return; + } + __pyx_L263:; - /* "_pydevd_bundle/pydevd_cython.pyx":1134 + /* "_pydevd_bundle/pydevd_cython.pyx":1136 + * + * # if we are quitting, let's stop the tracing + * if py_db.quitting: # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE * - * # if thread has a suspend flag, we suspend with a busy wait - * if info.pydev_state == 2: # <<<<<<<<<<<<<< - * self.do_wait_suspend(thread, frame, event, arg) - * return self.trace_dispatch */ - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_quitting); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1136, __pyx_L172_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_15) { - /* "_pydevd_bundle/pydevd_cython.pyx":1138 - * return self.trace_dispatch - * else: - * if not breakpoint and is_line: # <<<<<<<<<<<<<< - * # No stop from anyone and no breakpoint found in line (cache that). - * frame_skips_cache[line_cache_key] = 0 + /* "_pydevd_bundle/pydevd_cython.pyx":1137 + * # if we are quitting, let's stop the tracing + * if py_db.quitting: + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * return self.trace_dispatch */ - /*else*/ { - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1138, __pyx_L106_error) - __pyx_t_11 = (!__pyx_t_15); - if (__pyx_t_11) { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L167_bool_binop_done; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1137, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __pyx_t_7; + __pyx_t_7 = 0; } - __pyx_t_9 = __pyx_v_is_line; - __pyx_L167_bool_binop_done:; - if (__pyx_t_9) { + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1140 - * if not breakpoint and is_line: - * # No stop from anyone and no breakpoint found in line (cache that). - * frame_skips_cache[line_cache_key] = 0 # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1136 + * + * # if we are quitting, let's stop the tracing + * if py_db.quitting: # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE * - * except: */ - if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1140, __pyx_L106_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_line_cache_key, __pyx_int_0) < 0))) __PYX_ERR(0, 1140, __pyx_L106_error) + } - /* "_pydevd_bundle/pydevd_cython.pyx":1138 - * return self.trace_dispatch - * else: - * if not breakpoint and is_line: # <<<<<<<<<<<<<< - * # No stop from anyone and no breakpoint found in line (cache that). - * frame_skips_cache[line_cache_key] = 0 + /* "_pydevd_bundle/pydevd_cython.pyx":1139 + * return None if is_call else NO_FTRACE + * + * return self.trace_dispatch # <<<<<<<<<<<<<< + * except: + * # Unfortunately Python itself stops the tracing when it originates from */ - } - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L172_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1038 - * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + /* "_pydevd_bundle/pydevd_cython.pyx":909 * + * # step handling. We stop when we hit the right frame * try: # <<<<<<<<<<<<<< - * stop_on_plugin_breakpoint = False - * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: */ } - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - goto __pyx_L111_try_end; - __pyx_L106_error:; + __pyx_L172_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; @@ -22430,99 +22557,99 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispa __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1142 - * frame_skips_cache[line_cache_key] = 0 + /* "_pydevd_bundle/pydevd_cython.pyx":1140 * + * return self.trace_dispatch * except: # <<<<<<<<<<<<<< * # Unfortunately Python itself stops the tracing when it originates from * # the tracing function, so, we can't do much about it (just let the user know). */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1142, __pyx_L108_except_error) - __Pyx_XGOTREF(__pyx_t_1); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1140, __pyx_L174_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_8); - /* "_pydevd_bundle/pydevd_cython.pyx":1145 + /* "_pydevd_bundle/pydevd_cython.pyx":1143 * # Unfortunately Python itself stops the tracing when it originates from * # the tracing function, so, we can't do much about it (just let the user know). * exc = sys.exc_info()[0] # <<<<<<<<<<<<<< - * cmd = main_debugger.cmd_factory.make_console_message( + * cmd = py_db.cmd_factory.make_console_message( * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1145, __pyx_L108_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1143, __pyx_L174_except_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1145, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1145, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1143, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1145, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_exc = __pyx_t_7; - __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_exc = __pyx_t_2; + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1146 + /* "_pydevd_bundle/pydevd_cython.pyx":1144 * # the tracing function, so, we can't do much about it (just let the user know). * exc = sys.exc_info()[0] - * cmd = main_debugger.cmd_factory.make_console_message( # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_console_message( # <<<<<<<<<<<<<< * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) + * py_db.writer.add_command(cmd) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1146, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_make_console_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L108_except_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1144, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_make_console_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L174_except_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1147 + /* "_pydevd_bundle/pydevd_cython.pyx":1145 * exc = sys.exc_info()[0] - * cmd = main_debugger.cmd_factory.make_console_message( + * cmd = py_db.cmd_factory.make_console_message( * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) # <<<<<<<<<<<<<< - * main_debugger.writer.add_command(cmd) + * py_db.writer.add_command(cmd) * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1147, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1145, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_exc)) __PYX_ERR(0, 1147, __pyx_L108_except_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_exc)) __PYX_ERR(0, 1145, __pyx_L174_except_error); __Pyx_INCREF(__pyx_v_thread); __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_thread)) __PYX_ERR(0, 1147, __pyx_L108_except_error); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_raised_from_within_the_callba, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_thread)) __PYX_ERR(0, 1145, __pyx_L174_except_error); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_raised_from_within_the_callba, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_10 = 1; @@ -22530,3153 +22657,4613 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispa } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1146, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_7); + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __Pyx_XDECREF_SET(__pyx_v_cmd, __pyx_t_7); - __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_cmd, __pyx_t_2); + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1148 - * cmd = main_debugger.cmd_factory.make_console_message( + /* "_pydevd_bundle/pydevd_cython.pyx":1146 + * cmd = py_db.cmd_factory.make_console_message( * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) # <<<<<<<<<<<<<< + * py_db.writer.add_command(cmd) # <<<<<<<<<<<<<< * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): * pydev_log.exception() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L108_except_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L174_except_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_command); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_command); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cmd}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1148, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1149 + /* "_pydevd_bundle/pydevd_cython.pyx":1147 * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) + * py_db.writer.add_command(cmd) * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< * pydev_log.exception() + * raise + */ + __pyx_t_15 = PyObject_IsSubclass(__pyx_v_exc, __pyx_tuple__6); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1147, __pyx_L174_except_error) + __pyx_t_9 = (!__pyx_t_15); + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1148 + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() # <<<<<<<<<<<<<< + * raise * */ - __pyx_t_9 = PyObject_IsSubclass(__pyx_v_exc, __pyx_tuple__4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1149, __pyx_L108_except_error) - __pyx_t_11 = (!__pyx_t_9); - if (__pyx_t_11) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L174_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1147 + * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * raise + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1149 + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() + * raise # <<<<<<<<<<<<<< + * + * finally: + */ + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_7, __pyx_t_6); + __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; + __PYX_ERR(0, 1149, __pyx_L174_except_error) + } + + /* "_pydevd_bundle/pydevd_cython.pyx":909 + * + * # step handling. We stop when we hit the right frame + * try: # <<<<<<<<<<<<<< + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + */ + __pyx_L174_except_error:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + goto __pyx_L4_error; + __pyx_L176_try_return:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + goto __pyx_L3_return; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1152 + * + * finally: + * info.is_tracing -= 1 # <<<<<<<<<<<<<< + * + * # end trace_dispatch + */ + /*finally:*/ { + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_28, &__pyx_t_27, &__pyx_t_26); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_26); + __pyx_t_10 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_29 = __pyx_filename; + { + if (unlikely(!__pyx_v_info)) { __Pyx_RaiseUnboundLocalError("info"); __PYX_ERR(0, 1152, __pyx_L278_error) } + if (unlikely(!__pyx_v_info)) { __Pyx_RaiseUnboundLocalError("info"); __PYX_ERR(0, 1152, __pyx_L278_error) } + __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing - 1); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_27, __pyx_t_26); + } + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16); + __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; + __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_29; + goto __pyx_L1_error; + __pyx_L278_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_27, __pyx_t_26); + } + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; + goto __pyx_L1_error; + } + __pyx_L3_return: { + __pyx_t_26 = __pyx_r; + __pyx_r = 0; + __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing - 1); + __pyx_r = __pyx_t_26; + __pyx_t_26 = 0; + goto __pyx_L0; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":452 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef tuple abs_path_canonical_path_and_base; + * cdef bint is_exception_event; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_21); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_abs_path_canonical_path_and_base); + __Pyx_XDECREF((PyObject *)__pyx_v_info); + __Pyx_XDECREF(__pyx_v_breakpoints_for_file); + __Pyx_XDECREF(__pyx_v_stop_info); + __Pyx_XDECREF(__pyx_v_curr_func_name); + __Pyx_XDECREF(__pyx_v_frame_skips_cache); + __Pyx_XDECREF(__pyx_v_frame_cache_key); + __Pyx_XDECREF(__pyx_v_line_cache_key); + __Pyx_XDECREF(__pyx_v_bp); + __Pyx_XDECREF(__pyx_v_pydev_smart_step_into_variants); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XDECREF(__pyx_v_plugin_manager); + __Pyx_XDECREF(__pyx_v_stop_frame); + __Pyx_XDECREF(__pyx_v_function_breakpoint_on_call_event); + __Pyx_XDECREF(__pyx_v_returns_cache_key); + __Pyx_XDECREF(__pyx_v_return_lines); + __Pyx_XDECREF(__pyx_v_x); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XDECREF(__pyx_v_func_lines); + __Pyx_XDECREF(__pyx_v_offset_and_lineno); + __Pyx_XDECREF(__pyx_v_breakpoint); + __Pyx_XDECREF(__pyx_v_stop_reason); + __Pyx_XDECREF(__pyx_v_bp_type); + __Pyx_XDECREF(__pyx_v_new_frame); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_eval_result); + __Pyx_XDECREF(__pyx_v_cmd); + __Pyx_XDECREF(__pyx_v_exc); + __Pyx_XDECREF(__pyx_v_plugin_stop); + __Pyx_XDECREF(__pyx_v_force_check_project_scope); + __Pyx_XDECREF(__pyx_v_filename); + __Pyx_XDECREF(__pyx_v_f2); + __Pyx_XDECREF(__pyx_v_back); + __Pyx_XDECREF(__pyx_v_smart_step_into_variant); + __Pyx_XDECREF(__pyx_v_children_variants); + __Pyx_XDECREF(__pyx_v_f_code); + __Pyx_XDECREF(__pyx_v_back_absolute_filename); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_base); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch = {"trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trace_dispatch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, 1); __PYX_ERR(0, 452, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, 2); __PYX_ERR(0, 452, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch") < 0)) __PYX_ERR(0, 452, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = ((PyObject*)values[1]); + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 452, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_dispatch", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._args, self.exc_info, self.should_skip) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->should_skip); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->_args); + __Pyx_GIVEREF(__pyx_v_self->_args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_args)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->exc_info); + __Pyx_GIVEREF(__pyx_v_self->exc_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->exc_info)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._args, self.exc_info, self.should_skip) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._args, self.exc_info, self.should_skip) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._args is not None or self.exc_info is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._args, self.exc_info, self.should_skip) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._args is not None or self.exc_info is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->_args != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->exc_info != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None or self.exc_info is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._args is not None or self.exc_info is not None + * if use_setstate: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_PyDBFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_61391470); + __Pyx_GIVEREF(__pyx_int_61391470); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_61391470)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None or self.exc_info is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PyDBFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_61391470); + __Pyx_GIVEREF(__pyx_int_61391470); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_61391470)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1158 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7should_stop_on_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_7should_stop_on_exception = {"should_stop_on_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_7should_stop_on_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7should_stop_on_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_thread = 0; + PyObject *__pyx_v_arg = 0; + PyObject *__pyx_v_prev_user_uncaught_exc_info = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("should_stop_on_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_info,&__pyx_n_s_frame,&__pyx_n_s_thread,&__pyx_n_s_arg,&__pyx_n_s_prev_user_uncaught_exc_info,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 1, 6, 6, 1); __PYX_ERR(0, 1158, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 1, 6, 6, 2); __PYX_ERR(0, 1158, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 1, 6, 6, 3); __PYX_ERR(0, 1158, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 1, 6, 6, 4); __PYX_ERR(0, 1158, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_prev_user_uncaught_exc_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[5]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 1, 6, 6, 5); __PYX_ERR(0, 1158, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "should_stop_on_exception") < 0)) __PYX_ERR(0, 1158, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 6)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); + } + __pyx_v_py_db = values[0]; + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)values[1]); + __pyx_v_frame = values[2]; + __pyx_v_thread = values[3]; + __pyx_v_arg = values[4]; + __pyx_v_prev_user_uncaught_exc_info = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 1158, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, 1, "info", 0))) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_6should_stop_on_exception(__pyx_self, __pyx_v_py_db, __pyx_v_info, __pyx_v_frame, __pyx_v_thread, __pyx_v_arg, __pyx_v_prev_user_uncaught_exc_info); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6should_stop_on_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info, PyObject *__pyx_v_frame, PyObject *__pyx_v_thread, PyObject *__pyx_v_arg, PyObject *__pyx_v_prev_user_uncaught_exc_info) { + int __pyx_v_should_stop; + int __pyx_v_was_just_raised; + PyObject *__pyx_v_check_excs = 0; + PyObject *__pyx_v_maybe_user_uncaught_exc_info = NULL; + PyObject *__pyx_v_exception = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_trace = NULL; + PyObject *__pyx_v_exception_breakpoint = NULL; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exc_break_user = NULL; + PyObject *__pyx_v_exc_break_caught = NULL; + PyObject *__pyx_v_exc_break = NULL; + PyObject *__pyx_v_is_user_uncaught = NULL; + PyObject *__pyx_v_exc_info = NULL; + PyObject *__pyx_v_lines = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + Py_ssize_t __pyx_t_15; + int __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("should_stop_on_exception", 0); + __Pyx_INCREF(__pyx_v_frame); + + /* "_pydevd_bundle/pydevd_cython.pyx":1166 + * # ENDIF + * + * should_stop = False # <<<<<<<<<<<<<< + * maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info + * + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1167 + * + * should_stop = False + * maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info # <<<<<<<<<<<<<< + * + * # 2 = 2 + */ + __Pyx_INCREF(__pyx_v_prev_user_uncaught_exc_info); + __pyx_v_maybe_user_uncaught_exc_info = __pyx_v_prev_user_uncaught_exc_info; + + /* "_pydevd_bundle/pydevd_cython.pyx":1170 + * + * # 2 = 2 + * if info.pydev_state != 2: # and breakpoint is not None: # <<<<<<<<<<<<<< + * exception, value, trace = arg + * + */ + __pyx_t_1 = (__pyx_v_info->pydev_state != 2); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1171 + * # 2 = 2 + * if info.pydev_state != 2: # and breakpoint is not None: + * exception, value, trace = arg # <<<<<<<<<<<<<< + * + * if trace is not None and hasattr(trace, 'tb_next'): + */ + if ((likely(PyTuple_CheckExact(__pyx_v_arg))) || (PyList_CheckExact(__pyx_v_arg))) { + PyObject* sequence = __pyx_v_arg; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1171, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_v_arg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1171, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1171, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + __pyx_v_exception = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_value = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_trace = __pyx_t_4; + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1150 - * main_debugger.writer.add_command(cmd) - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): - * pydev_log.exception() # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1173 + * exception, value, trace = arg * - * raise - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1150, __pyx_L108_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1149 - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< - * pydev_log.exception() + * if trace is not None and hasattr(trace, 'tb_next'): # <<<<<<<<<<<<<< + * # on jython trace is None on the first event and it may not have a tb_next. * */ - } + __pyx_t_7 = (__pyx_v_trace != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = __Pyx_HasAttr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_1 = __pyx_t_7; + __pyx_L7_bool_binop_done:; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1152 - * pydev_log.exception() - * - * raise # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1176 + * # on jython trace is None on the first event and it may not have a tb_next. * - * # step handling. We stop when we hit the right frame + * should_stop = False # <<<<<<<<<<<<<< + * exception_breakpoint = None + * try: */ - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_6); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_8); - __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_8 = 0; - __PYX_ERR(0, 1152, __pyx_L108_except_error) - } + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1038 - * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + /* "_pydevd_bundle/pydevd_cython.pyx":1177 * - * try: # <<<<<<<<<<<<<< - * stop_on_plugin_breakpoint = False - * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + * should_stop = False + * exception_breakpoint = None # <<<<<<<<<<<<<< + * try: + * if py_db.plugin is not None: */ - __pyx_L108_except_error:; - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16); - goto __pyx_L4_error; - __pyx_L110_try_return:; - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16); - goto __pyx_L3_return; - __pyx_L111_try_end:; - } + __Pyx_INCREF(Py_None); + __pyx_v_exception_breakpoint = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":1155 - * - * # step handling. We stop when we hit the right frame + /* "_pydevd_bundle/pydevd_cython.pyx":1178 + * should_stop = False + * exception_breakpoint = None * try: # <<<<<<<<<<<<<< - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1156 - * # step handling. We stop when we hit the right frame + /* "_pydevd_bundle/pydevd_cython.pyx":1179 + * exception_breakpoint = None * try: - * should_skip = 0 # <<<<<<<<<<<<<< - * if pydevd_dont_trace.should_trace_hook is not None: - * if self.should_skip == -1: + * if py_db.plugin is not None: # <<<<<<<<<<<<<< + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) + * if result: */ - __pyx_v_should_skip = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_plugin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = (__pyx_t_4 != Py_None); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1157 + /* "_pydevd_bundle/pydevd_cython.pyx":1180 * try: - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< - * if self.should_skip == -1: - * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). - */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_11 = (__pyx_t_6 != Py_None); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_11) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1158 - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: - * if self.should_skip == -1: # <<<<<<<<<<<<<< - * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). - * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code - */ - __pyx_t_11 = (__pyx_v_self->should_skip == -1L); - if (__pyx_t_11) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1162 - * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code - * # Which will be handled by this frame is read-only, so, we can cache it safely. - * if not pydevd_dont_trace.should_trace_hook(frame, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< - * # -1, 0, 1 to be Cython-friendly - * should_skip = self.should_skip = 1 + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) # <<<<<<<<<<<<<< + * if result: + * should_stop, frame = result */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1162, __pyx_L172_error) - } - __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = NULL; - __pyx_t_10 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_plugin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exception_break); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_11 = 0; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_10 = 1; + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; } } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_frame, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1162, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_py_db, __pyx_v_frame, __pyx_v_thread, __pyx_v_arg}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 4+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1162, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = (!__pyx_t_11); - if (__pyx_t_9) { + __pyx_v_result = __pyx_t_4; + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1164 - * if not pydevd_dont_trace.should_trace_hook(frame, abs_path_canonical_path_and_base[0]): - * # -1, 0, 1 to be Cython-friendly - * should_skip = self.should_skip = 1 # <<<<<<<<<<<<<< - * else: - * should_skip = self.should_skip = 0 + /* "_pydevd_bundle/pydevd_cython.pyx":1181 + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) + * if result: # <<<<<<<<<<<<<< + * should_stop, frame = result + * except: */ - __pyx_v_should_skip = 1; - __pyx_v_self->should_skip = 1; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1181, __pyx_L9_error) + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1162 - * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code - * # Which will be handled by this frame is read-only, so, we can cache it safely. - * if not pydevd_dont_trace.should_trace_hook(frame, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< - * # -1, 0, 1 to be Cython-friendly - * should_skip = self.should_skip = 1 + /* "_pydevd_bundle/pydevd_cython.pyx":1182 + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) + * if result: + * should_stop, frame = result # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() */ - goto __pyx_L180; - } + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1182, __pyx_L9_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1182, __pyx_L9_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L18_unpacking_done; + __pyx_L17_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1182, __pyx_L9_error) + __pyx_L18_unpacking_done:; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1182, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_should_stop = __pyx_t_1; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_2); + __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1166 - * should_skip = self.should_skip = 1 - * else: - * should_skip = self.should_skip = 0 # <<<<<<<<<<<<<< - * else: - * should_skip = self.should_skip + /* "_pydevd_bundle/pydevd_cython.pyx":1181 + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) + * if result: # <<<<<<<<<<<<<< + * should_stop, frame = result + * except: */ - /*else*/ { - __pyx_v_should_skip = 0; - __pyx_v_self->should_skip = 0; } - __pyx_L180:; - - /* "_pydevd_bundle/pydevd_cython.pyx":1158 - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: - * if self.should_skip == -1: # <<<<<<<<<<<<<< - * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). - * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code - */ - goto __pyx_L179; - } - /* "_pydevd_bundle/pydevd_cython.pyx":1168 - * should_skip = self.should_skip = 0 - * else: - * should_skip = self.should_skip # <<<<<<<<<<<<<< - * - * plugin_stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1179 + * exception_breakpoint = None + * try: + * if py_db.plugin is not None: # <<<<<<<<<<<<<< + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) + * if result: */ - /*else*/ { - __pyx_t_10 = __pyx_v_self->should_skip; - __pyx_v_should_skip = __pyx_t_10; } - __pyx_L179:; - /* "_pydevd_bundle/pydevd_cython.pyx":1157 - * try: - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< - * if self.should_skip == -1: - * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + /* "_pydevd_bundle/pydevd_cython.pyx":1178 + * should_stop = False + * exception_breakpoint = None + * try: # <<<<<<<<<<<<<< + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) */ } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L14_try_end; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1170 - * should_skip = self.should_skip + /* "_pydevd_bundle/pydevd_cython.pyx":1183 + * if result: + * should_stop, frame = result + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() * - * plugin_stop = False # <<<<<<<<<<<<<< - * if should_skip: - * stop = False */ - __Pyx_INCREF(Py_False); - __pyx_v_plugin_stop = Py_False; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1183, __pyx_L11_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":1171 - * - * plugin_stop = False - * if should_skip: # <<<<<<<<<<<<<< - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1184 + * should_stop, frame = result + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< * + * if not should_stop: */ - __pyx_t_9 = (__pyx_v_should_skip != 0); - if (__pyx_t_9) { + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1184, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1184, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_13, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1184, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L10_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1172 - * plugin_stop = False - * if should_skip: - * stop = False # <<<<<<<<<<<<<< - * - * elif step_cmd in (107, 144, 206): + /* "_pydevd_bundle/pydevd_cython.pyx":1178 + * should_stop = False + * exception_breakpoint = None + * try: # <<<<<<<<<<<<<< + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg) */ - __pyx_v_stop = 0; + __pyx_L11_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L10_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L14_try_end:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1171 - * - * plugin_stop = False - * if should_skip: # <<<<<<<<<<<<<< - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1186 + * pydev_log.exception() * + * if not should_stop: # <<<<<<<<<<<<<< + * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + * if exception == SystemExit and py_db.ignore_system_exit_code(value): */ - goto __pyx_L181; - } + __pyx_t_1 = (!__pyx_v_should_stop); + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1174 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1188 + * if not should_stop: + * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + * if exception == SystemExit and py_db.ignore_system_exit_code(value): # <<<<<<<<<<<<<< + * pass * - * elif step_cmd in (107, 144, 206): # <<<<<<<<<<<<<< - * force_check_project_scope = step_cmd == 144 - * if is_line: */ - switch (__pyx_v_step_cmd) { - case 0x6B: - case 0x90: - case 0xCE: - __pyx_t_9 = 1; - break; - default: - __pyx_t_9 = 0; - break; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_exception, __pyx_builtin_SystemExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L23_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_ignore_system_exit_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L23_bool_binop_done:; + if (__pyx_t_1) { + goto __pyx_L22; } - __pyx_t_11 = __pyx_t_9; - if (__pyx_t_11) { - /* "_pydevd_bundle/pydevd_cython.pyx":1175 + /* "_pydevd_bundle/pydevd_cython.pyx":1191 + * pass * - * elif step_cmd in (107, 144, 206): - * force_check_project_scope = step_cmd == 144 # <<<<<<<<<<<<<< - * if is_line: - * if not info.pydev_use_scoped_step_frame: + * elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): # <<<<<<<<<<<<<< + * # These exceptions are control-flow related (they work as a generator + * # pause), so, we shouldn't stop on them. */ - __pyx_t_6 = __Pyx_PyBool_FromLong((__pyx_v_step_cmd == 0x90)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_force_check_project_scope = __pyx_t_6; - __pyx_t_6 = 0; + __Pyx_INCREF(__pyx_v_exception); + __pyx_t_3 = __pyx_v_exception; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_GeneratorExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L25_bool_binop_done; + } + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_StopIteration, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L25_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_StopAsyncIteration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L25_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __pyx_t_1; + if (__pyx_t_7) { + goto __pyx_L22; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1176 - * elif step_cmd in (107, 144, 206): - * force_check_project_scope = step_cmd == 144 - * if is_line: # <<<<<<<<<<<<<< - * if not info.pydev_use_scoped_step_frame: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: + /* "_pydevd_bundle/pydevd_cython.pyx":1196 + * pass + * + * elif ignore_exception_trace(trace): # <<<<<<<<<<<<<< + * pass + * */ - if (__pyx_v_is_line) { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ignore_exception_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_trace}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + goto __pyx_L22; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1177 - * force_check_project_scope = step_cmd == 144 - * if is_line: - * if not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + /* "_pydevd_bundle/pydevd_cython.pyx":1200 + * + * else: + * was_just_raised = trace.tb_next is None # <<<<<<<<<<<<<< + * + * # It was not handled by any plugin, lets check exception breakpoints. */ - __pyx_t_11 = (!__pyx_v_info->pydev_use_scoped_step_frame); - if (__pyx_t_11) { + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = (__pyx_t_3 == Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_was_just_raised = __pyx_t_7; - /* "_pydevd_bundle/pydevd_cython.pyx":1178 - * if is_line: - * if not info.pydev_use_scoped_step_frame: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1203 + * + * # It was not handled by any plugin, lets check exception breakpoints. + * check_excs = [] # <<<<<<<<<<<<<< + * + * # Note: check user unhandled before regular exceptions. */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1178, __pyx_L172_error) - if (!__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L185_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1178, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1178, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __pyx_t_9; - __pyx_L185_bool_binop_done:; - if (__pyx_t_11) { + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_check_excs = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1179 - * if not info.pydev_use_scoped_step_frame: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) # <<<<<<<<<<<<<< - * else: - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1206 + * + * # Note: check user unhandled before regular exceptions. + * exc_break_user = py_db.get_exception_breakpoint( # <<<<<<<<<<<<<< + * exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1179, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_frame, __pyx_t_7, __pyx_v_force_check_project_scope}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1179, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_stop = (!__pyx_t_11); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); - /* "_pydevd_bundle/pydevd_cython.pyx":1178 - * if is_line: - * if not info.pydev_use_scoped_step_frame: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1207 + * # Note: check user unhandled before regular exceptions. + * exc_break_user = py_db.get_exception_breakpoint( + * exception, py_db.break_on_user_uncaught_exceptions) # <<<<<<<<<<<<<< + * if exc_break_user is not None: + * check_excs.append((exc_break_user, True)) */ - goto __pyx_L184; - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_exception, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_exc_break_user = __pyx_t_3; + __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1181 - * stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) - * else: - * stop = True # <<<<<<<<<<<<<< - * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: + /* "_pydevd_bundle/pydevd_cython.pyx":1208 + * exc_break_user = py_db.get_exception_breakpoint( + * exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_user, True)) + * */ - /*else*/ { - __pyx_v_stop = 1; - } - __pyx_L184:; + __pyx_t_7 = (__pyx_v_exc_break_user != Py_None); + if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1177 - * force_check_project_scope = step_cmd == 144 - * if is_line: - * if not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + /* "_pydevd_bundle/pydevd_cython.pyx":1209 + * exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: + * check_excs.append((exc_break_user, True)) # <<<<<<<<<<<<<< + * + * exc_break_caught = py_db.get_exception_breakpoint( */ - goto __pyx_L183; - } + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_exc_break_user); + __Pyx_GIVEREF(__pyx_v_exc_break_user); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_exc_break_user)) __PYX_ERR(0, 1209, __pyx_L1_error); + __Pyx_INCREF(Py_True); + __Pyx_GIVEREF(Py_True); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 1209, __pyx_L1_error); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_check_excs, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1183 - * stop = True - * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * # Make sure we check the filtering inside ipython calls too... - * if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + /* "_pydevd_bundle/pydevd_cython.pyx":1208 + * exc_break_user = py_db.get_exception_breakpoint( + * exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_user, True)) + * */ - /*else*/ { - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1183, __pyx_L172_error) - if (!__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L188_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1183, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1183, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __pyx_t_9; - __pyx_L188_bool_binop_done:; - if (__pyx_t_11) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":1185 - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * # Make sure we check the filtering inside ipython calls too... - * if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): # <<<<<<<<<<<<<< - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":1211 + * check_excs.append((exc_break_user, True)) * + * exc_break_caught = py_db.get_exception_breakpoint( # <<<<<<<<<<<<<< + * exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1185, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1185, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_frame, __pyx_t_8, __pyx_v_force_check_project_scope}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1185, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1185, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = (!(!__pyx_t_11)); - if (__pyx_t_9) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); - /* "_pydevd_bundle/pydevd_cython.pyx":1186 - * # Make sure we check the filtering inside ipython calls too... - * if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1212 * - * # We can only stop inside the ipython call. + * exc_break_caught = py_db.get_exception_breakpoint( + * exception, py_db.break_on_caught_exceptions) # <<<<<<<<<<<<<< + * if exc_break_caught is not None: + * check_excs.append((exc_break_caught, False)) */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_6 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __pyx_t_1; - __pyx_t_1 = 0; - } - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L176_try_return; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_exception, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_exc_break_caught = __pyx_t_3; + __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1185 - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * # Make sure we check the filtering inside ipython calls too... - * if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): # <<<<<<<<<<<<<< - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":1213 + * exc_break_caught = py_db.get_exception_breakpoint( + * exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_caught, False)) * */ - } + __pyx_t_7 = (__pyx_v_exc_break_caught != Py_None); + if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1183 - * stop = True - * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * # Make sure we check the filtering inside ipython calls too... - * if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + /* "_pydevd_bundle/pydevd_cython.pyx":1214 + * exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: + * check_excs.append((exc_break_caught, False)) # <<<<<<<<<<<<<< + * + * for exc_break, is_user_uncaught in check_excs: */ - } + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_exc_break_caught); + __Pyx_GIVEREF(__pyx_v_exc_break_caught); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_exc_break_caught)) __PYX_ERR(0, 1214, __pyx_L1_error); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 1214, __pyx_L1_error); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_check_excs, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1189 + /* "_pydevd_bundle/pydevd_cython.pyx":1213 + * exc_break_caught = py_db.get_exception_breakpoint( + * exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_caught, False)) * - * # We can only stop inside the ipython call. - * filename = frame.f_code.co_filename # <<<<<<<<<<<<<< - * if filename.endswith('.pyc'): - * filename = filename[:-1] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1189, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_filename = __pyx_t_1; - __pyx_t_1 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1190 - * # We can only stop inside the ipython call. - * filename = frame.f_code.co_filename - * if filename.endswith('.pyc'): # <<<<<<<<<<<<<< - * filename = filename[:-1] + /* "_pydevd_bundle/pydevd_cython.pyx":1216 + * check_excs.append((exc_break_caught, False)) * + * for exc_break, is_user_uncaught in check_excs: # <<<<<<<<<<<<<< + * # Initially mark that it should stop and then go into exclusions. + * should_stop = True */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1190, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } + __pyx_t_3 = __pyx_v_check_excs; __Pyx_INCREF(__pyx_t_3); + __pyx_t_15 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1216, __pyx_L1_error) #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_s_pyc}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_15 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 1216, __pyx_L1_error) + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1216, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1190, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_9) { + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); + index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L32_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_13); if (unlikely(!__pyx_t_5)) goto __pyx_L32_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L33_unpacking_done; + __pyx_L32_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_L33_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_exc_break, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_is_user_uncaught, __pyx_t_5); + __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1191 - * filename = frame.f_code.co_filename - * if filename.endswith('.pyc'): - * filename = filename[:-1] # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1218 + * for exc_break, is_user_uncaught in check_excs: + * # Initially mark that it should stop and then go into exclusions. + * should_stop = True # <<<<<<<<<<<<<< * - * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + * if py_db.exclude_exception_by_filter(exc_break, trace): */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, -1L, NULL, NULL, &__pyx_slice__5, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_v_should_stop = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":1190 - * # We can only stop inside the ipython call. - * filename = frame.f_code.co_filename - * if filename.endswith('.pyc'): # <<<<<<<<<<<<<< - * filename = filename[:-1] + /* "_pydevd_bundle/pydevd_cython.pyx":1220 + * should_stop = True * + * if py_db.exclude_exception_by_filter(exc_break, trace): # <<<<<<<<<<<<<< + * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) + * should_stop = False */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_exclude_exception_by_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_11 = 1; } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_exc_break, __pyx_v_trace}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1193 - * filename = filename[:-1] + /* "_pydevd_bundle/pydevd_cython.pyx":1221 + * + * if py_db.exclude_exception_by_filter(exc_break, trace): + * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) # <<<<<<<<<<<<<< + * should_stop = False * - * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): # <<<<<<<<<<<<<< - * f = frame.f_back - * while f is not None: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1193, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1193, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1193, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_10 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_exception); + __Pyx_GIVEREF(__pyx_v_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_exception)) __PYX_ERR(0, 1221, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_13); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_13)) __PYX_ERR(0, 1221, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_12)) __PYX_ERR(0, 1221, __pyx_L1_error); + __pyx_t_13 = 0; + __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_Ignore_exception_s_in_library_s, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_11 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1193, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = (!__pyx_t_9); - if (__pyx_t_11) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1194 + /* "_pydevd_bundle/pydevd_cython.pyx":1222 + * if py_db.exclude_exception_by_filter(exc_break, trace): + * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) + * should_stop = False # <<<<<<<<<<<<<< * - * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): - * f = frame.f_back # <<<<<<<<<<<<<< - * while f is not None: - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * elif exc_break.condition is not None and \ */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1195 - * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): - * f = frame.f_back - * while f is not None: # <<<<<<<<<<<<<< - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f2 = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":1220 + * should_stop = True + * + * if py_db.exclude_exception_by_filter(exc_break, trace): # <<<<<<<<<<<<<< + * pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) + * should_stop = False */ - while (1) { - __pyx_t_11 = (__pyx_v_f != Py_None); - if (!__pyx_t_11) break; + goto __pyx_L34; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1196 - * f = frame.f_back - * while f is not None: - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< - * f2 = f.f_back - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + /* "_pydevd_bundle/pydevd_cython.pyx":1224 + * should_stop = False + * + * elif exc_break.condition is not None and \ # <<<<<<<<<<<<<< + * not py_db.handle_breakpoint_condition(info, exc_break, frame): + * should_stop = False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1196, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1196, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1196, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_11) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_condition); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = (__pyx_t_2 != Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + } else { + __pyx_t_7 = __pyx_t_1; + goto __pyx_L35_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1197 - * while f is not None: - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f2 = f.f_back # <<<<<<<<<<<<<< - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: - * pydev_log.debug('Stop inside ipython call') + /* "_pydevd_bundle/pydevd_cython.pyx":1225 + * + * elif exc_break.condition is not None and \ + * not py_db.handle_breakpoint_condition(info, exc_break, frame): # <<<<<<<<<<<<<< + * should_stop = False + * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_f2, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_condition); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_12, ((PyObject *)__pyx_v_info), __pyx_v_exc_break, __pyx_v_frame}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_16 = (!__pyx_t_1); + __pyx_t_7 = __pyx_t_16; + __pyx_L35_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":1198 - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f2 = f.f_back - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< - * pydev_log.debug('Stop inside ipython call') - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1224 + * should_stop = False + * + * elif exc_break.condition is not None and \ # <<<<<<<<<<<<<< + * not py_db.handle_breakpoint_condition(info, exc_break, frame): + * should_stop = False */ - __pyx_t_9 = (__pyx_v_f2 != Py_None); - if (__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L197_bool_binop_done; - } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1198, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1198, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1198, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __pyx_t_9; - __pyx_L197_bool_binop_done:; - if (__pyx_t_11) { + if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1199 - * f2 = f.f_back - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: - * pydev_log.debug('Stop inside ipython call') # <<<<<<<<<<<<<< - * stop = True - * break + /* "_pydevd_bundle/pydevd_cython.pyx":1226 + * elif exc_break.condition is not None and \ + * not py_db.handle_breakpoint_condition(info, exc_break, frame): + * should_stop = False # <<<<<<<<<<<<<< + * + * elif is_user_uncaught: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1199, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1199, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Stop_inside_ipython_call}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1200 - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: - * pydev_log.debug('Stop inside ipython call') - * stop = True # <<<<<<<<<<<<<< - * break - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":1224 + * should_stop = False + * + * elif exc_break.condition is not None and \ # <<<<<<<<<<<<<< + * not py_db.handle_breakpoint_condition(info, exc_break, frame): + * should_stop = False */ - __pyx_v_stop = 1; + goto __pyx_L34; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1201 - * pydev_log.debug('Stop inside ipython call') - * stop = True - * break # <<<<<<<<<<<<<< - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":1228 + * should_stop = False * + * elif is_user_uncaught: # <<<<<<<<<<<<<< + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False */ - goto __pyx_L194_break; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_user_uncaught); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1228, __pyx_L1_error) + if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1198 - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: - * f2 = f.f_back - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< - * pydev_log.debug('Stop inside ipython call') - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1230 + * elif is_user_uncaught: + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False # <<<<<<<<<<<<<< + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): */ - } + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1196 - * f = frame.f_back - * while f is not None: - * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< - * f2 = f.f_back - * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + /* "_pydevd_bundle/pydevd_cython.pyx":1231 + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ # <<<<<<<<<<<<<< + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): + * # User uncaught means that we're currently in user code but the code */ - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_frame, __pyx_t_5, Py_True}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = (!__pyx_t_16); + if (__pyx_t_1) { + } else { + __pyx_t_7 = __pyx_t_1; + goto __pyx_L38_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1202 - * stop = True - * break - * f = f.f_back # <<<<<<<<<<<<<< - * - * del f - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); - __pyx_t_1 = 0; + /* "_pydevd_bundle/pydevd_cython.pyx":1232 + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): # <<<<<<<<<<<<<< + * # User uncaught means that we're currently in user code but the code + * # up the stack is library code. + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = (__pyx_t_2 == Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_1) { + } else { + __pyx_t_7 = __pyx_t_1; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_f_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; } - __pyx_L194_break:; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_t_5, __pyx_t_12, Py_True}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __pyx_t_1; + __pyx_L38_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":1204 - * f = f.f_back - * - * del f # <<<<<<<<<<<<<< - * - * if not stop: + /* "_pydevd_bundle/pydevd_cython.pyx":1231 + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ # <<<<<<<<<<<<<< + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): + * # User uncaught means that we're currently in user code but the code */ - __Pyx_DECREF(__pyx_v_f); __pyx_v_f = 0; + if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1193 - * filename = filename[:-1] - * - * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): # <<<<<<<<<<<<<< - * f = frame.f_back - * while f is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":1235 + * # User uncaught means that we're currently in user code but the code + * # up the stack is library code. + * exc_info = prev_user_uncaught_exc_info # <<<<<<<<<<<<<< + * if not exc_info: + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + */ + __Pyx_INCREF(__pyx_v_prev_user_uncaught_exc_info); + __Pyx_XDECREF_SET(__pyx_v_exc_info, __pyx_v_prev_user_uncaught_exc_info); + + /* "_pydevd_bundle/pydevd_cython.pyx":1236 + * # up the stack is library code. + * exc_info = prev_user_uncaught_exc_info + * if not exc_info: # <<<<<<<<<<<<<< + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + * else: */ - } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_exc_info); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_t_1 = (!__pyx_t_7); + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1206 - * del f - * - * if not stop: # <<<<<<<<<<<<<< - * # In scoped mode if step in didn't work in this context it won't work - * # afterwards anyways. + /* "_pydevd_bundle/pydevd_cython.pyx":1237 + * exc_info = prev_user_uncaught_exc_info + * if not exc_info: + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) # <<<<<<<<<<<<<< + * else: + * lines = exc_info[2] */ - __pyx_t_11 = (!__pyx_v_stop); - if (__pyx_t_11) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = PySet_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PySet_Add(__pyx_t_12, __pyx_t_4) < 0) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arg)) __PYX_ERR(0, 1237, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_12)) __PYX_ERR(0, 1237, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_12 = 0; + __Pyx_DECREF_SET(__pyx_v_exc_info, __pyx_t_4); + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1209 - * # In scoped mode if step in didn't work in this context it won't work - * # afterwards anyways. - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< - * - * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + /* "_pydevd_bundle/pydevd_cython.pyx":1236 + * # up the stack is library code. + * exc_info = prev_user_uncaught_exc_info + * if not exc_info: # <<<<<<<<<<<<<< + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + * else: */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_1 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1209, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __pyx_t_7; - __pyx_t_7 = 0; + goto __pyx_L41; } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L176_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1206 - * del f - * - * if not stop: # <<<<<<<<<<<<<< - * # In scoped mode if step in didn't work in this context it won't work - * # afterwards anyways. + /* "_pydevd_bundle/pydevd_cython.pyx":1239 + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + * else: + * lines = exc_info[2] # <<<<<<<<<<<<<< + * lines.add(frame.f_lineno) + * exc_info = (arg, frame.f_lineno, lines) */ - } - } - __pyx_L183:; + /*else*/ { + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_lines, __pyx_t_4); + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1176 - * elif step_cmd in (107, 144, 206): - * force_check_project_scope = step_cmd == 144 - * if is_line: # <<<<<<<<<<<<<< - * if not info.pydev_use_scoped_step_frame: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: + /* "_pydevd_bundle/pydevd_cython.pyx":1240 + * else: + * lines = exc_info[2] + * lines.add(frame.f_lineno) # <<<<<<<<<<<<<< + * exc_info = (arg, frame.f_lineno, lines) + * maybe_user_uncaught_exc_info = exc_info */ - goto __pyx_L182; - } + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_lines, __pyx_n_s_add); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1211 - * return None if is_call else NO_FTRACE - * - * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1241 + * lines = exc_info[2] + * lines.add(frame.f_lineno) + * exc_info = (arg, frame.f_lineno, lines) # <<<<<<<<<<<<<< + * maybe_user_uncaught_exc_info = exc_info + * else: */ - if (__pyx_v_is_return) { - } else { - __pyx_t_11 = __pyx_v_is_return; - goto __pyx_L200_bool_binop_done; - } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1211, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_9) { - } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L200_bool_binop_done; - } - __pyx_t_9 = (!__pyx_v_info->pydev_use_scoped_step_frame); - __pyx_t_11 = __pyx_t_9; - __pyx_L200_bool_binop_done:; - if (__pyx_t_11) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_arg)) __PYX_ERR(0, 1241, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_4)) __PYX_ERR(0, 1241, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_lines); + __Pyx_GIVEREF(__pyx_v_lines); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_lines)) __PYX_ERR(0, 1241, __pyx_L1_error); + __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_exc_info, __pyx_t_12); + __pyx_t_12 = 0; + } + __pyx_L41:; - /* "_pydevd_bundle/pydevd_cython.pyx":1212 - * - * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: # <<<<<<<<<<<<<< - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1242 + * lines.add(frame.f_lineno) + * exc_info = (arg, frame.f_lineno, lines) + * maybe_user_uncaught_exc_info = exc_info # <<<<<<<<<<<<<< * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1212, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1212, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1212, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1212, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1212, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_11) { + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_DECREF_SET(__pyx_v_maybe_user_uncaught_exc_info, __pyx_v_exc_info); - /* "_pydevd_bundle/pydevd_cython.pyx":1213 - * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - * stop = False # <<<<<<<<<<<<<< - * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: + /* "_pydevd_bundle/pydevd_cython.pyx":1231 + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ # <<<<<<<<<<<<<< + * and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): + * # User uncaught means that we're currently in user code but the code */ - __pyx_v_stop = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1212 + /* "_pydevd_bundle/pydevd_cython.pyx":1228 + * should_stop = False * - * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: # <<<<<<<<<<<<<< - * stop = False - * else: + * elif is_user_uncaught: # <<<<<<<<<<<<<< + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False */ - goto __pyx_L203; + goto __pyx_L34; } - /* "_pydevd_bundle/pydevd_cython.pyx":1215 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1245 * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) - * if stop: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised and not just_raised(trace.tb_next): + * # In this case we never stop if it was just raised, so, to know if it was the first we */ /*else*/ { - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1215, __pyx_L172_error) - if (!__pyx_t_9) { + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_notify_on_first_raise_only); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_7) { } else { - __pyx_t_11 = __pyx_t_9; - goto __pyx_L205_bool_binop_done; + __pyx_t_1 = __pyx_t_7; + goto __pyx_L43_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1215, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __pyx_t_9; - __pyx_L205_bool_binop_done:; - if (__pyx_t_11) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1216 - * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) # <<<<<<<<<<<<<< - * if stop: - * # Prevent stopping in a return to the same location we were initially - */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_1, __pyx_t_8, __pyx_v_force_check_project_scope}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1216, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_stop = (!__pyx_t_11); - /* "_pydevd_bundle/pydevd_cython.pyx":1217 - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) - * if stop: # <<<<<<<<<<<<<< - * # Prevent stopping in a return to the same location we were initially - * # (i.e.: double-stop at the same place due to some filtering). + /* "_pydevd_bundle/pydevd_cython.pyx":1246 + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ + * and not was_just_raised and not just_raised(trace.tb_next): # <<<<<<<<<<<<<< + * # In this case we never stop if it was just raised, so, to know if it was the first we + * # need to check if we're in the 2nd method. */ - if (__pyx_v_stop) { + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); - /* "_pydevd_bundle/pydevd_cython.pyx":1220 - * # Prevent stopping in a return to the same location we were initially - * # (i.e.: double-stop at the same place due to some filtering). - * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): # <<<<<<<<<<<<<< - * stop = False - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1245 + * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised and not just_raised(trace.tb_next): + * # In this case we never stop if it was just raised, so, to know if it was the first we */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1220, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1220, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1220, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)) __PYX_ERR(0, 1220, __pyx_L172_error); - __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L172_error); - __pyx_t_6 = 0; - __pyx_t_8 = 0; - __pyx_t_8 = PyObject_RichCompare(__pyx_v_info->step_in_initial_location, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1220, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_11) { + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L43_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1221 - * # (i.e.: double-stop at the same place due to some filtering). - * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): - * stop = False # <<<<<<<<<<<<<< - * else: - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1246 + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ + * and not was_just_raised and not just_raised(trace.tb_next): # <<<<<<<<<<<<<< + * # In this case we never stop if it was just raised, so, to know if it was the first we + * # need to check if we're in the 2nd method. */ - __pyx_v_stop = 0; + __pyx_t_7 = (!__pyx_v_was_just_raised); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L43_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; + __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_16 = (!__pyx_t_7); + __pyx_t_1 = __pyx_t_16; + __pyx_L43_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":1220 - * # Prevent stopping in a return to the same location we were initially - * # (i.e.: double-stop at the same place due to some filtering). - * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): # <<<<<<<<<<<<<< - * stop = False - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1245 + * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised and not just_raised(trace.tb_next): + * # In this case we never stop if it was just raised, so, to know if it was the first we */ - } + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1217 - * if force_check_project_scope or main_debugger.is_files_filter_enabled: - * stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) - * if stop: # <<<<<<<<<<<<<< - * # Prevent stopping in a return to the same location we were initially - * # (i.e.: double-stop at the same place due to some filtering). + /* "_pydevd_bundle/pydevd_cython.pyx":1249 + * # In this case we never stop if it was just raised, so, to know if it was the first we + * # need to check if we're in the 2nd method. + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception # <<<<<<<<<<<<<< + * + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ */ - } + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1215 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1245 * else: - * if force_check_project_scope or main_debugger.is_files_filter_enabled: # <<<<<<<<<<<<<< - * stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) - * if stop: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised and not just_raised(trace.tb_next): + * # In this case we never stop if it was just raised, so, to know if it was the first we */ - goto __pyx_L204; + goto __pyx_L42; } - /* "_pydevd_bundle/pydevd_cython.pyx":1223 - * stop = False - * else: - * stop = True # <<<<<<<<<<<<<< - * else: - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1251 + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + * + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised: + * should_stop = False # I.e.: we stop only when it was just raised */ - /*else*/ { - __pyx_v_stop = 1; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_notify_on_first_raise_only); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_16) { + } else { + __pyx_t_1 = __pyx_t_16; + goto __pyx_L47_bool_binop_done; } - __pyx_L204:; - } - __pyx_L203:; - /* "_pydevd_bundle/pydevd_cython.pyx":1211 - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":1252 * - * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - * stop = False - */ - goto __pyx_L182; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":1225 - * stop = True - * else: - * stop = False # <<<<<<<<<<<<<< + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ + * and not was_just_raised: # <<<<<<<<<<<<<< + * should_stop = False # I.e.: we stop only when it was just raised * - * if stop: */ - /*else*/ { - __pyx_v_stop = 0; - } - __pyx_L182:; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); - /* "_pydevd_bundle/pydevd_cython.pyx":1227 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1251 + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception * - * if stop: # <<<<<<<<<<<<<< - * if step_cmd == 206: - * # i.e.: Check if we're stepping into the proper context. + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised: + * should_stop = False # I.e.: we stop only when it was just raised */ - if (__pyx_v_stop) { + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_7 = (!__pyx_t_16); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L47_bool_binop_done; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1228 + /* "_pydevd_bundle/pydevd_cython.pyx":1252 + * + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ + * and not was_just_raised: # <<<<<<<<<<<<<< + * should_stop = False # I.e.: we stop only when it was just raised * - * if stop: - * if step_cmd == 206: # <<<<<<<<<<<<<< - * # i.e.: Check if we're stepping into the proper context. - * f = frame */ - __pyx_t_11 = (__pyx_v_step_cmd == 0xCE); - if (__pyx_t_11) { + __pyx_t_7 = (!__pyx_v_was_just_raised); + __pyx_t_1 = __pyx_t_7; + __pyx_L47_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":1230 - * if step_cmd == 206: - * # i.e.: Check if we're stepping into the proper context. - * f = frame # <<<<<<<<<<<<<< - * while f is not None: - * if self._is_same_frame(stop_frame, f): + /* "_pydevd_bundle/pydevd_cython.pyx":1251 + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + * + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised: + * should_stop = False # I.e.: we stop only when it was just raised */ - __Pyx_INCREF(__pyx_v_frame); - __Pyx_XDECREF_SET(__pyx_v_f, __pyx_v_frame); + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1231 - * # i.e.: Check if we're stepping into the proper context. - * f = frame - * while f is not None: # <<<<<<<<<<<<<< - * if self._is_same_frame(stop_frame, f): - * break + /* "_pydevd_bundle/pydevd_cython.pyx":1253 + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ + * and not was_just_raised: + * should_stop = False # I.e.: we stop only when it was just raised # <<<<<<<<<<<<<< + * + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: */ - while (1) { - __pyx_t_11 = (__pyx_v_f != Py_None); - if (!__pyx_t_11) break; + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1232 - * f = frame - * while f is not None: - * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< - * break - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":1251 + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + * + * elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ # <<<<<<<<<<<<<< + * and not was_just_raised: + * should_stop = False # I.e.: we stop only when it was just raised */ - __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_f); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1232, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1232, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_11) { + goto __pyx_L42; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1233 - * while f is not None: - * if self._is_same_frame(stop_frame, f): - * break # <<<<<<<<<<<<<< - * f = f.f_back - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1255 + * should_stop = False # I.e.: we stop only when it was just raised + * + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: # <<<<<<<<<<<<<< + * # Option: Don't break if an exception is caught in the same function from which it is thrown + * should_stop = False */ - goto __pyx_L212_break; + if (__pyx_v_was_just_raised) { + } else { + __pyx_t_1 = __pyx_v_was_just_raised; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L50_bool_binop_done:; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1232 - * f = frame - * while f is not None: - * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< - * break - * f = f.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":1257 + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + * # Option: Don't break if an exception is caught in the same function from which it is thrown + * should_stop = False # <<<<<<<<<<<<<< + * + * if should_stop: */ - } + __pyx_v_should_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1234 - * if self._is_same_frame(stop_frame, f): - * break - * f = f.f_back # <<<<<<<<<<<<<< - * else: - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1255 + * should_stop = False # I.e.: we stop only when it was just raised + * + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: # <<<<<<<<<<<<<< + * # Option: Don't break if an exception is caught in the same function from which it is thrown + * should_stop = False */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1234, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_8); - __pyx_t_8 = 0; } + __pyx_L42:; + } + __pyx_L34:; - /* "_pydevd_bundle/pydevd_cython.pyx":1236 - * f = f.f_back - * else: - * stop = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1259 + * should_stop = False * - * if plugin_manager is not None: + * if should_stop: # <<<<<<<<<<<<<< + * exception_breakpoint = exc_break + * try: */ - /*else*/ { - __pyx_v_stop = 0; - } - __pyx_L212_break:; + if (__pyx_v_should_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":1228 + /* "_pydevd_bundle/pydevd_cython.pyx":1260 * - * if stop: - * if step_cmd == 206: # <<<<<<<<<<<<<< - * # i.e.: Check if we're stepping into the proper context. - * f = frame + * if should_stop: + * exception_breakpoint = exc_break # <<<<<<<<<<<<<< + * try: + * info.pydev_message = exc_break.qname */ - } + __Pyx_INCREF(__pyx_v_exc_break); + __Pyx_DECREF_SET(__pyx_v_exception_breakpoint, __pyx_v_exc_break); - /* "_pydevd_bundle/pydevd_cython.pyx":1227 - * stop = False - * - * if stop: # <<<<<<<<<<<<<< - * if step_cmd == 206: - * # i.e.: Check if we're stepping into the proper context. + /* "_pydevd_bundle/pydevd_cython.pyx":1261 + * if should_stop: + * exception_breakpoint = exc_break + * try: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname + * except: */ - } + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1238 - * stop = False - * - * if plugin_manager is not None: # <<<<<<<<<<<<<< - * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) - * if result: + /* "_pydevd_bundle/pydevd_cython.pyx":1262 + * exception_breakpoint = exc_break + * try: + * info.pydev_message = exc_break.qname # <<<<<<<<<<<<<< + * except: + * info.pydev_message = exc_break.qname.encode('utf-8') */ - __pyx_t_11 = (__pyx_v_plugin_manager != Py_None); - if (__pyx_t_11) { + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_qname); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1262, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_12); + if (!(likely(PyString_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_12))) __PYX_ERR(0, 1262, __pyx_L53_error) + __Pyx_GIVEREF(__pyx_t_12); + __Pyx_GOTREF(__pyx_v_info->pydev_message); + __Pyx_DECREF(__pyx_v_info->pydev_message); + __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_12); + __pyx_t_12 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1261 + * if should_stop: + * exception_breakpoint = exc_break + * try: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname + * except: + */ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L60_try_end; + __pyx_L53_error:; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1263 + * try: + * info.pydev_message = exc_break.qname + * except: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname.encode('utf-8') + * break + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1263, __pyx_L55_except_error) + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); - /* "_pydevd_bundle/pydevd_cython.pyx":1239 + /* "_pydevd_bundle/pydevd_cython.pyx":1264 + * info.pydev_message = exc_break.qname + * except: + * info.pydev_message = exc_break.qname.encode('utf-8') # <<<<<<<<<<<<<< + * break * - * if plugin_manager is not None: - * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) # <<<<<<<<<<<<<< - * if result: - * stop, plugin_stop = result */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_into); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1239, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_stop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1239, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[7] = {__pyx_t_1, __pyx_v_main_debugger, __pyx_v_frame, __pyx_v_event, __pyx_v_self->_args, __pyx_v_stop_info, __pyx_t_6}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 6+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1239, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_8); - __pyx_t_8 = 0; + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_qname); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1264, __pyx_L55_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1264, __pyx_L55_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_17))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_17); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_17, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_kp_s_utf_8}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1264, __pyx_L55_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 1264, __pyx_L55_except_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_info->pydev_message); + __Pyx_DECREF(__pyx_v_info->pydev_message); + __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L54_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1240 - * if plugin_manager is not None: - * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) - * if result: # <<<<<<<<<<<<<< - * stop, plugin_stop = result - * + /* "_pydevd_bundle/pydevd_cython.pyx":1261 + * if should_stop: + * exception_breakpoint = exc_break + * try: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname + * except: */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1240, __pyx_L172_error) - if (__pyx_t_11) { + __pyx_L55_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L54_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __pyx_L60_try_end:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1241 - * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) - * if result: - * stop, plugin_stop = result # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1265 + * except: + * info.pydev_message = exc_break.qname.encode('utf-8') + * break # <<<<<<<<<<<<<< * - * elif step_cmd in (108, 159): + * if should_stop: */ - if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { - PyObject* sequence = __pyx_v_result; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1241, __pyx_L172_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_8 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1241, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1241, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - #endif - } else { - Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); - index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L216_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - index = 1; __pyx_t_7 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L216_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1241, __pyx_L172_error) - __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L217_unpacking_done; - __pyx_L216_unpacking_failed:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_14 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1241, __pyx_L172_error) - __pyx_L217_unpacking_done:; - } - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1241, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_stop = __pyx_t_11; - __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_7); - __pyx_t_7 = 0; + goto __pyx_L31_break; - /* "_pydevd_bundle/pydevd_cython.pyx":1240 - * if plugin_manager is not None: - * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) - * if result: # <<<<<<<<<<<<<< - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1259 + * should_stop = False * + * if should_stop: # <<<<<<<<<<<<<< + * exception_breakpoint = exc_break + * try: */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1238 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1216 + * check_excs.append((exc_break_caught, False)) * - * if plugin_manager is not None: # <<<<<<<<<<<<<< - * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) - * if result: + * for exc_break, is_user_uncaught in check_excs: # <<<<<<<<<<<<<< + * # Initially mark that it should stop and then go into exclusions. + * should_stop = True */ } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L63_for_end; + __pyx_L31_break:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L63_for_end; + __pyx_L63_for_end:; + } + __pyx_L22:; - /* "_pydevd_bundle/pydevd_cython.pyx":1174 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1186 + * pydev_log.exception() * - * elif step_cmd in (107, 144, 206): # <<<<<<<<<<<<<< - * force_check_project_scope = step_cmd == 144 - * if is_line: + * if not should_stop: # <<<<<<<<<<<<<< + * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + * if exception == SystemExit and py_db.ignore_system_exit_code(value): */ - goto __pyx_L181; - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":1243 - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1267 + * break * - * elif step_cmd in (108, 159): # <<<<<<<<<<<<<< - * # Note: when dealing with a step over my code it's the same as a step over (the - * # difference is that when we return from a frame in one we go to regular step + * if should_stop: # <<<<<<<<<<<<<< + * # Always add exception to frame (must remove later after we proceed). + * add_exception_to_frame(frame, (exception, value, trace)) */ - switch (__pyx_v_step_cmd) { - case 0x6C: - case 0x9F: - __pyx_t_11 = 1; - break; - default: - __pyx_t_11 = 0; - break; - } - __pyx_t_9 = __pyx_t_11; - if (__pyx_t_9) { + if (__pyx_v_should_stop) { - /* "_pydevd_bundle/pydevd_cython.pyx":1247 - * # difference is that when we return from a frame in one we go to regular step - * # into and in the other we go to a step into my code). - * stop = self._is_same_frame(stop_frame, frame) and is_line # <<<<<<<<<<<<<< - * # Note: don't stop on a return for step over, only for line events - * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + /* "_pydevd_bundle/pydevd_cython.pyx":1269 + * if should_stop: + * # Always add exception to frame (must remove later after we proceed). + * add_exception_to_frame(frame, (exception, value, trace)) # <<<<<<<<<<<<<< + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: */ - __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1247, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L218_bool_binop_done; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_exception); + __Pyx_GIVEREF(__pyx_v_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_exception)) __PYX_ERR(0, 1269, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value)) __PYX_ERR(0, 1269, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_trace); + __Pyx_GIVEREF(__pyx_v_trace); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_trace)) __PYX_ERR(0, 1269, __pyx_L1_error); + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; } - __pyx_t_9 = __pyx_v_is_line; - __pyx_L218_bool_binop_done:; - __pyx_v_stop = __pyx_t_9; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_frame, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1251 - * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + /* "_pydevd_bundle/pydevd_cython.pyx":1271 + * add_exception_to_frame(frame, (exception, value, trace)) + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) * - * if plugin_manager is not None: # <<<<<<<<<<<<<< - * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) - * if result: */ - __pyx_t_9 = (__pyx_v_plugin_manager != Py_None); - if (__pyx_t_9) { + __pyx_t_7 = (__pyx_v_exception_breakpoint != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L66_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = (__pyx_t_3 != Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L66_bool_binop_done:; + if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1252 + /* "_pydevd_bundle/pydevd_cython.pyx":1272 * - * if plugin_manager is not None: - * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) # <<<<<<<<<<<<<< - * if result: - * stop, plugin_stop = result + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) # <<<<<<<<<<<<<< + * + * return should_stop, frame, maybe_user_uncaught_exc_info */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_over); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1252, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_stop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1252, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[7] = {__pyx_t_1, __pyx_v_main_debugger, __pyx_v_frame, __pyx_v_event, __pyx_v_self->_args, __pyx_v_stop_info, __pyx_t_6}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 6+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; } - __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_7); - __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_exception_breakpoint, ((PyObject *)__pyx_v_info), __pyx_v_frame}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1253 - * if plugin_manager is not None: - * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) - * if result: # <<<<<<<<<<<<<< - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1271 + * add_exception_to_frame(frame, (exception, value, trace)) + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) * */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1253, __pyx_L172_error) - if (__pyx_t_9) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":1254 - * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) - * if result: - * stop, plugin_stop = result # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1267 + * break * - * elif step_cmd == 128: + * if should_stop: # <<<<<<<<<<<<<< + * # Always add exception to frame (must remove later after we proceed). + * add_exception_to_frame(frame, (exception, value, trace)) */ - if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { - PyObject* sequence = __pyx_v_result; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1254, __pyx_L172_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_7 = PyList_GET_ITEM(sequence, 0); - __pyx_t_8 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1254, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - } else { - Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1254, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); - index = 0; __pyx_t_7 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L222_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L222_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1254, __pyx_L172_error) - __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L223_unpacking_done; - __pyx_L222_unpacking_failed:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_14 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1254, __pyx_L172_error) - __pyx_L223_unpacking_done:; - } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_stop = __pyx_t_9; - __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_8); - __pyx_t_8 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1253 - * if plugin_manager is not None: - * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) - * if result: # <<<<<<<<<<<<<< - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1173 + * exception, value, trace = arg + * + * if trace is not None and hasattr(trace, 'tb_next'): # <<<<<<<<<<<<<< + * # on jython trace is None on the first event and it may not have a tb_next. * */ - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":1251 - * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + /* "_pydevd_bundle/pydevd_cython.pyx":1170 + * + * # 2 = 2 + * if info.pydev_state != 2: # and breakpoint is not None: # <<<<<<<<<<<<<< + * exception, value, trace = arg * - * if plugin_manager is not None: # <<<<<<<<<<<<<< - * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) - * if result: */ - } + } - /* "_pydevd_bundle/pydevd_cython.pyx":1243 - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1274 + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + * + * return should_stop, frame, maybe_user_uncaught_exc_info # <<<<<<<<<<<<<< + * * - * elif step_cmd in (108, 159): # <<<<<<<<<<<<<< - * # Note: when dealing with a step over my code it's the same as a step over (the - * # difference is that when we return from a frame in one we go to regular step */ - goto __pyx_L181; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_should_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_frame); + __Pyx_GIVEREF(__pyx_v_frame); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_frame)) __PYX_ERR(0, 1274, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_maybe_user_uncaught_exc_info); + __Pyx_GIVEREF(__pyx_v_maybe_user_uncaught_exc_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_maybe_user_uncaught_exc_info)) __PYX_ERR(0, 1274, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1256 - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1158 * - * elif step_cmd == 128: # <<<<<<<<<<<<<< - * stop = False - * back = frame.f_back + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; */ - __pyx_t_9 = (__pyx_v_step_cmd == 0x80); - if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1257 + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_check_excs); + __Pyx_XDECREF(__pyx_v_maybe_user_uncaught_exc_info); + __Pyx_XDECREF(__pyx_v_exception); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_trace); + __Pyx_XDECREF(__pyx_v_exception_breakpoint); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exc_break_user); + __Pyx_XDECREF(__pyx_v_exc_break_caught); + __Pyx_XDECREF(__pyx_v_exc_break); + __Pyx_XDECREF(__pyx_v_is_user_uncaught); + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XDECREF(__pyx_v_lines); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1284 * - * elif step_cmd == 128: - * stop = False # <<<<<<<<<<<<<< - * back = frame.f_back - * if self._is_same_frame(stop_frame, frame) and is_return: + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; */ - __pyx_v_stop = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1258 - * elif step_cmd == 128: - * stop = False - * back = frame.f_back # <<<<<<<<<<<<<< - * if self._is_same_frame(stop_frame, frame) and is_return: - * # We're exiting the smart step into initial frame (so, we probably didn't find our target). - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1258, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_v_back = __pyx_t_8; - __pyx_t_8 = 0; +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9handle_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9handle_exception = {"handle_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9handle_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9handle_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_thread = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_arg = 0; + PyObject *__pyx_v_exception_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_thread,&__pyx_n_s_frame,&__pyx_n_s_arg,&__pyx_n_s_exception_type,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 1); __PYX_ERR(0, 1284, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 2); __PYX_ERR(0, 1284, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 3); __PYX_ERR(0, 1284, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 4); __PYX_ERR(0, 1284, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_exception") < 0)) __PYX_ERR(0, 1284, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + } + __pyx_v_py_db = values[0]; + __pyx_v_thread = values[1]; + __pyx_v_frame = values[2]; + __pyx_v_arg = values[3]; + __pyx_v_exception_type = ((PyObject*)values[4]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1284, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exception_type), (&PyString_Type), 1, "exception_type", 1))) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_8handle_exception(__pyx_self, __pyx_v_py_db, __pyx_v_thread, __pyx_v_frame, __pyx_v_arg, __pyx_v_exception_type); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8handle_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_thread, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg, PyObject *__pyx_v_exception_type) { + int __pyx_v_stopped; + PyObject *__pyx_v_abs_real_path_and_base = 0; + PyObject *__pyx_v_absolute_filename = 0; + PyObject *__pyx_v_canonical_normalized_filename = 0; + PyObject *__pyx_v_lines_ignored = 0; + PyObject *__pyx_v_frame_id_to_frame = 0; + PyObject *__pyx_v_merged = 0; + PyObject *__pyx_v_trace_obj = 0; + PyObject *__pyx_v_initial_trace_obj = NULL; + PyObject *__pyx_v_check_trace_obj = NULL; + PyObject *__pyx_v_curr_stat = NULL; + PyObject *__pyx_v_last_stat = NULL; + PyObject *__pyx_v_from_user_input = NULL; + PyObject *__pyx_v_exc_lineno = NULL; + PyObject *__pyx_v_line = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + char const *__pyx_t_17; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + int __pyx_t_24; + char const *__pyx_t_25; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_exception", 0); + __Pyx_INCREF(__pyx_v_py_db); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_INCREF(__pyx_v_frame); - /* "_pydevd_bundle/pydevd_cython.pyx":1259 - * stop = False - * back = frame.f_back - * if self._is_same_frame(stop_frame, frame) and is_return: # <<<<<<<<<<<<<< - * # We're exiting the smart step into initial frame (so, we probably didn't find our target). - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1296 + * # def handle_exception(py_db, thread, frame, arg, exception_type): + * # ENDIF + * stopped = False # <<<<<<<<<<<<<< + * try: + * # print('handle_exception', frame.f_lineno, frame.f_code.co_name) */ - __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1259, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1259, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L225_bool_binop_done; - } - __pyx_t_9 = __pyx_v_is_return; - __pyx_L225_bool_binop_done:; - if (__pyx_t_9) { + __pyx_v_stopped = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1261 - * if self._is_same_frame(stop_frame, frame) and is_return: - * # We're exiting the smart step into initial frame (so, we probably didn't find our target). - * stop = True # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1297 + * # ENDIF + * stopped = False + * try: # <<<<<<<<<<<<<< + * # print('handle_exception', frame.f_lineno, frame.f_code.co_name) * - * elif self._is_same_frame(stop_frame, back) and is_line: - */ - __pyx_v_stop = 1; - - /* "_pydevd_bundle/pydevd_cython.pyx":1259 - * stop = False - * back = frame.f_back - * if self._is_same_frame(stop_frame, frame) and is_return: # <<<<<<<<<<<<<< - * # We're exiting the smart step into initial frame (so, we probably didn't find our target). - * stop = True */ - goto __pyx_L224; - } + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1263 - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1301 * - * elif self._is_same_frame(stop_frame, back) and is_line: # <<<<<<<<<<<<<< - * if info.pydev_smart_child_offset != -1: - * # i.e.: in this case, we're not interested in the pause in the parent, rather - */ - __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1263, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L227_bool_binop_done; - } - __pyx_t_9 = __pyx_v_is_line; - __pyx_L227_bool_binop_done:; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1264 + * # We have 3 things in arg: exception type, description, traceback object + * trace_obj = arg[2] # <<<<<<<<<<<<<< * - * elif self._is_same_frame(stop_frame, back) and is_line: - * if info.pydev_smart_child_offset != -1: # <<<<<<<<<<<<<< - * # i.e.: in this case, we're not interested in the pause in the parent, rather - * # we're interested in the pause in the child (when the parent is at the proper place). + * initial_trace_obj = trace_obj */ - __pyx_t_9 = (__pyx_v_info->pydev_smart_child_offset != -1L); - if (__pyx_t_9) { + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_arg, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_trace_obj = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1267 - * # i.e.: in this case, we're not interested in the pause in the parent, rather - * # we're interested in the pause in the child (when the parent is at the proper place). - * stop = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1303 + * trace_obj = arg[2] * - * else: + * initial_trace_obj = trace_obj # <<<<<<<<<<<<<< + * if trace_obj.tb_next is None and trace_obj.tb_frame is frame: + * # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). */ - __pyx_v_stop = 0; + __Pyx_INCREF(__pyx_v_trace_obj); + __pyx_v_initial_trace_obj = __pyx_v_trace_obj; - /* "_pydevd_bundle/pydevd_cython.pyx":1264 + /* "_pydevd_bundle/pydevd_cython.pyx":1304 * - * elif self._is_same_frame(stop_frame, back) and is_line: - * if info.pydev_smart_child_offset != -1: # <<<<<<<<<<<<<< - * # i.e.: in this case, we're not interested in the pause in the parent, rather - * # we're interested in the pause in the child (when the parent is at the proper place). + * initial_trace_obj = trace_obj + * if trace_obj.tb_next is None and trace_obj.tb_frame is frame: # <<<<<<<<<<<<<< + * # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + * pass */ - goto __pyx_L229; - } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_t_1 == Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_t_1 == __pyx_v_frame); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_L7_bool_binop_done:; + if (__pyx_t_2) { + goto __pyx_L6; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1270 - * - * else: - * pydev_smart_parent_offset = info.pydev_smart_parent_offset # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1309 + * else: + * # Get the trace_obj from where the exception was raised... + * while trace_obj.tb_next is not None: # <<<<<<<<<<<<<< + * trace_obj = trace_obj.tb_next * - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants */ - /*else*/ { - __pyx_t_10 = __pyx_v_info->pydev_smart_parent_offset; - __pyx_v_pydev_smart_parent_offset = __pyx_t_10; + /*else*/ { + while (1) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_2) break; - /* "_pydevd_bundle/pydevd_cython.pyx":1272 - * pydev_smart_parent_offset = info.pydev_smart_parent_offset + /* "_pydevd_bundle/pydevd_cython.pyx":1310 + * # Get the trace_obj from where the exception was raised... + * while trace_obj.tb_next is not None: + * trace_obj = trace_obj.tb_next # <<<<<<<<<<<<<< * - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants # <<<<<<<<<<<<<< - * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: - * # Preferred mode (when the smart step into variants are available + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: */ - __pyx_t_8 = __pyx_v_info->pydev_smart_step_into_variants; - __Pyx_INCREF(__pyx_t_8); - __pyx_v_pydev_smart_step_into_variants = ((PyObject*)__pyx_t_8); - __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_trace_obj, __pyx_t_1); + __pyx_t_1 = 0; + } + } + __pyx_L6:; - /* "_pydevd_bundle/pydevd_cython.pyx":1273 + /* "_pydevd_bundle/pydevd_cython.pyx":1312 + * trace_obj = trace_obj.tb_next * - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants - * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< - * # Preferred mode (when the smart step into variants are available - * # and the offset is set). + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: # <<<<<<<<<<<<<< + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) */ - __pyx_t_11 = (__pyx_v_pydev_smart_parent_offset >= 0); - if (__pyx_t_11) { - } else { - __pyx_t_9 = __pyx_t_11; - goto __pyx_L231_bool_binop_done; - } - __pyx_t_11 = (__pyx_v_pydev_smart_step_into_variants != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_pydev_smart_step_into_variants) != 0); - __pyx_t_9 = __pyx_t_11; - __pyx_L231_bool_binop_done:; - if (__pyx_t_9) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_ignore_exceptions_thrown_in_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1312, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1276 - * # Preferred mode (when the smart step into variants are available - * # and the offset is set). - * stop = get_smart_step_into_variant_from_frame_offset(back.f_lasti, pydev_smart_step_into_variants) is \ # <<<<<<<<<<<<<< - * get_smart_step_into_variant_from_frame_offset(pydev_smart_parent_offset, pydev_smart_step_into_variants) + /* "_pydevd_bundle/pydevd_cython.pyx":1313 * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * for check_trace_obj in (initial_trace_obj, trace_obj): # <<<<<<<<<<<<<< + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_lasti); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1276, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_6, __pyx_v_pydev_smart_step_into_variants}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1276, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_initial_trace_obj); + __Pyx_GIVEREF(__pyx_v_initial_trace_obj); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_initial_trace_obj)) __PYX_ERR(0, 1313, __pyx_L4_error); + __Pyx_INCREF(__pyx_v_trace_obj); + __Pyx_GIVEREF(__pyx_v_trace_obj); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_trace_obj)) __PYX_ERR(0, 1313, __pyx_L4_error); + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_5 >= 2) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1313, __pyx_L4_error) + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, __pyx_t_1); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1277 - * # and the offset is set). - * stop = get_smart_step_into_variant_from_frame_offset(back.f_lasti, pydev_smart_step_into_variants) is \ - * get_smart_step_into_variant_from_frame_offset(pydev_smart_parent_offset, pydev_smart_step_into_variants) # <<<<<<<<<<<<<< - * - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1314 + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) # <<<<<<<<<<<<<< + * absolute_filename = abs_real_path_and_base[0] + * canonical_normalized_filename = abs_real_path_and_base[1] */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_parent_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_1, __pyx_v_pydev_smart_step_into_variants}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1277, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_9 = (__pyx_t_8 == __pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_stop = __pyx_t_9; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1314, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1314, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_abs_real_path_and_base, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1273 + /* "_pydevd_bundle/pydevd_cython.pyx":1315 + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] # <<<<<<<<<<<<<< + * canonical_normalized_filename = abs_real_path_and_base[1] * - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants - * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< - * # Preferred mode (when the smart step into variants are available - * # and the offset is set). */ - goto __pyx_L230; - } + if (unlikely(__pyx_v_abs_real_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1315, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_real_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1315, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_absolute_filename, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1281 - * else: - * # Only the name/line is available, so, check that. - * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1316 + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] + * canonical_normalized_filename = abs_real_path_and_base[1] # <<<<<<<<<<<<<< * - * # global context is set with an empty name + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) */ - /*else*/ { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1281, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1281, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 1281, __pyx_L172_error) - __Pyx_XDECREF_SET(__pyx_v_curr_func_name, ((PyObject*)__pyx_t_8)); - __pyx_t_8 = 0; + if (unlikely(__pyx_v_abs_real_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1316, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1316, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_canonical_normalized_filename, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1284 + /* "_pydevd_bundle/pydevd_cython.pyx":1318 + * canonical_normalized_filename = abs_real_path_and_base[1] * - * # global context is set with an empty name - * if curr_func_name in ('?', '') or curr_func_name is None: # <<<<<<<<<<<<<< - * curr_func_name = '' - * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: - */ - __Pyx_INCREF(__pyx_v_curr_func_name); - __pyx_t_21 = __pyx_v_curr_func_name; - __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s__3, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1284, __pyx_L172_error) - if (!__pyx_t_15) { - } else { - __pyx_t_11 = __pyx_t_15; - goto __pyx_L236_bool_binop_done; - } - __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_t_21, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1284, __pyx_L172_error) - __pyx_t_11 = __pyx_t_15; - __pyx_L236_bool_binop_done:; - __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; - __pyx_t_15 = __pyx_t_11; - if (!__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L234_bool_binop_done; - } - __pyx_t_15 = (__pyx_v_curr_func_name == ((PyObject*)Py_None)); - __pyx_t_9 = __pyx_t_15; - __pyx_L234_bool_binop_done:; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1285 - * # global context is set with an empty name - * if curr_func_name in ('?', '') or curr_func_name is None: - * curr_func_name = '' # <<<<<<<<<<<<<< - * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: - * stop = True + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) # <<<<<<<<<<<<<< + * if lines_ignored is None: + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} */ - __Pyx_INCREF(__pyx_kp_s_); - __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1318, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_canonical_normalized_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 1318, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_lines_ignored, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1284 + /* "_pydevd_bundle/pydevd_cython.pyx":1319 * - * # global context is set with an empty name - * if curr_func_name in ('?', '') or curr_func_name is None: # <<<<<<<<<<<<<< - * curr_func_name = '' - * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: - */ - } - - /* "_pydevd_bundle/pydevd_cython.pyx":1286 - * if curr_func_name in ('?', '') or curr_func_name is None: - * curr_func_name = '' - * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: # <<<<<<<<<<<<<< - * stop = True + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if lines_ignored is None: # <<<<<<<<<<<<<< + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} * */ - __pyx_t_15 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1286, __pyx_L172_error) - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L239_bool_binop_done; - } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stop_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1286, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_next_line); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1286, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __pyx_t_15; - __pyx_L239_bool_binop_done:; - if (__pyx_t_9) { + __pyx_t_2 = (__pyx_v_lines_ignored == ((PyObject*)Py_None)); + if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1287 - * curr_func_name = '' - * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: - * stop = True # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1320 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if lines_ignored is None: + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} # <<<<<<<<<<<<<< * - * if not stop: + * try: */ - __pyx_v_stop = 1; + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_lines_ignored, __pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1320, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely((PyObject_SetItem(__pyx_t_7, __pyx_v_canonical_normalized_filename, __pyx_t_1) < 0))) __PYX_ERR(0, 1320, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1286 - * if curr_func_name in ('?', '') or curr_func_name is None: - * curr_func_name = '' - * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: # <<<<<<<<<<<<<< - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1319 * - */ - } - } - __pyx_L230:; - } - __pyx_L229:; - - /* "_pydevd_bundle/pydevd_cython.pyx":1289 - * stop = True + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if lines_ignored is None: # <<<<<<<<<<<<<< + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} * - * if not stop: # <<<<<<<<<<<<<< - * # In smart step into, if we didn't hit it in this frame once, that'll - * # not be the case next time either, so, disable tracing for this frame. */ - __pyx_t_9 = (!__pyx_v_stop); - if (__pyx_t_9) { + } - /* "_pydevd_bundle/pydevd_cython.pyx":1292 - * # In smart step into, if we didn't hit it in this frame once, that'll - * # not be the case next time either, so, disable tracing for this frame. - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1322 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} * - * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: + * try: # <<<<<<<<<<<<<< + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_6 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1292, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __pyx_t_7; - __pyx_t_7 = 0; - } - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L176_try_return; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1289 - * stop = True + /* "_pydevd_bundle/pydevd_cython.pyx":1323 * - * if not stop: # <<<<<<<<<<<<<< - * # In smart step into, if we didn't hit it in this frame once, that'll - * # not be the case next time either, so, disable tracing for this frame. + * try: + * curr_stat = os.stat(absolute_filename) # <<<<<<<<<<<<<< + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * except: */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1323, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_stat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_absolute_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } + __Pyx_XDECREF_SET(__pyx_v_curr_stat, __pyx_t_1); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1263 - * stop = True - * - * elif self._is_same_frame(stop_frame, back) and is_line: # <<<<<<<<<<<<<< - * if info.pydev_smart_child_offset != -1: - * # i.e.: in this case, we're not interested in the pause in the parent, rather + /* "_pydevd_bundle/pydevd_cython.pyx":1324 + * try: + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) # <<<<<<<<<<<<<< + * except: + * curr_stat = None */ - goto __pyx_L224; - } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_stat, __pyx_n_s_st_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_stat, __pyx_n_s_st_mtime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1324, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L15_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L15_error); + __pyx_t_1 = 0; + __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_curr_stat, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1294 - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":1322 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} * - * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: # <<<<<<<<<<<<<< - * # Ok, we have to track 2 stops at this point, the parent and the child offset. - * # This happens when handling a step into which targets a function inside a list comprehension + * try: # <<<<<<<<<<<<<< + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) */ - __pyx_t_15 = (__pyx_v_back != Py_None); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L242_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1294, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1294, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L242_bool_binop_done; } - __pyx_t_9 = __pyx_v_is_line; - __pyx_L242_bool_binop_done:; - if (__pyx_t_9) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1298 - * # This happens when handling a step into which targets a function inside a list comprehension - * # or generator (in which case an intermediary frame is created due to an internal function call). - * pydev_smart_parent_offset = info.pydev_smart_parent_offset # <<<<<<<<<<<<<< - * pydev_smart_child_offset = info.pydev_smart_child_offset - * # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) - */ - __pyx_t_10 = __pyx_v_info->pydev_smart_parent_offset; - __pyx_v_pydev_smart_parent_offset = __pyx_t_10; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L22_try_end; + __pyx_L15_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1299 - * # or generator (in which case an intermediary frame is created due to an internal function call). - * pydev_smart_parent_offset = info.pydev_smart_parent_offset - * pydev_smart_child_offset = info.pydev_smart_child_offset # <<<<<<<<<<<<<< - * # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) - * # print('parent f_lasti', back.f_back.f_lasti) + /* "_pydevd_bundle/pydevd_cython.pyx":1325 + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * except: # <<<<<<<<<<<<<< + * curr_stat = None + * */ - __pyx_t_10 = __pyx_v_info->pydev_smart_child_offset; - __pyx_v_pydev_smart_child_offset = __pyx_t_10; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1325, __pyx_L17_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_1); - /* "_pydevd_bundle/pydevd_cython.pyx":1303 - * # print('parent f_lasti', back.f_back.f_lasti) - * # print('child f_lasti', back.f_lasti) - * stop = False # <<<<<<<<<<<<<< - * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + /* "_pydevd_bundle/pydevd_cython.pyx":1326 + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * except: + * curr_stat = None # <<<<<<<<<<<<<< + * + * last_stat = filename_to_stat_info.get(absolute_filename) */ - __pyx_v_stop = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1304 - * # print('child f_lasti', back.f_lasti) - * stop = False - * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: # <<<<<<<<<<<<<< - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_curr_stat, Py_None); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L16_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1322 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} * + * try: # <<<<<<<<<<<<<< + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) */ - __pyx_t_15 = (__pyx_v_pydev_smart_child_offset >= 0); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L246_bool_binop_done; - } - __pyx_t_15 = (__pyx_v_pydev_smart_child_offset >= 0); - __pyx_t_9 = __pyx_t_15; - __pyx_L246_bool_binop_done:; - if (__pyx_t_9) { + __pyx_L17_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L4_error; + __pyx_L16_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L22_try_end:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1305 - * stop = False - * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1328 + * curr_stat = None * - * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + * last_stat = filename_to_stat_info.get(absolute_filename) # <<<<<<<<<<<<<< + * if last_stat != curr_stat: + * filename_to_stat_info[absolute_filename] = curr_stat */ - __pyx_t_7 = __pyx_v_info->pydev_smart_step_into_variants; - __Pyx_INCREF(__pyx_t_7); - __pyx_v_pydev_smart_step_into_variants = ((PyObject*)__pyx_t_7); - __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_filename_to_stat_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1328, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_absolute_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_last_stat, __pyx_t_1); + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1307 - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + /* "_pydevd_bundle/pydevd_cython.pyx":1329 * - * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< - * # Note that we don't really check the parent offset, only the offset of - * # the child (because this is a generator, the parent may have moved forward + * last_stat = filename_to_stat_info.get(absolute_filename) + * if last_stat != curr_stat: # <<<<<<<<<<<<<< + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() */ - __pyx_t_15 = (__pyx_v_pydev_smart_parent_offset >= 0); - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L249_bool_binop_done; - } - __pyx_t_15 = (__pyx_v_pydev_smart_step_into_variants != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_pydev_smart_step_into_variants) != 0); - __pyx_t_9 = __pyx_t_15; - __pyx_L249_bool_binop_done:; - if (__pyx_t_9) { + __pyx_t_1 = PyObject_RichCompare(__pyx_v_last_stat, __pyx_v_curr_stat, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L4_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1329, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1312 - * # already -- and that's ok, so, we just check that the parent frame - * # matches in this case). - * smart_step_into_variant = get_smart_step_into_variant_from_frame_offset(pydev_smart_parent_offset, pydev_smart_step_into_variants) # <<<<<<<<<<<<<< - * # print('matched parent offset', pydev_smart_parent_offset) - * # Ok, now, check the child variant + /* "_pydevd_bundle/pydevd_cython.pyx":1330 + * last_stat = filename_to_stat_info.get(absolute_filename) + * if last_stat != curr_stat: + * filename_to_stat_info[absolute_filename] = curr_stat # <<<<<<<<<<<<<< + * lines_ignored.clear() + * try: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1312, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_parent_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1312, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_8, __pyx_v_pydev_smart_step_into_variants}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1312, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_v_smart_step_into_variant = __pyx_t_7; - __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_filename_to_stat_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_absolute_filename, __pyx_v_curr_stat) < 0))) __PYX_ERR(0, 1330, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1315 - * # print('matched parent offset', pydev_smart_parent_offset) - * # Ok, now, check the child variant - * children_variants = smart_step_into_variant.children_variants # <<<<<<<<<<<<<< - * stop = children_variants and ( - * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ + /* "_pydevd_bundle/pydevd_cython.pyx":1331 + * if last_stat != curr_stat: + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() # <<<<<<<<<<<<<< + * try: + * linecache.checkcache(absolute_filename) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_smart_step_into_variant, __pyx_n_s_children_variants); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_v_children_variants = __pyx_t_7; - __pyx_t_7 = 0; + if (unlikely(__pyx_v_lines_ignored == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); + __PYX_ERR(0, 1331, __pyx_L4_error) + } + __pyx_t_13 = __Pyx_PyDict_Clear(__pyx_v_lines_ignored); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 1331, __pyx_L4_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1316 - * # Ok, now, check the child variant - * children_variants = smart_step_into_variant.children_variants - * stop = children_variants and ( # <<<<<<<<<<<<<< - * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ - * get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) + /* "_pydevd_bundle/pydevd_cython.pyx":1332 + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + * try: # <<<<<<<<<<<<<< + * linecache.checkcache(absolute_filename) + * except: */ - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_children_variants); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1316, __pyx_L172_error) - if (__pyx_t_15) { - } else { - __pyx_t_9 = __pyx_t_15; - goto __pyx_L251_bool_binop_done; - } + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1317 - * children_variants = smart_step_into_variant.children_variants - * stop = children_variants and ( - * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ # <<<<<<<<<<<<<< - * get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) - * ) + /* "_pydevd_bundle/pydevd_cython.pyx":1333 + * lines_ignored.clear() + * try: + * linecache.checkcache(absolute_filename) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1317, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_lasti); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1317, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_8, __pyx_v_children_variants}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1317, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_linecache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1333, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_checkcache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1333, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; } - - /* "_pydevd_bundle/pydevd_cython.pyx":1318 - * stop = children_variants and ( - * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) is \ - * get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) # <<<<<<<<<<<<<< - * ) - * # print('stop at child', stop) - */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1318, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_child_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L172_error) + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_absolute_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_1, __pyx_v_children_variants}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __pyx_t_15 = (__pyx_t_7 == __pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __pyx_t_15; - __pyx_L251_bool_binop_done:; - __pyx_v_stop = __pyx_t_9; - - /* "_pydevd_bundle/pydevd_cython.pyx":1307 - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants - * - * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< - * # Note that we don't really check the parent offset, only the offset of - * # the child (because this is a generator, the parent may have moved forward - */ } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1304 - * # print('child f_lasti', back.f_lasti) - * stop = False - * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: # <<<<<<<<<<<<<< - * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants - * + /* "_pydevd_bundle/pydevd_cython.pyx":1332 + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + * try: # <<<<<<<<<<<<<< + * linecache.checkcache(absolute_filename) + * except: */ } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L33_try_end; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1322 - * # print('stop at child', stop) + /* "_pydevd_bundle/pydevd_cython.pyx":1334 + * try: + * linecache.checkcache(absolute_filename) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) * - * if not stop: # <<<<<<<<<<<<<< - * # In smart step into, if we didn't hit it in this frame once, that'll - * # not be the case next time either, so, disable tracing for this frame. */ - __pyx_t_9 = (!__pyx_v_stop); - if (__pyx_t_9) { + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1334, __pyx_L28_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); - /* "_pydevd_bundle/pydevd_cython.pyx":1325 - * # In smart step into, if we didn't hit it in this frame once, that'll - * # not be the case next time either, so, disable tracing for this frame. - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1335 + * linecache.checkcache(absolute_filename) + * except: + * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) # <<<<<<<<<<<<<< * - * elif step_cmd in (109, 160): + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_6 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __pyx_t_7; - __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1335, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_exception); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1335, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + __pyx_t_9 = 1; + } } - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L176_try_return; - - /* "_pydevd_bundle/pydevd_cython.pyx":1322 - * # print('stop at child', stop) - * - * if not stop: # <<<<<<<<<<<<<< - * # In smart step into, if we didn't hit it in this frame once, that'll - * # not be the case next time either, so, disable tracing for this frame. - */ + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_kp_s_Error_in_linecache_checkcache_r, __pyx_v_absolute_filename}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1335, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L27_exception_handled; } - /* "_pydevd_bundle/pydevd_cython.pyx":1294 - * return None if is_call else NO_FTRACE - * - * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: # <<<<<<<<<<<<<< - * # Ok, we have to track 2 stops at this point, the parent and the child offset. - * # This happens when handling a step into which targets a function inside a list comprehension + /* "_pydevd_bundle/pydevd_cython.pyx":1332 + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + * try: # <<<<<<<<<<<<<< + * linecache.checkcache(absolute_filename) + * except: */ + __pyx_L28_except_error:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + goto __pyx_L4_error; + __pyx_L27_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + __pyx_L33_try_end:; } - __pyx_L224:; - /* "_pydevd_bundle/pydevd_cython.pyx":1256 - * stop, plugin_stop = result + /* "_pydevd_bundle/pydevd_cython.pyx":1329 * - * elif step_cmd == 128: # <<<<<<<<<<<<<< - * stop = False - * back = frame.f_back + * last_stat = filename_to_stat_info.get(absolute_filename) + * if last_stat != curr_stat: # <<<<<<<<<<<<<< + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() */ - goto __pyx_L181; } - /* "_pydevd_bundle/pydevd_cython.pyx":1327 - * return None if is_call else NO_FTRACE - * - * elif step_cmd in (109, 160): # <<<<<<<<<<<<<< - * stop = is_return and self._is_same_frame(stop_frame, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":1337 + * pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) # <<<<<<<<<<<<<< + * if from_user_input: + * merged = {} */ - switch (__pyx_v_step_cmd) { - case 0x6D: - case 0xA0: - __pyx_t_9 = 1; - break; - default: - __pyx_t_9 = 0; - break; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_9 = 1; + } } - __pyx_t_15 = __pyx_t_9; - if (__pyx_t_15) { + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_canonical_normalized_filename}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1337, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_from_user_input, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1328 - * - * elif step_cmd in (109, 160): - * stop = is_return and self._is_same_frame(stop_frame, frame) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1338 * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if from_user_input: # <<<<<<<<<<<<<< + * merged = {} + * merged.update(lines_ignored) + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_user_input); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1338, __pyx_L4_error) + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1339 + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if from_user_input: + * merged = {} # <<<<<<<<<<<<<< + * merged.update(lines_ignored) + * # Override what we have with the related entries that the user entered + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1339, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_merged, ((PyObject*)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1340 + * if from_user_input: + * merged = {} + * merged.update(lines_ignored) # <<<<<<<<<<<<<< + * # Override what we have with the related entries that the user entered + * merged.update(from_user_input) + */ + __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_merged, __pyx_v_lines_ignored); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1342 + * merged.update(lines_ignored) + * # Override what we have with the related entries that the user entered + * merged.update(from_user_input) # <<<<<<<<<<<<<< * else: + * merged = lines_ignored */ - if (__pyx_v_is_return) { - } else { - __pyx_t_15 = __pyx_v_is_return; - goto __pyx_L254_bool_binop_done; - } - __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1328, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = __pyx_t_9; - __pyx_L254_bool_binop_done:; - __pyx_v_stop = __pyx_t_15; + __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_merged, __pyx_v_from_user_input); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1342, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1327 - * return None if is_call else NO_FTRACE - * - * elif step_cmd in (109, 160): # <<<<<<<<<<<<<< - * stop = is_return and self._is_same_frame(stop_frame, frame) + /* "_pydevd_bundle/pydevd_cython.pyx":1338 * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if from_user_input: # <<<<<<<<<<<<<< + * merged = {} + * merged.update(lines_ignored) */ - goto __pyx_L181; + goto __pyx_L36; } - /* "_pydevd_bundle/pydevd_cython.pyx":1331 - * + /* "_pydevd_bundle/pydevd_cython.pyx":1344 + * merged.update(from_user_input) * else: - * stop = False # <<<<<<<<<<<<<< + * merged = lines_ignored # <<<<<<<<<<<<<< * - * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * exc_lineno = check_trace_obj.tb_lineno */ /*else*/ { - __pyx_v_stop = 0; + __Pyx_INCREF(__pyx_v_lines_ignored); + __Pyx_XDECREF_SET(__pyx_v_merged, __pyx_v_lines_ignored); } - __pyx_L181:; + __pyx_L36:; - /* "_pydevd_bundle/pydevd_cython.pyx":1333 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1346 + * merged = lines_ignored * - * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): # <<<<<<<<<<<<<< - * f_code = getattr(frame.f_back, 'f_code', None) - * if f_code is not None: - */ - if (__pyx_v_stop) { - } else { - __pyx_t_15 = __pyx_v_stop; - goto __pyx_L257_bool_binop_done; - } - __pyx_t_9 = (__pyx_v_step_cmd != -1L); - if (__pyx_t_9) { - } else { - __pyx_t_15 = __pyx_t_9; - goto __pyx_L257_bool_binop_done; - } - if (__pyx_v_is_return) { - } else { - __pyx_t_15 = __pyx_v_is_return; - goto __pyx_L257_bool_binop_done; - } - __pyx_t_9 = __Pyx_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1333, __pyx_L172_error) - __pyx_t_15 = __pyx_t_9; - __pyx_L257_bool_binop_done:; - if (__pyx_t_15) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1334 + * exc_lineno = check_trace_obj.tb_lineno # <<<<<<<<<<<<<< * - * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): - * f_code = getattr(frame.f_back, 'f_code', None) # <<<<<<<<<<<<<< - * if f_code is not None: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1334, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_GetAttr3(__pyx_t_6, __pyx_n_s_f_code, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1334, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_f_code = __pyx_t_7; - __pyx_t_7 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1335 - * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): - * f_code = getattr(frame.f_back, 'f_code', None) - * if f_code is not None: # <<<<<<<<<<<<<< - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - * stop = False + * # print ('lines ignored', lines_ignored) */ - __pyx_t_15 = (__pyx_v_f_code != Py_None); - if (__pyx_t_15) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_lineno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1346, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_exc_lineno, __pyx_t_7); + __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1336 - * f_code = getattr(frame.f_back, 'f_code', None) - * if f_code is not None: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: # <<<<<<<<<<<<<< - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1352 + * # print ('merged', merged, 'curr', exc_lineno) * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. # <<<<<<<<<<<<<< + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1336, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1336, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1336, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1336, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1336, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1336, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_15) { + if (unlikely(__pyx_v_merged == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1352, __pyx_L4_error) + } + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_exc_lineno, __pyx_v_merged, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1352, __pyx_L4_error) + if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1337 - * if f_code is not None: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - * stop = False # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1353 * - * if plugin_stop: + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: # <<<<<<<<<<<<<< + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: */ - __pyx_v_stop = 0; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1336 - * f_code = getattr(frame.f_back, 'f_code', None) - * if f_code is not None: - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: # <<<<<<<<<<<<<< - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1354 + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_linecache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1354, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1354, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_absolute_filename, __pyx_v_exc_lineno, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1353 * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: # <<<<<<<<<<<<<< + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: */ } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L45_try_end; + __pyx_L38_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1335 - * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): - * f_code = getattr(frame.f_back, 'f_code', None) - * if f_code is not None: # <<<<<<<<<<<<<< - * if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1355 + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) + * line = '' */ - } + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1355, __pyx_L40_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_8); - /* "_pydevd_bundle/pydevd_cython.pyx":1333 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1356 + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: + * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) # <<<<<<<<<<<<<< + * line = '' * - * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): # <<<<<<<<<<<<<< - * f_code = getattr(frame.f_back, 'f_code', None) - * if f_code is not None: */ - } + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1356, __pyx_L40_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1356, __pyx_L40_except_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_15, __pyx_kp_s_Error_in_linecache_getline_r_s_f, __pyx_v_absolute_filename, __pyx_v_exc_lineno}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L40_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1339 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1357 + * except: + * pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) + * line = '' # <<<<<<<<<<<<<< * - * if plugin_stop: # <<<<<<<<<<<<<< - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) - * elif stop: + * if IGNORE_EXCEPTION_TAG.match(line) is not None: */ - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_plugin_stop); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1339, __pyx_L172_error) - if (__pyx_t_15) { + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_XDECREF_SET(__pyx_v_line, __pyx_kp_s_); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L39_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1340 + /* "_pydevd_bundle/pydevd_cython.pyx":1353 * - * if plugin_stop: - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) # <<<<<<<<<<<<<< - * elif stop: - * if is_line: + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: # <<<<<<<<<<<<<< + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: + */ + __pyx_L40_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L4_error; + __pyx_L39_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L45_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1359 + * line = '' + * + * if IGNORE_EXCEPTION_TAG.match(line) is not None: # <<<<<<<<<<<<<< + * lines_ignored[exc_lineno] = 1 + * return False */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_stop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1340, __pyx_L172_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_IGNORE_EXCEPTION_TAG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1359, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L172_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1359, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = NULL; - __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; } } #endif { - PyObject *__pyx_callargs[8] = {__pyx_t_1, __pyx_v_main_debugger, __pyx_v_frame, __pyx_v_event, __pyx_v_self->_args, __pyx_v_stop_info, __pyx_v_arg, __pyx_t_7}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 7+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1340, __pyx_L172_error) + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_line}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1359, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __pyx_v_stopped_on_plugin = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1339 - * stop = False + /* "_pydevd_bundle/pydevd_cython.pyx":1360 * - * if plugin_stop: # <<<<<<<<<<<<<< - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) - * elif stop: - */ - goto __pyx_L263; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":1341 - * if plugin_stop: - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) - * elif stop: # <<<<<<<<<<<<<< - * if is_line: - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * if IGNORE_EXCEPTION_TAG.match(line) is not None: + * lines_ignored[exc_lineno] = 1 # <<<<<<<<<<<<<< + * return False + * else: */ - if (__pyx_v_stop) { + if (unlikely(__pyx_v_lines_ignored == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1360, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_lines_ignored, __pyx_v_exc_lineno, __pyx_int_1) < 0))) __PYX_ERR(0, 1360, __pyx_L4_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1342 - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) - * elif stop: - * if is_line: # <<<<<<<<<<<<<< - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - * self.do_wait_suspend(thread, frame, event, arg) + /* "_pydevd_bundle/pydevd_cython.pyx":1361 + * if IGNORE_EXCEPTION_TAG.match(line) is not None: + * lines_ignored[exc_lineno] = 1 + * return False # <<<<<<<<<<<<<< + * else: + * # Put in the cache saying not to ignore */ - if (__pyx_v_is_line) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1343 - * elif stop: - * if is_line: - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) # <<<<<<<<<<<<<< - * self.do_wait_suspend(thread, frame, event, arg) - * elif is_return: # return event + /* "_pydevd_bundle/pydevd_cython.pyx":1359 + * line = '' + * + * if IGNORE_EXCEPTION_TAG.match(line) is not None: # <<<<<<<<<<<<<< + * lines_ignored[exc_lineno] = 1 + * return False */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_v_thread); - __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_thread)) __PYX_ERR(0, 1343, __pyx_L172_error); - __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 1343, __pyx_L172_error); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_original_step_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_original_step_cmd, __pyx_t_1) < 0) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1344 - * if is_line: - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< - * elif is_return: # return event - * back = frame.f_back + /* "_pydevd_bundle/pydevd_cython.pyx":1364 + * else: + * # Put in the cache saying not to ignore + * lines_ignored[exc_lineno] = 0 # <<<<<<<<<<<<<< + * else: + * # Ok, dict has it already cached, so, let's check it... */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1344, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_v_thread, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + /*else*/ { + if (unlikely(__pyx_v_lines_ignored == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1364, __pyx_L4_error) } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1342 - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) - * elif stop: - * if is_line: # <<<<<<<<<<<<<< - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - * self.do_wait_suspend(thread, frame, event, arg) - */ - goto __pyx_L264; + if (unlikely((PyDict_SetItem(__pyx_v_lines_ignored, __pyx_v_exc_lineno, __pyx_int_0) < 0))) __PYX_ERR(0, 1364, __pyx_L4_error) } - /* "_pydevd_bundle/pydevd_cython.pyx":1345 - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - * self.do_wait_suspend(thread, frame, event, arg) - * elif is_return: # return event # <<<<<<<<<<<<<< - * back = frame.f_back - * if back is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":1352 + * # print ('merged', merged, 'curr', exc_lineno) + * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. # <<<<<<<<<<<<<< + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) */ - if (__pyx_v_is_return) { + goto __pyx_L37; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1346 - * self.do_wait_suspend(thread, frame, event, arg) - * elif is_return: # return event - * back = frame.f_back # <<<<<<<<<<<<<< - * if back is not None: - * # When we get to the pydevd run function, the debugging has actually finished for the main thread + /* "_pydevd_bundle/pydevd_cython.pyx":1367 + * else: + * # Ok, dict has it already cached, so, let's check it... + * if merged.get(exc_lineno, 0): # <<<<<<<<<<<<<< + * return False + * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_back, __pyx_t_1); - __pyx_t_1 = 0; + /*else*/ { + if (unlikely(__pyx_v_merged == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 1367, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_merged, __pyx_v_exc_lineno, __pyx_int_0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1367, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1367, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1347 - * elif is_return: # return event - * back = frame.f_back - * if back is not None: # <<<<<<<<<<<<<< - * # When we get to the pydevd run function, the debugging has actually finished for the main thread - * # (note that it can still go on for other threads, but for this one, we just make it finish) + /* "_pydevd_bundle/pydevd_cython.pyx":1368 + * # Ok, dict has it already cached, so, let's check it... + * if merged.get(exc_lineno, 0): + * return False # <<<<<<<<<<<<<< + * + * try: */ - __pyx_t_15 = (__pyx_v_back != Py_None); - if (__pyx_t_15) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1351 - * # (note that it can still go on for other threads, but for this one, we just make it finish) - * # So, just setting it to None should be OK - * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) # <<<<<<<<<<<<<< - * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): - * back = None + /* "_pydevd_bundle/pydevd_cython.pyx":1367 + * else: + * # Ok, dict has it already cached, so, let's check it... + * if merged.get(exc_lineno, 0): # <<<<<<<<<<<<<< + * return False + * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1351, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_back}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { - PyObject* sequence = __pyx_t_1; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 3)) { - if (size > 3) __Pyx_RaiseTooManyValuesError(3); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1351, __pyx_L172_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); - } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); - __pyx_t_8 = PyList_GET_ITEM(sequence, 2); - } - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1351, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1351, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); - index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L266_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - index = 1; __pyx_t_7 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L266_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - index = 2; __pyx_t_8 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_8)) goto __pyx_L266_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 3) < 0) __PYX_ERR(0, 1351, __pyx_L172_error) - __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L267_unpacking_done; - __pyx_L266_unpacking_failed:; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1351, __pyx_L172_error) - __pyx_L267_unpacking_done:; - } - __pyx_v_back_absolute_filename = __pyx_t_6; - __pyx_t_6 = 0; - __pyx_v__ = __pyx_t_7; - __pyx_t_7 = 0; - __pyx_v_base = __pyx_t_8; - __pyx_t_8 = 0; + } + } + __pyx_L37:; - /* "_pydevd_bundle/pydevd_cython.pyx":1352 - * # So, just setting it to None should be OK - * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) - * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): # <<<<<<<<<<<<<< - * back = None + /* "_pydevd_bundle/pydevd_cython.pyx":1313 * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * for check_trace_obj in (initial_trace_obj, trace_obj): # <<<<<<<<<<<<<< + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_base); - __Pyx_GIVEREF(__pyx_v_base); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_base)) __PYX_ERR(0, 1352, __pyx_L172_error); - __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8)) __PYX_ERR(0, 1352, __pyx_L172_error); - __pyx_t_8 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!__pyx_t_9) { - } else { - __pyx_t_15 = __pyx_t_9; - goto __pyx_L269_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1352, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_15 = __pyx_t_9; - __pyx_L269_bool_binop_done:; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __pyx_t_15; - if (__pyx_t_9) { + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1353 - * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) - * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): - * back = None # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1312 + * trace_obj = trace_obj.tb_next * - * elif base == TRACE_PROPERTY: + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: # <<<<<<<<<<<<<< + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) */ - __Pyx_INCREF(Py_None); - __Pyx_DECREF_SET(__pyx_v_back, Py_None); + } - /* "_pydevd_bundle/pydevd_cython.pyx":1352 - * # So, just setting it to None should be OK - * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) - * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): # <<<<<<<<<<<<<< - * back = None + /* "_pydevd_bundle/pydevd_cython.pyx":1370 + * return False * + * try: # <<<<<<<<<<<<<< + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame */ - goto __pyx_L268; - } + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1355 - * back = None + /* "_pydevd_bundle/pydevd_cython.pyx":1371 * - * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< - * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) - * # if we're in a return, we want it to appear to the user in the previous frame! + * try: + * frame_id_to_frame = {} # <<<<<<<<<<<<<< + * frame_id_to_frame[id(frame)] = frame + * f = trace_obj.tb_frame */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TRACE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyObject_RichCompare(__pyx_v_base, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1355, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1355, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_9) { + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_frame_id_to_frame = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1358 - * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) - * # if we're in a return, we want it to appear to the user in the previous frame! - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< - * - * elif pydevd_dont_trace.should_trace_hook is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":1372 + * try: + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame # <<<<<<<<<<<<<< + * f = trace_obj.tb_frame + * while f is not None: */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_8 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __pyx_t_1; - __pyx_t_1 = 0; - } - __pyx_r = __pyx_t_8; - __pyx_t_8 = 0; - goto __pyx_L176_try_return; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyDict_SetItem(__pyx_v_frame_id_to_frame, __pyx_t_4, __pyx_v_frame) < 0))) __PYX_ERR(0, 1372, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1355 - * back = None - * - * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< - * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) - * # if we're in a return, we want it to appear to the user in the previous frame! + /* "_pydevd_bundle/pydevd_cython.pyx":1373 + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame + * f = trace_obj.tb_frame # <<<<<<<<<<<<<< + * while f is not None: + * frame_id_to_frame[id(f)] = f */ - } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_f = __pyx_t_4; + __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1360 - * return None if is_call else NO_FTRACE - * - * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< - * if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename): - * # In this case, we'll have to skip the previous one because it shouldn't be traced. + /* "_pydevd_bundle/pydevd_cython.pyx":1374 + * frame_id_to_frame[id(frame)] = frame + * f = trace_obj.tb_frame + * while f is not None: # <<<<<<<<<<<<<< + * frame_id_to_frame[id(f)] = f + * f = f.f_back */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_9) { + while (1) { + __pyx_t_2 = (__pyx_v_f != Py_None); + if (!__pyx_t_2) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1375 + * f = trace_obj.tb_frame + * while f is not None: + * frame_id_to_frame[id(f)] = f # <<<<<<<<<<<<<< + * f = f.f_back + * f = None + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1375, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyDict_SetItem(__pyx_v_frame_id_to_frame, __pyx_t_4, __pyx_v_f) < 0))) __PYX_ERR(0, 1375, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1361 + /* "_pydevd_bundle/pydevd_cython.pyx":1376 + * while f is not None: + * frame_id_to_frame[id(f)] = f + * f = f.f_back # <<<<<<<<<<<<<< + * f = None * - * elif pydevd_dont_trace.should_trace_hook is not None: - * if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename): # <<<<<<<<<<<<<< - * # In this case, we'll have to skip the previous one because it shouldn't be traced. - * # Also, we have to reset the tracing, because if the parent's parent (or some */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1361, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1361, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_back, __pyx_v_back_absolute_filename}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1361, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = (!__pyx_t_9); - if (__pyx_t_15) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1376, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_4); + __pyx_t_4 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1367 - * # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). - * # Related test: _debugger_case17a.py - * main_debugger.set_trace_for_frame_and_parents(back) # <<<<<<<<<<<<<< - * return None if is_call else NO_FTRACE + /* "_pydevd_bundle/pydevd_cython.pyx":1377 + * frame_id_to_frame[id(f)] = f + * f = f.f_back + * f = None # <<<<<<<<<<<<<< * + * stopped = True */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1367, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_back}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_f, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":1368 - * # Related test: _debugger_case17a.py - * main_debugger.set_trace_for_frame_and_parents(back) - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1379 + * f = None * - * if back is not None: + * stopped = True # <<<<<<<<<<<<<< + * py_db.send_caught_exception_stack(thread, arg, id(frame)) + * try: */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_1 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1368, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __pyx_t_7; - __pyx_t_7 = 0; - } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L176_try_return; + __pyx_v_stopped = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":1361 + /* "_pydevd_bundle/pydevd_cython.pyx":1380 * - * elif pydevd_dont_trace.should_trace_hook is not None: - * if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename): # <<<<<<<<<<<<<< - * # In this case, we'll have to skip the previous one because it shouldn't be traced. - * # Also, we have to reset the tracing, because if the parent's parent (or some + * stopped = True + * py_db.send_caught_exception_stack(thread, arg, id(frame)) # <<<<<<<<<<<<<< + * try: + * py_db.set_suspend(thread, 137) */ - } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_send_caught_exception_stack); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1380, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_thread, __pyx_v_arg, __pyx_t_7}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1360 - * return None if is_call else NO_FTRACE - * - * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< - * if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename): - * # In this case, we'll have to skip the previous one because it shouldn't be traced. + /* "_pydevd_bundle/pydevd_cython.pyx":1381 + * stopped = True + * py_db.send_caught_exception_stack(thread, arg, id(frame)) + * try: # <<<<<<<<<<<<<< + * py_db.set_suspend(thread, 137) + * py_db.do_wait_suspend(thread, frame, 'exception', arg, exception_type=exception_type) */ - } - __pyx_L268:; + /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1347 - * elif is_return: # return event - * back = frame.f_back - * if back is not None: # <<<<<<<<<<<<<< - * # When we get to the pydevd run function, the debugging has actually finished for the main thread - * # (note that it can still go on for other threads, but for this one, we just make it finish) + /* "_pydevd_bundle/pydevd_cython.pyx":1382 + * py_db.send_caught_exception_stack(thread, arg, id(frame)) + * try: + * py_db.set_suspend(thread, 137) # <<<<<<<<<<<<<< + * py_db.do_wait_suspend(thread, frame, 'exception', arg, exception_type=exception_type) + * finally: */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1382, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_9 = 1; } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_thread, __pyx_int_137}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1370 - * return None if is_call else NO_FTRACE - * - * if back is not None: # <<<<<<<<<<<<<< - * # if we're in a return, we want it to appear to the user in the previous frame! - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + /* "_pydevd_bundle/pydevd_cython.pyx":1383 + * try: + * py_db.set_suspend(thread, 137) + * py_db.do_wait_suspend(thread, frame, 'exception', arg, exception_type=exception_type) # <<<<<<<<<<<<<< + * finally: + * py_db.send_caught_exception_stack_proceeded(thread) */ - __pyx_t_15 = (__pyx_v_back != Py_None); - if (__pyx_t_15) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1383, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 1383, __pyx_L60_error); + __Pyx_INCREF(__pyx_v_frame); + __Pyx_GIVEREF(__pyx_v_frame); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_frame)) __PYX_ERR(0, 1383, __pyx_L60_error); + __Pyx_INCREF(__pyx_n_s_exception); + __Pyx_GIVEREF(__pyx_n_s_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_n_s_exception)) __PYX_ERR(0, 1383, __pyx_L60_error); + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_arg)) __PYX_ERR(0, 1383, __pyx_L60_error); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1383, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exception_type, __pyx_v_exception_type) < 0) __PYX_ERR(0, 1383, __pyx_L60_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1383, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1372 - * if back is not None: - * # if we're in a return, we want it to appear to the user in the previous frame! - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) # <<<<<<<<<<<<<< - * self.do_wait_suspend(thread, back, event, arg) - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1385 + * py_db.do_wait_suspend(thread, frame, 'exception', arg, exception_type=exception_type) + * finally: + * py_db.send_caught_exception_stack_proceeded(thread) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1372, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_thread); - __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 1372, __pyx_L172_error); - __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L172_error); - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_original_step_cmd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_original_step_cmd, __pyx_t_6) < 0) __PYX_ERR(0, 1372, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L172_error) + /*finally:*/ { + /*normal exit:*/{ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_send_caught_exception_stack_proc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1385, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_thread}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1373 - * # if we're in a return, we want it to appear to the user in the previous frame! - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - * self.do_wait_suspend(thread, back, event, arg) # <<<<<<<<<<<<<< - * else: - * # in jython we may not have a back frame - */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __pyx_L172_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L61; + } + __pyx_L60_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __pyx_t_9 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename; + { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_send_caught_exception_stack_proc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1385, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; - __pyx_t_10 = 0; + __pyx_t_24 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); @@ -25685,1123 +27272,642 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispa __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; + __pyx_t_24 = 1; } } #endif { - PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_thread, __pyx_v_back, __pyx_v_event, __pyx_v_arg}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10); + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_thread}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_24, 1+__pyx_t_24); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L172_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1370 - * return None if is_call else NO_FTRACE - * - * if back is not None: # <<<<<<<<<<<<<< - * # if we're in a return, we want it to appear to the user in the previous frame! - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - */ - goto __pyx_L272; } - - /* "_pydevd_bundle/pydevd_cython.pyx":1376 - * else: - * # in jython we may not have a back frame - * info.pydev_step_stop = None # <<<<<<<<<<<<<< - * info.pydev_original_step_cmd = -1 - * info.pydev_step_cmd = -1 - */ - /*else*/ { - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); - __Pyx_DECREF(__pyx_v_info->pydev_step_stop); - __pyx_v_info->pydev_step_stop = Py_None; - - /* "_pydevd_bundle/pydevd_cython.pyx":1377 - * # in jython we may not have a back frame - * info.pydev_step_stop = None - * info.pydev_original_step_cmd = -1 # <<<<<<<<<<<<<< - * info.pydev_step_cmd = -1 - * info.pydev_state = 1 - */ - __pyx_v_info->pydev_original_step_cmd = -1; - - /* "_pydevd_bundle/pydevd_cython.pyx":1378 - * info.pydev_step_stop = None - * info.pydev_original_step_cmd = -1 - * info.pydev_step_cmd = -1 # <<<<<<<<<<<<<< - * info.pydev_state = 1 - * - */ - __pyx_v_info->pydev_step_cmd = -1; - - /* "_pydevd_bundle/pydevd_cython.pyx":1379 - * info.pydev_original_step_cmd = -1 - * info.pydev_step_cmd = -1 - * info.pydev_state = 1 # <<<<<<<<<<<<<< - * - * # if we are quitting, let's stop the tracing - */ - __pyx_v_info->pydev_state = 1; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } - __pyx_L272:; - - /* "_pydevd_bundle/pydevd_cython.pyx":1345 - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - * self.do_wait_suspend(thread, frame, event, arg) - * elif is_return: # return event # <<<<<<<<<<<<<< - * back = frame.f_back - * if back is not None: - */ - } - __pyx_L264:; - - /* "_pydevd_bundle/pydevd_cython.pyx":1341 - * if plugin_stop: - * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) - * elif stop: # <<<<<<<<<<<<<< - * if is_line: - * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) - */ - } - __pyx_L263:; - - /* "_pydevd_bundle/pydevd_cython.pyx":1382 - * - * # if we are quitting, let's stop the tracing - * if main_debugger.quitting: # <<<<<<<<<<<<<< - * return None if is_call else NO_FTRACE - * - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_quitting); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1382, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1382, __pyx_L172_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_15) { - - /* "_pydevd_bundle/pydevd_cython.pyx":1383 - * # if we are quitting, let's stop the tracing - * if main_debugger.quitting: - * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< - * - * return self.trace_dispatch - */ - __Pyx_XDECREF(__pyx_r); - if (__pyx_v_is_call) { - __Pyx_INCREF(Py_None); - __pyx_t_6 = Py_None; - } else { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1383, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __pyx_t_7; - __pyx_t_7 = 0; + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20); + __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17; + goto __pyx_L51_error; + __pyx_L63_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); + } + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + goto __pyx_L51_error; } - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L176_try_return; - - /* "_pydevd_bundle/pydevd_cython.pyx":1382 - * - * # if we are quitting, let's stop the tracing - * if main_debugger.quitting: # <<<<<<<<<<<<<< - * return None if is_call else NO_FTRACE - * - */ + __pyx_L61:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1385 - * return None if is_call else NO_FTRACE - * - * return self.trace_dispatch # <<<<<<<<<<<<<< - * except: - * # Unfortunately Python itself stops the tracing when it originates from - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L172_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; - goto __pyx_L176_try_return; - - /* "_pydevd_bundle/pydevd_cython.pyx":1155 + /* "_pydevd_bundle/pydevd_cython.pyx":1370 + * return False * - * # step handling. We stop when we hit the right frame - * try: # <<<<<<<<<<<<<< - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: + * try: # <<<<<<<<<<<<<< + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame */ } - __pyx_L172_error:; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L56_try_end; + __pyx_L51_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":1386 + * finally: + * py_db.send_caught_exception_stack_proceeded(thread) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() * - * return self.trace_dispatch - * except: # <<<<<<<<<<<<<< - * # Unfortunately Python itself stops the tracing when it originates from - * # the tracing function, so, we can't do much about it (just let the user know). */ /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1386, __pyx_L174_except_error) + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1386, __pyx_L53_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); - /* "_pydevd_bundle/pydevd_cython.pyx":1389 - * # Unfortunately Python itself stops the tracing when it originates from - * # the tracing function, so, we can't do much about it (just let the user know). - * exc = sys.exc_info()[0] # <<<<<<<<<<<<<< - * cmd = main_debugger.cmd_factory.make_console_message( - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1389, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_exc = __pyx_t_2; - __pyx_t_2 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1390 - * # the tracing function, so, we can't do much about it (just let the user know). - * exc = sys.exc_info()[0] - * cmd = main_debugger.cmd_factory.make_console_message( # <<<<<<<<<<<<<< - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_make_console_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1390, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":1391 - * exc = sys.exc_info()[0] - * cmd = main_debugger.cmd_factory.make_console_message( - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) # <<<<<<<<<<<<<< - * main_debugger.writer.add_command(cmd) - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + /* "_pydevd_bundle/pydevd_cython.pyx":1387 + * py_db.send_caught_exception_stack_proceeded(thread) + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * + * py_db.set_trace_for_frame_and_parents(thread.ident, frame) */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L174_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L53_except_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_exc); - __Pyx_GIVEREF(__pyx_v_exc); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_exc)) __PYX_ERR(0, 1391, __pyx_L174_except_error); - __Pyx_INCREF(__pyx_v_thread); - __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_thread)) __PYX_ERR(0, 1391, __pyx_L174_except_error); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_raised_from_within_the_callba, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1387, __pyx_L53_except_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; - __pyx_t_10 = 0; + __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_10 = 1; + __Pyx_DECREF_SET(__pyx_t_14, function); + __pyx_t_16 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_16, 0+__pyx_t_16); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L53_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } - __Pyx_XDECREF_SET(__pyx_v_cmd, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L52_exception_handled; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1392 - * cmd = main_debugger.cmd_factory.make_console_message( - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) # <<<<<<<<<<<<<< - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): - * pydev_log.exception() + /* "_pydevd_bundle/pydevd_cython.pyx":1370 + * return False + * + * try: # <<<<<<<<<<<<<< + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1392, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_command); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cmd}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_L53_except_error:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + goto __pyx_L4_error; + __pyx_L52_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + __pyx_L56_try_end:; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1393 - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< - * pydev_log.exception() - * raise + /* "_pydevd_bundle/pydevd_cython.pyx":1389 + * pydev_log.exception() + * + * py_db.set_trace_for_frame_and_parents(thread.ident, frame) # <<<<<<<<<<<<<< + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. */ - __pyx_t_15 = PyObject_IsSubclass(__pyx_v_exc, __pyx_tuple__6); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1393, __pyx_L174_except_error) - __pyx_t_9 = (!__pyx_t_15); - if (__pyx_t_9) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1389, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1389, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_16 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_16 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_16, 2+__pyx_t_16); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1389, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } - /* "_pydevd_bundle/pydevd_cython.pyx":1394 - * main_debugger.writer.add_command(cmd) - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): - * pydev_log.exception() # <<<<<<<<<<<<<< - * raise - * + /* "_pydevd_bundle/pydevd_cython.pyx":1392 + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< + * # Clear some local variables... + * frame = None */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1394, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1394, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_10 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_10 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L174_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*finally:*/ { + /*normal exit:*/{ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_16 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_16 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1394 + * remove_exception_from_frame(frame) + * # Clear some local variables... + * frame = None # <<<<<<<<<<<<<< + * trace_obj = None + * initial_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_frame, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":1393 - * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< - * pydev_log.exception() - * raise + /* "_pydevd_bundle/pydevd_cython.pyx":1395 + * # Clear some local variables... + * frame = None + * trace_obj = None # <<<<<<<<<<<<<< + * initial_trace_obj = None + * check_trace_obj = None */ - } + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_trace_obj, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":1395 - * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): - * pydev_log.exception() - * raise # <<<<<<<<<<<<<< - * - * finally: + /* "_pydevd_bundle/pydevd_cython.pyx":1396 + * frame = None + * trace_obj = None + * initial_trace_obj = None # <<<<<<<<<<<<<< + * check_trace_obj = None + * f = None */ - __Pyx_GIVEREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_7); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_7, __pyx_t_8); - __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; - __PYX_ERR(0, 1395, __pyx_L174_except_error) - } + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_initial_trace_obj, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":1155 - * - * # step handling. We stop when we hit the right frame - * try: # <<<<<<<<<<<<<< - * should_skip = 0 - * if pydevd_dont_trace.should_trace_hook is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":1397 + * trace_obj = None + * initial_trace_obj = None + * check_trace_obj = None # <<<<<<<<<<<<<< + * f = None + * frame_id_to_frame = None */ - __pyx_L174_except_error:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); - goto __pyx_L4_error; - __pyx_L176_try_return:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); - goto __pyx_L3_return; - } - } + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1398 + * initial_trace_obj = None + * check_trace_obj = None + * f = None # <<<<<<<<<<<<<< + * frame_id_to_frame = None + * py_db = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1399 + * check_trace_obj = None + * f = None + * frame_id_to_frame = None # <<<<<<<<<<<<<< + * py_db = None + * thread = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); - /* "_pydevd_bundle/pydevd_cython.pyx":1398 + /* "_pydevd_bundle/pydevd_cython.pyx":1400 + * f = None + * frame_id_to_frame = None + * py_db = None # <<<<<<<<<<<<<< + * thread = None * - * finally: - * info.is_tracing -= 1 # <<<<<<<<<<<<<< + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_py_db, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1401 + * frame_id_to_frame = None + * py_db = None + * thread = None # <<<<<<<<<<<<<< * - * # end trace_dispatch + * return stopped */ - /*finally:*/ { + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_thread, Py_None); + goto __pyx_L5; + } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_28, &__pyx_t_27, &__pyx_t_26); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_28); - __Pyx_XGOTREF(__pyx_t_27); - __Pyx_XGOTREF(__pyx_t_26); - __pyx_t_10 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_29 = __pyx_filename; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_21); + __pyx_t_16 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_25 = __pyx_filename; { - if (unlikely(!__pyx_v_info)) { __Pyx_RaiseUnboundLocalError("info"); __PYX_ERR(0, 1398, __pyx_L278_error) } - if (unlikely(!__pyx_v_info)) { __Pyx_RaiseUnboundLocalError("info"); __PYX_ERR(0, 1398, __pyx_L278_error) } - __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing - 1); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_28); - __Pyx_XGIVEREF(__pyx_t_27); - __Pyx_XGIVEREF(__pyx_t_26); - __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_27, __pyx_t_26); - } - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16); - __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; - __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_29; - goto __pyx_L1_error; - __pyx_L278_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_28); - __Pyx_XGIVEREF(__pyx_t_27); - __Pyx_XGIVEREF(__pyx_t_26); - __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_27, __pyx_t_26); - } - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; - goto __pyx_L1_error; - } - __pyx_L3_return: { - __pyx_t_26 = __pyx_r; - __pyx_r = 0; - __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing - 1); - __pyx_r = __pyx_t_26; - __pyx_t_26 = 0; - goto __pyx_L0; - } - } - /* "_pydevd_bundle/pydevd_cython.pyx":701 - * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< - * cdef tuple abs_path_canonical_path_and_base; - * cdef bint is_exception_event; + /* "_pydevd_bundle/pydevd_cython.pyx":1392 + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< + * # Clear some local variables... + * frame = None */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_21); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_abs_path_canonical_path_and_base); - __Pyx_XDECREF((PyObject *)__pyx_v_info); - __Pyx_XDECREF(__pyx_v_breakpoints_for_file); - __Pyx_XDECREF(__pyx_v_stop_info); - __Pyx_XDECREF(__pyx_v_curr_func_name); - __Pyx_XDECREF(__pyx_v_frame_skips_cache); - __Pyx_XDECREF(__pyx_v_frame_cache_key); - __Pyx_XDECREF(__pyx_v_line_cache_key); - __Pyx_XDECREF(__pyx_v_bp); - __Pyx_XDECREF(__pyx_v_pydev_smart_step_into_variants); - __Pyx_XDECREF(__pyx_v_main_debugger); - __Pyx_XDECREF(__pyx_v_thread); - __Pyx_XDECREF(__pyx_v_plugin_manager); - __Pyx_XDECREF(__pyx_v_stop_frame); - __Pyx_XDECREF(__pyx_v_function_breakpoint_on_call_event); - __Pyx_XDECREF(__pyx_v_returns_cache_key); - __Pyx_XDECREF(__pyx_v_return_lines); - __Pyx_XDECREF(__pyx_v_x); - __Pyx_XDECREF(__pyx_v_f); - __Pyx_XDECREF(__pyx_v_func_lines); - __Pyx_XDECREF(__pyx_v_offset_and_lineno); - __Pyx_XDECREF(__pyx_v_breakpoint); - __Pyx_XDECREF(__pyx_v_stop_reason); - __Pyx_XDECREF(__pyx_v_bp_type); - __Pyx_XDECREF(__pyx_v_new_frame); - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XDECREF(__pyx_v_eval_result); - __Pyx_XDECREF(__pyx_v_cmd); - __Pyx_XDECREF(__pyx_v_exc); - __Pyx_XDECREF(__pyx_v_plugin_stop); - __Pyx_XDECREF(__pyx_v_force_check_project_scope); - __Pyx_XDECREF(__pyx_v_filename); - __Pyx_XDECREF(__pyx_v_f2); - __Pyx_XDECREF(__pyx_v_back); - __Pyx_XDECREF(__pyx_v_smart_step_into_variant); - __Pyx_XDECREF(__pyx_v_children_variants); - __Pyx_XDECREF(__pyx_v_f_code); - __Pyx_XDECREF(__pyx_v_stopped_on_plugin); - __Pyx_XDECREF(__pyx_v_back_absolute_filename); - __Pyx_XDECREF(__pyx_v__); - __Pyx_XDECREF(__pyx_v_base); - __Pyx_XDECREF(__pyx_v_frame); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch = {"trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_frame = 0; - PyObject *__pyx_v_event = 0; - PyObject *__pyx_v_arg = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[3] = {0,0,0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("trace_dispatch (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_MACROS - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { - (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); - kw_args--; - } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 701, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { - (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); - kw_args--; - } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 701, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, 1); __PYX_ERR(0, 701, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { - (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); - kw_args--; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1392, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_24 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_24 = 1; + } } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 701, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, 2); __PYX_ERR(0, 701, __pyx_L3_error) + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_24, 1+__pyx_t_24); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1392, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch") < 0)) __PYX_ERR(0, 701, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 3)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - } - __pyx_v_frame = values[0]; - __pyx_v_event = ((PyObject*)values[1]); - __pyx_v_arg = values[2]; - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 701, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - { - Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); - } - } - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 701, __pyx_L1_error) - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; - { - Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); - } - } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("trace_dispatch", 1); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict + /* "_pydevd_bundle/pydevd_cython.pyx":1394 + * remove_exception_from_frame(frame) + * # Clear some local variables... + * frame = None # <<<<<<<<<<<<<< + * trace_obj = None + * initial_trace_obj = None */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_frame, Py_None); -/* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_MACROS - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self)); + /* "_pydevd_bundle/pydevd_cython.pyx":1395 + * # Clear some local variables... + * frame = None + * trace_obj = None # <<<<<<<<<<<<<< + * initial_trace_obj = None + * check_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_trace_obj, Py_None); - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "_pydevd_bundle/pydevd_cython.pyx":1396 + * frame = None + * trace_obj = None + * initial_trace_obj = None # <<<<<<<<<<<<<< + * check_trace_obj = None + * f = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_initial_trace_obj, Py_None); -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self) { - PyObject *__pyx_v_state = 0; - PyObject *__pyx_v__dict = 0; - int __pyx_v_use_setstate; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 1); + /* "_pydevd_bundle/pydevd_cython.pyx":1397 + * trace_obj = None + * initial_trace_obj = None + * check_trace_obj = None # <<<<<<<<<<<<<< + * f = None + * frame_id_to_frame = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); - /* "(tree fragment)":5 - * cdef object _dict - * cdef bint use_setstate - * state = (self._args, self.exc_info, self.should_skip) # <<<<<<<<<<<<<< - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: + /* "_pydevd_bundle/pydevd_cython.pyx":1398 + * initial_trace_obj = None + * check_trace_obj = None + * f = None # <<<<<<<<<<<<<< + * frame_id_to_frame = None + * py_db = None */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->should_skip); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_self->_args); - __Pyx_GIVEREF(__pyx_v_self->_args); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_args)) __PYX_ERR(2, 5, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_self->exc_info); - __Pyx_GIVEREF(__pyx_v_self->exc_info); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->exc_info)) __PYX_ERR(2, 5, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error); - __pyx_t_1 = 0; - __pyx_v_state = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f, Py_None); - /* "(tree fragment)":6 - * cdef bint use_setstate - * state = (self._args, self.exc_info, self.should_skip) - * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< - * if _dict is not None: - * state += (_dict,) + /* "_pydevd_bundle/pydevd_cython.pyx":1399 + * check_trace_obj = None + * f = None + * frame_id_to_frame = None # <<<<<<<<<<<<<< + * py_db = None + * thread = None */ - __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v__dict = __pyx_t_2; - __pyx_t_2 = 0; + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); - /* "(tree fragment)":7 - * state = (self._args, self.exc_info, self.should_skip) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "_pydevd_bundle/pydevd_cython.pyx":1400 + * f = None + * frame_id_to_frame = None + * py_db = None # <<<<<<<<<<<<<< + * thread = None + * */ - __pyx_t_3 = (__pyx_v__dict != Py_None); - if (__pyx_t_3) { + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_py_db, Py_None); - /* "(tree fragment)":8 - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: - * state += (_dict,) # <<<<<<<<<<<<<< - * use_setstate = True - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1401 + * frame_id_to_frame = None + * py_db = None + * thread = None # <<<<<<<<<<<<<< + * + * return stopped */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v__dict); - __Pyx_GIVEREF(__pyx_v__dict); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_thread, Py_None); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21); + } + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; + __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_25; + goto __pyx_L1_error; + __pyx_L67_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21); + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; + goto __pyx_L1_error; + } + __pyx_L3_return: { + __pyx_t_21 = __pyx_r; + __pyx_r = 0; - /* "(tree fragment)":9 - * if _dict is not None: - * state += (_dict,) - * use_setstate = True # <<<<<<<<<<<<<< - * else: - * use_setstate = self._args is not None or self.exc_info is not None + /* "_pydevd_bundle/pydevd_cython.pyx":1392 + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< + * # Clear some local variables... + * frame = None */ - __pyx_v_use_setstate = 1; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "(tree fragment)":7 - * state = (self._args, self.exc_info, self.should_skip) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "_pydevd_bundle/pydevd_cython.pyx":1394 + * remove_exception_from_frame(frame) + * # Clear some local variables... + * frame = None # <<<<<<<<<<<<<< + * trace_obj = None + * initial_trace_obj = None */ - goto __pyx_L3; - } + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_frame, Py_None); - /* "(tree fragment)":11 - * use_setstate = True - * else: - * use_setstate = self._args is not None or self.exc_info is not None # <<<<<<<<<<<<<< - * if use_setstate: - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + /* "_pydevd_bundle/pydevd_cython.pyx":1395 + * # Clear some local variables... + * frame = None + * trace_obj = None # <<<<<<<<<<<<<< + * initial_trace_obj = None + * check_trace_obj = None */ - /*else*/ { - __pyx_t_4 = (__pyx_v_self->_args != ((PyObject*)Py_None)); - if (!__pyx_t_4) { - } else { - __pyx_t_3 = __pyx_t_4; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_4 = (__pyx_v_self->exc_info != Py_None); - __pyx_t_3 = __pyx_t_4; - __pyx_L4_bool_binop_done:; - __pyx_v_use_setstate = __pyx_t_3; - } - __pyx_L3:; + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_trace_obj, Py_None); - /* "(tree fragment)":12 - * else: - * use_setstate = self._args is not None or self.exc_info is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1396 + * frame = None + * trace_obj = None + * initial_trace_obj = None # <<<<<<<<<<<<<< + * check_trace_obj = None + * f = None */ - if (__pyx_v_use_setstate) { + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_initial_trace_obj, Py_None); - /* "(tree fragment)":13 - * use_setstate = self._args is not None or self.exc_info is not None - * if use_setstate: - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state # <<<<<<<<<<<<<< - * else: - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + /* "_pydevd_bundle/pydevd_cython.pyx":1397 + * trace_obj = None + * initial_trace_obj = None + * check_trace_obj = None # <<<<<<<<<<<<<< + * f = None + * frame_id_to_frame = None */ - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_PyDBFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); - __Pyx_INCREF(__pyx_int_61391470); - __Pyx_GIVEREF(__pyx_int_61391470); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_61391470)) __PYX_ERR(2, 13, __pyx_L1_error); - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_state); - __Pyx_GIVEREF(__pyx_v_state); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); - __pyx_t_1 = 0; - __pyx_t_2 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; - goto __pyx_L0; + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); - /* "(tree fragment)":12 - * else: - * use_setstate = self._args is not None or self.exc_info is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state - * else: + /* "_pydevd_bundle/pydevd_cython.pyx":1398 + * initial_trace_obj = None + * check_trace_obj = None + * f = None # <<<<<<<<<<<<<< + * frame_id_to_frame = None + * py_db = None */ - } + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f, Py_None); - /* "(tree fragment)":15 - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state - * else: - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + /* "_pydevd_bundle/pydevd_cython.pyx":1399 + * check_trace_obj = None + * f = None + * frame_id_to_frame = None # <<<<<<<<<<<<<< + * py_db = None + * thread = None */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PyDBFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); - __Pyx_INCREF(__pyx_int_61391470); - __Pyx_GIVEREF(__pyx_int_61391470); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_61391470)) __PYX_ERR(2, 15, __pyx_L1_error); - __Pyx_INCREF(__pyx_v_state); - __Pyx_GIVEREF(__pyx_v_state); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error); - __pyx_t_5 = 0; - __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - } + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict + /* "_pydevd_bundle/pydevd_cython.pyx":1400 + * f = None + * frame_id_to_frame = None + * py_db = None # <<<<<<<<<<<<<< + * thread = None + * */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_py_db, Py_None); - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_state); - __Pyx_XDECREF(__pyx_v__dict); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":16 - * else: - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + /* "_pydevd_bundle/pydevd_cython.pyx":1401 + * frame_id_to_frame = None + * py_db = None + * thread = None # <<<<<<<<<<<<<< + * + * return stopped */ - -/* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v___pyx_state = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_MACROS - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { - (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); - kw_args--; - } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v___pyx_state = values[0]; - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - { - Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); - } - } - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v___pyx_state); - - /* function exit code */ - { - Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_thread, Py_None); + __pyx_r = __pyx_t_21; + __pyx_t_21 = 0; + goto __pyx_L0; } + __pyx_L5:; } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 1); - /* "(tree fragment)":17 - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) - * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":1403 + * thread = None + * + * return stopped # <<<<<<<<<<<<<< + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + * from _pydev_bundle.pydev_log import exception as pydev_log_exception */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) - __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_stopped); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; - /* "(tree fragment)":16 - * else: - * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + /* "_pydevd_bundle/pydevd_cython.pyx":1284 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; */ /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XDECREF(__pyx_v_abs_real_path_and_base); + __Pyx_XDECREF(__pyx_v_absolute_filename); + __Pyx_XDECREF(__pyx_v_canonical_normalized_filename); + __Pyx_XDECREF(__pyx_v_lines_ignored); + __Pyx_XDECREF(__pyx_v_frame_id_to_frame); + __Pyx_XDECREF(__pyx_v_merged); + __Pyx_XDECREF(__pyx_v_trace_obj); + __Pyx_XDECREF(__pyx_v_initial_trace_obj); + __Pyx_XDECREF(__pyx_v_check_trace_obj); + __Pyx_XDECREF(__pyx_v_curr_stat); + __Pyx_XDECREF(__pyx_v_last_stat); + __Pyx_XDECREF(__pyx_v_from_user_input); + __Pyx_XDECREF(__pyx_v_exc_lineno); + __Pyx_XDECREF(__pyx_v_line); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XDECREF(__pyx_v_frame); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1436 +/* "_pydevd_bundle/pydevd_cython.pyx":1439 * * * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< @@ -26810,15 +27916,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setsta */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5notify_skipped_step_in_because_of_filters(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_11notify_skipped_step_in_because_of_filters(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_5notify_skipped_step_in_because_of_filters = {"notify_skipped_step_in_because_of_filters", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_5notify_skipped_step_in_because_of_filters, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5notify_skipped_step_in_because_of_filters(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_11notify_skipped_step_in_because_of_filters = {"notify_skipped_step_in_because_of_filters", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_11notify_skipped_step_in_because_of_filters, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_11notify_skipped_step_in_because_of_filters(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -26865,7 +27971,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -26873,14 +27979,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("notify_skipped_step_in_because_of_filters", 1, 2, 2, 1); __PYX_ERR(0, 1436, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("notify_skipped_step_in_because_of_filters", 1, 2, 2, 1); __PYX_ERR(0, 1439, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "notify_skipped_step_in_because_of_filters") < 0)) __PYX_ERR(0, 1436, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "notify_skipped_step_in_because_of_filters") < 0)) __PYX_ERR(0, 1439, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -26893,7 +27999,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("notify_skipped_step_in_because_of_filters", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1436, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("notify_skipped_step_in_because_of_filters", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1439, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26907,7 +28013,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_in_because_of_filters(__pyx_self, __pyx_v_py_db, __pyx_v_frame); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_10notify_skipped_step_in_because_of_filters(__pyx_self, __pyx_v_py_db, __pyx_v_frame); /* function exit code */ { @@ -26920,7 +28026,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_in_because_of_filters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10notify_skipped_step_in_because_of_filters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -26940,7 +28046,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("notify_skipped_step_in_because_of_filters", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1439 + /* "_pydevd_bundle/pydevd_cython.pyx":1442 * global _global_notify_skipped_step_in * * with _global_notify_skipped_step_in_lock: # <<<<<<<<<<<<<< @@ -26948,11 +28054,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ * # Check with lock in place (callers should actually have checked */ /*with:*/ { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_global_notify_skipped_step_in_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_global_notify_skipped_step_in_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L3_error) + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -26972,7 +28078,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L3_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1442, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -26988,17 +28094,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1440 + /* "_pydevd_bundle/pydevd_cython.pyx":1443 * * with _global_notify_skipped_step_in_lock: * if _global_notify_skipped_step_in: # <<<<<<<<<<<<<< * # Check with lock in place (callers should actually have checked * # before without the lock in place due to performance). */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1440, __pyx_L7_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1443, __pyx_L7_error) if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":1443 + /* "_pydevd_bundle/pydevd_cython.pyx":1446 * # Check with lock in place (callers should actually have checked * # before without the lock in place due to performance). * return # <<<<<<<<<<<<<< @@ -27009,7 +28115,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1440 + /* "_pydevd_bundle/pydevd_cython.pyx":1443 * * with _global_notify_skipped_step_in_lock: * if _global_notify_skipped_step_in: # <<<<<<<<<<<<<< @@ -27018,7 +28124,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1444 + /* "_pydevd_bundle/pydevd_cython.pyx":1447 * # before without the lock in place due to performance). * return * _global_notify_skipped_step_in = True # <<<<<<<<<<<<<< @@ -27030,14 +28136,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in, ((PyObject*)Py_True)); __Pyx_GIVEREF(Py_True); - /* "_pydevd_bundle/pydevd_cython.pyx":1445 + /* "_pydevd_bundle/pydevd_cython.pyx":1448 * return * _global_notify_skipped_step_in = True * py_db.notify_skipped_step_in_because_of_filters(frame) # <<<<<<<<<<<<<< * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1445, __pyx_L7_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1448, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_6 = 0; @@ -27057,13 +28163,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_frame}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1439 + /* "_pydevd_bundle/pydevd_cython.pyx":1442 * global _global_notify_skipped_step_in * * with _global_notify_skipped_step_in_lock: # <<<<<<<<<<<<<< @@ -27082,20 +28188,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.notify_skipped_step_in_because_of_filters", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1439, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1442, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L9_except_error) + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1442, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1439, __pyx_L9_except_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1442, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (__pyx_t_10 < 0) __PYX_ERR(0, 1439, __pyx_L9_except_error) + if (__pyx_t_10 < 0) __PYX_ERR(0, 1442, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_10); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); @@ -27103,7 +28209,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; - __PYX_ERR(0, 1439, __pyx_L9_except_error) + __PYX_ERR(0, 1442, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -27135,7 +28241,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1439, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -27147,7 +28253,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1439, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -27164,7 +28270,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ __pyx_L17:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1436 + /* "_pydevd_bundle/pydevd_cython.pyx":1439 * * * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< @@ -27188,7 +28294,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4notify_skipped_step_ return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1450 +/* "_pydevd_bundle/pydevd_cython.pyx":1453 * cdef class SafeCallWrapper: * cdef method_object * def __init__(self, method_object): # <<<<<<<<<<<<<< @@ -27232,12 +28338,12 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_1__init__ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1450, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1453, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1450, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1453, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -27248,7 +28354,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_1__init__ } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1450, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1453, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27280,7 +28386,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper___init__( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1451 + /* "_pydevd_bundle/pydevd_cython.pyx":1454 * cdef method_object * def __init__(self, method_object): * self.method_object = method_object # <<<<<<<<<<<<<< @@ -27293,7 +28399,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper___init__( __Pyx_DECREF(__pyx_v_self->method_object); __pyx_v_self->method_object = __pyx_v_method_object; - /* "_pydevd_bundle/pydevd_cython.pyx":1450 + /* "_pydevd_bundle/pydevd_cython.pyx":1453 * cdef class SafeCallWrapper: * cdef method_object * def __init__(self, method_object): # <<<<<<<<<<<<<< @@ -27307,7 +28413,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper___init__( return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1452 +/* "_pydevd_bundle/pydevd_cython.pyx":1455 * def __init__(self, method_object): * self.method_object = method_object * def __call__(self, *args): # <<<<<<<<<<<<<< @@ -27354,7 +28460,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1455 + /* "_pydevd_bundle/pydevd_cython.pyx":1458 * #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field * #in the frame, and that reference might get destroyed by set trace on frame and parents * cdef PyObject* method_obj = self.method_object # <<<<<<<<<<<<<< @@ -27363,7 +28469,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ */ __pyx_v_method_obj = ((PyObject *)__pyx_v_self->method_object); - /* "_pydevd_bundle/pydevd_cython.pyx":1456 + /* "_pydevd_bundle/pydevd_cython.pyx":1459 * #in the frame, and that reference might get destroyed by set trace on frame and parents * cdef PyObject* method_obj = self.method_object * Py_INCREF(method_obj) # <<<<<<<<<<<<<< @@ -27372,19 +28478,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ */ Py_INCREF(((PyObject *)__pyx_v_method_obj)); - /* "_pydevd_bundle/pydevd_cython.pyx":1457 + /* "_pydevd_bundle/pydevd_cython.pyx":1460 * cdef PyObject* method_obj = self.method_object * Py_INCREF(method_obj) * ret = (method_obj)(*args) # <<<<<<<<<<<<<< * Py_XDECREF (method_obj) * return SafeCallWrapper(ret) if ret is not None else None */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_method_obj), __pyx_v_args, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_method_obj), __pyx_v_args, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1458 + /* "_pydevd_bundle/pydevd_cython.pyx":1461 * Py_INCREF(method_obj) * ret = (method_obj)(*args) * Py_XDECREF (method_obj) # <<<<<<<<<<<<<< @@ -27393,7 +28499,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ */ Py_XDECREF(__pyx_v_method_obj); - /* "_pydevd_bundle/pydevd_cython.pyx":1459 + /* "_pydevd_bundle/pydevd_cython.pyx":1462 * ret = (method_obj)(*args) * Py_XDECREF (method_obj) * return SafeCallWrapper(ret) if ret is not None else None # <<<<<<<<<<<<<< @@ -27403,7 +28509,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = (__pyx_v_ret != Py_None); if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -27415,7 +28521,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1452 + /* "_pydevd_bundle/pydevd_cython.pyx":1455 * def __init__(self, method_object): * self.method_object = method_object * def __call__(self, *args): # <<<<<<<<<<<<<< @@ -27436,7 +28542,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__ return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1460 +/* "_pydevd_bundle/pydevd_cython.pyx":1463 * Py_XDECREF (method_obj) * return SafeCallWrapper(ret) if ret is not None else None * def get_method_object(self): # <<<<<<<<<<<<<< @@ -27490,7 +28596,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_4ge __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_method_object", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1461 + /* "_pydevd_bundle/pydevd_cython.pyx":1464 * return SafeCallWrapper(ret) if ret is not None else None * def get_method_object(self): * return self.method_object # <<<<<<<<<<<<<< @@ -27502,7 +28608,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_4ge __pyx_r = __pyx_v_self->method_object; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1460 + /* "_pydevd_bundle/pydevd_cython.pyx":1463 * Py_XDECREF (method_obj) * return SafeCallWrapper(ret) if ret is not None else None * def get_method_object(self): # <<<<<<<<<<<<<< @@ -27918,7 +29024,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_8__ return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1466 +/* "_pydevd_bundle/pydevd_cython.pyx":1469 * * * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< @@ -27927,15 +29033,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_8__ */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_13fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_7fix_top_level_trace_and_get_trace_func = {"fix_top_level_trace_and_get_trace_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_7fix_top_level_trace_and_get_trace_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_13fix_top_level_trace_and_get_trace_func = {"fix_top_level_trace_and_get_trace_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_13fix_top_level_trace_and_get_trace_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_13fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -27982,7 +29088,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1466, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -27990,14 +29096,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1466, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("fix_top_level_trace_and_get_trace_func", 1, 2, 2, 1); __PYX_ERR(0, 1466, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fix_top_level_trace_and_get_trace_func", 1, 2, 2, 1); __PYX_ERR(0, 1469, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fix_top_level_trace_and_get_trace_func") < 0)) __PYX_ERR(0, 1466, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fix_top_level_trace_and_get_trace_func") < 0)) __PYX_ERR(0, 1469, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -28010,7 +29116,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fix_top_level_trace_and_get_trace_func", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1466, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fix_top_level_trace_and_get_trace_func", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1469, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28024,7 +29130,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_and_get_trace_func(__pyx_self, __pyx_v_py_db, __pyx_v_frame); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12fix_top_level_trace_and_get_trace_func(__pyx_self, __pyx_v_py_db, __pyx_v_frame); /* function exit code */ { @@ -28037,7 +29143,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_thread = NULL; @@ -28072,7 +29178,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1477 + /* "_pydevd_bundle/pydevd_cython.pyx":1480 * # where more information is cached (and will also setup the tracing for * # frames where we should deal with unhandled exceptions). * thread = None # <<<<<<<<<<<<<< @@ -28082,7 +29188,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __Pyx_INCREF(Py_None); __pyx_v_thread = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":1481 + /* "_pydevd_bundle/pydevd_cython.pyx":1484 * # (i.e.: thread entry-points). * * f_unhandled = frame # <<<<<<<<<<<<<< @@ -28092,7 +29198,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __Pyx_INCREF(__pyx_v_frame); __pyx_v_f_unhandled = __pyx_v_frame; - /* "_pydevd_bundle/pydevd_cython.pyx":1483 + /* "_pydevd_bundle/pydevd_cython.pyx":1486 * f_unhandled = frame * # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) * force_only_unhandled_tracer = False # <<<<<<<<<<<<<< @@ -28101,7 +29207,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ __pyx_v_force_only_unhandled_tracer = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1484 + /* "_pydevd_bundle/pydevd_cython.pyx":1487 * # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) * force_only_unhandled_tracer = False * while f_unhandled is not None: # <<<<<<<<<<<<<< @@ -28112,59 +29218,59 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_1 = (__pyx_v_f_unhandled != Py_None); if (!__pyx_t_1) break; - /* "_pydevd_bundle/pydevd_cython.pyx":1487 + /* "_pydevd_bundle/pydevd_cython.pyx":1490 * # name = splitext(basename(f_unhandled.f_code.co_filename))[0] * * name = f_unhandled.f_code.co_filename # <<<<<<<<<<<<<< * # basename * i = name.rfind('/') */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 1487, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1489 + /* "_pydevd_bundle/pydevd_cython.pyx":1492 * name = f_unhandled.f_code.co_filename * # basename * i = name.rfind('/') # <<<<<<<<<<<<<< * j = name.rfind('\\') * if j > i: */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1490 + /* "_pydevd_bundle/pydevd_cython.pyx":1493 * # basename * i = name.rfind('/') * j = name.rfind('\\') # <<<<<<<<<<<<<< * if j > i: * i = j */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1491 + /* "_pydevd_bundle/pydevd_cython.pyx":1494 * i = name.rfind('/') * j = name.rfind('\\') * if j > i: # <<<<<<<<<<<<<< * i = j * if i >= 0: */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1491, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1494, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1492 + /* "_pydevd_bundle/pydevd_cython.pyx":1495 * j = name.rfind('\\') * if j > i: * i = j # <<<<<<<<<<<<<< @@ -28174,7 +29280,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __Pyx_INCREF(__pyx_v_j); __Pyx_DECREF_SET(__pyx_v_i, __pyx_v_j); - /* "_pydevd_bundle/pydevd_cython.pyx":1491 + /* "_pydevd_bundle/pydevd_cython.pyx":1494 * i = name.rfind('/') * j = name.rfind('\\') * if j > i: # <<<<<<<<<<<<<< @@ -28183,19 +29289,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1493 + /* "_pydevd_bundle/pydevd_cython.pyx":1496 * if j > i: * i = j * if i >= 0: # <<<<<<<<<<<<<< * name = name[i + 1:] * # remove ext */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1494 + /* "_pydevd_bundle/pydevd_cython.pyx":1497 * i = j * if i >= 0: * name = name[i + 1:] # <<<<<<<<<<<<<< @@ -28204,24 +29310,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ if (unlikely(__pyx_v_name == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1494, __pyx_L1_error) + __PYX_ERR(0, 1497, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 == Py_None); if (__pyx_t_1) { __pyx_t_4 = 0; } else { - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error) __pyx_t_4 = __pyx_t_5; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PySequence_GetSlice(__pyx_v_name, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_3 = PySequence_GetSlice(__pyx_v_name, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1493 + /* "_pydevd_bundle/pydevd_cython.pyx":1496 * if j > i: * i = j * if i >= 0: # <<<<<<<<<<<<<< @@ -28230,31 +29336,31 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1496 + /* "_pydevd_bundle/pydevd_cython.pyx":1499 * name = name[i + 1:] * # remove ext * i = name.rfind('.') # <<<<<<<<<<<<<< * if i >= 0: * name = name[:i] */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1497 + /* "_pydevd_bundle/pydevd_cython.pyx":1500 * # remove ext * i = name.rfind('.') * if i >= 0: # <<<<<<<<<<<<<< * name = name[:i] * */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1500, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1498 + /* "_pydevd_bundle/pydevd_cython.pyx":1501 * i = name.rfind('.') * if i >= 0: * name = name[:i] # <<<<<<<<<<<<<< @@ -28263,7 +29369,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ if (unlikely(__pyx_v_name == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1498, __pyx_L1_error) + __PYX_ERR(0, 1501, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_i); __pyx_t_3 = __pyx_v_i; @@ -28271,16 +29377,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ if (__pyx_t_1) { __pyx_t_4 = PY_SSIZE_T_MAX; } else { - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error) __pyx_t_4 = __pyx_t_5; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PySequence_GetSlice(__pyx_v_name, 0, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_3 = PySequence_GetSlice(__pyx_v_name, 0, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1497 + /* "_pydevd_bundle/pydevd_cython.pyx":1500 * # remove ext * i = name.rfind('.') * if i >= 0: # <<<<<<<<<<<<<< @@ -28289,42 +29395,42 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1500 + /* "_pydevd_bundle/pydevd_cython.pyx":1503 * name = name[:i] * * if name == 'threading': # <<<<<<<<<<<<<< * if f_unhandled.f_code.co_name in ('__bootstrap', '_bootstrap'): * # We need __bootstrap_inner, not __bootstrap. */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_threading, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1500, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_threading, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1503, __pyx_L1_error) if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1501 + /* "_pydevd_bundle/pydevd_cython.pyx":1504 * * if name == 'threading': * if f_unhandled.f_code.co_name in ('__bootstrap', '_bootstrap'): # <<<<<<<<<<<<<< * # We need __bootstrap_inner, not __bootstrap. * return None, False */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bootstrap, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bootstrap, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1504, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L10_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bootstrap_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bootstrap_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1504, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L10_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __pyx_t_1; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1503 + /* "_pydevd_bundle/pydevd_cython.pyx":1506 * if f_unhandled.f_code.co_name in ('__bootstrap', '_bootstrap'): * # We need __bootstrap_inner, not __bootstrap. * return None, False # <<<<<<<<<<<<<< @@ -28336,7 +29442,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_r = __pyx_tuple__10; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1501 + /* "_pydevd_bundle/pydevd_cython.pyx":1504 * * if name == 'threading': * if f_unhandled.f_code.co_name in ('__bootstrap', '_bootstrap'): # <<<<<<<<<<<<<< @@ -28345,41 +29451,41 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1505 + /* "_pydevd_bundle/pydevd_cython.pyx":1508 * return None, False * * elif f_unhandled.f_code.co_name in ('__bootstrap_inner', '_bootstrap_inner'): # <<<<<<<<<<<<<< * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. * t = f_unhandled.f_locals.get('self') */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_bootstrap_inner, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_bootstrap_inner, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1508, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_6 = __pyx_t_1; goto __pyx_L12_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_bootstrap_inner_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_bootstrap_inner_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1508, __pyx_L1_error) __pyx_t_6 = __pyx_t_1; __pyx_L12_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_6; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1507 + /* "_pydevd_bundle/pydevd_cython.pyx":1510 * elif f_unhandled.f_code.co_name in ('__bootstrap_inner', '_bootstrap_inner'): * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. * t = f_unhandled.f_locals.get('self') # <<<<<<<<<<<<<< * force_only_unhandled_tracer = True * if t is not None and isinstance(t, threading.Thread): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -28400,14 +29506,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_self}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1508 + /* "_pydevd_bundle/pydevd_cython.pyx":1511 * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. * t = f_unhandled.f_locals.get('self') * force_only_unhandled_tracer = True # <<<<<<<<<<<<<< @@ -28416,7 +29522,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ __pyx_v_force_only_unhandled_tracer = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":1509 + /* "_pydevd_bundle/pydevd_cython.pyx":1512 * t = f_unhandled.f_locals.get('self') * force_only_unhandled_tracer = True * if t is not None and isinstance(t, threading.Thread): # <<<<<<<<<<<<<< @@ -28429,18 +29535,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_1 = __pyx_t_6; goto __pyx_L15_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = PyObject_IsInstance(__pyx_v_t, __pyx_t_7); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1509, __pyx_L1_error) + __pyx_t_6 = PyObject_IsInstance(__pyx_v_t, __pyx_t_7); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L15_bool_binop_done:; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1510 + /* "_pydevd_bundle/pydevd_cython.pyx":1513 * force_only_unhandled_tracer = True * if t is not None and isinstance(t, threading.Thread): * thread = t # <<<<<<<<<<<<<< @@ -28450,7 +29556,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __Pyx_INCREF(__pyx_v_t); __Pyx_DECREF_SET(__pyx_v_thread, __pyx_v_t); - /* "_pydevd_bundle/pydevd_cython.pyx":1511 + /* "_pydevd_bundle/pydevd_cython.pyx":1514 * if t is not None and isinstance(t, threading.Thread): * thread = t * break # <<<<<<<<<<<<<< @@ -28459,7 +29565,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ goto __pyx_L4_break; - /* "_pydevd_bundle/pydevd_cython.pyx":1509 + /* "_pydevd_bundle/pydevd_cython.pyx":1512 * t = f_unhandled.f_locals.get('self') * force_only_unhandled_tracer = True * if t is not None and isinstance(t, threading.Thread): # <<<<<<<<<<<<<< @@ -28468,7 +29574,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1505 + /* "_pydevd_bundle/pydevd_cython.pyx":1508 * return None, False * * elif f_unhandled.f_code.co_name in ('__bootstrap_inner', '_bootstrap_inner'): # <<<<<<<<<<<<<< @@ -28477,7 +29583,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1500 + /* "_pydevd_bundle/pydevd_cython.pyx":1503 * name = name[:i] * * if name == 'threading': # <<<<<<<<<<<<<< @@ -28487,33 +29593,33 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ goto __pyx_L8; } - /* "_pydevd_bundle/pydevd_cython.pyx":1513 + /* "_pydevd_bundle/pydevd_cython.pyx":1516 * break * * elif name == 'pydev_monkey': # <<<<<<<<<<<<<< * if f_unhandled.f_code.co_name == '__call__': * force_only_unhandled_tracer = True */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydev_monkey, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1513, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydev_monkey, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1516, __pyx_L1_error) if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1514 + /* "_pydevd_bundle/pydevd_cython.pyx":1517 * * elif name == 'pydev_monkey': * if f_unhandled.f_code.co_name == '__call__': # <<<<<<<<<<<<<< * force_only_unhandled_tracer = True * break */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_call_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_call_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1515 + /* "_pydevd_bundle/pydevd_cython.pyx":1518 * elif name == 'pydev_monkey': * if f_unhandled.f_code.co_name == '__call__': * force_only_unhandled_tracer = True # <<<<<<<<<<<<<< @@ -28522,7 +29628,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ __pyx_v_force_only_unhandled_tracer = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":1516 + /* "_pydevd_bundle/pydevd_cython.pyx":1519 * if f_unhandled.f_code.co_name == '__call__': * force_only_unhandled_tracer = True * break # <<<<<<<<<<<<<< @@ -28531,7 +29637,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ goto __pyx_L4_break; - /* "_pydevd_bundle/pydevd_cython.pyx":1514 + /* "_pydevd_bundle/pydevd_cython.pyx":1517 * * elif name == 'pydev_monkey': * if f_unhandled.f_code.co_name == '__call__': # <<<<<<<<<<<<<< @@ -28540,7 +29646,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1513 + /* "_pydevd_bundle/pydevd_cython.pyx":1516 * break * * elif name == 'pydev_monkey': # <<<<<<<<<<<<<< @@ -28550,42 +29656,42 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ goto __pyx_L8; } - /* "_pydevd_bundle/pydevd_cython.pyx":1518 + /* "_pydevd_bundle/pydevd_cython.pyx":1521 * break * * elif name == 'pydevd': # <<<<<<<<<<<<<< * if f_unhandled.f_code.co_name in ('run', 'main'): * # We need to get to _exec */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydevd, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydevd, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1521, __pyx_L1_error) if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1519 + /* "_pydevd_bundle/pydevd_cython.pyx":1522 * * elif name == 'pydevd': * if f_unhandled.f_code.co_name in ('run', 'main'): # <<<<<<<<<<<<<< * # We need to get to _exec * return None, False */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_run, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_run, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1522, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_main, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_main, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1522, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L19_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = __pyx_t_1; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1521 + /* "_pydevd_bundle/pydevd_cython.pyx":1524 * if f_unhandled.f_code.co_name in ('run', 'main'): * # We need to get to _exec * return None, False # <<<<<<<<<<<<<< @@ -28597,7 +29703,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_r = __pyx_tuple__10; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1519 + /* "_pydevd_bundle/pydevd_cython.pyx":1522 * * elif name == 'pydevd': * if f_unhandled.f_code.co_name in ('run', 'main'): # <<<<<<<<<<<<<< @@ -28606,23 +29712,23 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1523 + /* "_pydevd_bundle/pydevd_cython.pyx":1526 * return None, False * * if f_unhandled.f_code.co_name == '_exec': # <<<<<<<<<<<<<< * force_only_unhandled_tracer = True * break */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_exec, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_exec, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1524 + /* "_pydevd_bundle/pydevd_cython.pyx":1527 * * if f_unhandled.f_code.co_name == '_exec': * force_only_unhandled_tracer = True # <<<<<<<<<<<<<< @@ -28631,7 +29737,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ __pyx_v_force_only_unhandled_tracer = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":1525 + /* "_pydevd_bundle/pydevd_cython.pyx":1528 * if f_unhandled.f_code.co_name == '_exec': * force_only_unhandled_tracer = True * break # <<<<<<<<<<<<<< @@ -28640,7 +29746,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ goto __pyx_L4_break; - /* "_pydevd_bundle/pydevd_cython.pyx":1523 + /* "_pydevd_bundle/pydevd_cython.pyx":1526 * return None, False * * if f_unhandled.f_code.co_name == '_exec': # <<<<<<<<<<<<<< @@ -28649,7 +29755,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1518 + /* "_pydevd_bundle/pydevd_cython.pyx":1521 * break * * elif name == 'pydevd': # <<<<<<<<<<<<<< @@ -28659,17 +29765,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ goto __pyx_L8; } - /* "_pydevd_bundle/pydevd_cython.pyx":1527 + /* "_pydevd_bundle/pydevd_cython.pyx":1530 * break * * elif name == 'pydevd_tracing': # <<<<<<<<<<<<<< * return None, False * */ - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydevd_tracing, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydevd_tracing, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1530, __pyx_L1_error) if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1528 + /* "_pydevd_bundle/pydevd_cython.pyx":1531 * * elif name == 'pydevd_tracing': * return None, False # <<<<<<<<<<<<<< @@ -28681,7 +29787,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_r = __pyx_tuple__10; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1527 + /* "_pydevd_bundle/pydevd_cython.pyx":1530 * break * * elif name == 'pydevd_tracing': # <<<<<<<<<<<<<< @@ -28690,20 +29796,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1530 + /* "_pydevd_bundle/pydevd_cython.pyx":1533 * return None, False * * elif f_unhandled.f_back is None: # <<<<<<<<<<<<<< * break * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1531 + /* "_pydevd_bundle/pydevd_cython.pyx":1534 * * elif f_unhandled.f_back is None: * break # <<<<<<<<<<<<<< @@ -28712,7 +29818,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ goto __pyx_L4_break; - /* "_pydevd_bundle/pydevd_cython.pyx":1530 + /* "_pydevd_bundle/pydevd_cython.pyx":1533 * return None, False * * elif f_unhandled.f_back is None: # <<<<<<<<<<<<<< @@ -28722,21 +29828,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ } __pyx_L8:; - /* "_pydevd_bundle/pydevd_cython.pyx":1533 + /* "_pydevd_bundle/pydevd_cython.pyx":1536 * break * * f_unhandled = f_unhandled.f_back # <<<<<<<<<<<<<< * * if thread is None: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_f_unhandled, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L4_break:; - /* "_pydevd_bundle/pydevd_cython.pyx":1535 + /* "_pydevd_bundle/pydevd_cython.pyx":1538 * f_unhandled = f_unhandled.f_back * * if thread is None: # <<<<<<<<<<<<<< @@ -28746,32 +29852,32 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = (__pyx_v_thread == Py_None); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1538 + /* "_pydevd_bundle/pydevd_cython.pyx":1541 * # Important: don't call threadingCurrentThread if we're in the threading module * # to avoid creating dummy threads. * if py_db.threading_get_ident is not None: # <<<<<<<<<<<<<< * thread = py_db.threading_active.get(py_db.threading_get_ident()) * if thread is None: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_get_ident); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_get_ident); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1539 + /* "_pydevd_bundle/pydevd_cython.pyx":1542 * # to avoid creating dummy threads. * if py_db.threading_get_ident is not None: * thread = py_db.threading_active.get(py_db.threading_get_ident()) # <<<<<<<<<<<<<< * if thread is None: * return None, False */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_active); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_active); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_get_ident); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_get_ident); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_8 = 0; @@ -28791,7 +29897,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1539, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -28814,14 +29920,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1539, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF_SET(__pyx_v_thread, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1540 + /* "_pydevd_bundle/pydevd_cython.pyx":1543 * if py_db.threading_get_ident is not None: * thread = py_db.threading_active.get(py_db.threading_get_ident()) * if thread is None: # <<<<<<<<<<<<<< @@ -28831,7 +29937,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = (__pyx_v_thread == Py_None); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1541 + /* "_pydevd_bundle/pydevd_cython.pyx":1544 * thread = py_db.threading_active.get(py_db.threading_get_ident()) * if thread is None: * return None, False # <<<<<<<<<<<<<< @@ -28843,7 +29949,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_r = __pyx_tuple__10; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1540 + /* "_pydevd_bundle/pydevd_cython.pyx":1543 * if py_db.threading_get_ident is not None: * thread = py_db.threading_active.get(py_db.threading_get_ident()) * if thread is None: # <<<<<<<<<<<<<< @@ -28852,7 +29958,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1538 + /* "_pydevd_bundle/pydevd_cython.pyx":1541 * # Important: don't call threadingCurrentThread if we're in the threading module * # to avoid creating dummy threads. * if py_db.threading_get_ident is not None: # <<<<<<<<<<<<<< @@ -28862,7 +29968,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ goto __pyx_L23; } - /* "_pydevd_bundle/pydevd_cython.pyx":1544 + /* "_pydevd_bundle/pydevd_cython.pyx":1547 * else: * # Jython does not have threading.get_ident(). * thread = py_db.threading_current_thread() # <<<<<<<<<<<<<< @@ -28870,7 +29976,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ * if getattr(thread, 'pydev_do_not_trace', None): */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_current_thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_current_thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -28890,7 +29996,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -28899,7 +30005,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ } __pyx_L23:; - /* "_pydevd_bundle/pydevd_cython.pyx":1535 + /* "_pydevd_bundle/pydevd_cython.pyx":1538 * f_unhandled = f_unhandled.f_back * * if thread is None: # <<<<<<<<<<<<<< @@ -28908,27 +30014,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1546 + /* "_pydevd_bundle/pydevd_cython.pyx":1549 * thread = py_db.threading_current_thread() * * if getattr(thread, 'pydev_do_not_trace', None): # <<<<<<<<<<<<<< * py_db.disable_tracing() * return None, False */ - __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_thread, __pyx_n_s_pydev_do_not_trace, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_thread, __pyx_n_s_pydev_do_not_trace, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1547 + /* "_pydevd_bundle/pydevd_cython.pyx":1550 * * if getattr(thread, 'pydev_do_not_trace', None): * py_db.disable_tracing() # <<<<<<<<<<<<<< * return None, False * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_disable_tracing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_disable_tracing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -28948,13 +30054,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1548 + /* "_pydevd_bundle/pydevd_cython.pyx":1551 * if getattr(thread, 'pydev_do_not_trace', None): * py_db.disable_tracing() * return None, False # <<<<<<<<<<<<<< @@ -28966,7 +30072,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_r = __pyx_tuple__10; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1546 + /* "_pydevd_bundle/pydevd_cython.pyx":1549 * thread = py_db.threading_current_thread() * * if getattr(thread, 'pydev_do_not_trace', None): # <<<<<<<<<<<<<< @@ -28975,7 +30081,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1550 + /* "_pydevd_bundle/pydevd_cython.pyx":1553 * return None, False * * try: # <<<<<<<<<<<<<< @@ -28991,19 +30097,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1551 + /* "_pydevd_bundle/pydevd_cython.pyx":1554 * * try: * additional_info = thread.additional_info # <<<<<<<<<<<<<< * if additional_info is None: * raise AttributeError() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1551, __pyx_L26_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_additional_info = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1552 + /* "_pydevd_bundle/pydevd_cython.pyx":1555 * try: * additional_info = thread.additional_info * if additional_info is None: # <<<<<<<<<<<<<< @@ -29013,20 +30119,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = (__pyx_v_additional_info == Py_None); if (unlikely(__pyx_t_6)) { - /* "_pydevd_bundle/pydevd_cython.pyx":1553 + /* "_pydevd_bundle/pydevd_cython.pyx":1556 * additional_info = thread.additional_info * if additional_info is None: * raise AttributeError() # <<<<<<<<<<<<<< * except: * additional_info = py_db.set_additional_thread_info(thread) */ - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L26_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1553, __pyx_L26_error) + __PYX_ERR(0, 1556, __pyx_L26_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1552 + /* "_pydevd_bundle/pydevd_cython.pyx":1555 * try: * additional_info = thread.additional_info * if additional_info is None: # <<<<<<<<<<<<<< @@ -29035,7 +30141,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1550 + /* "_pydevd_bundle/pydevd_cython.pyx":1553 * return None, False * * try: # <<<<<<<<<<<<<< @@ -29054,7 +30160,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1554 + /* "_pydevd_bundle/pydevd_cython.pyx":1557 * if additional_info is None: * raise AttributeError() * except: # <<<<<<<<<<<<<< @@ -29063,19 +30169,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.fix_top_level_trace_and_get_trace_func", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 1554, __pyx_L28_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 1557, __pyx_L28_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_7); - /* "_pydevd_bundle/pydevd_cython.pyx":1555 + /* "_pydevd_bundle/pydevd_cython.pyx":1558 * raise AttributeError() * except: * additional_info = py_db.set_additional_thread_info(thread) # <<<<<<<<<<<<<< * * # print('enter thread tracer', thread, get_current_thread_id(thread)) */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_additional_thread_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1555, __pyx_L28_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_additional_thread_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1558, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = NULL; __pyx_t_8 = 0; @@ -29095,7 +30201,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_thread}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1555, __pyx_L28_except_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1558, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -29107,7 +30213,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ goto __pyx_L27_exception_handled; } - /* "_pydevd_bundle/pydevd_cython.pyx":1550 + /* "_pydevd_bundle/pydevd_cython.pyx":1553 * return None, False * * try: # <<<<<<<<<<<<<< @@ -29128,38 +30234,38 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_L31_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1558 + /* "_pydevd_bundle/pydevd_cython.pyx":1561 * * # print('enter thread tracer', thread, get_current_thread_id(thread)) * args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) # <<<<<<<<<<<<<< * * if f_unhandled is not None: */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_global_cache_skips); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1558, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_global_cache_skips); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_global_cache_frame_skips); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_global_cache_frame_skips); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_py_db); __Pyx_GIVEREF(__pyx_v_py_db); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_py_db)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_py_db)) __PYX_ERR(0, 1561, __pyx_L1_error); __Pyx_INCREF(__pyx_v_thread); __Pyx_GIVEREF(__pyx_v_thread); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_thread)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_thread)) __PYX_ERR(0, 1561, __pyx_L1_error); __Pyx_INCREF(__pyx_v_additional_info); __Pyx_GIVEREF(__pyx_v_additional_info); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_additional_info)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_additional_info)) __PYX_ERR(0, 1561, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error); __pyx_t_7 = 0; __pyx_t_2 = 0; __pyx_v_args = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1560 + /* "_pydevd_bundle/pydevd_cython.pyx":1563 * args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) * * if f_unhandled is not None: # <<<<<<<<<<<<<< @@ -29169,14 +30275,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = (__pyx_v_f_unhandled != Py_None); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1561 + /* "_pydevd_bundle/pydevd_cython.pyx":1564 * * if f_unhandled is not None: * if f_unhandled.f_back is None and not force_only_unhandled_tracer: # <<<<<<<<<<<<<< * # Happens when we attach to a running program (cannot reuse instance because it's mutable). * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -29190,42 +30296,42 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_L37_bool_binop_done:; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1563 + /* "_pydevd_bundle/pydevd_cython.pyx":1566 * if f_unhandled.f_back is None and not force_only_unhandled_tracer: * # Happens when we attach to a running program (cannot reuse instance because it's mutable). * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) # <<<<<<<<<<<<<< * additional_info.top_level_thread_tracer_no_back_frames.append(top_level_thread_tracer) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). * else: */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args)) __PYX_ERR(0, 1566, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_top_level_thread_tracer = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1564 + /* "_pydevd_bundle/pydevd_cython.pyx":1567 * # Happens when we attach to a running program (cannot reuse instance because it's mutable). * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) * additional_info.top_level_thread_tracer_no_back_frames.append(top_level_thread_tracer) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). # <<<<<<<<<<<<<< * else: * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_no_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_no_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_top_level_thread_tracer); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_top_level_thread_tracer); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1561 + /* "_pydevd_bundle/pydevd_cython.pyx":1564 * * if f_unhandled is not None: * if f_unhandled.f_back is None and not force_only_unhandled_tracer: # <<<<<<<<<<<<<< @@ -29235,7 +30341,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ goto __pyx_L36; } - /* "_pydevd_bundle/pydevd_cython.pyx":1566 + /* "_pydevd_bundle/pydevd_cython.pyx":1569 * additional_info.top_level_thread_tracer_no_back_frames.append(top_level_thread_tracer) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). * else: * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled # <<<<<<<<<<<<<< @@ -29243,12 +30349,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ * # Stop in some internal place to report about unhandled exceptions */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_unhandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_unhandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_top_level_thread_tracer = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1567 + /* "_pydevd_bundle/pydevd_cython.pyx":1570 * else: * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled * if top_level_thread_tracer is None: # <<<<<<<<<<<<<< @@ -29258,28 +30364,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = (__pyx_v_top_level_thread_tracer == Py_None); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1569 + /* "_pydevd_bundle/pydevd_cython.pyx":1572 * if top_level_thread_tracer is None: * # Stop in some internal place to report about unhandled exceptions * top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) # <<<<<<<<<<<<<< * additional_info.top_level_thread_tracer_unhandled = top_level_thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). * */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions), __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions), __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_top_level_thread_tracer, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1570 + /* "_pydevd_bundle/pydevd_cython.pyx":1573 * # Stop in some internal place to report about unhandled exceptions * top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) * additional_info.top_level_thread_tracer_unhandled = top_level_thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). # <<<<<<<<<<<<<< * * # print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_unhandle, __pyx_v_top_level_thread_tracer) < 0) __PYX_ERR(0, 1570, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_unhandle, __pyx_v_top_level_thread_tracer) < 0) __PYX_ERR(0, 1573, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1567 + /* "_pydevd_bundle/pydevd_cython.pyx":1570 * else: * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled * if top_level_thread_tracer is None: # <<<<<<<<<<<<<< @@ -29290,14 +30396,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ } __pyx_L36:; - /* "_pydevd_bundle/pydevd_cython.pyx":1573 + /* "_pydevd_bundle/pydevd_cython.pyx":1576 * * # print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) * f_trace = top_level_thread_tracer.get_trace_dispatch_func() # <<<<<<<<<<<<<< * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * f_trace = SafeCallWrapper(f_trace) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_level_thread_tracer, __pyx_n_s_get_trace_dispatch_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_level_thread_tracer, __pyx_n_s_get_trace_dispatch_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -29317,35 +30423,35 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_f_trace = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1575 + /* "_pydevd_bundle/pydevd_cython.pyx":1578 * f_trace = top_level_thread_tracer.get_trace_dispatch_func() * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * f_trace = SafeCallWrapper(f_trace) # <<<<<<<<<<<<<< * # ENDIF * f_unhandled.f_trace = f_trace */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_f_trace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_f_trace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_f_trace, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1577 + /* "_pydevd_bundle/pydevd_cython.pyx":1580 * f_trace = SafeCallWrapper(f_trace) * # ENDIF * f_unhandled.f_trace = f_trace # <<<<<<<<<<<<<< * * if frame is f_unhandled: */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_trace, __pyx_v_f_trace) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_trace, __pyx_v_f_trace) < 0) __PYX_ERR(0, 1580, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1579 + /* "_pydevd_bundle/pydevd_cython.pyx":1582 * f_unhandled.f_trace = f_trace * * if frame is f_unhandled: # <<<<<<<<<<<<<< @@ -29355,7 +30461,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = (__pyx_v_frame == __pyx_v_f_unhandled); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1580 + /* "_pydevd_bundle/pydevd_cython.pyx":1583 * * if frame is f_unhandled: * return f_trace, False # <<<<<<<<<<<<<< @@ -29363,19 +30469,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ * thread_tracer = additional_info.thread_tracer */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_f_trace); __Pyx_GIVEREF(__pyx_v_f_trace); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f_trace)) __PYX_ERR(0, 1580, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f_trace)) __PYX_ERR(0, 1583, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 1580, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 1583, __pyx_L1_error); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1579 + /* "_pydevd_bundle/pydevd_cython.pyx":1582 * f_unhandled.f_trace = f_trace * * if frame is f_unhandled: # <<<<<<<<<<<<<< @@ -29384,7 +30490,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1560 + /* "_pydevd_bundle/pydevd_cython.pyx":1563 * args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) * * if f_unhandled is not None: # <<<<<<<<<<<<<< @@ -29393,19 +30499,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1582 + /* "_pydevd_bundle/pydevd_cython.pyx":1585 * return f_trace, False * * thread_tracer = additional_info.thread_tracer # <<<<<<<<<<<<<< * if thread_tracer is None or thread_tracer._args[0] is not py_db: * thread_tracer = ThreadTracer(args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1582, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_thread_tracer = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1583 + /* "_pydevd_bundle/pydevd_cython.pyx":1586 * * thread_tracer = additional_info.thread_tracer * if thread_tracer is None or thread_tracer._args[0] is not py_db: # <<<<<<<<<<<<<< @@ -29418,9 +30524,9 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_t_6 = __pyx_t_1; goto __pyx_L42_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread_tracer, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread_tracer, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != __pyx_v_py_db); @@ -29429,28 +30535,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ __pyx_L42_bool_binop_done:; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":1584 + /* "_pydevd_bundle/pydevd_cython.pyx":1587 * thread_tracer = additional_info.thread_tracer * if thread_tracer is None or thread_tracer._args[0] is not py_db: * thread_tracer = ThreadTracer(args) # <<<<<<<<<<<<<< * additional_info.thread_tracer = thread_tracer * */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_thread_tracer, __pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1585 + /* "_pydevd_bundle/pydevd_cython.pyx":1588 * if thread_tracer is None or thread_tracer._args[0] is not py_db: * thread_tracer = ThreadTracer(args) * additional_info.thread_tracer = thread_tracer # <<<<<<<<<<<<<< * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_thread_tracer, __pyx_v_thread_tracer) < 0) __PYX_ERR(0, 1585, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_thread_tracer, __pyx_v_thread_tracer) < 0) __PYX_ERR(0, 1588, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1583 + /* "_pydevd_bundle/pydevd_cython.pyx":1586 * * thread_tracer = additional_info.thread_tracer * if thread_tracer is None or thread_tracer._args[0] is not py_db: # <<<<<<<<<<<<<< @@ -29459,7 +30565,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1588 + /* "_pydevd_bundle/pydevd_cython.pyx":1591 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * return SafeCallWrapper(thread_tracer), True # <<<<<<<<<<<<<< @@ -29467,21 +30573,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ * # return thread_tracer, True */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_thread_tracer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_thread_tracer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1591, __pyx_L1_error); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 1588, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 1591, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1466 + /* "_pydevd_bundle/pydevd_cython.pyx":1469 * * * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< @@ -29516,7 +30622,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1594 +/* "_pydevd_bundle/pydevd_cython.pyx":1597 * * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< @@ -29525,15 +30631,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6fix_top_level_trace_ */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9trace_dispatch(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15trace_dispatch(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9trace_dispatch = {"trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9trace_dispatch(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_15trace_dispatch = {"trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15trace_dispatch(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -29586,7 +30692,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1594, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -29594,9 +30700,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1594, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); __PYX_ERR(0, 1594, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); __PYX_ERR(0, 1597, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -29604,9 +30710,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1594, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); __PYX_ERR(0, 1594, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); __PYX_ERR(0, 1597, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -29614,14 +30720,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1594, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); __PYX_ERR(0, 1594, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); __PYX_ERR(0, 1597, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch") < 0)) __PYX_ERR(0, 1594, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch") < 0)) __PYX_ERR(0, 1597, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; @@ -29638,7 +30744,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1594, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1597, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29652,7 +30758,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(__pyx_self, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_14trace_dispatch(__pyx_self, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); /* function exit code */ { @@ -29665,7 +30771,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { PyObject *__pyx_v_thread_trace_func = NULL; PyObject *__pyx_v_apply_to_settrace = NULL; PyObject *__pyx_r = NULL; @@ -29682,14 +30788,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace_dispatch", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1595 + /* "_pydevd_bundle/pydevd_cython.pyx":1598 * * def trace_dispatch(py_db, frame, event, arg): * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) # <<<<<<<<<<<<<< * if thread_trace_func is None: * return None if event == 'call' else NO_FTRACE */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_fix_top_level_trace_and_get_trac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_fix_top_level_trace_and_get_trac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -29709,7 +30815,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_py_db, __pyx_v_frame}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -29719,7 +30825,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1595, __pyx_L1_error) + __PYX_ERR(0, 1598, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -29732,15 +30838,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); @@ -29748,7 +30854,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1595, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1598, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -29756,7 +30862,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1595, __pyx_L1_error) + __PYX_ERR(0, 1598, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_thread_trace_func = __pyx_t_2; @@ -29764,7 +30870,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __pyx_v_apply_to_settrace = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1596 + /* "_pydevd_bundle/pydevd_cython.pyx":1599 * def trace_dispatch(py_db, frame, event, arg): * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) * if thread_trace_func is None: # <<<<<<<<<<<<<< @@ -29774,7 +30880,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __pyx_t_7 = (__pyx_v_thread_trace_func == Py_None); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1597 + /* "_pydevd_bundle/pydevd_cython.pyx":1600 * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) * if thread_trace_func is None: * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -29782,12 +30888,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO * py_db.enable_tracing(thread_trace_func) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1597, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1600, __pyx_L1_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -29796,7 +30902,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1596 + /* "_pydevd_bundle/pydevd_cython.pyx":1599 * def trace_dispatch(py_db, frame, event, arg): * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) * if thread_trace_func is None: # <<<<<<<<<<<<<< @@ -29805,24 +30911,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1598 + /* "_pydevd_bundle/pydevd_cython.pyx":1601 * if thread_trace_func is None: * return None if event == 'call' else NO_FTRACE * if apply_to_settrace: # <<<<<<<<<<<<<< * py_db.enable_tracing(thread_trace_func) * return thread_trace_func(frame, event, arg) */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_apply_to_settrace); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1598, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_apply_to_settrace); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1601, __pyx_L1_error) if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1599 + /* "_pydevd_bundle/pydevd_cython.pyx":1602 * return None if event == 'call' else NO_FTRACE * if apply_to_settrace: * py_db.enable_tracing(thread_trace_func) # <<<<<<<<<<<<<< * return thread_trace_func(frame, event, arg) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_enable_tracing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_enable_tracing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -29842,13 +30948,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_thread_trace_func}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1598 + /* "_pydevd_bundle/pydevd_cython.pyx":1601 * if thread_trace_func is None: * return None if event == 'call' else NO_FTRACE * if apply_to_settrace: # <<<<<<<<<<<<<< @@ -29857,7 +30963,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1600 + /* "_pydevd_bundle/pydevd_cython.pyx":1603 * if apply_to_settrace: * py_db.enable_tracing(thread_trace_func) * return thread_trace_func(frame, event, arg) # <<<<<<<<<<<<<< @@ -29884,7 +30990,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -29892,7 +30998,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1594 + /* "_pydevd_bundle/pydevd_cython.pyx":1597 * * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< @@ -29916,7 +31022,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8trace_dispatch(CYTHO return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1606 +/* "_pydevd_bundle/pydevd_cython.pyx":1609 * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -29960,12 +31066,12 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1609, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1606, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1609, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -29976,7 +31082,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1606, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1609, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29990,7 +31096,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1606, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1609, __pyx_L1_error) __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self), __pyx_v_args); /* function exit code */ @@ -30013,7 +31119,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1607 + /* "_pydevd_bundle/pydevd_cython.pyx":1610 * cdef public tuple _args; * def __init__(self, tuple args): * self._args = args # <<<<<<<<<<<<<< @@ -30026,7 +31132,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU __Pyx_DECREF(__pyx_v_self->_args); __pyx_v_self->_args = __pyx_v_args; - /* "_pydevd_bundle/pydevd_cython.pyx":1606 + /* "_pydevd_bundle/pydevd_cython.pyx":1609 * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -30040,7 +31146,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1615 +/* "_pydevd_bundle/pydevd_cython.pyx":1618 * # ENDIF * * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -30107,7 +31213,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -30115,9 +31221,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, 1); __PYX_ERR(0, 1615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, 1); __PYX_ERR(0, 1618, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -30125,14 +31231,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, 2); __PYX_ERR(0, 1615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, 2); __PYX_ERR(0, 1618, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_unhandled_exceptions") < 0)) __PYX_ERR(0, 1615, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_unhandled_exceptions") < 0)) __PYX_ERR(0, 1618, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -30147,7 +31253,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1618, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30192,14 +31298,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace_unhandled_exceptions", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1618 + /* "_pydevd_bundle/pydevd_cython.pyx":1621 * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) * if event == 'exception' and arg is not None: # <<<<<<<<<<<<<< * py_db, t, additional_info = self._args[0:3] * if arg is not None: */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1621, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; @@ -30210,7 +31316,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1619 + /* "_pydevd_bundle/pydevd_cython.pyx":1622 * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) * if event == 'exception' and arg is not None: * py_db, t, additional_info = self._args[0:3] # <<<<<<<<<<<<<< @@ -30219,9 +31325,9 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace */ if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1619, __pyx_L1_error) + __PYX_ERR(0, 1622, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyTuple_GetSlice(__pyx_v_self->_args, 0, 3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyTuple_GetSlice(__pyx_v_self->_args, 0, 3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (1) { PyObject* sequence = __pyx_t_3; @@ -30229,7 +31335,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1619, __pyx_L1_error) + __PYX_ERR(0, 1622, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); @@ -30239,11 +31345,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -30255,7 +31361,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace __pyx_v_additional_info = __pyx_t_6; __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1620 + /* "_pydevd_bundle/pydevd_cython.pyx":1623 * if event == 'exception' and arg is not None: * py_db, t, additional_info = self._args[0:3] * if arg is not None: # <<<<<<<<<<<<<< @@ -30265,37 +31371,37 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace __pyx_t_1 = (__pyx_v_arg != Py_None); if (__pyx_t_1) { - /* "_pydevd_bundle/pydevd_cython.pyx":1621 + /* "_pydevd_bundle/pydevd_cython.pyx":1624 * py_db, t, additional_info = self._args[0:3] * if arg is not None: * if not additional_info.suspended_at_unhandled: # <<<<<<<<<<<<<< * additional_info.suspended_at_unhandled = True * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1622 + /* "_pydevd_bundle/pydevd_cython.pyx":1625 * if arg is not None: * if not additional_info.suspended_at_unhandled: * additional_info.suspended_at_unhandled = True # <<<<<<<<<<<<<< * * py_db.stop_on_unhandled_exception(py_db, t, additional_info, arg) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled, Py_True) < 0) __PYX_ERR(0, 1622, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled, Py_True) < 0) __PYX_ERR(0, 1625, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1624 + /* "_pydevd_bundle/pydevd_cython.pyx":1627 * additional_info.suspended_at_unhandled = True * * py_db.stop_on_unhandled_exception(py_db, t, additional_info, arg) # <<<<<<<<<<<<<< * * # No need to reset frame.f_trace to keep the same trace function. */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1624, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -30315,13 +31421,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_py_db, __pyx_v_t, __pyx_v_additional_info, __pyx_v_arg}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1621 + /* "_pydevd_bundle/pydevd_cython.pyx":1624 * py_db, t, additional_info = self._args[0:3] * if arg is not None: * if not additional_info.suspended_at_unhandled: # <<<<<<<<<<<<<< @@ -30330,7 +31436,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1620 + /* "_pydevd_bundle/pydevd_cython.pyx":1623 * if event == 'exception' and arg is not None: * py_db, t, additional_info = self._args[0:3] * if arg is not None: # <<<<<<<<<<<<<< @@ -30339,7 +31445,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1618 + /* "_pydevd_bundle/pydevd_cython.pyx":1621 * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) * if event == 'exception' and arg is not None: # <<<<<<<<<<<<<< @@ -30348,7 +31454,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1627 + /* "_pydevd_bundle/pydevd_cython.pyx":1630 * * # No need to reset frame.f_trace to keep the same trace function. * return self.trace_unhandled_exceptions # <<<<<<<<<<<<<< @@ -30356,13 +31462,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace * def get_trace_dispatch_func(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_unhandled_exceptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_unhandled_exceptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1615 + /* "_pydevd_bundle/pydevd_cython.pyx":1618 * # ENDIF * * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -30387,7 +31493,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1629 +/* "_pydevd_bundle/pydevd_cython.pyx":1632 * return self.trace_unhandled_exceptions * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< @@ -30445,7 +31551,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_trace_dispatch_func", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1630 + /* "_pydevd_bundle/pydevd_cython.pyx":1633 * * def get_trace_dispatch_func(self): * return self.trace_unhandled_exceptions # <<<<<<<<<<<<<< @@ -30453,13 +31559,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_unhandled_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1630, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_unhandled_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1629 + /* "_pydevd_bundle/pydevd_cython.pyx":1632 * return self.trace_unhandled_exceptions * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< @@ -30478,7 +31584,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1605 +/* "_pydevd_bundle/pydevd_cython.pyx":1608 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: * cdef public tuple _args; # <<<<<<<<<<<<<< @@ -30540,7 +31646,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyU const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1605, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1608, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -30993,7 +32099,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1641 +/* "_pydevd_bundle/pydevd_cython.pyx":1644 * cdef public set _raise_lines; * cdef public int _last_raise_line; * def __init__(self, frame_trace_dispatch, tuple args): # <<<<<<<<<<<<<< @@ -31040,7 +32146,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1644, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -31048,14 +32154,14 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1644, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1641, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1644, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1641, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1644, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -31068,7 +32174,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1641, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1644, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31082,7 +32188,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1641, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1644, __pyx_L1_error) __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), __pyx_v_frame_trace_dispatch, __pyx_v_args); /* function exit code */ @@ -31109,7 +32215,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1642 + /* "_pydevd_bundle/pydevd_cython.pyx":1645 * cdef public int _last_raise_line; * def __init__(self, frame_trace_dispatch, tuple args): * self._frame_trace_dispatch = frame_trace_dispatch # <<<<<<<<<<<<<< @@ -31122,7 +32228,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac __Pyx_DECREF(__pyx_v_self->_frame_trace_dispatch); __pyx_v_self->_frame_trace_dispatch = __pyx_v_frame_trace_dispatch; - /* "_pydevd_bundle/pydevd_cython.pyx":1643 + /* "_pydevd_bundle/pydevd_cython.pyx":1646 * def __init__(self, frame_trace_dispatch, tuple args): * self._frame_trace_dispatch = frame_trace_dispatch * self._args = args # <<<<<<<<<<<<<< @@ -31135,7 +32241,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac __Pyx_DECREF(__pyx_v_self->_args); __pyx_v_self->_args = __pyx_v_args; - /* "_pydevd_bundle/pydevd_cython.pyx":1644 + /* "_pydevd_bundle/pydevd_cython.pyx":1647 * self._frame_trace_dispatch = frame_trace_dispatch * self._args = args * self.try_except_infos = None # <<<<<<<<<<<<<< @@ -31148,7 +32254,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac __Pyx_DECREF(__pyx_v_self->try_except_infos); __pyx_v_self->try_except_infos = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":1645 + /* "_pydevd_bundle/pydevd_cython.pyx":1648 * self._args = args * self.try_except_infos = None * self._last_exc_arg = None # <<<<<<<<<<<<<< @@ -31161,14 +32267,14 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac __Pyx_DECREF(__pyx_v_self->_last_exc_arg); __pyx_v_self->_last_exc_arg = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":1646 + /* "_pydevd_bundle/pydevd_cython.pyx":1649 * self.try_except_infos = None * self._last_exc_arg = None * self._raise_lines = set() # <<<<<<<<<<<<<< * self._last_raise_line = -1 * # ELSE */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_raise_lines); @@ -31176,7 +32282,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac __pyx_v_self->_raise_lines = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1647 + /* "_pydevd_bundle/pydevd_cython.pyx":1650 * self._last_exc_arg = None * self._raise_lines = set() * self._last_raise_line = -1 # <<<<<<<<<<<<<< @@ -31185,7 +32291,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac */ __pyx_v_self->_last_raise_line = -1; - /* "_pydevd_bundle/pydevd_cython.pyx":1641 + /* "_pydevd_bundle/pydevd_cython.pyx":1644 * cdef public set _raise_lines; * cdef public int _last_raise_line; * def __init__(self, frame_trace_dispatch, tuple args): # <<<<<<<<<<<<<< @@ -31205,7 +32311,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1671 +/* "_pydevd_bundle/pydevd_cython.pyx":1674 * # ENDIF * * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -31272,7 +32378,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -31280,9 +32386,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, 1); __PYX_ERR(0, 1671, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, 1); __PYX_ERR(0, 1674, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -31290,14 +32396,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, 2); __PYX_ERR(0, 1671, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, 2); __PYX_ERR(0, 1674, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch_and_unhandled_exceptions") < 0)) __PYX_ERR(0, 1671, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch_and_unhandled_exceptions") < 0)) __PYX_ERR(0, 1674, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -31312,7 +32418,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1671, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1674, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31368,7 +32474,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace_dispatch_and_unhandled_exceptions", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1674 + /* "_pydevd_bundle/pydevd_cython.pyx":1677 * # DEBUG = 'code_to_debug' in frame.f_code.co_filename * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) * frame_trace_dispatch = self._frame_trace_dispatch # <<<<<<<<<<<<<< @@ -31380,7 +32486,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_v_frame_trace_dispatch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1675 + /* "_pydevd_bundle/pydevd_cython.pyx":1678 * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) * frame_trace_dispatch = self._frame_trace_dispatch * if frame_trace_dispatch is not None: # <<<<<<<<<<<<<< @@ -31390,7 +32496,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_t_2 = (__pyx_v_frame_trace_dispatch != Py_None); if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1676 + /* "_pydevd_bundle/pydevd_cython.pyx":1679 * frame_trace_dispatch = self._frame_trace_dispatch * if frame_trace_dispatch is not None: * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) # <<<<<<<<<<<<<< @@ -31416,7 +32522,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -31426,7 +32532,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_v_self->_frame_trace_dispatch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1675 + /* "_pydevd_bundle/pydevd_cython.pyx":1678 * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) * frame_trace_dispatch = self._frame_trace_dispatch * if frame_trace_dispatch is not None: # <<<<<<<<<<<<<< @@ -31435,17 +32541,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1678 + /* "_pydevd_bundle/pydevd_cython.pyx":1681 * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) * * if event == 'exception': # <<<<<<<<<<<<<< * self._last_exc_arg = arg * self._raise_lines.add(frame.f_lineno) */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1678, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1681, __pyx_L1_error) if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1679 + /* "_pydevd_bundle/pydevd_cython.pyx":1682 * * if event == 'exception': * self._last_exc_arg = arg # <<<<<<<<<<<<<< @@ -31458,7 +32564,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __Pyx_DECREF(__pyx_v_self->_last_exc_arg); __pyx_v_self->_last_exc_arg = __pyx_v_arg; - /* "_pydevd_bundle/pydevd_cython.pyx":1680 + /* "_pydevd_bundle/pydevd_cython.pyx":1683 * if event == 'exception': * self._last_exc_arg = arg * self._raise_lines.add(frame.f_lineno) # <<<<<<<<<<<<<< @@ -31467,27 +32573,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace */ if (unlikely(__pyx_v_self->_raise_lines == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 1680, __pyx_L1_error) + __PYX_ERR(0, 1683, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PySet_Add(__pyx_v_self->_raise_lines, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1680, __pyx_L1_error) + __pyx_t_6 = PySet_Add(__pyx_v_self->_raise_lines, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1681 + /* "_pydevd_bundle/pydevd_cython.pyx":1684 * self._last_exc_arg = arg * self._raise_lines.add(frame.f_lineno) * self._last_raise_line = frame.f_lineno # <<<<<<<<<<<<<< * * elif event == 'return' and self._last_exc_arg is not None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_last_raise_line = __pyx_t_5; - /* "_pydevd_bundle/pydevd_cython.pyx":1678 + /* "_pydevd_bundle/pydevd_cython.pyx":1681 * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) * * if event == 'exception': # <<<<<<<<<<<<<< @@ -31497,14 +32603,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace goto __pyx_L4; } - /* "_pydevd_bundle/pydevd_cython.pyx":1683 + /* "_pydevd_bundle/pydevd_cython.pyx":1686 * self._last_raise_line = frame.f_lineno * * elif event == 'return' and self._last_exc_arg is not None: # <<<<<<<<<<<<<< * # For unhandled exceptions we actually track the return when at the topmost level. * try: */ - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1683, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1686, __pyx_L1_error) if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; @@ -31515,7 +32621,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "_pydevd_bundle/pydevd_cython.pyx":1685 + /* "_pydevd_bundle/pydevd_cython.pyx":1688 * elif event == 'return' and self._last_exc_arg is not None: * # For unhandled exceptions we actually track the return when at the topmost level. * try: # <<<<<<<<<<<<<< @@ -31524,7 +32630,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace */ /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1686 + /* "_pydevd_bundle/pydevd_cython.pyx":1689 * # For unhandled exceptions we actually track the return when at the topmost level. * try: * py_db, t, additional_info = self._args[0:3] # <<<<<<<<<<<<<< @@ -31533,9 +32639,9 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace */ if (unlikely(__pyx_v_self->_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1686, __pyx_L8_error) + __PYX_ERR(0, 1689, __pyx_L8_error) } - __pyx_t_1 = __Pyx_PyTuple_GetSlice(__pyx_v_self->_args, 0, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyTuple_GetSlice(__pyx_v_self->_args, 0, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); if (1) { PyObject* sequence = __pyx_t_1; @@ -31543,7 +32649,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1686, __pyx_L8_error) + __PYX_ERR(0, 1689, __pyx_L8_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -31553,11 +32659,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1686, __pyx_L8_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L8_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1689, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1686, __pyx_L8_error) + __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1689, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -31569,70 +32675,92 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_v_additional_info = __pyx_t_8; __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1687 + /* "_pydevd_bundle/pydevd_cython.pyx":1690 * try: * py_db, t, additional_info = self._args[0:3] * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. # <<<<<<<<<<<<<< * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1687, __pyx_L8_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1690, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (!__pyx_t_2); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1688 + /* "_pydevd_bundle/pydevd_cython.pyx":1691 * py_db, t, additional_info = self._args[0:3] * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): # <<<<<<<<<<<<<< * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) * finally: */ - __pyx_t_1 = __pyx_v_self->_raise_lines; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_8 = __pyx_f_14_pydevd_bundle_13pydevd_cython_is_unhandled_exception(((PyObject *)__pyx_v_self), __pyx_v_py_db, __pyx_v_frame, __pyx_v_self->_last_raise_line, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1688, __pyx_L8_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_is_unhandled_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1691, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_last_raise_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1691, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_py_db, __pyx_v_frame, __pyx_t_4, __pyx_v_self->_raise_lines}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1691, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1688, __pyx_L8_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1689 + /* "_pydevd_bundle/pydevd_cython.pyx":1692 * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) # <<<<<<<<<<<<<< * finally: * # Remove reference to exception after handling it. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L8_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1692, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_py_db, __pyx_v_t, __pyx_v_additional_info, __pyx_v_self->_last_exc_arg}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1689, __pyx_L8_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1688 + /* "_pydevd_bundle/pydevd_cython.pyx":1691 * py_db, t, additional_info = self._args[0:3] * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): # <<<<<<<<<<<<<< @@ -31641,7 +32769,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1687 + /* "_pydevd_bundle/pydevd_cython.pyx":1690 * try: * py_db, t, additional_info = self._args[0:3] * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. # <<<<<<<<<<<<<< @@ -31651,7 +32779,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace } } - /* "_pydevd_bundle/pydevd_cython.pyx":1692 + /* "_pydevd_bundle/pydevd_cython.pyx":1695 * finally: * # Remove reference to exception after handling it. * self._last_exc_arg = None # <<<<<<<<<<<<<< @@ -31709,7 +32837,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_L9:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1683 + /* "_pydevd_bundle/pydevd_cython.pyx":1686 * self._last_raise_line = frame.f_lineno * * elif event == 'return' and self._last_exc_arg is not None: # <<<<<<<<<<<<<< @@ -31719,31 +32847,31 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace } __pyx_L4:; - /* "_pydevd_bundle/pydevd_cython.pyx":1694 + /* "_pydevd_bundle/pydevd_cython.pyx":1697 * self._last_exc_arg = None * * ret = self.trace_dispatch_and_unhandled_exceptions # <<<<<<<<<<<<<< * * # Need to reset (the call to _frame_trace_dispatch may have changed it). */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_v_ret = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ret = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1698 + /* "_pydevd_bundle/pydevd_cython.pyx":1701 * # Need to reset (the call to _frame_trace_dispatch may have changed it). * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * frame.f_trace = SafeCallWrapper(ret) # <<<<<<<<<<<<<< * # ELSE * # frame.f_trace = ret */ - __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_8) < 0) __PYX_ERR(0, 1698, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_1) < 0) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1702 + /* "_pydevd_bundle/pydevd_cython.pyx":1705 * # frame.f_trace = ret * # ENDIF * return ret # <<<<<<<<<<<<<< @@ -31755,7 +32883,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1671 + /* "_pydevd_bundle/pydevd_cython.pyx":1674 * # ENDIF * * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -31782,7 +32910,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1704 +/* "_pydevd_bundle/pydevd_cython.pyx":1707 * return ret * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< @@ -31840,7 +32968,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_trace_dispatch_func", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1705 + /* "_pydevd_bundle/pydevd_cython.pyx":1708 * * def get_trace_dispatch_func(self): * return self.trace_dispatch_and_unhandled_exceptions # <<<<<<<<<<<<<< @@ -31848,13 +32976,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1704 + /* "_pydevd_bundle/pydevd_cython.pyx":1707 * return ret * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< @@ -31873,7 +33001,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1635 +/* "_pydevd_bundle/pydevd_cython.pyx":1638 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class TopLevelThreadTracerNoBackFrame: * cdef public object _frame_trace_dispatch; # <<<<<<<<<<<<<< @@ -31974,7 +33102,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1636 +/* "_pydevd_bundle/pydevd_cython.pyx":1639 * cdef class TopLevelThreadTracerNoBackFrame: * cdef public object _frame_trace_dispatch; * cdef public tuple _args; # <<<<<<<<<<<<<< @@ -32036,7 +33164,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1636, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1639, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32088,7 +33216,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1637 +/* "_pydevd_bundle/pydevd_cython.pyx":1640 * cdef public object _frame_trace_dispatch; * cdef public tuple _args; * cdef public object try_except_infos; # <<<<<<<<<<<<<< @@ -32189,7 +33317,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1638 +/* "_pydevd_bundle/pydevd_cython.pyx":1641 * cdef public tuple _args; * cdef public object try_except_infos; * cdef public object _last_exc_arg; # <<<<<<<<<<<<<< @@ -32290,7 +33418,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1639 +/* "_pydevd_bundle/pydevd_cython.pyx":1642 * cdef public object try_except_infos; * cdef public object _last_exc_arg; * cdef public set _raise_lines; # <<<<<<<<<<<<<< @@ -32352,7 +33480,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_v_value))) __PYX_ERR(0, 1639, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_v_value))) __PYX_ERR(0, 1642, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32404,7 +33532,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1640 +/* "_pydevd_bundle/pydevd_cython.pyx":1643 * cdef public object _last_exc_arg; * cdef public set _raise_lines; * cdef public int _last_raise_line; # <<<<<<<<<<<<<< @@ -32436,7 +33564,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_last_raise_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_last_raise_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32474,7 +33602,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBac int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1640, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1643, __pyx_L1_error) __pyx_v_self->_last_raise_line = __pyx_t_1; /* function exit code */ @@ -32932,7 +34060,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1711 +/* "_pydevd_bundle/pydevd_cython.pyx":1714 * cdef class ThreadTracer: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -32976,12 +34104,12 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1714, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1711, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1714, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -32992,7 +34120,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1711, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1714, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33006,7 +34134,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1711, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1714, __pyx_L1_error) __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self), __pyx_v_args); /* function exit code */ @@ -33029,7 +34157,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1712 + /* "_pydevd_bundle/pydevd_cython.pyx":1715 * cdef public tuple _args; * def __init__(self, tuple args): * self._args = args # <<<<<<<<<<<<<< @@ -33042,7 +34170,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str __Pyx_DECREF(__pyx_v_self->_args); __pyx_v_self->_args = __pyx_v_args; - /* "_pydevd_bundle/pydevd_cython.pyx":1711 + /* "_pydevd_bundle/pydevd_cython.pyx":1714 * cdef class ThreadTracer: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -33056,7 +34184,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1720 +/* "_pydevd_bundle/pydevd_cython.pyx":1723 * # ENDIF * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -33110,7 +34238,7 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -33118,9 +34246,9 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1720, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -33128,14 +34256,14 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1720, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1723, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1720, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1723, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -33150,7 +34278,7 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1720, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1723, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33216,7 +34344,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1746 + /* "_pydevd_bundle/pydevd_cython.pyx":1749 * # DEBUG = 'code_to_debug' in frame.f_code.co_filename * # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args # <<<<<<<<<<<<<< @@ -33231,7 +34359,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1746, __pyx_L1_error) + __PYX_ERR(0, 1749, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -33249,7 +34377,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1746, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1749, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -33257,10 +34385,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1746, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1749, __pyx_L1_error) } - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 1746, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_5))) __PYX_ERR(0, 1746, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 1749, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_5))) __PYX_ERR(0, 1749, __pyx_L1_error) __pyx_v_py_db = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_t = __pyx_t_3; @@ -33272,7 +34400,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_v_frame_skips_cache = __pyx_t_6; __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1747 + /* "_pydevd_bundle/pydevd_cython.pyx":1750 * # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args * if additional_info.is_tracing: # <<<<<<<<<<<<<< @@ -33282,7 +34410,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_7 = (__pyx_v_additional_info->is_tracing != 0); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1748 + /* "_pydevd_bundle/pydevd_cython.pyx":1751 * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args * if additional_info.is_tracing: * return None if event == 'call' else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch # <<<<<<<<<<<<<< @@ -33290,12 +34418,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * additional_info.is_tracing += 1 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1748, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1751, __pyx_L1_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1748, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -33304,7 +34432,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1747 + /* "_pydevd_bundle/pydevd_cython.pyx":1750 * # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args * if additional_info.is_tracing: # <<<<<<<<<<<<<< @@ -33313,7 +34441,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1750 + /* "_pydevd_bundle/pydevd_cython.pyx":1753 * return None if event == 'call' else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch * * additional_info.is_tracing += 1 # <<<<<<<<<<<<<< @@ -33322,7 +34450,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ __pyx_v_additional_info->is_tracing = (__pyx_v_additional_info->is_tracing + 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1751 + /* "_pydevd_bundle/pydevd_cython.pyx":1754 * * additional_info.is_tracing += 1 * try: # <<<<<<<<<<<<<< @@ -33339,7 +34467,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1752 + /* "_pydevd_bundle/pydevd_cython.pyx":1755 * additional_info.is_tracing += 1 * try: * pydev_step_cmd = additional_info.pydev_step_cmd # <<<<<<<<<<<<<< @@ -33349,7 +34477,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_11 = __pyx_v_additional_info->pydev_step_cmd; __pyx_v_pydev_step_cmd = __pyx_t_11; - /* "_pydevd_bundle/pydevd_cython.pyx":1753 + /* "_pydevd_bundle/pydevd_cython.pyx":1756 * try: * pydev_step_cmd = additional_info.pydev_step_cmd * is_stepping = pydev_step_cmd != -1 # <<<<<<<<<<<<<< @@ -33358,20 +34486,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ __pyx_v_is_stepping = (__pyx_v_pydev_step_cmd != -1L); - /* "_pydevd_bundle/pydevd_cython.pyx":1754 + /* "_pydevd_bundle/pydevd_cython.pyx":1757 * pydev_step_cmd = additional_info.pydev_step_cmd * is_stepping = pydev_step_cmd != -1 * if py_db.pydb_disposed: # <<<<<<<<<<<<<< * return None if event == 'call' else NO_FTRACE * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1754, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1757, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1755 + /* "_pydevd_bundle/pydevd_cython.pyx":1758 * is_stepping = pydev_step_cmd != -1 * if py_db.pydb_disposed: * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -33379,12 +34507,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # if thread is not alive, cancel trace_dispatch processing */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1755, __pyx_L7_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1758, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1755, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1758, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -33393,7 +34521,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1754 + /* "_pydevd_bundle/pydevd_cython.pyx":1757 * pydev_step_cmd = additional_info.pydev_step_cmd * is_stepping = pydev_step_cmd != -1 * if py_db.pydb_disposed: # <<<<<<<<<<<<<< @@ -33402,14 +34530,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1758 + /* "_pydevd_bundle/pydevd_cython.pyx":1761 * * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): # <<<<<<<<<<<<<< * py_db.notify_thread_not_alive(get_current_thread_id(t)) * return None if event == 'call' else NO_FTRACE */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1758, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1761, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -33429,25 +34557,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_t}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1758, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1761, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = (!__pyx_t_7); if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1759 + /* "_pydevd_bundle/pydevd_cython.pyx":1762 * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): * py_db.notify_thread_not_alive(get_current_thread_id(t)) # <<<<<<<<<<<<<< * return None if event == 'call' else NO_FTRACE * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_notify_thread_not_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1759, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_notify_thread_not_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1762, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1762, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -33467,7 +34595,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_t}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1759, __pyx_L7_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1762, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -33490,13 +34618,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1759, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1760 + /* "_pydevd_bundle/pydevd_cython.pyx":1763 * if not is_thread_alive(t): * py_db.notify_thread_not_alive(get_current_thread_id(t)) * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -33504,12 +34632,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # Note: it's important that the context name is also given because we may hit something once */ __Pyx_XDECREF(__pyx_r); - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1760, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1763, __pyx_L7_error) if (__pyx_t_12) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1760, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1763, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -33518,7 +34646,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1758 + /* "_pydevd_bundle/pydevd_cython.pyx":1761 * * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): # <<<<<<<<<<<<<< @@ -33527,19 +34655,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1764 + /* "_pydevd_bundle/pydevd_cython.pyx":1767 * # Note: it's important that the context name is also given because we may hit something once * # in the global context and another in the local context. * frame_cache_key = frame.f_code # <<<<<<<<<<<<<< * if frame_cache_key in cache_skips: * if not is_stepping: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_frame_cache_key = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1765 + /* "_pydevd_bundle/pydevd_cython.pyx":1768 * # in the global context and another in the local context. * frame_cache_key = frame.f_code * if frame_cache_key in cache_skips: # <<<<<<<<<<<<<< @@ -33548,12 +34676,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1765, __pyx_L7_error) + __PYX_ERR(0, 1768, __pyx_L7_error) } - __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_frame_cache_key, __pyx_v_cache_skips, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1765, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_frame_cache_key, __pyx_v_cache_skips, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1768, __pyx_L7_error) if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1766 + /* "_pydevd_bundle/pydevd_cython.pyx":1769 * frame_cache_key = frame.f_code * if frame_cache_key in cache_skips: * if not is_stepping: # <<<<<<<<<<<<<< @@ -33563,7 +34691,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_12 = (!__pyx_v_is_stepping); if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1768 + /* "_pydevd_bundle/pydevd_cython.pyx":1771 * if not is_stepping: * # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -33571,12 +34699,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # When stepping we can't take into account caching based on the breakpoints (only global filtering). */ __Pyx_XDECREF(__pyx_r); - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1768, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1771, __pyx_L7_error) if (__pyx_t_12) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1768, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1771, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -33585,7 +34713,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1766 + /* "_pydevd_bundle/pydevd_cython.pyx":1769 * frame_cache_key = frame.f_code * if frame_cache_key in cache_skips: * if not is_stepping: # <<<<<<<<<<<<<< @@ -33594,7 +34722,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1771 + /* "_pydevd_bundle/pydevd_cython.pyx":1774 * else: * # When stepping we can't take into account caching based on the breakpoints (only global filtering). * if cache_skips.get(frame_cache_key) == 1: # <<<<<<<<<<<<<< @@ -33604,15 +34732,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal /*else*/ { if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1771, __pyx_L7_error) + __PYX_ERR(0, 1774, __pyx_L7_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_frame_cache_key, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_frame_cache_key, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1771, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1774, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1773 + /* "_pydevd_bundle/pydevd_cython.pyx":1776 * if cache_skips.get(frame_cache_key) == 1: * * if additional_info.pydev_original_step_cmd in (107, 144) and not _global_notify_skipped_step_in: # <<<<<<<<<<<<<< @@ -33634,20 +34762,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_12 = __pyx_t_13; goto __pyx_L19_bool_binop_done; } - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1773, __pyx_L7_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1776, __pyx_L7_error) __pyx_t_7 = (!__pyx_t_13); __pyx_t_12 = __pyx_t_7; __pyx_L19_bool_binop_done:; if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1774 + /* "_pydevd_bundle/pydevd_cython.pyx":1777 * * if additional_info.pydev_original_step_cmd in (107, 144) and not _global_notify_skipped_step_in: * notify_skipped_step_in_because_of_filters(py_db, frame) # <<<<<<<<<<<<<< * * back_frame = frame.f_back */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1774, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1777, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -33667,13 +34795,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_py_db, __pyx_v_frame}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1773 + /* "_pydevd_bundle/pydevd_cython.pyx":1776 * if cache_skips.get(frame_cache_key) == 1: * * if additional_info.pydev_original_step_cmd in (107, 144) and not _global_notify_skipped_step_in: # <<<<<<<<<<<<<< @@ -33682,19 +34810,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1776 + /* "_pydevd_bundle/pydevd_cython.pyx":1779 * notify_skipped_step_in_because_of_filters(py_db, frame) * * back_frame = frame.f_back # <<<<<<<<<<<<<< * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * back_frame_cache_key = back_frame.f_code */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1776, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_back_frame = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1777 + /* "_pydevd_bundle/pydevd_cython.pyx":1780 * * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): # <<<<<<<<<<<<<< @@ -33723,19 +34851,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L22_bool_binop_done:; if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1778 + /* "_pydevd_bundle/pydevd_cython.pyx":1781 * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * back_frame_cache_key = back_frame.f_code # <<<<<<<<<<<<<< * if cache_skips.get(back_frame_cache_key) == 1: * # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1778, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_back_frame_cache_key = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1779 + /* "_pydevd_bundle/pydevd_cython.pyx":1782 * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * back_frame_cache_key = back_frame.f_code * if cache_skips.get(back_frame_cache_key) == 1: # <<<<<<<<<<<<<< @@ -33744,15 +34872,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1779, __pyx_L7_error) + __PYX_ERR(0, 1782, __pyx_L7_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1779, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1782, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1781 + /* "_pydevd_bundle/pydevd_cython.pyx":1784 * if cache_skips.get(back_frame_cache_key) == 1: * # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -33760,12 +34888,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1781, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1784, __pyx_L7_error) if (__pyx_t_12) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1781, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -33774,7 +34902,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1779 + /* "_pydevd_bundle/pydevd_cython.pyx":1782 * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * back_frame_cache_key = back_frame.f_code * if cache_skips.get(back_frame_cache_key) == 1: # <<<<<<<<<<<<<< @@ -33783,7 +34911,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1777 + /* "_pydevd_bundle/pydevd_cython.pyx":1780 * * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): # <<<<<<<<<<<<<< @@ -33793,7 +34921,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L21; } - /* "_pydevd_bundle/pydevd_cython.pyx":1784 + /* "_pydevd_bundle/pydevd_cython.pyx":1787 * else: * # if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -33802,12 +34930,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1784, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1787, __pyx_L7_error) if (__pyx_t_12) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1787, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -33818,7 +34946,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L21:; - /* "_pydevd_bundle/pydevd_cython.pyx":1771 + /* "_pydevd_bundle/pydevd_cython.pyx":1774 * else: * # When stepping we can't take into account caching based on the breakpoints (only global filtering). * if cache_skips.get(frame_cache_key) == 1: # <<<<<<<<<<<<<< @@ -33828,7 +34956,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } - /* "_pydevd_bundle/pydevd_cython.pyx":1765 + /* "_pydevd_bundle/pydevd_cython.pyx":1768 * # in the global context and another in the local context. * frame_cache_key = frame.f_code * if frame_cache_key in cache_skips: # <<<<<<<<<<<<<< @@ -33837,7 +34965,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1786 + /* "_pydevd_bundle/pydevd_cython.pyx":1789 * return None if event == 'call' else NO_FTRACE * * try: # <<<<<<<<<<<<<< @@ -33853,29 +34981,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1788 + /* "_pydevd_bundle/pydevd_cython.pyx":1791 * try: * # Make fast path faster! * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] # <<<<<<<<<<<<<< * except: * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L25_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1788, __pyx_L25_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1791, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L25_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1791, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1788, __pyx_L25_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1791, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_6))) __PYX_ERR(0, 1788, __pyx_L25_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_6))) __PYX_ERR(0, 1791, __pyx_L25_error) __pyx_v_abs_path_canonical_path_and_base = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1786 + /* "_pydevd_bundle/pydevd_cython.pyx":1789 * return None if event == 'call' else NO_FTRACE * * try: # <<<<<<<<<<<<<< @@ -33895,7 +35023,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1789 + /* "_pydevd_bundle/pydevd_cython.pyx":1792 * # Make fast path faster! * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] * except: # <<<<<<<<<<<<<< @@ -33904,19 +35032,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 1789, __pyx_L27_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 1792, __pyx_L27_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); - /* "_pydevd_bundle/pydevd_cython.pyx":1790 + /* "_pydevd_bundle/pydevd_cython.pyx":1793 * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] * except: * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) # <<<<<<<<<<<<<< * * file_type = py_db.get_file_type(frame, abs_path_canonical_path_and_base) # we don't want to debug threading or anything related to pydevd */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L27_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1793, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_11 = 0; @@ -33936,11 +35064,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_frame}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L27_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1793, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_4))) __PYX_ERR(0, 1790, __pyx_L27_except_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_4))) __PYX_ERR(0, 1793, __pyx_L27_except_error) __Pyx_XDECREF_SET(__pyx_v_abs_path_canonical_path_and_base, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -33949,7 +35077,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L26_exception_handled; } - /* "_pydevd_bundle/pydevd_cython.pyx":1786 + /* "_pydevd_bundle/pydevd_cython.pyx":1789 * return None if event == 'call' else NO_FTRACE * * try: # <<<<<<<<<<<<<< @@ -33970,14 +35098,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L30_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1792 + /* "_pydevd_bundle/pydevd_cython.pyx":1795 * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) * * file_type = py_db.get_file_type(frame, abs_path_canonical_path_and_base) # we don't want to debug threading or anything related to pydevd # <<<<<<<<<<<<<< * * if file_type is not None: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1792, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1795, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_11 = 0; @@ -33997,14 +35125,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_frame, __pyx_v_abs_path_canonical_path_and_base}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1795, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_v_file_type = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1794 + /* "_pydevd_bundle/pydevd_cython.pyx":1797 * file_type = py_db.get_file_type(frame, abs_path_canonical_path_and_base) # we don't want to debug threading or anything related to pydevd * * if file_type is not None: # <<<<<<<<<<<<<< @@ -34014,30 +35142,30 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_12 = (__pyx_v_file_type != Py_None); if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1795 + /* "_pydevd_bundle/pydevd_cython.pyx":1798 * * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) */ - __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1795, __pyx_L7_error) + __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1798, __pyx_L7_error) if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1796 + /* "_pydevd_bundle/pydevd_cython.pyx":1799 * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_in_project_scope); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_in_project_scope); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1799, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1796, __pyx_L7_error) + __PYX_ERR(0, 1799, __pyx_L7_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1796, __pyx_L7_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1799, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -34058,16 +35186,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1796, __pyx_L7_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1799, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = (!__pyx_t_12); if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1798 + /* "_pydevd_bundle/pydevd_cython.pyx":1801 * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -34076,11 +35204,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1798, __pyx_L7_error) + __PYX_ERR(0, 1801, __pyx_L7_error) } - if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1798, __pyx_L7_error) + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1801, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1799 + /* "_pydevd_bundle/pydevd_cython.pyx":1802 * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34088,12 +35216,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1799, __pyx_L7_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1802, __pyx_L7_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1799, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -34102,7 +35230,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1796 + /* "_pydevd_bundle/pydevd_cython.pyx":1799 * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< @@ -34111,7 +35239,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1795 + /* "_pydevd_bundle/pydevd_cython.pyx":1798 * * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< @@ -34121,7 +35249,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L34; } - /* "_pydevd_bundle/pydevd_cython.pyx":1802 + /* "_pydevd_bundle/pydevd_cython.pyx":1805 * else: * # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -34131,11 +35259,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal /*else*/ { if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1802, __pyx_L7_error) + __PYX_ERR(0, 1805, __pyx_L7_error) } - if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1802, __pyx_L7_error) + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1805, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1803 + /* "_pydevd_bundle/pydevd_cython.pyx":1806 * # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34143,12 +35271,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * if py_db.is_files_filter_enabled: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1803, __pyx_L7_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1806, __pyx_L7_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1803, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1806, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -34159,7 +35287,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L34:; - /* "_pydevd_bundle/pydevd_cython.pyx":1794 + /* "_pydevd_bundle/pydevd_cython.pyx":1797 * file_type = py_db.get_file_type(frame, abs_path_canonical_path_and_base) # we don't want to debug threading or anything related to pydevd * * if file_type is not None: # <<<<<<<<<<<<<< @@ -34168,33 +35296,33 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1805 + /* "_pydevd_bundle/pydevd_cython.pyx":1808 * return None if event == 'call' else NO_FTRACE * * if py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): * cache_skips[frame_cache_key] = 1 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1805, __pyx_L7_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1808, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1806 + /* "_pydevd_bundle/pydevd_cython.pyx":1809 * * if py_db.is_files_filter_enabled: * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): # <<<<<<<<<<<<<< * cache_skips[frame_cache_key] = 1 * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1806, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1809, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1806, __pyx_L7_error) + __PYX_ERR(0, 1809, __pyx_L7_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1806, __pyx_L7_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1809, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -34215,15 +35343,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1809, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1806, __pyx_L7_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1809, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1807 + /* "_pydevd_bundle/pydevd_cython.pyx":1810 * if py_db.is_files_filter_enabled: * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -34232,11 +35360,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1807, __pyx_L7_error) + __PYX_ERR(0, 1810, __pyx_L7_error) } - if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1807, __pyx_L7_error) + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1810, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1809 + /* "_pydevd_bundle/pydevd_cython.pyx":1812 * cache_skips[frame_cache_key] = 1 * * if is_stepping and additional_info.pydev_original_step_cmd in (107, 144) and not _global_notify_skipped_step_in: # <<<<<<<<<<<<<< @@ -34263,20 +35391,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_13 = __pyx_t_7; goto __pyx_L39_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1809, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1812, __pyx_L7_error) __pyx_t_12 = (!__pyx_t_7); __pyx_t_13 = __pyx_t_12; __pyx_L39_bool_binop_done:; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1810 + /* "_pydevd_bundle/pydevd_cython.pyx":1813 * * if is_stepping and additional_info.pydev_original_step_cmd in (107, 144) and not _global_notify_skipped_step_in: * notify_skipped_step_in_because_of_filters(py_db, frame) # <<<<<<<<<<<<<< * * # A little gotcha, sometimes when we're stepping in we have to stop in a */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_11 = 0; @@ -34296,13 +35424,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_py_db, __pyx_v_frame}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1809 + /* "_pydevd_bundle/pydevd_cython.pyx":1812 * cache_skips[frame_cache_key] = 1 * * if is_stepping and additional_info.pydev_original_step_cmd in (107, 144) and not _global_notify_skipped_step_in: # <<<<<<<<<<<<<< @@ -34311,19 +35439,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1815 + /* "_pydevd_bundle/pydevd_cython.pyx":1818 * # return event showing the back frame as the current frame, so, we need * # to check not only the current frame but the back frame too. * back_frame = frame.f_back # <<<<<<<<<<<<<< * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_back_frame, __pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1816 + /* "_pydevd_bundle/pydevd_cython.pyx":1819 * # to check not only the current frame but the back frame too. * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): # <<<<<<<<<<<<<< @@ -34352,18 +35480,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L43_bool_binop_done:; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1817 + /* "_pydevd_bundle/pydevd_cython.pyx":1820 * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): # <<<<<<<<<<<<<< * back_frame_cache_key = back_frame.f_code * cache_skips[back_frame_cache_key] = 1 */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1817, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1820, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1817, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1820, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1817, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1820, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -34385,27 +35513,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1820, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1817, __pyx_L7_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1820, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1818 + /* "_pydevd_bundle/pydevd_cython.pyx":1821 * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): * back_frame_cache_key = back_frame.f_code # <<<<<<<<<<<<<< * cache_skips[back_frame_cache_key] = 1 * # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_back_frame_cache_key, __pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1819 + /* "_pydevd_bundle/pydevd_cython.pyx":1822 * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): * back_frame_cache_key = back_frame.f_code * cache_skips[back_frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -34414,11 +35542,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1819, __pyx_L7_error) + __PYX_ERR(0, 1822, __pyx_L7_error) } - if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1819, __pyx_L7_error) + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 1822, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1821 + /* "_pydevd_bundle/pydevd_cython.pyx":1824 * cache_skips[back_frame_cache_key] = 1 * # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34426,12 +35554,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1821, __pyx_L7_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1824, __pyx_L7_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1821, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1824, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -34440,7 +35568,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1817 + /* "_pydevd_bundle/pydevd_cython.pyx":1820 * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): # <<<<<<<<<<<<<< @@ -34449,7 +35577,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1816 + /* "_pydevd_bundle/pydevd_cython.pyx":1819 * # to check not only the current frame but the back frame too. * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): # <<<<<<<<<<<<<< @@ -34459,7 +35587,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L42; } - /* "_pydevd_bundle/pydevd_cython.pyx":1824 + /* "_pydevd_bundle/pydevd_cython.pyx":1827 * else: * # if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34468,12 +35596,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1824, __pyx_L7_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1827, __pyx_L7_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1824, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1827, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -34484,7 +35612,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L42:; - /* "_pydevd_bundle/pydevd_cython.pyx":1806 + /* "_pydevd_bundle/pydevd_cython.pyx":1809 * * if py_db.is_files_filter_enabled: * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): # <<<<<<<<<<<<<< @@ -34493,7 +35621,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1805 + /* "_pydevd_bundle/pydevd_cython.pyx":1808 * return None if event == 'call' else NO_FTRACE * * if py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< @@ -34502,60 +35630,60 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1832 + /* "_pydevd_bundle/pydevd_cython.pyx":1835 * ret = PyDBFrame( * ( * py_db, abs_path_canonical_path_and_base, additional_info, t, frame_skips_cache, frame_cache_key, # <<<<<<<<<<<<<< * ) * ).trace_dispatch(frame, event, arg) */ - __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L7_error) + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_py_db); __Pyx_GIVEREF(__pyx_v_py_db); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_py_db)) __PYX_ERR(0, 1832, __pyx_L7_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_py_db)) __PYX_ERR(0, 1835, __pyx_L7_error); __Pyx_INCREF(__pyx_v_abs_path_canonical_path_and_base); __Pyx_GIVEREF(__pyx_v_abs_path_canonical_path_and_base); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_abs_path_canonical_path_and_base)) __PYX_ERR(0, 1832, __pyx_L7_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_abs_path_canonical_path_and_base)) __PYX_ERR(0, 1835, __pyx_L7_error); __Pyx_INCREF((PyObject *)__pyx_v_additional_info); __Pyx_GIVEREF((PyObject *)__pyx_v_additional_info); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_additional_info))) __PYX_ERR(0, 1832, __pyx_L7_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_additional_info))) __PYX_ERR(0, 1835, __pyx_L7_error); __Pyx_INCREF(__pyx_v_t); __Pyx_GIVEREF(__pyx_v_t); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_t)) __PYX_ERR(0, 1832, __pyx_L7_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_t)) __PYX_ERR(0, 1835, __pyx_L7_error); __Pyx_INCREF(__pyx_v_frame_skips_cache); __Pyx_GIVEREF(__pyx_v_frame_skips_cache); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_frame_skips_cache)) __PYX_ERR(0, 1832, __pyx_L7_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_frame_skips_cache)) __PYX_ERR(0, 1835, __pyx_L7_error); __Pyx_INCREF(__pyx_v_frame_cache_key); __Pyx_GIVEREF(__pyx_v_frame_cache_key); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_frame_cache_key)) __PYX_ERR(0, 1832, __pyx_L7_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_frame_cache_key)) __PYX_ERR(0, 1835, __pyx_L7_error); - /* "_pydevd_bundle/pydevd_cython.pyx":1830 + /* "_pydevd_bundle/pydevd_cython.pyx":1833 * # Just create PyDBFrame directly (removed support for Python versions < 2.5, which required keeping a weak * # reference to the frame). * ret = PyDBFrame( # <<<<<<<<<<<<<< * ( * py_db, abs_path_canonical_path_and_base, additional_info, t, frame_skips_cache, frame_cache_key, */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1830, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1833, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1834 + /* "_pydevd_bundle/pydevd_cython.pyx":1837 * py_db, abs_path_canonical_path_and_base, additional_info, t, frame_skips_cache, frame_cache_key, * ) * ).trace_dispatch(frame, event, arg) # <<<<<<<<<<<<<< * if ret is None: * # 1 means skipped because of filters. */ - if (!(likely(PyString_CheckExact(__pyx_v_event))||((__pyx_v_event) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_event))) __PYX_ERR(0, 1834, __pyx_L7_error) - __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_5)->__pyx_vtab)->trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_5), __pyx_v_frame, ((PyObject*)__pyx_v_event), __pyx_v_arg, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L7_error) + if (!(likely(PyString_CheckExact(__pyx_v_event))||((__pyx_v_event) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_event))) __PYX_ERR(0, 1837, __pyx_L7_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_5)->__pyx_vtab)->trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_5), __pyx_v_frame, ((PyObject*)__pyx_v_event), __pyx_v_arg, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1837, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1835 + /* "_pydevd_bundle/pydevd_cython.pyx":1838 * ) * ).trace_dispatch(frame, event, arg) * if ret is None: # <<<<<<<<<<<<<< @@ -34565,7 +35693,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_13 = (__pyx_v_ret == Py_None); if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1838 + /* "_pydevd_bundle/pydevd_cython.pyx":1841 * # 1 means skipped because of filters. * # 2 means skipped because no breakpoints were hit. * cache_skips[frame_cache_key] = 2 # <<<<<<<<<<<<<< @@ -34574,11 +35702,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_cache_skips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1838, __pyx_L7_error) + __PYX_ERR(0, 1841, __pyx_L7_error) } - if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_2) < 0))) __PYX_ERR(0, 1838, __pyx_L7_error) + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_2) < 0))) __PYX_ERR(0, 1841, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1839 + /* "_pydevd_bundle/pydevd_cython.pyx":1842 * # 2 means skipped because no breakpoints were hit. * cache_skips[frame_cache_key] = 2 * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34586,12 +35714,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1839, __pyx_L7_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1842, __pyx_L7_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1839, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -34600,7 +35728,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1835 + /* "_pydevd_bundle/pydevd_cython.pyx":1838 * ) * ).trace_dispatch(frame, event, arg) * if ret is None: # <<<<<<<<<<<<<< @@ -34609,19 +35737,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1842 + /* "_pydevd_bundle/pydevd_cython.pyx":1845 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * frame.f_trace = SafeCallWrapper(ret) # Make sure we keep the returned tracer. # <<<<<<<<<<<<<< * # ELSE * # frame.f_trace = ret # Make sure we keep the returned tracer. */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_1) < 0) __PYX_ERR(0, 1842, __pyx_L7_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_1) < 0) __PYX_ERR(0, 1845, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1846 + /* "_pydevd_bundle/pydevd_cython.pyx":1849 * # frame.f_trace = ret # Make sure we keep the returned tracer. * # ENDIF * return ret # <<<<<<<<<<<<<< @@ -34633,7 +35761,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = __pyx_v_ret; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1751 + /* "_pydevd_bundle/pydevd_cython.pyx":1754 * * additional_info.is_tracing += 1 * try: # <<<<<<<<<<<<<< @@ -34649,7 +35777,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1848 + /* "_pydevd_bundle/pydevd_cython.pyx":1851 * return ret * * except SystemExit: # <<<<<<<<<<<<<< @@ -34659,12 +35787,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_SystemExit); if (__pyx_t_11) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1848, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1851, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); - /* "_pydevd_bundle/pydevd_cython.pyx":1849 + /* "_pydevd_bundle/pydevd_cython.pyx":1852 * * except SystemExit: * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34672,12 +35800,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * except Exception: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1849, __pyx_L9_except_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1852, __pyx_L9_except_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_6 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1849, __pyx_L9_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; @@ -34690,7 +35818,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L10_except_return; } - /* "_pydevd_bundle/pydevd_cython.pyx":1851 + /* "_pydevd_bundle/pydevd_cython.pyx":1854 * return None if event == 'call' else NO_FTRACE * * except Exception: # <<<<<<<<<<<<<< @@ -34700,25 +35828,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_11) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 1851, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 1854, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); - /* "_pydevd_bundle/pydevd_cython.pyx":1852 + /* "_pydevd_bundle/pydevd_cython.pyx":1855 * * except Exception: * if py_db.pydb_disposed: # <<<<<<<<<<<<<< * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. * # Log it */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1852, __pyx_L9_except_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1855, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1852, __pyx_L9_except_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1855, __pyx_L9_except_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1853 + /* "_pydevd_bundle/pydevd_cython.pyx":1856 * except Exception: * if py_db.pydb_disposed: * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. # <<<<<<<<<<<<<< @@ -34726,12 +35854,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * try: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1853, __pyx_L9_except_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1856, __pyx_L9_except_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_6 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1853, __pyx_L9_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; @@ -34743,7 +35871,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_except_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1852 + /* "_pydevd_bundle/pydevd_cython.pyx":1855 * * except Exception: * if py_db.pydb_disposed: # <<<<<<<<<<<<<< @@ -34752,7 +35880,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1855 + /* "_pydevd_bundle/pydevd_cython.pyx":1858 * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. * # Log it * try: # <<<<<<<<<<<<<< @@ -34768,27 +35896,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1856 + /* "_pydevd_bundle/pydevd_cython.pyx":1859 * # Log it * try: * if pydev_log_exception is not None: # <<<<<<<<<<<<<< * # This can actually happen during the interpreter shutdown in Python 2.7 * pydev_log_exception() */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1856, __pyx_L52_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1859, __pyx_L52_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = (__pyx_t_6 != Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_13) { - /* "_pydevd_bundle/pydevd_cython.pyx":1858 + /* "_pydevd_bundle/pydevd_cython.pyx":1861 * if pydev_log_exception is not None: * # This can actually happen during the interpreter shutdown in Python 2.7 * pydev_log_exception() # <<<<<<<<<<<<<< * except: * # Error logging? We're really in the interpreter shutdown... */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1858, __pyx_L52_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1861, __pyx_L52_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_11 = 0; @@ -34808,13 +35936,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1858, __pyx_L52_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1861, __pyx_L52_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1856 + /* "_pydevd_bundle/pydevd_cython.pyx":1859 * # Log it * try: * if pydev_log_exception is not None: # <<<<<<<<<<<<<< @@ -34823,7 +35951,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1855 + /* "_pydevd_bundle/pydevd_cython.pyx":1858 * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. * # Log it * try: # <<<<<<<<<<<<<< @@ -34840,7 +35968,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1859 + /* "_pydevd_bundle/pydevd_cython.pyx":1862 * # This can actually happen during the interpreter shutdown in Python 2.7 * pydev_log_exception() * except: # <<<<<<<<<<<<<< @@ -34859,7 +35987,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L59_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1863 + /* "_pydevd_bundle/pydevd_cython.pyx":1866 * # (https://github.com/fabioz/PyDev.Debugger/issues/8) * pass * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -34867,12 +35995,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * additional_info.is_tracing -= 1 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1863, __pyx_L9_except_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1866, __pyx_L9_except_error) if (__pyx_t_13) { __Pyx_INCREF(Py_None); __pyx_t_6 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L9_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; @@ -34886,7 +36014,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } goto __pyx_L9_except_error; - /* "_pydevd_bundle/pydevd_cython.pyx":1751 + /* "_pydevd_bundle/pydevd_cython.pyx":1754 * * additional_info.is_tracing += 1 * try: # <<<<<<<<<<<<<< @@ -34914,7 +36042,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } - /* "_pydevd_bundle/pydevd_cython.pyx":1865 + /* "_pydevd_bundle/pydevd_cython.pyx":1868 * return None if event == 'call' else NO_FTRACE * finally: * additional_info.is_tracing -= 1 # <<<<<<<<<<<<<< @@ -34969,7 +36097,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } - /* "_pydevd_bundle/pydevd_cython.pyx":1720 + /* "_pydevd_bundle/pydevd_cython.pyx":1723 * # ENDIF * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -35004,7 +36132,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1710 +/* "_pydevd_bundle/pydevd_cython.pyx":1713 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class ThreadTracer: * cdef public tuple _args; # <<<<<<<<<<<<<< @@ -35066,7 +36194,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__se const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1710, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1713, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -35519,7 +36647,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_6__set return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1880 +/* "_pydevd_bundle/pydevd_cython.pyx":1883 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -35528,15 +36656,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_6__set */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_11__call__(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_17__call__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_11__call__ = {"__call__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_11__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_11__call__(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_17__call__ = {"__call__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_17__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_17__call__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -35589,7 +36717,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1880, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -35597,9 +36725,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1880, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 1); __PYX_ERR(0, 1880, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 1); __PYX_ERR(0, 1883, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -35607,9 +36735,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1880, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 2); __PYX_ERR(0, 1880, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 2); __PYX_ERR(0, 1883, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -35617,14 +36745,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1880, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 3); __PYX_ERR(0, 1880, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 3); __PYX_ERR(0, 1883, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1880, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1883, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; @@ -35641,7 +36769,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1880, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1883, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35655,7 +36783,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(__pyx_self, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_16__call__(__pyx_self, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); /* function exit code */ { @@ -35668,7 +36796,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_16__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -35680,28 +36808,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNU int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 1); - /* "_pydevd_bundle/pydevd_cython.pyx":1881 + /* "_pydevd_bundle/pydevd_cython.pyx":1884 * * def __call__(self, frame, event, arg): * constructed_tid_to_last_frame[self._args[1].ident] = frame # <<<<<<<<<<<<<< * return _original_call(self, frame, event, arg) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_constructed_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_constructed_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ident); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ident); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_frame) < 0))) __PYX_ERR(0, 1881, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_frame) < 0))) __PYX_ERR(0, 1884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1882 + /* "_pydevd_bundle/pydevd_cython.pyx":1885 * def __call__(self, frame, event, arg): * constructed_tid_to_last_frame[self._args[1].ident] = frame * return _original_call(self, frame, event, arg) # <<<<<<<<<<<<<< @@ -35709,7 +36837,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNU * ThreadTracer.__call__ = __call__ */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_original_call); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_original_call); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -35729,7 +36857,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNU PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -35737,7 +36865,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNU __pyx_t_2 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1880 + /* "_pydevd_bundle/pydevd_cython.pyx":1883 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -35758,6 +36886,79 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNU return __pyx_r; } +/* "_pydevd_bundle/pydevd_cython.pyx":1891 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError('Not used in sys.monitoring mode.') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func = {"fix_top_level_trace_and_get_trace_func", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "fix_top_level_trace_and_get_trace_func", 1))) return NULL; + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_18fix_top_level_trace_and_get_trace_func(__pyx_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_18fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1892 + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + * raise RuntimeError('Not used in sys.monitoring mode.') # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1892, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1891 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError('Not used in sys.monitoring mode.') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.fix_top_level_trace_and_get_trace_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "(tree fragment)":1 * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError @@ -35765,15 +36966,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10__call__(CYTHON_UNU */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_13__pyx_unpickle_PyDBAdditionalThreadInfo(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_PyDBAdditionalThreadInfo(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_13__pyx_unpickle_PyDBAdditionalThreadInfo = {"__pyx_unpickle_PyDBAdditionalThreadInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_13__pyx_unpickle_PyDBAdditionalThreadInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_13__pyx_unpickle_PyDBAdditionalThreadInfo(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_PyDBAdditionalThreadInfo = {"__pyx_unpickle_PyDBAdditionalThreadInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_PyDBAdditionalThreadInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_PyDBAdditionalThreadInfo(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -35877,7 +37078,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12__pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -35890,7 +37091,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12__pyx_unpickle_PyDBAdditionalThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_PyDBAdditionalThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -35914,7 +37115,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12__pyx_unpickle_PyDB */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__11, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__12, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -36465,15 +37666,15 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBAdd */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15__pyx_unpickle__TryExceptContainerObj(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle__TryExceptContainerObj(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_15__pyx_unpickle__TryExceptContainerObj = {"__pyx_unpickle__TryExceptContainerObj", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15__pyx_unpickle__TryExceptContainerObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15__pyx_unpickle__TryExceptContainerObj(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle__TryExceptContainerObj = {"__pyx_unpickle__TryExceptContainerObj", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle__TryExceptContainerObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle__TryExceptContainerObj(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -36577,7 +37778,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_14__pyx_unpickle__TryExceptContainerObj(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle__TryExceptContainerObj(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -36590,7 +37791,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__pyx_unpickle__TryExceptContainerObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle__TryExceptContainerObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -36614,7 +37815,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__pyx_unpickle__Try */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__12, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__13, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -36909,15 +38110,15 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle__TryExc */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_17__pyx_unpickle_PyDBFrame(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_PyDBFrame(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_17__pyx_unpickle_PyDBFrame = {"__pyx_unpickle_PyDBFrame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_17__pyx_unpickle_PyDBFrame, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_17__pyx_unpickle_PyDBFrame(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_PyDBFrame = {"__pyx_unpickle_PyDBFrame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_PyDBFrame, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_PyDBFrame(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -37021,7 +38222,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_16__pyx_unpickle_PyDBFrame(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_PyDBFrame(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -37034,7 +38235,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_16__pyx_unpickle_PyDBFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_PyDBFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -37058,7 +38259,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_16__pyx_unpickle_PyDB */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__13, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__14, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -37373,15 +38574,15 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFra */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_19__pyx_unpickle_SafeCallWrapper(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_SafeCallWrapper(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_19__pyx_unpickle_SafeCallWrapper = {"__pyx_unpickle_SafeCallWrapper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_19__pyx_unpickle_SafeCallWrapper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_19__pyx_unpickle_SafeCallWrapper(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_SafeCallWrapper = {"__pyx_unpickle_SafeCallWrapper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_SafeCallWrapper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_SafeCallWrapper(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -37485,7 +38686,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_18__pyx_unpickle_SafeCallWrapper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_26__pyx_unpickle_SafeCallWrapper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -37498,7 +38699,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_18__pyx_unpickle_SafeCallWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_26__pyx_unpickle_SafeCallWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -37522,7 +38723,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_18__pyx_unpickle_Safe */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__14, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -37816,15 +39017,15 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_SafeCal */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions = {"__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions = {"__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -37928,7 +39129,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_28__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -37941,7 +39142,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_28__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -37965,7 +39166,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_20__pyx_unpickle_TopL */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__16, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -38260,15 +39461,15 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLeve */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle_TopLevelThreadTracerNoBackFrame(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_TopLevelThreadTracerNoBackFrame(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle_TopLevelThreadTracerNoBackFrame = {"__pyx_unpickle_TopLevelThreadTracerNoBackFrame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle_TopLevelThreadTracerNoBackFrame, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle_TopLevelThreadTracerNoBackFrame(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_TopLevelThreadTracerNoBackFrame = {"__pyx_unpickle_TopLevelThreadTracerNoBackFrame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_TopLevelThreadTracerNoBackFrame, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_TopLevelThreadTracerNoBackFrame(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -38372,7 +39573,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle_TopLevelThreadTracerNoBackFrame(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_30__pyx_unpickle_TopLevelThreadTracerNoBackFrame(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -38385,7 +39586,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle_TopLevelThreadTracerNoBackFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_30__pyx_unpickle_TopLevelThreadTracerNoBackFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -38409,7 +39610,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22__pyx_unpickle_TopL */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__16, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__17, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -38758,15 +39959,15 @@ static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLeve */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_ThreadTracer(PyObject *__pyx_self, +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_ThreadTracer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_ThreadTracer = {"__pyx_unpickle_ThreadTracer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_ThreadTracer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_ThreadTracer(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_ThreadTracer = {"__pyx_unpickle_ThreadTracer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_ThreadTracer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_ThreadTracer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -38870,7 +40071,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_ThreadTracer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_32__pyx_unpickle_ThreadTracer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { @@ -38883,7 +40084,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_ThreadTracer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_32__pyx_unpickle_ThreadTracer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -38907,7 +40108,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24__pyx_unpickle_Thre */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__16, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -41056,7 +42257,9 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_NO_FTRACE, __pyx_k_NO_FTRACE, sizeof(__pyx_k_NO_FTRACE), 0, 0, 1, 1}, {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1}, {&__pyx_n_s_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1}, + {&__pyx_kp_s_Not_used_in_sys_monitoring_mode, __pyx_k_Not_used_in_sys_monitoring_mode, sizeof(__pyx_k_Not_used_in_sys_monitoring_mode), 0, 0, 1, 0}, {&__pyx_n_s_PYDEVD_IPYTHON_CONTEXT, __pyx_k_PYDEVD_IPYTHON_CONTEXT, sizeof(__pyx_k_PYDEVD_IPYTHON_CONTEXT), 0, 0, 1, 1}, + {&__pyx_n_s_PYDEVD_USE_SYS_MONITORING, __pyx_k_PYDEVD_USE_SYS_MONITORING, sizeof(__pyx_k_PYDEVD_USE_SYS_MONITORING), 0, 0, 1, 1}, {&__pyx_n_s_PYDEV_FILE, __pyx_k_PYDEV_FILE, sizeof(__pyx_k_PYDEV_FILE), 0, 0, 1, 1}, {&__pyx_n_s_PYTHON_SUSPEND, __pyx_k_PYTHON_SUSPEND, sizeof(__pyx_k_PYTHON_SUSPEND), 0, 0, 1, 1}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, @@ -41073,6 +42276,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_PyDBFrame_trace_dispatch, __pyx_k_PyDBFrame_trace_dispatch, sizeof(__pyx_k_PyDBFrame_trace_dispatch), 0, 0, 1, 1}, {&__pyx_n_s_PyDBFrame_trace_exception, __pyx_k_PyDBFrame_trace_exception, sizeof(__pyx_k_PyDBFrame_trace_exception), 0, 0, 1, 1}, {&__pyx_n_s_RETURN_VALUES_DICT, __pyx_k_RETURN_VALUES_DICT, sizeof(__pyx_k_RETURN_VALUES_DICT), 0, 0, 1, 1}, + {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_STATE_RUN, __pyx_k_STATE_RUN, sizeof(__pyx_k_STATE_RUN), 0, 0, 1, 1}, {&__pyx_n_s_SUPPORT_GEVENT, __pyx_k_SUPPORT_GEVENT, sizeof(__pyx_k_SUPPORT_GEVENT), 0, 0, 1, 1}, {&__pyx_n_s_SafeCallWrapper, __pyx_k_SafeCallWrapper, sizeof(__pyx_k_SafeCallWrapper), 0, 0, 1, 1}, @@ -41105,12 +42309,14 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, __pyx_k_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, sizeof(__pyx_k_USE_CUSTOM_SYS_CURRENT_FRAMES_MA), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_get_topmost_frame_for, __pyx_k_Unable_to_get_topmost_frame_for, sizeof(__pyx_k_Unable_to_get_topmost_frame_for), 0, 0, 1, 0}, {&__pyx_kp_s_Using_Cython_speedups, __pyx_k_Using_Cython_speedups, sizeof(__pyx_k_Using_Cython_speedups), 0, 0, 1, 0}, - {&__pyx_n_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 1}, + {&__pyx_n_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 1}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0}, {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0}, + {&__pyx_n_s_abs_real_path_and_base, __pyx_k_abs_real_path_and_base, sizeof(__pyx_k_abs_real_path_and_base), 0, 0, 1, 1}, + {&__pyx_n_s_absolute_filename, __pyx_k_absolute_filename, sizeof(__pyx_k_absolute_filename), 0, 0, 1, 1}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_add_command, __pyx_k_add_command, sizeof(__pyx_k_add_command), 0, 0, 1, 1}, {&__pyx_n_s_add_exception_to_frame, __pyx_k_add_exception_to_frame, sizeof(__pyx_k_add_exception_to_frame), 0, 0, 1, 1}, @@ -41133,7 +42339,10 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, {&__pyx_n_s_call_2, __pyx_k_call_2, sizeof(__pyx_k_call_2), 0, 0, 1, 1}, {&__pyx_n_s_can_skip, __pyx_k_can_skip, sizeof(__pyx_k_can_skip), 0, 0, 1, 1}, + {&__pyx_n_s_canonical_normalized_filename, __pyx_k_canonical_normalized_filename, sizeof(__pyx_k_canonical_normalized_filename), 0, 0, 1, 1}, {&__pyx_kp_s_cell, __pyx_k_cell, sizeof(__pyx_k_cell), 0, 0, 1, 0}, + {&__pyx_n_s_check_excs, __pyx_k_check_excs, sizeof(__pyx_k_check_excs), 0, 0, 1, 1}, + {&__pyx_n_s_check_trace_obj, __pyx_k_check_trace_obj, sizeof(__pyx_k_check_trace_obj), 0, 0, 1, 1}, {&__pyx_n_s_checkcache, __pyx_k_checkcache, sizeof(__pyx_k_checkcache), 0, 0, 1, 1}, {&__pyx_n_s_children_variants, __pyx_k_children_variants, sizeof(__pyx_k_children_variants), 0, 0, 1, 1}, {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, @@ -41152,6 +42361,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_constant_to_str, __pyx_k_constant_to_str, sizeof(__pyx_k_constant_to_str), 0, 0, 1, 1}, {&__pyx_n_s_constructed_tid_to_last_frame, __pyx_k_constructed_tid_to_last_frame, sizeof(__pyx_k_constructed_tid_to_last_frame), 0, 0, 1, 1}, {&__pyx_n_s_container_obj, __pyx_k_container_obj, sizeof(__pyx_k_container_obj), 0, 0, 1, 1}, + {&__pyx_n_s_curr_stat, __pyx_k_curr_stat, sizeof(__pyx_k_curr_stat), 0, 0, 1, 1}, {&__pyx_n_s_current_frames, __pyx_k_current_frames, sizeof(__pyx_k_current_frames), 0, 0, 1, 1}, {&__pyx_n_s_current_frames_2, __pyx_k_current_frames_2, sizeof(__pyx_k_current_frames_2), 0, 0, 1, 1}, {&__pyx_n_s_custom_key, __pyx_k_custom_key, sizeof(__pyx_k_custom_key), 0, 0, 1, 1}, @@ -41168,16 +42378,22 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, + {&__pyx_n_s_exc_break, __pyx_k_exc_break, sizeof(__pyx_k_exc_break), 0, 0, 1, 1}, + {&__pyx_n_s_exc_break_caught, __pyx_k_exc_break_caught, sizeof(__pyx_k_exc_break_caught), 0, 0, 1, 1}, + {&__pyx_n_s_exc_break_user, __pyx_k_exc_break_user, sizeof(__pyx_k_exc_break_user), 0, 0, 1, 1}, {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_exc_lineno, __pyx_k_exc_lineno, sizeof(__pyx_k_exc_lineno), 0, 0, 1, 1}, {&__pyx_n_s_except_line, __pyx_k_except_line, sizeof(__pyx_k_except_line), 0, 0, 1, 1}, {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1}, {&__pyx_n_s_exception_break, __pyx_k_exception_break, sizeof(__pyx_k_exception_break), 0, 0, 1, 1}, + {&__pyx_n_s_exception_breakpoint, __pyx_k_exception_breakpoint, sizeof(__pyx_k_exception_breakpoint), 0, 0, 1, 1}, {&__pyx_n_s_exception_type, __pyx_k_exception_type, sizeof(__pyx_k_exception_type), 0, 0, 1, 1}, {&__pyx_n_s_exclude_exception_by_filter, __pyx_k_exclude_exception_by_filter, sizeof(__pyx_k_exclude_exception_by_filter), 0, 0, 1, 1}, {&__pyx_n_s_exec, __pyx_k_exec, sizeof(__pyx_k_exec), 0, 0, 1, 1}, {&__pyx_n_s_execfile, __pyx_k_execfile, sizeof(__pyx_k_execfile), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_f_back, __pyx_k_f_back, sizeof(__pyx_k_f_back), 0, 0, 1, 1}, {&__pyx_n_s_f_code, __pyx_k_f_code, sizeof(__pyx_k_f_code), 0, 0, 1, 1}, {&__pyx_n_s_f_globals, __pyx_k_f_globals, sizeof(__pyx_k_f_globals), 0, 0, 1, 1}, @@ -41194,8 +42410,10 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_force_only_unhandled_tracer, __pyx_k_force_only_unhandled_tracer, sizeof(__pyx_k_force_only_unhandled_tracer), 0, 0, 1, 1}, {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, {&__pyx_n_s_frame_cache_key, __pyx_k_frame_cache_key, sizeof(__pyx_k_frame_cache_key), 0, 0, 1, 1}, + {&__pyx_n_s_frame_id_to_frame, __pyx_k_frame_id_to_frame, sizeof(__pyx_k_frame_id_to_frame), 0, 0, 1, 1}, {&__pyx_n_s_frame_skips_cache, __pyx_k_frame_skips_cache, sizeof(__pyx_k_frame_skips_cache), 0, 0, 1, 1}, {&__pyx_n_s_frame_trace_dispatch, __pyx_k_frame_trace_dispatch, sizeof(__pyx_k_frame_trace_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_from_user_input, __pyx_k_from_user_input, sizeof(__pyx_k_from_user_input), 0, 0, 1, 1}, {&__pyx_n_s_func_name, __pyx_k_func_name, sizeof(__pyx_k_func_name), 0, 0, 1, 1}, {&__pyx_n_s_function_breakpoint_name_to_brea, __pyx_k_function_breakpoint_name_to_brea, sizeof(__pyx_k_function_breakpoint_name_to_brea), 0, 0, 1, 1}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, @@ -41217,6 +42435,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_global_notify_skipped_step_in_l, __pyx_k_global_notify_skipped_step_in_l, sizeof(__pyx_k_global_notify_skipped_step_in_l), 0, 0, 1, 1}, {&__pyx_n_s_handle_breakpoint_condition, __pyx_k_handle_breakpoint_condition, sizeof(__pyx_k_handle_breakpoint_condition), 0, 0, 1, 1}, {&__pyx_n_s_handle_breakpoint_expression, __pyx_k_handle_breakpoint_expression, sizeof(__pyx_k_handle_breakpoint_expression), 0, 0, 1, 1}, + {&__pyx_n_s_handle_exception, __pyx_k_handle_exception, sizeof(__pyx_k_handle_exception), 0, 0, 1, 1}, {&__pyx_n_s_handle_user_exception, __pyx_k_handle_user_exception, sizeof(__pyx_k_handle_user_exception), 0, 0, 1, 1}, {&__pyx_n_s_has_condition, __pyx_k_has_condition, sizeof(__pyx_k_has_condition), 0, 0, 1, 1}, {&__pyx_n_s_has_plugin_exception_breaks, __pyx_k_has_plugin_exception_breaks, sizeof(__pyx_k_has_plugin_exception_breaks), 0, 0, 1, 1}, @@ -41230,6 +42449,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_in_project_scope, __pyx_k_in_project_scope, sizeof(__pyx_k_in_project_scope), 0, 0, 1, 1}, {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, + {&__pyx_n_s_initial_trace_obj, __pyx_k_initial_trace_obj, sizeof(__pyx_k_initial_trace_obj), 0, 0, 1, 1}, {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, @@ -41238,19 +42458,27 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_is_line_in_try_block, __pyx_k_is_line_in_try_block, sizeof(__pyx_k_is_line_in_try_block), 0, 0, 1, 1}, {&__pyx_n_s_is_logpoint, __pyx_k_is_logpoint, sizeof(__pyx_k_is_logpoint), 0, 0, 1, 1}, {&__pyx_n_s_is_thread_alive, __pyx_k_is_thread_alive, sizeof(__pyx_k_is_thread_alive), 0, 0, 1, 1}, + {&__pyx_n_s_is_unhandled_exception, __pyx_k_is_unhandled_exception, sizeof(__pyx_k_is_unhandled_exception), 0, 0, 1, 1}, + {&__pyx_n_s_is_user_uncaught, __pyx_k_is_user_uncaught, sizeof(__pyx_k_is_user_uncaught), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_just_raised, __pyx_k_just_raised, sizeof(__pyx_k_just_raised), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_kp_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 0}, + {&__pyx_n_s_last_raise_line, __pyx_k_last_raise_line, sizeof(__pyx_k_last_raise_line), 0, 0, 1, 1}, + {&__pyx_n_s_last_stat, __pyx_k_last_stat, sizeof(__pyx_k_last_stat), 0, 0, 1, 1}, {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, {&__pyx_n_s_linecache, __pyx_k_linecache, sizeof(__pyx_k_linecache), 0, 0, 1, 1}, + {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1}, + {&__pyx_n_s_lines_ignored, __pyx_k_lines_ignored, sizeof(__pyx_k_lines_ignored), 0, 0, 1, 1}, {&__pyx_n_s_linesep, __pyx_k_linesep, sizeof(__pyx_k_linesep), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1}, {&__pyx_n_s_make_console_message, __pyx_k_make_console_message, sizeof(__pyx_k_make_console_message), 0, 0, 1, 1}, {&__pyx_n_s_make_io_message, __pyx_k_make_io_message, sizeof(__pyx_k_make_io_message), 0, 0, 1, 1}, {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, + {&__pyx_n_s_maybe_user_uncaught_exc_info, __pyx_k_maybe_user_uncaught_exc_info, sizeof(__pyx_k_maybe_user_uncaught_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_merged, __pyx_k_merged, sizeof(__pyx_k_merged), 0, 0, 1, 1}, {&__pyx_n_s_method_object, __pyx_k_method_object, sizeof(__pyx_k_method_object), 0, 0, 1, 1}, {&__pyx_kp_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 0}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, @@ -41267,6 +42495,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, {&__pyx_n_s_plugin, __pyx_k_plugin, sizeof(__pyx_k_plugin), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, + {&__pyx_n_s_prev_user_uncaught_exc_info, __pyx_k_prev_user_uncaught_exc_info, sizeof(__pyx_k_prev_user_uncaught_exc_info), 0, 0, 1, 1}, {&__pyx_n_s_py_db, __pyx_k_py_db, sizeof(__pyx_k_py_db), 0, 0, 1, 1}, {&__pyx_kp_s_pyc, __pyx_k_pyc, sizeof(__pyx_k_pyc), 0, 0, 1, 0}, {&__pyx_n_s_pydb_disposed, __pyx_k_pydb_disposed, sizeof(__pyx_k_pydb_disposed), 0, 0, 1, 1}, @@ -41308,6 +42537,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_qname, __pyx_k_qname, sizeof(__pyx_k_qname), 0, 0, 1, 1}, {&__pyx_n_s_quitting, __pyx_k_quitting, sizeof(__pyx_k_quitting), 0, 0, 1, 1}, + {&__pyx_n_s_raise_lines, __pyx_k_raise_lines, sizeof(__pyx_k_raise_lines), 0, 0, 1, 1}, {&__pyx_n_s_raise_lines_in_except, __pyx_k_raise_lines_in_except, sizeof(__pyx_k_raise_lines_in_except), 0, 0, 1, 1}, {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, @@ -41315,6 +42545,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_remove_exception_from_frame, __pyx_k_remove_exception_from_frame, sizeof(__pyx_k_remove_exception_from_frame), 0, 0, 1, 1}, {&__pyx_n_s_remove_return_values_flag, __pyx_k_remove_return_values_flag, sizeof(__pyx_k_remove_return_values_flag), 0, 0, 1, 1}, + {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1}, {&__pyx_n_s_return_line, __pyx_k_return_line, sizeof(__pyx_k_return_line), 0, 0, 1, 1}, @@ -41333,6 +42564,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_should_stop, __pyx_k_should_stop, sizeof(__pyx_k_should_stop), 0, 0, 1, 1}, + {&__pyx_n_s_should_stop_on_exception, __pyx_k_should_stop_on_exception, sizeof(__pyx_k_should_stop_on_exception), 0, 0, 1, 1}, {&__pyx_n_s_should_trace_hook, __pyx_k_should_trace_hook, sizeof(__pyx_k_should_trace_hook), 0, 0, 1, 1}, {&__pyx_n_s_show_return_values, __pyx_k_show_return_values, sizeof(__pyx_k_show_return_values), 0, 0, 1, 1}, {&__pyx_n_s_skip_on_exceptions_thrown_in_sam, __pyx_k_skip_on_exceptions_thrown_in_sam, sizeof(__pyx_k_skip_on_exceptions_thrown_in_sam), 0, 0, 1, 1}, @@ -41344,6 +42576,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, {&__pyx_n_s_stop_on_unhandled_exception, __pyx_k_stop_on_unhandled_exception, sizeof(__pyx_k_stop_on_unhandled_exception), 0, 0, 1, 1}, + {&__pyx_n_s_stopped, __pyx_k_stopped, sizeof(__pyx_k_stopped), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_suspend, __pyx_k_suspend, sizeof(__pyx_k_suspend), 0, 0, 1, 1}, {&__pyx_n_s_suspend_other_threads, __pyx_k_suspend_other_threads, sizeof(__pyx_k_suspend_other_threads), 0, 0, 1, 1}, @@ -41370,14 +42603,19 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_trace_dispatch, __pyx_k_trace_dispatch, sizeof(__pyx_k_trace_dispatch), 0, 0, 1, 1}, {&__pyx_n_s_trace_dispatch_and_unhandled_exc, __pyx_k_trace_dispatch_and_unhandled_exc, sizeof(__pyx_k_trace_dispatch_and_unhandled_exc), 0, 0, 1, 1}, {&__pyx_n_s_trace_exception, __pyx_k_trace_exception, sizeof(__pyx_k_trace_exception), 0, 0, 1, 1}, + {&__pyx_n_s_trace_obj, __pyx_k_trace_obj, sizeof(__pyx_k_trace_obj), 0, 0, 1, 1}, {&__pyx_n_s_trace_unhandled_exceptions, __pyx_k_trace_unhandled_exceptions, sizeof(__pyx_k_trace_unhandled_exceptions), 0, 0, 1, 1}, {&__pyx_n_s_try_exc_info, __pyx_k_try_exc_info, sizeof(__pyx_k_try_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_try_except_info, __pyx_k_try_except_info, sizeof(__pyx_k_try_except_info), 0, 0, 1, 1}, {&__pyx_n_s_try_except_infos, __pyx_k_try_except_infos, sizeof(__pyx_k_try_except_infos), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, + {&__pyx_n_s_valid_try_except_infos, __pyx_k_valid_try_except_infos, sizeof(__pyx_k_valid_try_except_infos), 0, 0, 1, 1}, + {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, + {&__pyx_n_s_was_just_raised, __pyx_k_was_just_raised, sizeof(__pyx_k_was_just_raised), 0, 0, 1, 1}, {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; @@ -41385,14 +42623,15 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 175, __pyx_L1_error) - __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 208, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 210, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 130, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 149, __pyx_L1_error) - __pyx_builtin_SystemExit = __Pyx_GetBuiltinName(__pyx_n_s_SystemExit); if (!__pyx_builtin_SystemExit) __PYX_ERR(0, 376, __pyx_L1_error) - __pyx_builtin_GeneratorExit = __Pyx_GetBuiltinName(__pyx_n_s_GeneratorExit); if (!__pyx_builtin_GeneratorExit) __PYX_ERR(0, 379, __pyx_L1_error) - __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_builtin_SystemExit = __Pyx_GetBuiltinName(__pyx_n_s_SystemExit); if (!__pyx_builtin_SystemExit) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_builtin_GeneratorExit = __Pyx_GetBuiltinName(__pyx_n_s_GeneratorExit); if (!__pyx_builtin_GeneratorExit) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1892, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -41414,50 +42653,59 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "_pydevd_bundle/pydevd_cython.pyx":1149 + /* "_pydevd_bundle/pydevd_cython.pyx":903 * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) + * py_db.writer.add_command(cmd) * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< * pydev_log.exception() * */ - __pyx_tuple__4 = PyTuple_Pack(2, __pyx_builtin_KeyboardInterrupt, __pyx_builtin_SystemExit); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(2, __pyx_builtin_KeyboardInterrupt, __pyx_builtin_SystemExit); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "_pydevd_bundle/pydevd_cython.pyx":1191 + /* "_pydevd_bundle/pydevd_cython.pyx":945 * filename = frame.f_code.co_filename * if filename.endswith('.pyc'): * filename = filename[:-1] # <<<<<<<<<<<<<< * * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): */ - __pyx_slice__5 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_slice__5 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); - /* "_pydevd_bundle/pydevd_cython.pyx":1393 + /* "_pydevd_bundle/pydevd_cython.pyx":1147 * '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - * main_debugger.writer.add_command(cmd) + * py_db.writer.add_command(cmd) * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< * pydev_log.exception() * raise */ - __pyx_tuple__6 = PyTuple_Pack(2, __pyx_builtin_KeyboardInterrupt, __pyx_builtin_SystemExit); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_builtin_KeyboardInterrupt, __pyx_builtin_SystemExit); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "_pydevd_bundle/pydevd_cython.pyx":1503 + /* "_pydevd_bundle/pydevd_cython.pyx":1506 * if f_unhandled.f_code.co_name in ('__bootstrap', '_bootstrap'): * # We need __bootstrap_inner, not __bootstrap. * return None, False # <<<<<<<<<<<<<< * * elif f_unhandled.f_code.co_name in ('__bootstrap_inner', '_bootstrap_inner'): */ - __pyx_tuple__10 = PyTuple_Pack(2, Py_None, Py_False); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(2, Py_None, Py_False); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); + /* "_pydevd_bundle/pydevd_cython.pyx":1892 + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + * raise RuntimeError('Not used in sys.monitoring mode.') # <<<<<<<<<<<<<< + */ + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Not_used_in_sys_monitoring_mode); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result @@ -41465,24 +42713,24 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5f02be1, 0xa5a0d63, 0x75b3b02) = (conditional_breakpoint_exception, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type))" % __pyx_checksum */ - __pyx_tuple__11 = PyTuple_Pack(3, __pyx_int_99625953, __pyx_int_173673827, __pyx_int_123419394); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__11); - __Pyx_GIVEREF(__pyx_tuple__11); - __pyx_tuple__12 = PyTuple_Pack(3, __pyx_int_230645316, __pyx_int_232881363, __pyx_int_210464433); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(3, __pyx_int_99625953, __pyx_int_173673827, __pyx_int_123419394); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - __pyx_tuple__13 = PyTuple_Pack(3, __pyx_int_61391470, __pyx_int_192493205, __pyx_int_84338306); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(3, __pyx_int_230645316, __pyx_int_232881363, __pyx_int_210464433); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - __pyx_tuple__14 = PyTuple_Pack(3, __pyx_int_169093275, __pyx_int_63705258, __pyx_int_125568891); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(3, __pyx_int_61391470, __pyx_int_192493205, __pyx_int_84338306); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - __pyx_tuple__15 = PyTuple_Pack(3, __pyx_int_18997755, __pyx_int_255484337, __pyx_int_64458794); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(3, __pyx_int_169093275, __pyx_int_63705258, __pyx_int_125568891); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_tuple__16 = PyTuple_Pack(3, __pyx_int_66451433, __pyx_int_16751766, __pyx_int_171613889); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_tuple__16 = PyTuple_Pack(3, __pyx_int_18997755, __pyx_int_255484337, __pyx_int_64458794); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_tuple__17 = PyTuple_Pack(3, __pyx_int_66451433, __pyx_int_16751766, __pyx_int_171613889); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); /* "_pydevd_bundle/pydevd_cython.pyx":11 * from _pydev_bundle import pydev_log @@ -41491,9 +42739,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * # ELSE * # from _pydevd_bundle.pydevd_frame import PyDBFrame */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Using_Cython_speedups); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 11, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Using_Cython_speedups); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); /* "_pydevd_bundle/pydevd_cython.pyx":113 * self.pydev_use_scoped_step_frame = False @@ -41502,20 +42750,20 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * ''' * Gets the topmost frame for the given thread. Note that it may be None */ - __pyx_tuple__18 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_thread, __pyx_n_s_current_frames_2, __pyx_n_s_topmost_frame); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 113, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_topmost_frame, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_thread, __pyx_n_s_current_frames_2, __pyx_n_s_topmost_frame); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_topmost_frame, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 113, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__20); - __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41523,10 +42771,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) */ - __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__22); - __Pyx_GIVEREF(__pyx_tuple__22); - __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(2, 16, __pyx_L1_error) /* "_pydevd_bundle/pydevd_cython.pyx":145 * @@ -41535,10 +42783,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * try: * additional_info = thread.additional_info */ - __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_s_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); - __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_set_additional_thread_info, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_set_additional_thread_info, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 145, __pyx_L1_error) /* "_pydevd_bundle/pydevd_cython.pyx":161 * return additional_info @@ -41547,61 +42795,73 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * import re * */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_os, __pyx_n_s_path); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 161, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_os, __pyx_n_s_path); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); - /* "_pydevd_bundle/pydevd_cython.pyx":177 + /* "_pydevd_bundle/pydevd_cython.pyx":178 * except ImportError: * * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< * return None * */ - __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 177, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); - __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_smart_step_into_variant_from, 177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_smart_step_into_variant_from, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 178, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":199 + /* "_pydevd_bundle/pydevd_cython.pyx":200 * basename = os.path.basename * * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') # <<<<<<<<<<<<<< * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_IgnoreException); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 199, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_IgnoreException); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); - /* "_pydevd_bundle/pydevd_cython.pyx":200 + /* "_pydevd_bundle/pydevd_cython.pyx":201 * * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') * DEBUG_START = ('pydevd.py', 'run') # <<<<<<<<<<<<<< * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') * TRACE_PROPERTY = 'pydevd_traceproperty.py' */ - __pyx_tuple__31 = PyTuple_Pack(2, __pyx_kp_s_pydevd_py, __pyx_n_s_run); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__31); - __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_tuple__32 = PyTuple_Pack(2, __pyx_kp_s_pydevd_py, __pyx_n_s_run); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); - /* "_pydevd_bundle/pydevd_cython.pyx":201 + /* "_pydevd_bundle/pydevd_cython.pyx":202 * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') # <<<<<<<<<<<<<< * TRACE_PROPERTY = 'pydevd_traceproperty.py' * */ - __pyx_tuple__32 = PyTuple_Pack(2, __pyx_kp_s_pydev_execfile_py, __pyx_n_s_execfile); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_tuple__33 = PyTuple_Pack(2, __pyx_kp_s_pydev_execfile_py, __pyx_n_s_execfile); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + + /* "_pydevd_bundle/pydevd_cython.pyx":214 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * # ELSE + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + */ + __pyx_tuple__34 = PyTuple_Pack(8, __pyx_n_s_container_obj, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_last_raise_line, __pyx_n_s_raise_lines, __pyx_n_s_try_except_infos, __pyx_n_s_valid_try_except_infos, __pyx_n_s_try_except_info); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_is_unhandled_exception, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 214, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41609,71 +42869,71 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) */ - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(2, 16, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":308 + /* "_pydevd_bundle/pydevd_cython.pyx":309 * # ENDIF * * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< * self._args[0].set_suspend(*args, **kwargs) * */ - __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 308, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__35); - __Pyx_GIVEREF(__pyx_tuple__35); - __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_set_suspend, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_set_suspend, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 309, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":311 + /* "_pydevd_bundle/pydevd_cython.pyx":312 * self._args[0].set_suspend(*args, **kwargs) * * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< * self._args[0].do_wait_suspend(*args, **kwargs) * */ - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_do_wait_suspend, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_do_wait_suspend, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 312, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":315 + /* "_pydevd_bundle/pydevd_cython.pyx":316 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< * cdef bint should_stop; * cdef tuple exc_info; */ - __pyx_tuple__38 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_should_stop, __pyx_n_s_exc_info, __pyx_n_s_frame_skips_cache, __pyx_n_s_frame_cache_key, __pyx_n_s_custom_key, __pyx_n_s_container_obj); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_exception, 315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_should_stop, __pyx_n_s_exc_info, __pyx_n_s_frame_skips_cache, __pyx_n_s_frame_cache_key, __pyx_n_s_custom_key, __pyx_n_s_container_obj); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_exception, 316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 316, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":464 - * return should_stop, frame + /* "_pydevd_bundle/pydevd_cython.pyx":344 + * return self.trace_exception * * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< * exc_info = self.exc_info * if exc_info: */ - __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 464, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_handle_user_exception, 464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_handle_user_exception, 344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 344, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":701 + /* "_pydevd_bundle/pydevd_cython.pyx":452 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< * cdef tuple abs_path_canonical_path_and_base; * cdef bint is_exception_event; */ - __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 452, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 452, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41681,38 +42941,62 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) */ - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(2, 16, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1436 + /* "_pydevd_bundle/pydevd_cython.pyx":1158 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + __pyx_tuple__49 = PyTuple_Pack(21, __pyx_n_s_py_db, __pyx_n_s_info, __pyx_n_s_frame, __pyx_n_s_thread, __pyx_n_s_arg, __pyx_n_s_prev_user_uncaught_exc_info, __pyx_n_s_should_stop, __pyx_n_s_was_just_raised, __pyx_n_s_check_excs, __pyx_n_s_maybe_user_uncaught_exc_info, __pyx_n_s_exception, __pyx_n_s_value, __pyx_n_s_trace, __pyx_n_s_exception_breakpoint, __pyx_n_s_result, __pyx_n_s_exc_break_user, __pyx_n_s_exc_break_caught, __pyx_n_s_exc_break, __pyx_n_s_is_user_uncaught, __pyx_n_s_exc_info, __pyx_n_s_lines); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_should_stop_on_exception, 1158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 1158, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1284 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; + */ + __pyx_tuple__51 = PyTuple_Pack(21, __pyx_n_s_py_db, __pyx_n_s_thread, __pyx_n_s_frame, __pyx_n_s_arg, __pyx_n_s_exception_type, __pyx_n_s_stopped, __pyx_n_s_abs_real_path_and_base, __pyx_n_s_absolute_filename, __pyx_n_s_canonical_normalized_filename, __pyx_n_s_lines_ignored, __pyx_n_s_frame_id_to_frame, __pyx_n_s_merged, __pyx_n_s_trace_obj, __pyx_n_s_initial_trace_obj, __pyx_n_s_check_trace_obj, __pyx_n_s_curr_stat, __pyx_n_s_last_stat, __pyx_n_s_from_user_input, __pyx_n_s_exc_lineno, __pyx_n_s_line, __pyx_n_s_f); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_handle_exception, 1284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1284, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1439 * * * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< * global _global_notify_skipped_step_in * */ - __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_py_db, __pyx_n_s_frame); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1436, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__46); - __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_notify_skipped_step_in_because_o, 1436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_py_db, __pyx_n_s_frame); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_notify_skipped_step_in_because_o, 1439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 1439, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1460 + /* "_pydevd_bundle/pydevd_cython.pyx":1463 * Py_XDECREF (method_obj) * return SafeCallWrapper(ret) if ret is not None else None * def get_method_object(self): # <<<<<<<<<<<<<< * return self.method_object * # ELSE */ - __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__48); - __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_method_object, 1460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_tuple__55 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_method_object, 1463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 1463, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41720,59 +43004,59 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) */ - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(2, 16, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1466 + /* "_pydevd_bundle/pydevd_cython.pyx":1469 * * * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef str filename; */ - __pyx_tuple__52 = PyTuple_Pack(15, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_filename, __pyx_n_s_name_2, __pyx_n_s_args, __pyx_n_s_thread, __pyx_n_s_f_unhandled, __pyx_n_s_force_only_unhandled_tracer, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_top_level_thread_tracer, __pyx_n_s_f_trace, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1466, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__52); - __Pyx_GIVEREF(__pyx_tuple__52); - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_fix_top_level_trace_and_get_trac, 1466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(15, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_filename, __pyx_n_s_name_2, __pyx_n_s_args, __pyx_n_s_thread, __pyx_n_s_f_unhandled, __pyx_n_s_force_only_unhandled_tracer, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_top_level_thread_tracer, __pyx_n_s_f_trace, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_fix_top_level_trace_and_get_trac, 1469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 1469, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1594 + /* "_pydevd_bundle/pydevd_cython.pyx":1597 * * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) * if thread_trace_func is None: */ - __pyx_tuple__54 = PyTuple_Pack(6, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_thread_trace_func, __pyx_n_s_apply_to_settrace); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1594, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 1594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 1594, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(6, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_thread_trace_func, __pyx_n_s_apply_to_settrace); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__61); + __Pyx_GIVEREF(__pyx_tuple__61); + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 1597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 1597, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1615 + /* "_pydevd_bundle/pydevd_cython.pyx":1618 * # ENDIF * * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) */ - __pyx_tuple__56 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_py_db, __pyx_n_s_t, __pyx_n_s_additional_info); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 1615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__56); - __Pyx_GIVEREF(__pyx_tuple__56); - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_unhandled_exceptions, 1615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 1615, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_py_db, __pyx_n_s_t, __pyx_n_s_additional_info); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_unhandled_exceptions, 1618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 1618, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1629 + /* "_pydevd_bundle/pydevd_cython.pyx":1632 * return self.trace_unhandled_exceptions * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< * return self.trace_unhandled_exceptions * */ - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_trace_dispatch_func, 1629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1629, __pyx_L1_error) + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_trace_dispatch_func, 1632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1632, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41780,35 +43064,35 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) */ - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(2, 16, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1671 + /* "_pydevd_bundle/pydevd_cython.pyx":1674 * # ENDIF * * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< * # DEBUG = 'code_to_debug' in frame.f_code.co_filename * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) */ - __pyx_tuple__61 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_frame_trace_dispatch, __pyx_n_s_py_db, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__61); - __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch_and_unhandled_exc, 1671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 1671, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_frame_trace_dispatch, __pyx_n_s_py_db, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch_and_unhandled_exc, 1674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1674, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1704 + /* "_pydevd_bundle/pydevd_cython.pyx":1707 * return ret * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< * return self.trace_dispatch_and_unhandled_exceptions * */ - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_trace_dispatch_func, 1704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_trace_dispatch_func, 1707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1707, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41816,14 +43100,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) */ - __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(2, 16, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":16 * else: @@ -41831,32 +43115,40 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) */ - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(2, 16, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1880 + /* "_pydevd_bundle/pydevd_cython.pyx":1883 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< * constructed_tid_to_last_frame[self._args[1].ident] = frame * return _original_call(self, frame, event, arg) */ - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_call_2, 1880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1880, __pyx_L1_error) + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_call_2, 1883, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 1883, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1891 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError('Not used in sys.monitoring mode.') + */ + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_fix_top_level_trace_and_get_trac, 1891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1891, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_tuple__69 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__69); - __Pyx_GIVEREF(__pyx_tuple__69); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__TryExceptContain, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PyDBFrame, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SafeCallWrapper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadTracer, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__TryExceptContain, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PyDBFrame, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SafeCallWrapper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadTracer, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -41974,15 +43266,15 @@ static int __Pyx_modinit_type_init_code(void) { if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 23, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj)) __PYX_ERR(0, 256, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj)) __PYX_ERR(0, 257, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 257, __pyx_L1_error) #else __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj = &__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 256, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 257, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj->tp_print = 0; @@ -41992,13 +43284,11 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TryExceptContainerObj, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 256, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TryExceptContainerObj, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 257, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 256, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 257, __pyx_L1_error) #endif __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame = &__pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame; - __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._should_stop_on_exception = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__should_stop_on_exception; - __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._handle_exception = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__handle_exception; __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame.get_func_name = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name; __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._show_return_values = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values; __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._remove_return_values = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values; @@ -42006,15 +43296,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._is_same_frame = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame; __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame.trace_dispatch = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame)) __PYX_ERR(0, 274, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame)) __PYX_ERR(0, 275, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 275, __pyx_L1_error) #else __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame = &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 274, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 275, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame->tp_print = 0; @@ -42024,24 +43314,24 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 274, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 275, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 274, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 275, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyDBFrame, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 274, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyDBFrame, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 275, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 274, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 275, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper)) __PYX_ERR(0, 1448, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper)) __PYX_ERR(0, 1451, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) #else __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper = &__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1448, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper->tp_print = 0; @@ -42051,20 +43341,20 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SafeCallWrapper, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1448, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SafeCallWrapper, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1448, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions)) __PYX_ERR(0, 1604, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1604, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions)) __PYX_ERR(0, 1607, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1607, __pyx_L1_error) #else __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions = &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1604, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1607, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions->tp_print = 0; @@ -42074,20 +43364,20 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1604, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1607, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1604, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1607, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame)) __PYX_ERR(0, 1634, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame)) __PYX_ERR(0, 1637, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1637, __pyx_L1_error) #else __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1637, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame->tp_print = 0; @@ -42097,20 +43387,20 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerNoBackFrame, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerNoBackFrame, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1637, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1637, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer)) __PYX_ERR(0, 1709, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer)) __PYX_ERR(0, 1712, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1712, __pyx_L1_error) #else __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1712, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer->tp_print = 0; @@ -42122,7 +43412,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1709, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1712, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__.doc = __pyx_doc_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__; @@ -42130,9 +43420,9 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadTracer, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadTracer, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1712, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1712, __pyx_L1_error) #endif __Pyx_RefNannyFinishContext(); return 0; @@ -42151,15 +43441,15 @@ static int __Pyx_modinit_type_import_code(void) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_3(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_6(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyTypeObject), #else - sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(PyHeapTypeObject), + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyHeapTypeObject), #endif - __Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -42392,10 +43682,8 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_pydevd_cython(PyObject *__pyx_pyin CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_b); - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_cython_runtime); + __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -42554,7 +43842,7 @@ if (!__Pyx_RefNanny) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -42575,7 +43863,7 @@ if (!__Pyx_RefNanny) { * ''' * Gets the topmost frame for the given thread. Note that it may be None */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3get_topmost_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo_get_top, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3get_topmost_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo_get_top, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_get_topmost_frame, __pyx_t_2) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -42586,7 +43874,7 @@ if (!__Pyx_RefNanny) { * cdef tuple state * cdef object _dict */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo___reduc, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo___reduc, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -42598,7 +43886,7 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo___setst, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo___setst, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -42626,7 +43914,7 @@ if (!__Pyx_RefNanny) { * try: * additional_info = thread.additional_info */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info, 0, __pyx_n_s_set_additional_thread_info, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info, 0, __pyx_n_s_set_additional_thread_info, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_additional_thread_info, __pyx_t_3) < 0) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -42693,7 +43981,7 @@ if (!__Pyx_RefNanny) { * from _pydev_bundle import pydev_log * from _pydevd_bundle import pydevd_dont_trace # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_constants import (RETURN_VALUES_DICT, NO_FTRACE, - * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT) + * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT, */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -42713,10 +44001,10 @@ if (!__Pyx_RefNanny) { * from _pydev_bundle import pydev_log * from _pydevd_bundle import pydevd_dont_trace * from _pydevd_bundle.pydevd_constants import (RETURN_VALUES_DICT, NO_FTRACE, # <<<<<<<<<<<<<< - * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT) - * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace + * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT, + * PYDEVD_USE_SYS_MONITORING) */ - __pyx_t_3 = PyList_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_RETURN_VALUES_DICT); __Pyx_GIVEREF(__pyx_n_s_RETURN_VALUES_DICT); @@ -42733,6 +44021,9 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); __Pyx_GIVEREF(__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT)) __PYX_ERR(0, 166, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + __Pyx_GIVEREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_PYDEVD_USE_SYS_MONITORING)) __PYX_ERR(0, 166, __pyx_L1_error); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -42756,133 +44047,137 @@ if (!__Pyx_RefNanny) { __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT, __pyx_t_3) < 0) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PYDEVD_USE_SYS_MONITORING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEVD_USE_SYS_MONITORING, __pyx_t_3) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":168 - * from _pydevd_bundle.pydevd_constants import (RETURN_VALUES_DICT, NO_FTRACE, - * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT) + /* "_pydevd_bundle/pydevd_cython.pyx":169 + * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT, + * PYDEVD_USE_SYS_MONITORING) * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_utils import get_clsname_for_code * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame */ - __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_add_exception_to_frame); __Pyx_GIVEREF(__pyx_n_s_add_exception_to_frame); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_add_exception_to_frame)) __PYX_ERR(0, 168, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_add_exception_to_frame)) __PYX_ERR(0, 169, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_just_raised); __Pyx_GIVEREF(__pyx_n_s_just_raised); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_just_raised)) __PYX_ERR(0, 168, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_just_raised)) __PYX_ERR(0, 169, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_remove_exception_from_frame); __Pyx_GIVEREF(__pyx_n_s_remove_exception_from_frame); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_remove_exception_from_frame)) __PYX_ERR(0, 168, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_remove_exception_from_frame)) __PYX_ERR(0, 169, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_ignore_exception_trace); __Pyx_GIVEREF(__pyx_n_s_ignore_exception_trace); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ignore_exception_trace)) __PYX_ERR(0, 168, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_frame_util, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ignore_exception_trace)) __PYX_ERR(0, 169, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_frame_util, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_exception_to_frame, __pyx_t_2) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_exception_to_frame, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_just_raised, __pyx_t_2) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_just_raised, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_exception_from_frame, __pyx_t_2) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_exception_from_frame, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ignore_exception_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ignore_exception_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ignore_exception_trace, __pyx_t_2) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ignore_exception_trace, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":169 - * EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT) + /* "_pydevd_bundle/pydevd_cython.pyx":170 + * PYDEVD_USE_SYS_MONITORING) * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace * from _pydevd_bundle.pydevd_utils import get_clsname_for_code # <<<<<<<<<<<<<< * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_get_clsname_for_code); __Pyx_GIVEREF(__pyx_n_s_get_clsname_for_code); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_clsname_for_code)) __PYX_ERR(0, 169, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_clsname_for_code)) __PYX_ERR(0, 170, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_clsname_for_code, __pyx_t_3) < 0) __PYX_ERR(0, 169, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_clsname_for_code, __pyx_t_3) < 0) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":170 + /* "_pydevd_bundle/pydevd_cython.pyx":171 * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace * from _pydevd_bundle.pydevd_utils import get_clsname_for_code * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK * import sys */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 170, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 171, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_2) < 0) __PYX_ERR(0, 170, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_2) < 0) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":171 + /* "_pydevd_bundle/pydevd_cython.pyx":172 * from _pydevd_bundle.pydevd_utils import get_clsname_for_code * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK # <<<<<<<<<<<<<< * import sys * try: */ - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_constant_to_str); __Pyx_GIVEREF(__pyx_n_s_constant_to_str); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_constant_to_str)) __PYX_ERR(0, 171, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_constant_to_str)) __PYX_ERR(0, 172, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_CMD_SET_FUNCTION_BREAK); __Pyx_GIVEREF(__pyx_n_s_CMD_SET_FUNCTION_BREAK); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_CMD_SET_FUNCTION_BREAK)) __PYX_ERR(0, 171, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_comm_const, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_CMD_SET_FUNCTION_BREAK)) __PYX_ERR(0, 172, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_comm_const, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_constant_to_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_constant_to_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_constant_to_str, __pyx_t_3) < 0) __PYX_ERR(0, 171, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_constant_to_str, __pyx_t_3) < 0) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CMD_SET_FUNCTION_BREAK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CMD_SET_FUNCTION_BREAK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_FUNCTION_BREAK, __pyx_t_3) < 0) __PYX_ERR(0, 171, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_FUNCTION_BREAK, __pyx_t_3) < 0) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":172 + /* "_pydevd_bundle/pydevd_cython.pyx":173 * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK * import sys # <<<<<<<<<<<<<< * try: * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 172, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":173 + /* "_pydevd_bundle/pydevd_cython.pyx":174 * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK * import sys * try: # <<<<<<<<<<<<<< @@ -42898,28 +44193,28 @@ if (!__Pyx_RefNanny) { __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":174 + /* "_pydevd_bundle/pydevd_cython.pyx":175 * import sys * try: * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset # <<<<<<<<<<<<<< * except ImportError: * */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L2_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_get_smart_step_into_variant_from); __Pyx_GIVEREF(__pyx_n_s_get_smart_step_into_variant_from); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_smart_step_into_variant_from)) __PYX_ERR(0, 174, __pyx_L2_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_bytecode_u, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L2_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_smart_step_into_variant_from)) __PYX_ERR(0, 175, __pyx_L2_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_bytecode_u, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L2_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_smart_step_into_variant_from, __pyx_t_2) < 0) __PYX_ERR(0, 174, __pyx_L2_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_smart_step_into_variant_from, __pyx_t_2) < 0) __PYX_ERR(0, 175, __pyx_L2_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":173 + /* "_pydevd_bundle/pydevd_cython.pyx":174 * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK * import sys * try: # <<<<<<<<<<<<<< @@ -42935,7 +44230,7 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":175 + /* "_pydevd_bundle/pydevd_cython.pyx":176 * try: * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset * except ImportError: # <<<<<<<<<<<<<< @@ -42945,21 +44240,21 @@ if (!__Pyx_RefNanny) { __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 175, __pyx_L4_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 176, __pyx_L4_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_7); - /* "_pydevd_bundle/pydevd_cython.pyx":177 + /* "_pydevd_bundle/pydevd_cython.pyx":178 * except ImportError: * * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< * return None * */ - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_3get_smart_step_into_variant_from_frame_offset, 0, __pyx_n_s_get_smart_step_into_variant_from, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 177, __pyx_L4_except_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_3get_smart_step_into_variant_from_frame_offset, 0, __pyx_n_s_get_smart_step_into_variant_from, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_smart_step_into_variant_from, __pyx_t_8) < 0) __PYX_ERR(0, 177, __pyx_L4_except_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_smart_step_into_variant_from, __pyx_t_8) < 0) __PYX_ERR(0, 178, __pyx_L4_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -42968,7 +44263,7 @@ if (!__Pyx_RefNanny) { } goto __pyx_L4_except_error; - /* "_pydevd_bundle/pydevd_cython.pyx":173 + /* "_pydevd_bundle/pydevd_cython.pyx":174 * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK * import sys * try: # <<<<<<<<<<<<<< @@ -42989,82 +44284,82 @@ if (!__Pyx_RefNanny) { __pyx_L7_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":197 + /* "_pydevd_bundle/pydevd_cython.pyx":198 * # ENDIF * * basename = os.path.basename # <<<<<<<<<<<<<< * * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_basename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_basename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_basename, __pyx_t_7) < 0) __PYX_ERR(0, 197, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_basename, __pyx_t_7) < 0) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":199 + /* "_pydevd_bundle/pydevd_cython.pyx":200 * basename = os.path.basename * * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') # <<<<<<<<<<<<<< * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_IGNORE_EXCEPTION_TAG, __pyx_t_7) < 0) __PYX_ERR(0, 199, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_IGNORE_EXCEPTION_TAG, __pyx_t_7) < 0) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":200 + /* "_pydevd_bundle/pydevd_cython.pyx":201 * * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') * DEBUG_START = ('pydevd.py', 'run') # <<<<<<<<<<<<<< * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') * TRACE_PROPERTY = 'pydevd_traceproperty.py' */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START, __pyx_tuple__31) < 0) __PYX_ERR(0, 200, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START, __pyx_tuple__32) < 0) __PYX_ERR(0, 201, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":201 + /* "_pydevd_bundle/pydevd_cython.pyx":202 * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') # <<<<<<<<<<<<<< * TRACE_PROPERTY = 'pydevd_traceproperty.py' * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START_PY3K, __pyx_tuple__32) < 0) __PYX_ERR(0, 201, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START_PY3K, __pyx_tuple__33) < 0) __PYX_ERR(0, 202, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":202 + /* "_pydevd_bundle/pydevd_cython.pyx":203 * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') * TRACE_PROPERTY = 'pydevd_traceproperty.py' # <<<<<<<<<<<<<< * * import dis */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACE_PROPERTY, __pyx_kp_s_pydevd_traceproperty_py) < 0) __PYX_ERR(0, 202, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACE_PROPERTY, __pyx_kp_s_pydevd_traceproperty_py) < 0) __PYX_ERR(0, 203, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":204 + /* "_pydevd_bundle/pydevd_cython.pyx":205 * TRACE_PROPERTY = 'pydevd_traceproperty.py' * * import dis # <<<<<<<<<<<<<< * * try: */ - __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_dis, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_dis, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dis, __pyx_t_7) < 0) __PYX_ERR(0, 204, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dis, __pyx_t_7) < 0) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":206 + /* "_pydevd_bundle/pydevd_cython.pyx":207 * import dis * * try: # <<<<<<<<<<<<<< @@ -43080,18 +44375,18 @@ if (!__Pyx_RefNanny) { __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":207 + /* "_pydevd_bundle/pydevd_cython.pyx":208 * * try: * StopAsyncIteration # <<<<<<<<<<<<<< * except NameError: * StopAsyncIteration = StopIteration */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_StopAsyncIteration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L10_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_StopAsyncIteration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":206 + /* "_pydevd_bundle/pydevd_cython.pyx":207 * import dis * * try: # <<<<<<<<<<<<<< @@ -43109,7 +44404,7 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":208 + /* "_pydevd_bundle/pydevd_cython.pyx":209 * try: * StopAsyncIteration * except NameError: # <<<<<<<<<<<<<< @@ -43119,19 +44414,19 @@ if (!__Pyx_RefNanny) { __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_6) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 208, __pyx_L12_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 209, __pyx_L12_except_error) __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":209 + /* "_pydevd_bundle/pydevd_cython.pyx":210 * StopAsyncIteration * except NameError: * StopAsyncIteration = StopIteration # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_StopAsyncIteration, __pyx_builtin_StopIteration) < 0) __PYX_ERR(0, 209, __pyx_L12_except_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StopAsyncIteration, __pyx_builtin_StopIteration) < 0) __PYX_ERR(0, 210, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43139,7 +44434,7 @@ if (!__Pyx_RefNanny) { } goto __pyx_L12_except_error; - /* "_pydevd_bundle/pydevd_cython.pyx":206 + /* "_pydevd_bundle/pydevd_cython.pyx":207 * import dis * * try: # <<<<<<<<<<<<<< @@ -43160,12 +44455,24 @@ if (!__Pyx_RefNanny) { __pyx_L15_try_end:; } + /* "_pydevd_bundle/pydevd_cython.pyx":214 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * # ELSE + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_5is_unhandled_exception, 0, __pyx_n_s_is_unhandled_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_unhandled_exception, __pyx_t_3) < 0) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TryExceptContainerObj___reduce, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TryExceptContainerObj___reduce, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43177,100 +44484,74 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TryExceptContainerObj___setstat, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TryExceptContainerObj___setstat, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); - /* "_pydevd_bundle/pydevd_cython.pyx":287 - * # Same thing in the main debugger but only considering the file contents, while the one in the main debugger - * # considers the user input (so, the actual result must be a join of both). - * filename_to_lines_where_exceptions_are_ignored = {} # <<<<<<<<<<<<<< - * filename_to_stat_info = {} - * - */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_t_3) < 0) __PYX_ERR(0, 287, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - - /* "_pydevd_bundle/pydevd_cython.pyx":288 - * # considers the user input (so, the actual result must be a join of both). - * filename_to_lines_where_exceptions_are_ignored = {} - * filename_to_stat_info = {} # <<<<<<<<<<<<<< - * - * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_filename_to_stat_info, __pyx_t_3) < 0) __PYX_ERR(0, 288, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - - /* "_pydevd_bundle/pydevd_cython.pyx":308 + /* "_pydevd_bundle/pydevd_cython.pyx":309 * # ENDIF * * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< * self._args[0].set_suspend(*args, **kwargs) * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_set_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_set_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_set_suspend, __pyx_t_3) < 0) __PYX_ERR(0, 308, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_set_suspend, __pyx_t_3) < 0) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - /* "_pydevd_bundle/pydevd_cython.pyx":311 + /* "_pydevd_bundle/pydevd_cython.pyx":312 * self._args[0].set_suspend(*args, **kwargs) * * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< * self._args[0].do_wait_suspend(*args, **kwargs) * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_do_wait_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_do_wait_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_do_wait_suspend, __pyx_t_3) < 0) __PYX_ERR(0, 311, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_do_wait_suspend, __pyx_t_3) < 0) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - /* "_pydevd_bundle/pydevd_cython.pyx":315 + /* "_pydevd_bundle/pydevd_cython.pyx":316 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< * cdef bint should_stop; * cdef tuple exc_info; */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_trace_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_trace_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_trace_exception, __pyx_t_3) < 0) __PYX_ERR(0, 315, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_trace_exception, __pyx_t_3) < 0) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - /* "_pydevd_bundle/pydevd_cython.pyx":464 - * return should_stop, frame + /* "_pydevd_bundle/pydevd_cython.pyx":344 + * return self.trace_exception * * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< * exc_info = self.exc_info * if exc_info: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_handle_user_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_handle_user_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_handle_user_exception, __pyx_t_3) < 0) __PYX_ERR(0, 464, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_handle_user_exception, __pyx_t_3) < 0) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - /* "_pydevd_bundle/pydevd_cython.pyx":701 + /* "_pydevd_bundle/pydevd_cython.pyx":452 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< * cdef tuple abs_path_canonical_path_and_base; * cdef bint is_exception_event; */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_trace_dispatch, __pyx_t_3) < 0) __PYX_ERR(0, 701, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_trace_dispatch, __pyx_t_3) < 0) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); @@ -43279,7 +44560,7 @@ if (!__Pyx_RefNanny) { * cdef tuple state * cdef object _dict */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43291,170 +44572,225 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame___setstate_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame___setstate_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); - /* "_pydevd_bundle/pydevd_cython.pyx":1401 + /* "_pydevd_bundle/pydevd_cython.pyx":1158 * - * # end trace_dispatch + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_7should_stop_on_exception, 0, __pyx_n_s_should_stop_on_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_should_stop_on_exception, __pyx_t_3) < 0) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1279 + * # Same thing in the main debugger but only considering the file contents, while the one in the main debugger + * # considers the user input (so, the actual result must be a join of both). + * filename_to_lines_where_exceptions_are_ignored: dict = {} # <<<<<<<<<<<<<< + * filename_to_stat_info: dict = {} + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_t_3) < 0) __PYX_ERR(0, 1279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1280 + * # considers the user input (so, the actual result must be a join of both). + * filename_to_lines_where_exceptions_are_ignored: dict = {} + * filename_to_stat_info: dict = {} # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_filename_to_stat_info, __pyx_t_3) < 0) __PYX_ERR(0, 1280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1284 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9handle_exception, 0, __pyx_n_s_handle_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_handle_exception, __pyx_t_3) < 0) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1404 + * + * return stopped * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive # <<<<<<<<<<<<<< * from _pydev_bundle.pydev_log import exception as pydev_log_exception * from _pydev_bundle._pydev_saved_modules import threading */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_is_thread_alive); __Pyx_GIVEREF(__pyx_n_s_is_thread_alive); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_is_thread_alive)) __PYX_ERR(0, 1401, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_is_thread_alive)) __PYX_ERR(0, 1404, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_thread_alive, __pyx_t_3) < 0) __PYX_ERR(0, 1401, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_thread_alive, __pyx_t_3) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1402 - * # end trace_dispatch + /* "_pydevd_bundle/pydevd_cython.pyx":1405 + * return stopped * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive * from _pydev_bundle.pydev_log import exception as pydev_log_exception # <<<<<<<<<<<<<< * from _pydev_bundle._pydev_saved_modules import threading * from _pydevd_bundle.pydevd_constants import (get_current_thread_id, NO_FTRACE, */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_exception); __Pyx_GIVEREF(__pyx_n_s_exception); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_exception)) __PYX_ERR(0, 1402, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_log, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_exception)) __PYX_ERR(0, 1405, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_log, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log_exception, __pyx_t_2) < 0) __PYX_ERR(0, 1402, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log_exception, __pyx_t_2) < 0) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1403 + /* "_pydevd_bundle/pydevd_cython.pyx":1406 * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive * from _pydev_bundle.pydev_log import exception as pydev_log_exception * from _pydev_bundle._pydev_saved_modules import threading # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_constants import (get_current_thread_id, NO_FTRACE, - * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock) + * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock, PYDEVD_USE_SYS_MONITORING) */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_threading); __Pyx_GIVEREF(__pyx_n_s_threading); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_threading)) __PYX_ERR(0, 1403, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_threading)) __PYX_ERR(0, 1406, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_3) < 0) __PYX_ERR(0, 1403, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_3) < 0) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1404 + /* "_pydevd_bundle/pydevd_cython.pyx":1407 * from _pydev_bundle.pydev_log import exception as pydev_log_exception * from _pydev_bundle._pydev_saved_modules import threading * from _pydevd_bundle.pydevd_constants import (get_current_thread_id, NO_FTRACE, # <<<<<<<<<<<<<< - * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock) + * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock, PYDEVD_USE_SYS_MONITORING) * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER */ - __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_get_current_thread_id); __Pyx_GIVEREF(__pyx_n_s_get_current_thread_id); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_current_thread_id)) __PYX_ERR(0, 1404, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_current_thread_id)) __PYX_ERR(0, 1407, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_NO_FTRACE); __Pyx_GIVEREF(__pyx_n_s_NO_FTRACE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_NO_FTRACE)) __PYX_ERR(0, 1404, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_NO_FTRACE)) __PYX_ERR(0, 1407, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); __Pyx_GIVEREF(__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA)) __PYX_ERR(0, 1404, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA)) __PYX_ERR(0, 1407, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_ForkSafeLock); __Pyx_GIVEREF(__pyx_n_s_ForkSafeLock); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ForkSafeLock)) __PYX_ERR(0, 1404, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ForkSafeLock)) __PYX_ERR(0, 1407, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + __Pyx_GIVEREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_PYDEVD_USE_SYS_MONITORING)) __PYX_ERR(0, 1407, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_current_thread_id, __pyx_t_2) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_current_thread_id, __pyx_t_2) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_FTRACE, __pyx_t_2) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_FTRACE, __pyx_t_2) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, __pyx_t_2) < 0) __PYX_ERR(0, 1405, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, __pyx_t_2) < 0) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ForkSafeLock, __pyx_t_2) < 0) __PYX_ERR(0, 1405, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ForkSafeLock, __pyx_t_2) < 0) __PYX_ERR(0, 1408, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PYDEVD_USE_SYS_MONITORING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEVD_USE_SYS_MONITORING, __pyx_t_2) < 0) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1406 + /* "_pydevd_bundle/pydevd_cython.pyx":1409 * from _pydevd_bundle.pydevd_constants import (get_current_thread_id, NO_FTRACE, - * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock) + * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock, PYDEVD_USE_SYS_MONITORING) * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER # <<<<<<<<<<<<<< * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 1406, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 1409, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); __Pyx_GIVEREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER)) __PYX_ERR(0, 1406, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER)) __PYX_ERR(0, 1409, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_3) < 0) __PYX_ERR(0, 1406, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_3) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_t_3) < 0) __PYX_ERR(0, 1406, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_t_3) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1429 + /* "_pydevd_bundle/pydevd_cython.pyx":1432 * # - Breakpoints are changed * # It can be used when running regularly (without step over/step in/step return) * global_cache_skips = {} # <<<<<<<<<<<<<< * global_cache_frame_skips = {} * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_cache_skips, __pyx_t_2) < 0) __PYX_ERR(0, 1429, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_cache_skips, __pyx_t_2) < 0) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1430 + /* "_pydevd_bundle/pydevd_cython.pyx":1433 * # It can be used when running regularly (without step over/step in/step return) * global_cache_skips = {} * global_cache_frame_skips = {} # <<<<<<<<<<<<<< * * _global_notify_skipped_step_in = False */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_cache_frame_skips, __pyx_t_2) < 0) __PYX_ERR(0, 1430, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_cache_frame_skips, __pyx_t_2) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1432 + /* "_pydevd_bundle/pydevd_cython.pyx":1435 * global_cache_frame_skips = {} * * _global_notify_skipped_step_in = False # <<<<<<<<<<<<<< @@ -43466,43 +44802,43 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in, ((PyObject*)Py_False)); __Pyx_GIVEREF(Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":1433 + /* "_pydevd_bundle/pydevd_cython.pyx":1436 * * _global_notify_skipped_step_in = False * _global_notify_skipped_step_in_lock = ForkSafeLock() # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_notify_skipped_step_in_l, __pyx_t_3) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_notify_skipped_step_in_l, __pyx_t_3) < 0) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1436 + /* "_pydevd_bundle/pydevd_cython.pyx":1439 * * * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< * global _global_notify_skipped_step_in * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_5notify_skipped_step_in_because_of_filters, 0, __pyx_n_s_notify_skipped_step_in_because_o, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_11notify_skipped_step_in_because_of_filters, 0, __pyx_n_s_notify_skipped_step_in_because_o, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_notify_skipped_step_in_because_o, __pyx_t_3) < 0) __PYX_ERR(0, 1436, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_notify_skipped_step_in_because_o, __pyx_t_3) < 0) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1460 + /* "_pydevd_bundle/pydevd_cython.pyx":1463 * Py_XDECREF (method_obj) * return SafeCallWrapper(ret) if ret is not None else None * def get_method_object(self): # <<<<<<<<<<<<<< * return self.method_object * # ELSE */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper_get_method_objec, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper_get_method_objec, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_get_method_object, __pyx_t_3) < 0) __PYX_ERR(0, 1460, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_get_method_object, __pyx_t_3) < 0) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); @@ -43511,7 +44847,7 @@ if (!__Pyx_RefNanny) { * cdef tuple state * cdef object _dict */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43523,59 +44859,59 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper___setstate_cytho, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper___setstate_cytho, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); - /* "_pydevd_bundle/pydevd_cython.pyx":1466 + /* "_pydevd_bundle/pydevd_cython.pyx":1469 * * * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef str filename; */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_7fix_top_level_trace_and_get_trace_func, 0, __pyx_n_s_fix_top_level_trace_and_get_trac, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_13fix_top_level_trace_and_get_trace_func, 0, __pyx_n_s_fix_top_level_trace_and_get_trac, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_t_3) < 0) __PYX_ERR(0, 1466, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_t_3) < 0) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1594 + /* "_pydevd_bundle/pydevd_cython.pyx":1597 * * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) * if thread_trace_func is None: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9trace_dispatch, 0, __pyx_n_s_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15trace_dispatch, 0, __pyx_n_s_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace_dispatch, __pyx_t_3) < 0) __PYX_ERR(0, 1594, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace_dispatch, __pyx_t_3) < 0) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1615 + /* "_pydevd_bundle/pydevd_cython.pyx":1618 * # ENDIF * * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_trace_unhandled_exceptions, __pyx_t_3) < 0) __PYX_ERR(0, 1615, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_trace_unhandled_exceptions, __pyx_t_3) < 0) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); - /* "_pydevd_bundle/pydevd_cython.pyx":1629 + /* "_pydevd_bundle/pydevd_cython.pyx":1632 * return self.trace_unhandled_exceptions * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< * return self.trace_unhandled_exceptions * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1629, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_get_trace_dispatch_func, __pyx_t_3) < 0) __PYX_ERR(0, 1629, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_get_trace_dispatch_func, __pyx_t_3) < 0) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); @@ -43584,7 +44920,7 @@ if (!__Pyx_RefNanny) { * cdef tuple state * cdef object _dict */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43596,35 +44932,35 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); - /* "_pydevd_bundle/pydevd_cython.pyx":1671 + /* "_pydevd_bundle/pydevd_cython.pyx":1674 * # ENDIF * * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< * # DEBUG = 'code_to_debug' in frame.f_code.co_filename * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_trace_dispatch_and_unhandled_exc, __pyx_t_3) < 0) __PYX_ERR(0, 1671, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_trace_dispatch_and_unhandled_exc, __pyx_t_3) < 0) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); - /* "_pydevd_bundle/pydevd_cython.pyx":1704 + /* "_pydevd_bundle/pydevd_cython.pyx":1707 * return ret * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< * return self.trace_dispatch_and_unhandled_exceptions * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_3, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_3, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_get_trace_dispatch_func, __pyx_t_3) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_get_trace_dispatch_func, __pyx_t_3) < 0) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); @@ -43633,7 +44969,7 @@ if (!__Pyx_RefNanny) { * cdef tuple state * cdef object _dict */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_4, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_4, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43645,7 +44981,7 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_5, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_5, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43656,7 +44992,7 @@ if (!__Pyx_RefNanny) { * cdef tuple state * cdef object _dict */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadTracer___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadTracer___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43668,81 +45004,83 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadTracer___setstate_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadTracer___setstate_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer); - /* "_pydevd_bundle/pydevd_cython.pyx":1868 + /* "_pydevd_bundle/pydevd_cython.pyx":1871 * * * if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: # <<<<<<<<<<<<<< * # This is far from ideal, as we'll leak frames (we'll always have the last created frame, not really * # the last topmost frame saved -- this should be Ok for our usage, but it may leak frames and things */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1868, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1868, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1876 + /* "_pydevd_bundle/pydevd_cython.pyx":1879 * # * # See: https://github.com/IronLanguages/main/issues/1630 * from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame # <<<<<<<<<<<<<< * * _original_call = ThreadTracer.__call__ */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_constructed_tid_to_last_frame); __Pyx_GIVEREF(__pyx_n_s_constructed_tid_to_last_frame); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_constructed_tid_to_last_frame)) __PYX_ERR(0, 1876, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_constructed_tid_to_last_frame)) __PYX_ERR(0, 1879, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_constructed_tid_to_last_frame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_constructed_tid_to_last_frame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_constructed_tid_to_last_frame, __pyx_t_3) < 0) __PYX_ERR(0, 1876, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_constructed_tid_to_last_frame, __pyx_t_3) < 0) __PYX_ERR(0, 1879, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1878 + /* "_pydevd_bundle/pydevd_cython.pyx":1881 * from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame * * _original_call = ThreadTracer.__call__ # <<<<<<<<<<<<<< * * def __call__(self, frame, event, arg): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_original_call, __pyx_t_2) < 0) __PYX_ERR(0, 1878, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_original_call, __pyx_t_2) < 0) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1880 + /* "_pydevd_bundle/pydevd_cython.pyx":1883 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< * constructed_tid_to_last_frame[self._args[1].ident] = frame * return _original_call(self, frame, event, arg) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_11__call__, 0, __pyx_n_s_call_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_17__call__, 0, __pyx_n_s_call_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_call_2, __pyx_t_2) < 0) __PYX_ERR(0, 1880, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_call_2, __pyx_t_2) < 0) __PYX_ERR(0, 1883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1884 + /* "_pydevd_bundle/pydevd_cython.pyx":1887 * return _original_call(self, frame, event, arg) * * ThreadTracer.__call__ = __call__ # <<<<<<<<<<<<<< + * + * if PYDEVD_USE_SYS_MONITORING: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2, __pyx_t_2) < 0) __PYX_ERR(0, 1884, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1868 + /* "_pydevd_bundle/pydevd_cython.pyx":1871 * * * if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: # <<<<<<<<<<<<<< @@ -43751,12 +45089,45 @@ if (!__Pyx_RefNanny) { */ } + /* "_pydevd_bundle/pydevd_cython.pyx":1889 + * ThreadTracer.__call__ = __call__ + * + * if PYDEVD_USE_SYS_MONITORING: # <<<<<<<<<<<<<< + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_USE_SYS_MONITORING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1891 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError('Not used in sys.monitoring mode.') + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func, 0, __pyx_n_s_fix_top_level_trace_and_get_trac, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_t_2) < 0) __PYX_ERR(0, 1891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1889 + * ThreadTracer.__call__ = __call__ + * + * if PYDEVD_USE_SYS_MONITORING: # <<<<<<<<<<<<<< + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + */ + } + /* "(tree fragment)":1 * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_13__pyx_unpickle_PyDBAdditionalThreadInfo, 0, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_PyDBAdditionalThreadInfo, 0, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43768,7 +45139,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_tracing = __pyx_state[1]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[2]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[3]; __pyx_result.pydev_django_resolve_frame = __pyx_state[4]; __pyx_result.pydev_func_name = __pyx_state[5]; __pyx_result.pydev_message = __pyx_state[6]; __pyx_result.pydev_next_line = __pyx_state[7]; __pyx_result.pydev_notify_kill = __pyx_state[8]; __pyx_result.pydev_original_step_cmd = __pyx_state[9]; __pyx_result.pydev_smart_child_offset = __pyx_state[10]; __pyx_result.pydev_smart_parent_offset = __pyx_state[11]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[12]; __pyx_result.pydev_smart_step_stop = __pyx_state[13]; __pyx_result.pydev_state = __pyx_state[14]; __pyx_result.pydev_step_cmd = __pyx_state[15]; __pyx_result.pydev_step_stop = __pyx_state[16]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[17]; __pyx_result.step_in_initial_location = __pyx_state[18]; __pyx_result.suspend_type = __pyx_state[19]; __pyx_result.suspended_at_unhandled = __pyx_state[20]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[21]; __pyx_result.thread_tracer = __pyx_state[22]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[23]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[24]; __pyx_result.trace_suspend_type = __pyx_state[25] * if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15__pyx_unpickle__TryExceptContainerObj, 0, __pyx_n_s_pyx_unpickle__TryExceptContain, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle__TryExceptContainerObj, 0, __pyx_n_s_pyx_unpickle__TryExceptContain, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__TryExceptContain, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43778,7 +45149,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_17__pyx_unpickle_PyDBFrame, 0, __pyx_n_s_pyx_unpickle_PyDBFrame, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_PyDBFrame, 0, __pyx_n_s_pyx_unpickle_PyDBFrame, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PyDBFrame, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43790,7 +45161,7 @@ if (!__Pyx_RefNanny) { * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_19__pyx_unpickle_SafeCallWrapper, 0, __pyx_n_s_pyx_unpickle_SafeCallWrapper, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_SafeCallWrapper, 0, __pyx_n_s_pyx_unpickle_SafeCallWrapper, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SafeCallWrapper, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43800,7 +45171,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_21__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, 0, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, 0, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43812,7 +45183,7 @@ if (!__Pyx_RefNanny) { * __pyx_result._args = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_23__pyx_unpickle_TopLevelThreadTracerNoBackFrame, 0, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_TopLevelThreadTracerNoBackFrame, 0, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43822,7 +45193,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_25__pyx_unpickle_ThreadTracer, 0, __pyx_n_s_pyx_unpickle_ThreadTracer, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_ThreadTracer, 0, __pyx_n_s_pyx_unpickle_ThreadTracer, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadTracer, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -44025,14 +45396,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject #endif /* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } +#endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { @@ -44044,6 +45421,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; +#endif } /* GetBuiltinName */ @@ -44265,6 +45643,24 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO } return NULL; // not found (no exception set) } +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; i= 0x030500A1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { @@ -44651,9 +46047,15 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && @@ -44730,8 +46132,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -44750,8 +46157,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -44816,7 +46228,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL - #if Py_VERSION_HEX < 0x03090000 + #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); @@ -44859,6 +46271,7 @@ __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) } /* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -44868,9 +46281,14 @@ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { Py_INCREF(d); return d; } +#endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; -#if CYTHON_USE_TYPE_SLOTS +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS if (likely(PyString_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { @@ -44878,9 +46296,10 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject } return r; } -#endif + #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif } /* PyObjectCallNoArg */ @@ -45270,6 +46689,33 @@ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + type_name = __Pyx_PyType_GetName(type); + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + /* pyfrozenset_new */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { if (it) { @@ -45324,33 +46770,6 @@ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, in return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -/* ArgTypeTest */ -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) -{ - __Pyx_TypeName type_name; - __Pyx_TypeName obj_type_name; - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - else if (exact) { - #if PY_MAJOR_VERSION == 2 - if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; - #endif - } - else { - if (likely(__Pyx_TypeCheck(obj, type))) return 1; - } - type_name = __Pyx_PyType_GetName(type); - obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME - ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); - __Pyx_DECREF_TypeName(type_name); - __Pyx_DECREF_TypeName(obj_type_name); - return 0; -} - /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; @@ -45439,7 +46858,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } } #else - if (is_list || PySequence_Check(o)) { + if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif @@ -45483,6 +46902,60 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { return __Pyx_IterFinish(); } +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; @@ -45503,36 +46976,130 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { return 0; } -/* GetAttr */ -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { -#if CYTHON_USE_TYPE_SLOTS -#if PY_MAJOR_VERSION >= 3 - if (likely(PyUnicode_Check(n))) -#else - if (likely(PyString_Check(n))) -#endif - return __Pyx_PyObject_GetAttrStr(o, n); -#endif - return PyObject_GetAttr(o, n); +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } -/* HasAttr */ -static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { - PyObject *r; - if (unlikely(!__Pyx_PyBaseString_Check(n))) { - PyErr_SetString(PyExc_TypeError, - "hasattr(): attribute name must be string"); - return -1; +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + + return PyInt_FromLong(a & b); } - r = __Pyx_GetAttr(o, n); - if (!r) { - PyErr_Clear(); - return 0; - } else { - Py_DECREF(r); - return 1; + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + if ((intval & PyLong_MASK) == intval) { + long last_digit = (long) __Pyx_PyLong_Digits(op1)[0]; + long result = intval & (likely(__Pyx_PyLong_IsPos(op1)) ? last_digit : (PyLong_MASK - last_digit + 1)); + return PyLong_FromLong(result); + } + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + if (likely(__Pyx_PyLong_IsCompact(op1))) { + a = __Pyx_PyLong_CompactValue(op1); + } else { + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_and(op1, op2); + } + } + x = a & b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla & llb; + return PyLong_FromLongLong(llx); +#endif + + } + #endif + return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2); } +#endif /* UnpackUnboundCMethod */ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { @@ -45733,185 +47300,6 @@ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObjec return value; } -/* SwapException */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_value = exc_info->exc_value; - exc_info->exc_value = *value; - if (tmp_value == NULL || tmp_value == Py_None) { - Py_XDECREF(tmp_value); - tmp_value = NULL; - tmp_type = NULL; - tmp_tb = NULL; - } else { - tmp_type = (PyObject*) Py_TYPE(tmp_value); - Py_INCREF(tmp_type); - #if CYTHON_COMPILING_IN_CPYTHON - tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; - Py_XINCREF(tmp_tb); - #else - tmp_tb = PyException_GetTraceback(tmp_value); - #endif - } - #elif CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = *type; - exc_info->exc_value = *value; - exc_info->exc_traceback = *tb; - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = *type; - tstate->exc_value = *value; - tstate->exc_traceback = *tb; - #endif - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} -#else -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); - PyErr_SetExcInfo(*type, *value, *tb); - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} -#endif - -/* RaiseNoneIterError */ -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -} - -/* PyIntBinop */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { - CYTHON_MAYBE_UNUSED_VAR(intval); - CYTHON_MAYBE_UNUSED_VAR(inplace); - CYTHON_UNUSED_VAR(zerodivision_check); - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(op1))) { - const long b = intval; - long a = PyInt_AS_LONG(op1); - - return PyInt_FromLong(a & b); - } - #endif - #if CYTHON_USE_PYLONG_INTERNALS - if (likely(PyLong_CheckExact(op1))) { - const long b = intval; - long a, x; -#ifdef HAVE_LONG_LONG - const PY_LONG_LONG llb = intval; - PY_LONG_LONG lla, llx; -#endif - if ((intval & PyLong_MASK) == intval) { - long last_digit = (long) __Pyx_PyLong_Digits(op1)[0]; - long result = intval & (likely(__Pyx_PyLong_IsPos(op1)) ? last_digit : (PyLong_MASK - last_digit + 1)); - return PyLong_FromLong(result); - } - if (unlikely(__Pyx_PyLong_IsZero(op1))) { - return __Pyx_NewRef(op1); - } - if (likely(__Pyx_PyLong_IsCompact(op1))) { - a = __Pyx_PyLong_CompactValue(op1); - } else { - const digit* digits = __Pyx_PyLong_Digits(op1); - const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); - switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { - lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; - case 2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { - lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; - case -3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { - lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; - case 3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { - lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; - case -4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { - lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; - case 4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { - lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; - default: return PyLong_Type.tp_as_number->nb_and(op1, op2); - } - } - x = a & b; - return PyLong_FromLong(x); -#ifdef HAVE_LONG_LONG - long_long: - llx = lla & llb; - return PyLong_FromLongLong(llx); -#endif - - - } - #endif - return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2); -} -#endif - /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; @@ -46336,6 +47724,39 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, return NULL; } +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (!r) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { @@ -46476,12 +47897,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyOb } /* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } +#endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { @@ -46491,6 +47921,7 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); +#endif } /* append */ @@ -46634,7 +48065,9 @@ static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { __Pyx_TypeName obj_type_name; if (likely(PyType_Check(obj))) { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); - if (meth) { + if (!meth) { + PyErr_Clear(); + } else { PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); Py_DECREF(meth); return result; @@ -46879,38 +48312,38 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs #endif return -1; } -#if !CYTHON_USE_TYPE_SLOTS - if (dictoffset == 0) { - PyErr_Format(PyExc_TypeError, - "extension type '%s.200s': " - "unable to validate whether bases have a __dict__ " - "when CYTHON_USE_TYPE_SLOTS is off " - "(likely because you are building in the limited API). " - "Therefore, all extension types with multiple bases " - "must add 'cdef dict __dict__' in this compilation mode", - type_name); -#if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); -#endif - return -1; - } -#else - if (dictoffset == 0 && b->tp_dictoffset) + if (dictoffset == 0) { - __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); - PyErr_Format(PyExc_TypeError, - "extension type '%.200s' has no __dict__ slot, " - "but base type '" __Pyx_FMT_TYPENAME "' has: " - "either add 'cdef dict __dict__' to the extension type " - "or add '__slots__ = [...]' to the base type", - type_name, b_name); - __Pyx_DECREF_TypeName(b_name); + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) + dictoffset_return: +#endif #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); + Py_DECREF(b0); #endif - return -1; + return -1; + } } -#endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif @@ -47256,10 +48689,10 @@ static int __Pyx_MergeVtables(PyTypeObject *type) { #endif /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_0_3 -#define __PYX_HAVE_RT_ImportType_3_0_3 -static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_3 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_0_6 +#define __PYX_HAVE_RT_ImportType_3_0_6 +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size) { PyObject *result = 0; char warning[200]; @@ -47313,7 +48746,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_3 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_6 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -47321,7 +48754,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_3 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_6 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -47337,10 +48770,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { - PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME); - if (unlikely(!abi_module)) return NULL; - Py_INCREF(abi_module); - return abi_module; + return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ @@ -48593,7 +50023,7 @@ static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject * #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 - PyObject *module, *from_list, *star = __pyx_n_s__26; + PyObject *module, *from_list, *star = __pyx_n_s__27; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) @@ -48791,8 +50221,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject Py_DECREF(replace); return result; } - #if __PYX_LIMITED_VERSION_HEX < 0x030780000 PyErr_Clear(); + #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; @@ -48812,6 +50242,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject if (result) Py_INCREF(result); return result; } + #else + return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, @@ -49013,13 +50445,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; @@ -49027,16 +50459,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -49212,7 +50646,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -49485,7 +50919,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -49621,13 +51055,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; @@ -49635,16 +51069,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -49783,7 +51219,7 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* CheckBinaryVersion */ -static unsigned long __Pyx_get_runtime_version() { +static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.pyx b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.pyx index 6620c671bb..90ec48c701 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.pyx +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython.pyx @@ -164,7 +164,8 @@ import re from _pydev_bundle import pydev_log from _pydevd_bundle import pydevd_dont_trace from _pydevd_bundle.pydevd_constants import (RETURN_VALUES_DICT, NO_FTRACE, - EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT) + EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT, + PYDEVD_USE_SYS_MONITORING) from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace from _pydevd_bundle.pydevd_utils import get_clsname_for_code from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame @@ -210,7 +211,7 @@ except NameError: # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) -cdef is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): +def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # ELSE # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): # ENDIF @@ -260,8 +261,8 @@ cdef class _TryExceptContainerObj: # ELSE # class _TryExceptContainerObj(object): # ''' -# A dumb container object just to containe the try..except info when needed. Meant to be -# persisent among multiple PyDBFrames to the same code object. +# A dumb container object just to contain the try..except info when needed. Meant to be +# persistent among multiple PyDBFrames to the same code object. # ''' # try_except_infos = None # ENDIF @@ -280,13 +281,6 @@ cdef class PyDBFrame: # ''' # ENDIF - # Note: class (and not instance) attributes. - - # Same thing in the main debugger but only considering the file contents, while the one in the main debugger - # considers the user input (so, the actual result must be a join of both). - filename_to_lines_where_exceptions_are_ignored = {} - filename_to_stat_info = {} - # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) cdef tuple _args cdef int should_skip @@ -299,10 +293,17 @@ cdef class PyDBFrame: # should_skip = -1 # Default value in class (put in instance on set). # exc_info = () # Default value in class (put in instance on set). # -# def __init__(self, args): -# # args = main_debugger, abs_path_canonical_path_and_base, base, info, t, frame -# # yeap, much faster than putting in self and then getting it from self later on -# self._args = args +# if PYDEVD_USE_SYS_MONITORING: +# +# def __init__(self, *args, **kwargs): +# raise RuntimeError("Not expected to be used in sys.monitoring.") +# +# else: +# +# def __init__(self, args): +# # args = py_db, abs_path_canonical_path_and_base, base, info, t, frame +# # yeap, much faster than putting in self and then getting it from self later on +# self._args = args # ENDIF def set_suspend(self, *args, **kwargs): @@ -319,10 +320,11 @@ cdef class PyDBFrame: # def trace_exception(self, frame, event, arg): # ENDIF if event == 'exception': - should_stop, frame = self._should_stop_on_exception(frame, event, arg) + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info if should_stop: - if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): return self.trace_dispatch elif event == 'return': @@ -339,263 +341,12 @@ cdef class PyDBFrame: return self.trace_exception - # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - cdef _should_stop_on_exception(self, frame, str event, arg): - cdef PyDBAdditionalThreadInfo info; - cdef bint should_stop; - cdef bint was_just_raised; - cdef list check_excs; - # ELSE -# def _should_stop_on_exception(self, frame, event, arg): - # ENDIF - - # main_debugger, _filename, info, _thread = self._args - main_debugger = self._args[0] - info = self._args[2] - should_stop = False - - # 2 = 2 - if info.pydev_state != 2: # and breakpoint is not None: - exception, value, trace = arg - - if trace is not None and hasattr(trace, 'tb_next'): - # on jython trace is None on the first event and it may not have a tb_next. - - should_stop = False - exception_breakpoint = None - try: - if main_debugger.plugin is not None: - result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - if result: - should_stop, frame = result - except: - pydev_log.exception() - - if not should_stop: - # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). - if exception == SystemExit and main_debugger.ignore_system_exit_code(value): - pass - - elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): - # These exceptions are control-flow related (they work as a generator - # pause), so, we shouldn't stop on them. - pass - - elif ignore_exception_trace(trace): - pass - - else: - was_just_raised = trace.tb_next is None - - # It was not handled by any plugin, lets check exception breakpoints. - check_excs = [] - - # Note: check user unhandled before regular exceptions. - exc_break_user = main_debugger.get_exception_breakpoint( - exception, main_debugger.break_on_user_uncaught_exceptions) - if exc_break_user is not None: - check_excs.append((exc_break_user, True)) - - exc_break_caught = main_debugger.get_exception_breakpoint( - exception, main_debugger.break_on_caught_exceptions) - if exc_break_caught is not None: - check_excs.append((exc_break_caught, False)) - - for exc_break, is_user_uncaught in check_excs: - # Initially mark that it should stop and then go into exclusions. - should_stop = True - - if main_debugger.exclude_exception_by_filter(exc_break, trace): - pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) - should_stop = False - - elif exc_break.condition is not None and \ - not main_debugger.handle_breakpoint_condition(info, exc_break, frame): - should_stop = False - - elif is_user_uncaught: - # Note: we don't stop here, we just collect the exc_info to use later on... - should_stop = False - if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ - and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): - # User uncaught means that we're currently in user code but the code - # up the stack is library code. - exc_info = self.exc_info - if not exc_info: - exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) - else: - lines = exc_info[2] - lines.add(frame.f_lineno) - exc_info = (arg, frame.f_lineno, lines) - self.exc_info = exc_info - else: - # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ - and not was_just_raised and not just_raised(trace.tb_next): - # In this case we never stop if it was just raised, so, to know if it was the first we - # need to check if we're in the 2nd method. - should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception - - elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ - and not was_just_raised: - should_stop = False # I.e.: we stop only when it was just raised - - elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context: - # Option: Don't break if an exception is caught in the same function from which it is thrown - should_stop = False - - if should_stop: - exception_breakpoint = exc_break - try: - info.pydev_message = exc_break.qname - except: - info.pydev_message = exc_break.qname.encode('utf-8') - break - - if should_stop: - # Always add exception to frame (must remove later after we proceed). - add_exception_to_frame(frame, (exception, value, trace)) - - if exception_breakpoint is not None and exception_breakpoint.expression is not None: - main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame) - - return should_stop, frame - def handle_user_exception(self, frame): exc_info = self.exc_info if exc_info: - return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) return False - # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - cdef _handle_exception(self, frame, str event, arg, str exception_type): - cdef bint stopped; - cdef tuple abs_real_path_and_base; - cdef str absolute_filename; - cdef str canonical_normalized_filename; - cdef dict filename_to_lines_where_exceptions_are_ignored; - cdef dict lines_ignored; - cdef dict frame_id_to_frame; - cdef dict merged; - cdef object trace_obj; - cdef object main_debugger; - # ELSE -# def _handle_exception(self, frame, event, arg, exception_type): - # ENDIF - stopped = False - try: - # print('_handle_exception', frame.f_lineno, frame.f_code.co_name) - - # We have 3 things in arg: exception type, description, traceback object - trace_obj = arg[2] - main_debugger = self._args[0] - - initial_trace_obj = trace_obj - if trace_obj.tb_next is None and trace_obj.tb_frame is frame: - # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). - pass - else: - # Get the trace_obj from where the exception was raised... - while trace_obj.tb_next is not None: - trace_obj = trace_obj.tb_next - - if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: - for check_trace_obj in (initial_trace_obj, trace_obj): - abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) - absolute_filename = abs_real_path_and_base[0] - canonical_normalized_filename = abs_real_path_and_base[1] - - filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored - - lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - if lines_ignored is None: - lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} - - try: - curr_stat = os.stat(absolute_filename) - curr_stat = (curr_stat.st_size, curr_stat.st_mtime) - except: - curr_stat = None - - last_stat = self.filename_to_stat_info.get(absolute_filename) - if last_stat != curr_stat: - self.filename_to_stat_info[absolute_filename] = curr_stat - lines_ignored.clear() - try: - linecache.checkcache(absolute_filename) - except: - pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) - - from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - if from_user_input: - merged = {} - merged.update(lines_ignored) - # Override what we have with the related entries that the user entered - merged.update(from_user_input) - else: - merged = lines_ignored - - exc_lineno = check_trace_obj.tb_lineno - - # print ('lines ignored', lines_ignored) - # print ('user input', from_user_input) - # print ('merged', merged, 'curr', exc_lineno) - - if exc_lineno not in merged: # Note: check on merged but update lines_ignored. - try: - line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - except: - pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) - line = '' - - if IGNORE_EXCEPTION_TAG.match(line) is not None: - lines_ignored[exc_lineno] = 1 - return False - else: - # Put in the cache saying not to ignore - lines_ignored[exc_lineno] = 0 - else: - # Ok, dict has it already cached, so, let's check it... - if merged.get(exc_lineno, 0): - return False - - thread = self._args[3] - - try: - frame_id_to_frame = {} - frame_id_to_frame[id(frame)] = frame - f = trace_obj.tb_frame - while f is not None: - frame_id_to_frame[id(f)] = f - f = f.f_back - f = None - - stopped = True - main_debugger.send_caught_exception_stack(thread, arg, id(frame)) - try: - self.set_suspend(thread, 137) - self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type) - finally: - main_debugger.send_caught_exception_stack_proceeded(thread) - except: - pydev_log.exception() - - main_debugger.set_trace_for_frame_and_parents(frame) - finally: - # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. - remove_exception_from_frame(frame) - # Clear some local variables... - frame = None - trace_obj = None - initial_trace_obj = None - check_trace_obj = None - f = None - frame_id_to_frame = None - main_debugger = None - thread = None - - return stopped - # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) cdef get_func_name(self, frame): cdef str func_name @@ -635,9 +386,9 @@ cdef class PyDBFrame: f_locals_back = None # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - cdef _remove_return_values(self, main_debugger, frame): + cdef _remove_return_values(self, py_db, frame): # ELSE -# def _remove_return_values(self, main_debugger, frame): +# def _remove_return_values(self, py_db, frame): # ENDIF try: try: @@ -654,17 +405,17 @@ cdef class PyDBFrame: f_locals_back = None # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) - cdef _get_unfiltered_back_frame(self, main_debugger, frame): + cdef _get_unfiltered_back_frame(self, py_db, frame): # ELSE -# def _get_unfiltered_back_frame(self, main_debugger, frame): +# def _get_unfiltered_back_frame(self, py_db, frame): # ENDIF f = frame.f_back while f is not None: - if not main_debugger.is_files_filter_enabled: + if not py_db.is_files_filter_enabled: return f else: - if main_debugger.apply_files_filter(f, f.f_code.co_filename, False): + if py_db.apply_files_filter(f, f.f_code.co_filename, False): f = f.f_back else: @@ -740,7 +491,7 @@ cdef class PyDBFrame: try: # DEBUG = '_debugger_case_generator.py' in frame.f_code.co_filename - main_debugger, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) info.is_tracing += 1 @@ -750,14 +501,14 @@ cdef class PyDBFrame: line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None line_cache_key = (frame_cache_key, line) - if main_debugger.pydb_disposed: + if py_db.pydb_disposed: return None if event == 'call' else NO_FTRACE - plugin_manager = main_debugger.plugin + plugin_manager = py_db.plugin has_exception_breakpoints = ( - main_debugger.break_on_caught_exceptions - or main_debugger.break_on_user_uncaught_exceptions - or main_debugger.has_plugin_exception_breaks) + py_db.break_on_caught_exceptions + or py_db.break_on_user_uncaught_exceptions + or py_db.has_plugin_exception_breaks) stop_frame = info.pydev_step_stop step_cmd = info.pydev_step_cmd @@ -787,7 +538,7 @@ cdef class PyDBFrame: # it doesn't give any clear indication when a coroutine or generator is # finishing or just pausing. return_lines = set() - for x in main_debugger.collect_return_info(frame.f_code): + for x in py_db.collect_return_info(frame.f_code): # Note: cython does not support closures in cpdefs (so we can't use # a list comprehension). return_lines.add(x.return_line) @@ -820,7 +571,7 @@ cdef class PyDBFrame: # frame in this case). if stop_frame is frame and not info.pydev_use_scoped_step_frame: if step_cmd in (108, 159, 107, 144): - f = self._get_unfiltered_back_frame(main_debugger, frame) + f = self._get_unfiltered_back_frame(py_db, frame) if f is not None: info.pydev_step_cmd = 206 info.pydev_step_stop = f @@ -835,7 +586,7 @@ cdef class PyDBFrame: elif step_cmd == 206: # We're exiting this one, so, mark the new coroutine context. - f = self._get_unfiltered_back_frame(main_debugger, frame) + f = self._get_unfiltered_back_frame(py_db, frame) if f is not None: info.pydev_step_stop = f else: @@ -845,9 +596,10 @@ cdef class PyDBFrame: elif event == 'exception': breakpoints_for_file = None if has_exception_breakpoints: - should_stop, frame = self._should_stop_on_exception(frame, event, arg) + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info if should_stop: - if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): return self.trace_dispatch return self.trace_dispatch @@ -896,15 +648,16 @@ cdef class PyDBFrame: is_return = False is_exception_event = False if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. - function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) elif event == 'exception': is_exception_event = True breakpoints_for_file = None if has_exception_breakpoints: - should_stop, frame = self._should_stop_on_exception(frame, event, arg) + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info if should_stop: - if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): return self.trace_dispatch is_line = False is_return = False @@ -915,7 +668,7 @@ cdef class PyDBFrame: return self.trace_dispatch if not is_exception_event: - breakpoints_for_file = main_debugger.breakpoints.get(abs_path_canonical_path_and_base[1]) + breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) can_skip = False @@ -939,8 +692,8 @@ cdef class PyDBFrame: elif step_cmd == 144: if ( - main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) - and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) + py_db.apply_files_filter(frame, frame.f_code.co_filename, True) + and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) ): can_skip = True @@ -955,10 +708,10 @@ cdef class PyDBFrame: if can_skip: if plugin_manager is not None and ( - main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): - can_skip = plugin_manager.can_skip(main_debugger, frame) + py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + can_skip = plugin_manager.can_skip(py_db, frame) - if can_skip and main_debugger.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): + if can_skip and py_db.show_return_values and info.pydev_step_cmd in (108, 159) and self._is_same_frame(stop_frame, frame.f_back): # trace function for showing return values after step over can_skip = False @@ -1057,21 +810,22 @@ cdef class PyDBFrame: new_frame = frame stop = True - elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: - result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) + elif plugin_manager is not None and py_db.has_plugin_line_breaks: + result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) if result: - stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result + stop_on_plugin_breakpoint = True + breakpoint, new_frame, bp_type = result if breakpoint: # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint # lets do the conditional stuff here if breakpoint.expression is not None: - main_debugger.handle_breakpoint_expression(breakpoint, info, new_frame) + py_db.handle_breakpoint_expression(breakpoint, info, new_frame) if stop or stop_on_plugin_breakpoint: eval_result = False if breakpoint.has_condition: - eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) + eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) if not eval_result: stop = False stop_on_plugin_breakpoint = False @@ -1096,10 +850,10 @@ cdef class PyDBFrame: stop_on_plugin_breakpoint = False if info.pydev_message is not None and len(info.pydev_message) > 0: - cmd = main_debugger.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') - main_debugger.writer.add_command(cmd) + cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') + py_db.writer.add_command(cmd) - if main_debugger.show_return_values: + if py_db.show_return_values: if is_return and ( (info.pydev_step_cmd in (108, 159, 128) and (self._is_same_frame(stop_frame, frame.f_back))) or (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) or @@ -1107,16 +861,16 @@ cdef class PyDBFrame: ( info.pydev_step_cmd == 144 and frame.f_back is not None - and not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) ) ): self._show_return_values(frame, arg) - elif main_debugger.remove_return_values_flag: + elif py_db.remove_return_values_flag: try: - self._remove_return_values(main_debugger, frame) + self._remove_return_values(py_db, frame) finally: - main_debugger.remove_return_values_flag = False + py_db.remove_return_values_flag = False if stop: self.set_suspend( @@ -1126,7 +880,7 @@ cdef class PyDBFrame: ) elif stop_on_plugin_breakpoint and plugin_manager is not None: - result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) + result = plugin_manager.suspend(py_db, thread, frame, bp_type) if result: frame = result @@ -1143,9 +897,9 @@ cdef class PyDBFrame: # Unfortunately Python itself stops the tracing when it originates from # the tracing function, so, we can't do much about it (just let the user know). exc = sys.exc_info()[0] - cmd = main_debugger.cmd_factory.make_console_message( + cmd = py_db.cmd_factory.make_console_message( '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - main_debugger.writer.add_command(cmd) + py_db.writer.add_command(cmd) if not issubclass(exc, (KeyboardInterrupt, SystemExit)): pydev_log.exception() @@ -1159,7 +913,7 @@ cdef class PyDBFrame: # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code # Which will be handled by this frame is read-only, so, we can cache it safely. - if not pydevd_dont_trace.should_trace_hook(frame, abs_path_canonical_path_and_base[0]): + if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): # -1, 0, 1 to be Cython-friendly should_skip = self.should_skip = 1 else: @@ -1175,14 +929,14 @@ cdef class PyDBFrame: force_check_project_scope = step_cmd == 144 if is_line: if not info.pydev_use_scoped_step_frame: - if force_check_project_scope or main_debugger.is_files_filter_enabled: - stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) else: stop = True else: - if force_check_project_scope or main_debugger.is_files_filter_enabled: + if force_check_project_scope or py_db.is_files_filter_enabled: # Make sure we check the filtering inside ipython calls too... - if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): return None if is_call else NO_FTRACE # We can only stop inside the ipython call. @@ -1209,11 +963,11 @@ cdef class PyDBFrame: return None if is_call else NO_FTRACE elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: - if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: stop = False else: - if force_check_project_scope or main_debugger.is_files_filter_enabled: - stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) if stop: # Prevent stopping in a return to the same location we were initially # (i.e.: double-stop at the same place due to some filtering). @@ -1236,7 +990,7 @@ cdef class PyDBFrame: stop = False if plugin_manager is not None: - result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) + result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) if result: stop, plugin_stop = result @@ -1249,7 +1003,7 @@ cdef class PyDBFrame: # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. if plugin_manager is not None: - result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) + result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) if result: stop, plugin_stop = result @@ -1333,11 +1087,11 @@ cdef class PyDBFrame: if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): f_code = getattr(frame.f_back, 'f_code', None) if f_code is not None: - if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: stop = False if plugin_stop: - stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) + plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) elif stop: if is_line: self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) @@ -1358,13 +1112,13 @@ cdef class PyDBFrame: return None if is_call else NO_FTRACE elif pydevd_dont_trace.should_trace_hook is not None: - if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename): + if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): # In this case, we'll have to skip the previous one because it shouldn't be traced. # Also, we have to reset the tracing, because if the parent's parent (or some # other parent) has to be traced and it's not currently, we wouldn't stop where # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). # Related test: _debugger_case17a.py - main_debugger.set_trace_for_frame_and_parents(back) + py_db.set_trace_for_frame_and_parents(thread.ident, back) return None if is_call else NO_FTRACE if back is not None: @@ -1379,7 +1133,7 @@ cdef class PyDBFrame: info.pydev_state = 1 # if we are quitting, let's stop the tracing - if main_debugger.quitting: + if py_db.quitting: return None if is_call else NO_FTRACE return self.trace_dispatch @@ -1387,9 +1141,9 @@ cdef class PyDBFrame: # Unfortunately Python itself stops the tracing when it originates from # the tracing function, so, we can't do much about it (just let the user know). exc = sys.exc_info()[0] - cmd = main_debugger.cmd_factory.make_console_message( + cmd = py_db.cmd_factory.make_console_message( '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - main_debugger.writer.add_command(cmd) + py_db.writer.add_command(cmd) if not issubclass(exc, (KeyboardInterrupt, SystemExit)): pydev_log.exception() raise @@ -1398,11 +1152,260 @@ cdef class PyDBFrame: info.is_tracing -= 1 # end trace_dispatch + + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info): + cdef bint should_stop; + cdef bint was_just_raised; + cdef list check_excs; +# ELSE +# def should_stop_on_exception(py_db, info, frame, thread, arg, prev_user_uncaught_exc_info): +# ENDIF + + should_stop = False + maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info + + # 2 = 2 + if info.pydev_state != 2: # and breakpoint is not None: + exception, value, trace = arg + + if trace is not None and hasattr(trace, 'tb_next'): + # on jython trace is None on the first event and it may not have a tb_next. + + should_stop = False + exception_breakpoint = None + try: + if py_db.plugin is not None: + result = py_db.plugin.exception_break(py_db, frame, thread, arg) + if result: + should_stop, frame = result + except: + pydev_log.exception() + + if not should_stop: + # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + if exception == SystemExit and py_db.ignore_system_exit_code(value): + pass + + elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): + # These exceptions are control-flow related (they work as a generator + # pause), so, we shouldn't stop on them. + pass + + elif ignore_exception_trace(trace): + pass + + else: + was_just_raised = trace.tb_next is None + + # It was not handled by any plugin, lets check exception breakpoints. + check_excs = [] + + # Note: check user unhandled before regular exceptions. + exc_break_user = py_db.get_exception_breakpoint( + exception, py_db.break_on_user_uncaught_exceptions) + if exc_break_user is not None: + check_excs.append((exc_break_user, True)) + + exc_break_caught = py_db.get_exception_breakpoint( + exception, py_db.break_on_caught_exceptions) + if exc_break_caught is not None: + check_excs.append((exc_break_caught, False)) + + for exc_break, is_user_uncaught in check_excs: + # Initially mark that it should stop and then go into exclusions. + should_stop = True + + if py_db.exclude_exception_by_filter(exc_break, trace): + pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) + should_stop = False + + elif exc_break.condition is not None and \ + not py_db.handle_breakpoint_condition(info, exc_break, frame): + should_stop = False + + elif is_user_uncaught: + # Note: we don't stop here, we just collect the exc_info to use later on... + should_stop = False + if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ + and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): + # User uncaught means that we're currently in user code but the code + # up the stack is library code. + exc_info = prev_user_uncaught_exc_info + if not exc_info: + exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + else: + lines = exc_info[2] + lines.add(frame.f_lineno) + exc_info = (arg, frame.f_lineno, lines) + maybe_user_uncaught_exc_info = exc_info + else: + # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ + and not was_just_raised and not just_raised(trace.tb_next): + # In this case we never stop if it was just raised, so, to know if it was the first we + # need to check if we're in the 2nd method. + should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + + elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ + and not was_just_raised: + should_stop = False # I.e.: we stop only when it was just raised + + elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + # Option: Don't break if an exception is caught in the same function from which it is thrown + should_stop = False + + if should_stop: + exception_breakpoint = exc_break + try: + info.pydev_message = exc_break.qname + except: + info.pydev_message = exc_break.qname.encode('utf-8') + break + + if should_stop: + # Always add exception to frame (must remove later after we proceed). + add_exception_to_frame(frame, (exception, value, trace)) + + if exception_breakpoint is not None and exception_breakpoint.expression is not None: + py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + + return should_stop, frame, maybe_user_uncaught_exc_info + + +# Same thing in the main debugger but only considering the file contents, while the one in the main debugger +# considers the user input (so, the actual result must be a join of both). +filename_to_lines_where_exceptions_are_ignored: dict = {} +filename_to_stat_info: dict = {} + + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +def handle_exception(py_db, thread, frame, arg, str exception_type): + cdef bint stopped; + cdef tuple abs_real_path_and_base; + cdef str absolute_filename; + cdef str canonical_normalized_filename; + cdef dict lines_ignored; + cdef dict frame_id_to_frame; + cdef dict merged; + cdef object trace_obj; +# ELSE +# def handle_exception(py_db, thread, frame, arg, exception_type): +# ENDIF + stopped = False + try: + # print('handle_exception', frame.f_lineno, frame.f_code.co_name) + + # We have 3 things in arg: exception type, description, traceback object + trace_obj = arg[2] + + initial_trace_obj = trace_obj + if trace_obj.tb_next is None and trace_obj.tb_frame is frame: + # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + pass + else: + # Get the trace_obj from where the exception was raised... + while trace_obj.tb_next is not None: + trace_obj = trace_obj.tb_next + + if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + for check_trace_obj in (initial_trace_obj, trace_obj): + abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + absolute_filename = abs_real_path_and_base[0] + canonical_normalized_filename = abs_real_path_and_base[1] + + lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if lines_ignored is None: + lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + + try: + curr_stat = os.stat(absolute_filename) + curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + except: + curr_stat = None + + last_stat = filename_to_stat_info.get(absolute_filename) + if last_stat != curr_stat: + filename_to_stat_info[absolute_filename] = curr_stat + lines_ignored.clear() + try: + linecache.checkcache(absolute_filename) + except: + pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) + + from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if from_user_input: + merged = {} + merged.update(lines_ignored) + # Override what we have with the related entries that the user entered + merged.update(from_user_input) + else: + merged = lines_ignored + + exc_lineno = check_trace_obj.tb_lineno + + # print ('lines ignored', lines_ignored) + # print ('user input', from_user_input) + # print ('merged', merged, 'curr', exc_lineno) + + if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + try: + line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + except: + pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) + line = '' + + if IGNORE_EXCEPTION_TAG.match(line) is not None: + lines_ignored[exc_lineno] = 1 + return False + else: + # Put in the cache saying not to ignore + lines_ignored[exc_lineno] = 0 + else: + # Ok, dict has it already cached, so, let's check it... + if merged.get(exc_lineno, 0): + return False + + try: + frame_id_to_frame = {} + frame_id_to_frame[id(frame)] = frame + f = trace_obj.tb_frame + while f is not None: + frame_id_to_frame[id(f)] = f + f = f.f_back + f = None + + stopped = True + py_db.send_caught_exception_stack(thread, arg, id(frame)) + try: + py_db.set_suspend(thread, 137) + py_db.do_wait_suspend(thread, frame, 'exception', arg, exception_type=exception_type) + finally: + py_db.send_caught_exception_stack_proceeded(thread) + except: + pydev_log.exception() + + py_db.set_trace_for_frame_and_parents(thread.ident, frame) + finally: + # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + remove_exception_from_frame(frame) + # Clear some local variables... + frame = None + trace_obj = None + initial_trace_obj = None + check_trace_obj = None + f = None + frame_id_to_frame = None + py_db = None + thread = None + + return stopped from _pydev_bundle.pydev_is_thread_alive import is_thread_alive from _pydev_bundle.pydev_log import exception as pydev_log_exception from _pydev_bundle._pydev_saved_modules import threading from _pydevd_bundle.pydevd_constants import (get_current_thread_id, NO_FTRACE, - USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock) + USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock, PYDEVD_USE_SYS_MONITORING) from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) @@ -1882,3 +1885,8 @@ if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: return _original_call(self, frame, event, arg) ThreadTracer.__call__ = __call__ + +if PYDEVD_USE_SYS_MONITORING: + + def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + raise RuntimeError('Not used in sys.monitoring mode.') diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython_wrapper.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython_wrapper.py index 1058519b3f..5af95d52a9 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython_wrapper.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_cython_wrapper.py @@ -49,4 +49,10 @@ fix_top_level_trace_and_get_trace_func = mod.fix_top_level_trace_and_get_trace_func +handle_exception = mod.handle_exception + +should_stop_on_exception = mod.should_stop_on_exception + +is_unhandled_exception = mod.is_unhandled_exception + version = getattr(mod, 'version', 0) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_daemon_thread.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_daemon_thread.py index 80149acba3..228737a267 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_daemon_thread.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_daemon_thread.py @@ -3,7 +3,7 @@ from _pydevd_bundle.pydevd_utils import notify_about_gevent_if_needed import weakref from _pydevd_bundle.pydevd_constants import IS_JYTHON, IS_IRONPYTHON, \ - PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS, USE_SYS_MONITORING + PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS, PYDEVD_USE_SYS_MONITORING from _pydev_bundle.pydev_log import exception as pydev_log_exception import sys from _pydev_bundle import pydev_log @@ -68,7 +68,7 @@ def do_kill_pydev_thread(self): def _stop_trace(self): if self.pydev_do_not_trace: - if USE_SYS_MONITORING: + if PYDEVD_USE_SYS_MONITORING: pydevd_sys_monitoring.stop_monitoring(all_threads=False) return pydevd_tracing.SetTrace(None) # no debugging on this thread diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_dont_trace_files.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_dont_trace_files.py index 7cf2610153..92cde318f9 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_dont_trace_files.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_dont_trace_files.py @@ -11,7 +11,8 @@ '_pydev_runfiles': PYDEV_FILE, '_pydevd_bundle': PYDEV_FILE, '_pydevd_frame_eval': PYDEV_FILE, - 'pydev_ipython': PYDEV_FILE, + '_pydevd_sys_monitoring': PYDEV_FILE, + 'pydev_ipython': LIB_FILE, 'pydev_sitecustomize': PYDEV_FILE, 'pydevd_attach_to_process': PYDEV_FILE, 'pydevd_concurrency_analyser': PYDEV_FILE, @@ -19,6 +20,24 @@ 'test_pydevd_reload': PYDEV_FILE, } +LIB_FILES_IN_DONT_TRACE_DIRS = { + '__init__.py', + 'inputhook.py', + 'inputhookglut.py', + 'inputhookgtk.py', + 'inputhookgtk3.py', + 'inputhookpyglet.py', + 'inputhookqt4.py', + 'inputhookqt5.py', + 'inputhooktk.py', + 'inputhookwx.py', + 'matplotlibtools.py', + 'qt.py', + 'qt_for_kernel.py', + 'qt_loaders.py', + 'version.py', +} + DONT_TRACE = { # commonly used things from the stdlib that we don't want to trace 'Queue.py':LIB_FILE, @@ -78,6 +97,7 @@ 'pydevd_base_schema.py': PYDEV_FILE, 'pydevd_breakpoints.py': PYDEV_FILE, 'pydevd_bytecode_utils.py': PYDEV_FILE, + 'pydevd_bytecode_utils_py311.py': PYDEV_FILE, 'pydevd_code_to_source.py': PYDEV_FILE, 'pydevd_collect_bytecode_info.py': PYDEV_FILE, 'pydevd_comm.py': PYDEV_FILE, @@ -130,10 +150,10 @@ 'pydevd_source_mapping.py': PYDEV_FILE, 'pydevd_stackless.py': PYDEV_FILE, 'pydevd_suspended_frames.py': PYDEV_FILE, + 'pydevd_sys_monitoring.py': PYDEV_FILE, 'pydevd_thread_lifecycle.py': PYDEV_FILE, 'pydevd_thread_wrappers.py': PYDEV_FILE, 'pydevd_timeout.py': PYDEV_FILE, - 'pydevd_trace_api.py': PYDEV_FILE, 'pydevd_trace_dispatch.py': PYDEV_FILE, 'pydevd_trace_dispatch_regular.py': PYDEV_FILE, 'pydevd_traceproperty.py': PYDEV_FILE, @@ -142,7 +162,6 @@ 'pydevd_vars.py': PYDEV_FILE, 'pydevd_vm_type.py': PYDEV_FILE, 'pydevd_xml.py': PYDEV_FILE, - 'pydevd_sys_monitoring.py': PYDEV_FILE, } # if we try to trace io.py it seems it can get halted (see http://bugs.python.org/issue4716) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_filtering.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_filtering.py index d5f0d56675..3d0376a598 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_filtering.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_filtering.py @@ -12,6 +12,7 @@ from _pydevd_bundle.pydevd_constants import USER_CODE_BASENAMES_STARTING_WITH, \ LIBRARY_CODE_BASENAMES_STARTING_WITH, IS_PYPY, IS_WINDOWS from _pydevd_bundle import pydevd_constants +from _pydevd_bundle.pydevd_constants import is_true_in_env ExcludeFilter = namedtuple('ExcludeFilter', 'name, exclude, is_path') @@ -101,7 +102,7 @@ def __init__(self): self._use_libraries_filter = False self.require_module = False # True if some exclude filter filters by the module. - self.set_use_libraries_filter(os.getenv('PYDEVD_FILTER_LIBRARIES') is not None) + self.set_use_libraries_filter(is_true_in_env('PYDEVD_FILTER_LIBRARIES')) project_roots = os.getenv('IDE_PROJECT_ROOTS', None) if project_roots is not None: diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame.py index ce2ccfaefa..0ee769b74f 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame.py @@ -6,7 +6,7 @@ from _pydevd_bundle import pydevd_dont_trace from _pydevd_bundle.pydevd_constants import (RETURN_VALUES_DICT, NO_FTRACE, EXCEPTION_TYPE_HANDLED, EXCEPTION_TYPE_USER_UNHANDLED, PYDEVD_IPYTHON_CONTEXT, - USE_SYS_MONITORING) + PYDEVD_USE_SYS_MONITORING) from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace from _pydevd_bundle.pydevd_utils import get_clsname_for_code from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame @@ -64,7 +64,7 @@ def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # IFDEF CYTHON -# cdef is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): +# def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # ELSE def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): # ENDIF @@ -114,8 +114,8 @@ def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_l # ELSE class _TryExceptContainerObj(object): ''' - A dumb container object just to containe the try..except info when needed. Meant to be - persisent among multiple PyDBFrames to the same code object. + A dumb container object just to contain the try..except info when needed. Meant to be + persistent among multiple PyDBFrames to the same code object. ''' try_except_infos = None # ENDIF @@ -134,13 +134,6 @@ class PyDBFrame: ''' # ENDIF - # Note: class (and not instance) attributes. - - # Same thing in the main debugger but only considering the file contents, while the one in the main debugger - # considers the user input (so, the actual result must be a join of both). - filename_to_lines_where_exceptions_are_ignored = {} - filename_to_stat_info = {} - # IFDEF CYTHON # cdef tuple _args # cdef int should_skip @@ -153,10 +146,17 @@ class PyDBFrame: should_skip = -1 # Default value in class (put in instance on set). exc_info = () # Default value in class (put in instance on set). - def __init__(self, args): - # args = main_debugger, abs_path_canonical_path_and_base, base, info, t, frame - # yeap, much faster than putting in self and then getting it from self later on - self._args = args + if PYDEVD_USE_SYS_MONITORING: + + def __init__(self, *args, **kwargs): + raise RuntimeError("Not expected to be used in sys.monitoring.") + + else: + + def __init__(self, args): + # args = py_db, abs_path_canonical_path_and_base, base, info, t, frame + # yeap, much faster than putting in self and then getting it from self later on + self._args = args # ENDIF def set_suspend(self, *args, **kwargs): @@ -173,10 +173,11 @@ def do_wait_suspend(self, *args, **kwargs): def trace_exception(self, frame, event, arg): # ENDIF if event == 'exception': - should_stop, frame = self._should_stop_on_exception(frame, event, arg) + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info if should_stop: - if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): return self.trace_dispatch elif event == 'return': @@ -193,263 +194,12 @@ def trace_exception(self, frame, event, arg): return self.trace_exception - # IFDEF CYTHON - # cdef _should_stop_on_exception(self, frame, str event, arg): - # cdef PyDBAdditionalThreadInfo info; - # cdef bint should_stop; - # cdef bint was_just_raised; - # cdef list check_excs; - # ELSE - def _should_stop_on_exception(self, frame, event, arg): - # ENDIF - - # main_debugger, _filename, info, _thread = self._args - main_debugger = self._args[0] - info = self._args[2] - should_stop = False - - # STATE_SUSPEND = 2 - if info.pydev_state != 2: # and breakpoint is not None: - exception, value, trace = arg - - if trace is not None and hasattr(trace, 'tb_next'): - # on jython trace is None on the first event and it may not have a tb_next. - - should_stop = False - exception_breakpoint = None - try: - if main_debugger.plugin is not None: - result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg) - if result: - should_stop, frame = result - except: - pydev_log.exception() - - if not should_stop: - # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). - if exception == SystemExit and main_debugger.ignore_system_exit_code(value): - pass - - elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): - # These exceptions are control-flow related (they work as a generator - # pause), so, we shouldn't stop on them. - pass - - elif ignore_exception_trace(trace): - pass - - else: - was_just_raised = trace.tb_next is None - - # It was not handled by any plugin, lets check exception breakpoints. - check_excs = [] - - # Note: check user unhandled before regular exceptions. - exc_break_user = main_debugger.get_exception_breakpoint( - exception, main_debugger.break_on_user_uncaught_exceptions) - if exc_break_user is not None: - check_excs.append((exc_break_user, True)) - - exc_break_caught = main_debugger.get_exception_breakpoint( - exception, main_debugger.break_on_caught_exceptions) - if exc_break_caught is not None: - check_excs.append((exc_break_caught, False)) - - for exc_break, is_user_uncaught in check_excs: - # Initially mark that it should stop and then go into exclusions. - should_stop = True - - if main_debugger.exclude_exception_by_filter(exc_break, trace): - pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) - should_stop = False - - elif exc_break.condition is not None and \ - not main_debugger.handle_breakpoint_condition(info, exc_break, frame): - should_stop = False - - elif is_user_uncaught: - # Note: we don't stop here, we just collect the exc_info to use later on... - should_stop = False - if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \ - and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): - # User uncaught means that we're currently in user code but the code - # up the stack is library code. - exc_info = self.exc_info - if not exc_info: - exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) - else: - lines = exc_info[2] - lines.add(frame.f_lineno) - exc_info = (arg, frame.f_lineno, lines) - self.exc_info = exc_info - else: - # I.e.: these are only checked if we're not dealing with user uncaught exceptions. - if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \ - and not was_just_raised and not just_raised(trace.tb_next): - # In this case we never stop if it was just raised, so, to know if it was the first we - # need to check if we're in the 2nd method. - should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception - - elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \ - and not was_just_raised: - should_stop = False # I.e.: we stop only when it was just raised - - elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context: - # Option: Don't break if an exception is caught in the same function from which it is thrown - should_stop = False - - if should_stop: - exception_breakpoint = exc_break - try: - info.pydev_message = exc_break.qname - except: - info.pydev_message = exc_break.qname.encode('utf-8') - break - - if should_stop: - # Always add exception to frame (must remove later after we proceed). - add_exception_to_frame(frame, (exception, value, trace)) - - if exception_breakpoint is not None and exception_breakpoint.expression is not None: - main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame) - - return should_stop, frame - def handle_user_exception(self, frame): exc_info = self.exc_info if exc_info: - return self._handle_exception(frame, 'exception', exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) return False - # IFDEF CYTHON - # cdef _handle_exception(self, frame, str event, arg, str exception_type): - # cdef bint stopped; - # cdef tuple abs_real_path_and_base; - # cdef str absolute_filename; - # cdef str canonical_normalized_filename; - # cdef dict filename_to_lines_where_exceptions_are_ignored; - # cdef dict lines_ignored; - # cdef dict frame_id_to_frame; - # cdef dict merged; - # cdef object trace_obj; - # cdef object main_debugger; - # ELSE - def _handle_exception(self, frame, event, arg, exception_type): - # ENDIF - stopped = False - try: - # print('_handle_exception', frame.f_lineno, frame.f_code.co_name) - - # We have 3 things in arg: exception type, description, traceback object - trace_obj = arg[2] - main_debugger = self._args[0] - - initial_trace_obj = trace_obj - if trace_obj.tb_next is None and trace_obj.tb_frame is frame: - # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). - pass - else: - # Get the trace_obj from where the exception was raised... - while trace_obj.tb_next is not None: - trace_obj = trace_obj.tb_next - - if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception: - for check_trace_obj in (initial_trace_obj, trace_obj): - abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) - absolute_filename = abs_real_path_and_base[0] - canonical_normalized_filename = abs_real_path_and_base[1] - - filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored - - lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - if lines_ignored is None: - lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} - - try: - curr_stat = os.stat(absolute_filename) - curr_stat = (curr_stat.st_size, curr_stat.st_mtime) - except: - curr_stat = None - - last_stat = self.filename_to_stat_info.get(absolute_filename) - if last_stat != curr_stat: - self.filename_to_stat_info[absolute_filename] = curr_stat - lines_ignored.clear() - try: - linecache.checkcache(absolute_filename) - except: - pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) - - from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) - if from_user_input: - merged = {} - merged.update(lines_ignored) - # Override what we have with the related entries that the user entered - merged.update(from_user_input) - else: - merged = lines_ignored - - exc_lineno = check_trace_obj.tb_lineno - - # print ('lines ignored', lines_ignored) - # print ('user input', from_user_input) - # print ('merged', merged, 'curr', exc_lineno) - - if exc_lineno not in merged: # Note: check on merged but update lines_ignored. - try: - line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) - except: - pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) - line = '' - - if IGNORE_EXCEPTION_TAG.match(line) is not None: - lines_ignored[exc_lineno] = 1 - return False - else: - # Put in the cache saying not to ignore - lines_ignored[exc_lineno] = 0 - else: - # Ok, dict has it already cached, so, let's check it... - if merged.get(exc_lineno, 0): - return False - - thread = self._args[3] - - try: - frame_id_to_frame = {} - frame_id_to_frame[id(frame)] = frame - f = trace_obj.tb_frame - while f is not None: - frame_id_to_frame[id(f)] = f - f = f.f_back - f = None - - stopped = True - main_debugger.send_caught_exception_stack(thread, arg, id(frame)) - try: - self.set_suspend(thread, CMD_STEP_CAUGHT_EXCEPTION) - self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type) - finally: - main_debugger.send_caught_exception_stack_proceeded(thread) - except: - pydev_log.exception() - - main_debugger.set_trace_for_frame_and_parents(thread, frame) - finally: - # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. - remove_exception_from_frame(frame) - # Clear some local variables... - frame = None - trace_obj = None - initial_trace_obj = None - check_trace_obj = None - f = None - frame_id_to_frame = None - main_debugger = None - thread = None - - return stopped - # IFDEF CYTHON # cdef get_func_name(self, frame): # cdef str func_name @@ -489,9 +239,9 @@ def _show_return_values(self, frame, arg): f_locals_back = None # IFDEF CYTHON - # cdef _remove_return_values(self, main_debugger, frame): + # cdef _remove_return_values(self, py_db, frame): # ELSE - def _remove_return_values(self, main_debugger, frame): + def _remove_return_values(self, py_db, frame): # ENDIF try: try: @@ -508,17 +258,17 @@ def _remove_return_values(self, main_debugger, frame): f_locals_back = None # IFDEF CYTHON - # cdef _get_unfiltered_back_frame(self, main_debugger, frame): + # cdef _get_unfiltered_back_frame(self, py_db, frame): # ELSE - def _get_unfiltered_back_frame(self, main_debugger, frame): + def _get_unfiltered_back_frame(self, py_db, frame): # ENDIF f = frame.f_back while f is not None: - if not main_debugger.is_files_filter_enabled: + if not py_db.is_files_filter_enabled: return f else: - if main_debugger.apply_files_filter(f, f.f_code.co_filename, False): + if py_db.apply_files_filter(f, f.f_code.co_filename, False): f = f.f_back else: @@ -594,7 +344,7 @@ def trace_dispatch(self, frame, event, arg): try: # DEBUG = '_debugger_case_generator.py' in frame.f_code.co_filename - main_debugger, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) info.is_tracing += 1 @@ -604,14 +354,14 @@ def trace_dispatch(self, frame, event, arg): line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None line_cache_key = (frame_cache_key, line) - if main_debugger.pydb_disposed: + if py_db.pydb_disposed: return None if event == 'call' else NO_FTRACE - plugin_manager = main_debugger.plugin + plugin_manager = py_db.plugin has_exception_breakpoints = ( - main_debugger.break_on_caught_exceptions - or main_debugger.break_on_user_uncaught_exceptions - or main_debugger.has_plugin_exception_breaks) + py_db.break_on_caught_exceptions + or py_db.break_on_user_uncaught_exceptions + or py_db.has_plugin_exception_breaks) stop_frame = info.pydev_step_stop step_cmd = info.pydev_step_cmd @@ -641,7 +391,7 @@ def trace_dispatch(self, frame, event, arg): # it doesn't give any clear indication when a coroutine or generator is # finishing or just pausing. return_lines = set() - for x in main_debugger.collect_return_info(frame.f_code): + for x in py_db.collect_return_info(frame.f_code): # Note: cython does not support closures in cpdefs (so we can't use # a list comprehension). return_lines.add(x.return_line) @@ -674,7 +424,7 @@ def trace_dispatch(self, frame, event, arg): # frame in this case). if stop_frame is frame and not info.pydev_use_scoped_step_frame: if step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE, CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE): - f = self._get_unfiltered_back_frame(main_debugger, frame) + f = self._get_unfiltered_back_frame(py_db, frame) if f is not None: info.pydev_step_cmd = CMD_STEP_INTO_COROUTINE info.pydev_step_stop = f @@ -689,7 +439,7 @@ def trace_dispatch(self, frame, event, arg): elif step_cmd == CMD_STEP_INTO_COROUTINE: # We're exiting this one, so, mark the new coroutine context. - f = self._get_unfiltered_back_frame(main_debugger, frame) + f = self._get_unfiltered_back_frame(py_db, frame) if f is not None: info.pydev_step_stop = f else: @@ -699,9 +449,10 @@ def trace_dispatch(self, frame, event, arg): elif event == 'exception': breakpoints_for_file = None if has_exception_breakpoints: - should_stop, frame = self._should_stop_on_exception(frame, event, arg) + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info if should_stop: - if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): return self.trace_dispatch return self.trace_dispatch @@ -750,15 +501,16 @@ def trace_dispatch(self, frame, event, arg): is_return = False is_exception_event = False if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. - function_breakpoint_on_call_event = main_debugger.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) elif event == 'exception': is_exception_event = True breakpoints_for_file = None if has_exception_breakpoints: - should_stop, frame = self._should_stop_on_exception(frame, event, arg) + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info if should_stop: - if self._handle_exception(frame, event, arg, EXCEPTION_TYPE_HANDLED): + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): return self.trace_dispatch is_line = False is_return = False @@ -769,7 +521,7 @@ def trace_dispatch(self, frame, event, arg): return self.trace_dispatch if not is_exception_event: - breakpoints_for_file = main_debugger.breakpoints.get(abs_path_canonical_path_and_base[1]) + breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) can_skip = False @@ -793,8 +545,8 @@ def trace_dispatch(self, frame, event, arg): elif step_cmd == CMD_STEP_INTO_MY_CODE: if ( - main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) - and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) + py_db.apply_files_filter(frame, frame.f_code.co_filename, True) + and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)) ): can_skip = True @@ -809,10 +561,10 @@ def trace_dispatch(self, frame, event, arg): if can_skip: if plugin_manager is not None and ( - main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks): - can_skip = plugin_manager.can_skip(main_debugger, frame) + py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + can_skip = plugin_manager.can_skip(py_db, frame) - if can_skip and main_debugger.show_return_values and info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and self._is_same_frame(stop_frame, frame.f_back): + if can_skip and py_db.show_return_values and info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and self._is_same_frame(stop_frame, frame.f_back): # trace function for showing return values after step over can_skip = False @@ -911,21 +663,22 @@ def trace_dispatch(self, frame, event, arg): new_frame = frame stop = True - elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: - result = plugin_manager.get_breakpoint(main_debugger, frame, event, self._args) + elif plugin_manager is not None and py_db.has_plugin_line_breaks: + result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) if result: - stop_on_plugin_breakpoint, breakpoint, new_frame, bp_type = result + stop_on_plugin_breakpoint = True + breakpoint, new_frame, bp_type = result if breakpoint: # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint # lets do the conditional stuff here if breakpoint.expression is not None: - main_debugger.handle_breakpoint_expression(breakpoint, info, new_frame) + py_db.handle_breakpoint_expression(breakpoint, info, new_frame) if stop or stop_on_plugin_breakpoint: eval_result = False if breakpoint.has_condition: - eval_result = main_debugger.handle_breakpoint_condition(info, breakpoint, new_frame) + eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) if not eval_result: stop = False stop_on_plugin_breakpoint = False @@ -950,10 +703,10 @@ def trace_dispatch(self, frame, event, arg): stop_on_plugin_breakpoint = False if info.pydev_message is not None and len(info.pydev_message) > 0: - cmd = main_debugger.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') - main_debugger.writer.add_command(cmd) + cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, '1') + py_db.writer.add_command(cmd) - if main_debugger.show_return_values: + if py_db.show_return_values: if is_return and ( (info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE, CMD_SMART_STEP_INTO) and (self._is_same_frame(stop_frame, frame.f_back))) or (info.pydev_step_cmd in (CMD_STEP_RETURN, CMD_STEP_RETURN_MY_CODE) and (self._is_same_frame(stop_frame, frame))) or @@ -961,16 +714,16 @@ def trace_dispatch(self, frame, event, arg): ( info.pydev_step_cmd == CMD_STEP_INTO_MY_CODE and frame.f_back is not None - and not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) ) ): self._show_return_values(frame, arg) - elif main_debugger.remove_return_values_flag: + elif py_db.remove_return_values_flag: try: - self._remove_return_values(main_debugger, frame) + self._remove_return_values(py_db, frame) finally: - main_debugger.remove_return_values_flag = False + py_db.remove_return_values_flag = False if stop: self.set_suspend( @@ -980,7 +733,7 @@ def trace_dispatch(self, frame, event, arg): ) elif stop_on_plugin_breakpoint and plugin_manager is not None: - result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) + result = plugin_manager.suspend(py_db, thread, frame, bp_type) if result: frame = result @@ -997,9 +750,9 @@ def trace_dispatch(self, frame, event, arg): # Unfortunately Python itself stops the tracing when it originates from # the tracing function, so, we can't do much about it (just let the user know). exc = sys.exc_info()[0] - cmd = main_debugger.cmd_factory.make_console_message( + cmd = py_db.cmd_factory.make_console_message( '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - main_debugger.writer.add_command(cmd) + py_db.writer.add_command(cmd) if not issubclass(exc, (KeyboardInterrupt, SystemExit)): pydev_log.exception() @@ -1029,14 +782,14 @@ def trace_dispatch(self, frame, event, arg): force_check_project_scope = step_cmd == CMD_STEP_INTO_MY_CODE if is_line: if not info.pydev_use_scoped_step_frame: - if force_check_project_scope or main_debugger.is_files_filter_enabled: - stop = not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) else: stop = True else: - if force_check_project_scope or main_debugger.is_files_filter_enabled: + if force_check_project_scope or py_db.is_files_filter_enabled: # Make sure we check the filtering inside ipython calls too... - if not not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): return None if is_call else NO_FTRACE # We can only stop inside the ipython call. @@ -1063,11 +816,11 @@ def trace_dispatch(self, frame, event, arg): return None if is_call else NO_FTRACE elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: - if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: stop = False else: - if force_check_project_scope or main_debugger.is_files_filter_enabled: - stop = not main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope) if stop: # Prevent stopping in a return to the same location we were initially # (i.e.: double-stop at the same place due to some filtering). @@ -1090,7 +843,7 @@ def trace_dispatch(self, frame, event, arg): stop = False if plugin_manager is not None: - result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) + result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) if result: stop, plugin_stop = result @@ -1103,7 +856,7 @@ def trace_dispatch(self, frame, event, arg): # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. if plugin_manager is not None: - result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) + result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) if result: stop, plugin_stop = result @@ -1187,11 +940,11 @@ def trace_dispatch(self, frame, event, arg): if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): f_code = getattr(frame.f_back, 'f_code', None) if f_code is not None: - if main_debugger.get_file_type(frame.f_back) == main_debugger.PYDEV_FILE: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: stop = False if plugin_stop: - stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) + plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) elif stop: if is_line: self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) @@ -1218,7 +971,7 @@ def trace_dispatch(self, frame, event, arg): # other parent) has to be traced and it's not currently, we wouldn't stop where # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). # Related test: _debugger_case17a.py - main_debugger.set_trace_for_frame_and_parents(thread, back) + py_db.set_trace_for_frame_and_parents(thread.ident, back) return None if is_call else NO_FTRACE if back is not None: @@ -1233,7 +986,7 @@ def trace_dispatch(self, frame, event, arg): info.pydev_state = STATE_RUN # if we are quitting, let's stop the tracing - if main_debugger.quitting: + if py_db.quitting: return None if is_call else NO_FTRACE return self.trace_dispatch @@ -1241,9 +994,9 @@ def trace_dispatch(self, frame, event, arg): # Unfortunately Python itself stops the tracing when it originates from # the tracing function, so, we can't do much about it (just let the user know). exc = sys.exc_info()[0] - cmd = main_debugger.cmd_factory.make_console_message( + cmd = py_db.cmd_factory.make_console_message( '%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n' % (exc, thread,)) - main_debugger.writer.add_command(cmd) + py_db.writer.add_command(cmd) if not issubclass(exc, (KeyboardInterrupt, SystemExit)): pydev_log.exception() raise @@ -1254,9 +1007,250 @@ def trace_dispatch(self, frame, event, arg): # end trace_dispatch -if USE_SYS_MONITORING: +# IFDEF CYTHON +# def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info): +# cdef bint should_stop; +# cdef bint was_just_raised; +# cdef list check_excs; +# ELSE +def should_stop_on_exception(py_db, info, frame, thread, arg, prev_user_uncaught_exc_info): +# ENDIF - class PyDBFrame: + should_stop = False + maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info - def __init__(self, *args, **kwargs): - raise RuntimeError("Not expected to be used in sys.monitoring.") + # STATE_SUSPEND = 2 + if info.pydev_state != 2: # and breakpoint is not None: + exception, value, trace = arg + + if trace is not None and hasattr(trace, 'tb_next'): + # on jython trace is None on the first event and it may not have a tb_next. + + should_stop = False + exception_breakpoint = None + try: + if py_db.plugin is not None: + result = py_db.plugin.exception_break(py_db, frame, thread, arg) + if result: + should_stop, frame = result + except: + pydev_log.exception() + + if not should_stop: + # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + if exception == SystemExit and py_db.ignore_system_exit_code(value): + pass + + elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): + # These exceptions are control-flow related (they work as a generator + # pause), so, we shouldn't stop on them. + pass + + elif ignore_exception_trace(trace): + pass + + else: + was_just_raised = trace.tb_next is None + + # It was not handled by any plugin, lets check exception breakpoints. + check_excs = [] + + # Note: check user unhandled before regular exceptions. + exc_break_user = py_db.get_exception_breakpoint( + exception, py_db.break_on_user_uncaught_exceptions) + if exc_break_user is not None: + check_excs.append((exc_break_user, True)) + + exc_break_caught = py_db.get_exception_breakpoint( + exception, py_db.break_on_caught_exceptions) + if exc_break_caught is not None: + check_excs.append((exc_break_caught, False)) + + for exc_break, is_user_uncaught in check_excs: + # Initially mark that it should stop and then go into exclusions. + should_stop = True + + if py_db.exclude_exception_by_filter(exc_break, trace): + pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)) + should_stop = False + + elif exc_break.condition is not None and \ + not py_db.handle_breakpoint_condition(info, exc_break, frame): + should_stop = False + + elif is_user_uncaught: + # Note: we don't stop here, we just collect the exc_info to use later on... + should_stop = False + if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) \ + and (frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)): + # User uncaught means that we're currently in user code but the code + # up the stack is library code. + exc_info = prev_user_uncaught_exc_info + if not exc_info: + exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + else: + lines = exc_info[2] + lines.add(frame.f_lineno) + exc_info = (arg, frame.f_lineno, lines) + maybe_user_uncaught_exc_info = exc_info + else: + # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + if exc_break.notify_on_first_raise_only and py_db.skip_on_exceptions_thrown_in_same_context \ + and not was_just_raised and not just_raised(trace.tb_next): + # In this case we never stop if it was just raised, so, to know if it was the first we + # need to check if we're in the 2nd method. + should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + + elif exc_break.notify_on_first_raise_only and not py_db.skip_on_exceptions_thrown_in_same_context \ + and not was_just_raised: + should_stop = False # I.e.: we stop only when it was just raised + + elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + # Option: Don't break if an exception is caught in the same function from which it is thrown + should_stop = False + + if should_stop: + exception_breakpoint = exc_break + try: + info.pydev_message = exc_break.qname + except: + info.pydev_message = exc_break.qname.encode('utf-8') + break + + if should_stop: + # Always add exception to frame (must remove later after we proceed). + add_exception_to_frame(frame, (exception, value, trace)) + + if exception_breakpoint is not None and exception_breakpoint.expression is not None: + py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + + return should_stop, frame, maybe_user_uncaught_exc_info + + +# Same thing in the main debugger but only considering the file contents, while the one in the main debugger +# considers the user input (so, the actual result must be a join of both). +filename_to_lines_where_exceptions_are_ignored: dict = {} +filename_to_stat_info: dict = {} + + +# IFDEF CYTHON +# def handle_exception(py_db, thread, frame, arg, str exception_type): +# cdef bint stopped; +# cdef tuple abs_real_path_and_base; +# cdef str absolute_filename; +# cdef str canonical_normalized_filename; +# cdef dict lines_ignored; +# cdef dict frame_id_to_frame; +# cdef dict merged; +# cdef object trace_obj; +# ELSE +def handle_exception(py_db, thread, frame, arg, exception_type): +# ENDIF + stopped = False + try: + # print('handle_exception', frame.f_lineno, frame.f_code.co_name) + + # We have 3 things in arg: exception type, description, traceback object + trace_obj = arg[2] + + initial_trace_obj = trace_obj + if trace_obj.tb_next is None and trace_obj.tb_frame is frame: + # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + pass + else: + # Get the trace_obj from where the exception was raised... + while trace_obj.tb_next is not None: + trace_obj = trace_obj.tb_next + + if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + for check_trace_obj in (initial_trace_obj, trace_obj): + abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + absolute_filename = abs_real_path_and_base[0] + canonical_normalized_filename = abs_real_path_and_base[1] + + lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if lines_ignored is None: + lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + + try: + curr_stat = os.stat(absolute_filename) + curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + except: + curr_stat = None + + last_stat = filename_to_stat_info.get(absolute_filename) + if last_stat != curr_stat: + filename_to_stat_info[absolute_filename] = curr_stat + lines_ignored.clear() + try: + linecache.checkcache(absolute_filename) + except: + pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename) + + from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if from_user_input: + merged = {} + merged.update(lines_ignored) + # Override what we have with the related entries that the user entered + merged.update(from_user_input) + else: + merged = lines_ignored + + exc_lineno = check_trace_obj.tb_lineno + + # print ('lines ignored', lines_ignored) + # print ('user input', from_user_input) + # print ('merged', merged, 'curr', exc_lineno) + + if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + try: + line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + except: + pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno) + line = '' + + if IGNORE_EXCEPTION_TAG.match(line) is not None: + lines_ignored[exc_lineno] = 1 + return False + else: + # Put in the cache saying not to ignore + lines_ignored[exc_lineno] = 0 + else: + # Ok, dict has it already cached, so, let's check it... + if merged.get(exc_lineno, 0): + return False + + try: + frame_id_to_frame = {} + frame_id_to_frame[id(frame)] = frame + f = trace_obj.tb_frame + while f is not None: + frame_id_to_frame[id(f)] = f + f = f.f_back + f = None + + stopped = True + py_db.send_caught_exception_stack(thread, arg, id(frame)) + try: + py_db.set_suspend(thread, CMD_STEP_CAUGHT_EXCEPTION) + py_db.do_wait_suspend(thread, frame, 'exception', arg, exception_type=exception_type) + finally: + py_db.send_caught_exception_stack_proceeded(thread) + except: + pydev_log.exception() + + py_db.set_trace_for_frame_and_parents(thread.ident, frame) + finally: + # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + remove_exception_from_frame(frame) + # Clear some local variables... + frame = None + trace_obj = None + initial_trace_obj = None + check_trace_obj = None + f = None + frame_id_to_frame = None + py_db = None + thread = None + + return stopped diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame_utils.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame_utils.py index f079757a6c..d118100661 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame_utils.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_frame_utils.py @@ -34,6 +34,9 @@ def __init__(self, name, filename): self.co_firstlineno = 1 self.co_flags = 0 + def co_lines(self): + return () + def add_exception_to_frame(frame, exception_info): frame.f_locals['__exception__'] = exception_info diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_net_command_factory_xml.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_net_command_factory_xml.py index 7df8105957..5d27b200e4 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_net_command_factory_xml.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_net_command_factory_xml.py @@ -236,7 +236,7 @@ def make_thread_suspend_str( frames_list, stop_reason=None, message=None, - suspend_type="trace", + trace_suspend_type="trace", ): """ :return tuple(str,str): @@ -273,8 +273,8 @@ def make_thread_suspend_str( append(' stop_reason="%s"' % (stop_reason,)) if message is not None: append(' message="%s"' % (message,)) - if suspend_type is not None: - append(' suspend_type="%s"' % (suspend_type,)) + if trace_suspend_type is not None: + append(' suspend_type="%s"' % (trace_suspend_type,)) append('>') thread_stack_str = self.make_thread_stack_str(py_db, frames_list) append(thread_stack_str) @@ -282,10 +282,10 @@ def make_thread_suspend_str( return ''.join(cmd_text_list), thread_stack_str - def make_thread_suspend_message(self, py_db, thread_id, frames_list, stop_reason, message, suspend_type): + def make_thread_suspend_message(self, py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type): try: thread_suspend_str, thread_stack_str = self.make_thread_suspend_str( - py_db, thread_id, frames_list, stop_reason, message, suspend_type) + py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type) cmd = NetCommand(CMD_THREAD_SUSPEND, 0, thread_suspend_str) cmd.thread_stack_str = thread_stack_str cmd.thread_suspend_str = thread_suspend_str diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_plugin_utils.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_plugin_utils.py index 0cd0d76152..972b8a3443 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_plugin_utils.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_plugin_utils.py @@ -1,8 +1,7 @@ import types from _pydev_bundle import pydev_log -from _pydevd_bundle import pydevd_trace_api - +from typing import Tuple, Literal try: from pydevd_plugins import django_debug except: @@ -15,6 +14,7 @@ jinja2_debug = None pydev_log.debug('Unable to load jinja2_debug plugin') + def load_plugins(): plugins = [] if django_debug is not None: @@ -34,58 +34,176 @@ def bind_func_to_method(func, obj, method_name): class PluginManager(object): + EMPTY_SENTINEL = object() + def __init__(self, main_debugger): self.plugins = load_plugins() + + # When some breakpoint is added for a given plugin it becomes active. self.active_plugins = [] + self.main_debugger = main_debugger - self.rebind_methods() def add_breakpoint(self, func_name, *args, **kwargs): - # add breakpoint for plugin and remember which plugin to use in tracing + # add breakpoint for plugin for plugin in self.plugins: if hasattr(plugin, func_name): func = getattr(plugin, func_name) - result = func(self, *args, **kwargs) + result = func(*args, **kwargs) if result: self.activate(plugin) - return result return None def activate(self, plugin): if plugin not in self.active_plugins: self.active_plugins.append(plugin) - self.rebind_methods() - def rebind_methods(self): - if len(self.active_plugins) == 0: - self.bind_functions(pydevd_trace_api, getattr, pydevd_trace_api) - elif len(self.active_plugins) == 1: - self.bind_functions(pydevd_trace_api, getattr, self.active_plugins[0]) - else: - self.bind_functions(pydevd_trace_api, create_dispatch, self.active_plugins) - - def bind_functions(self, interface, function_factory, arg): - for name in dir(interface): - func = function_factory(arg, name) - if type(func) == types.FunctionType: - bind_func_to_method(func, self, name) + # These are not a part of the API, rather, `add_breakpoint` should be used with `add_line_breakpoint` or `add_exception_breakpoint` + # which will call it for all plugins and then if it's valid it'll be activated. + # + # def add_line_breakpoint(self, py_db, type, canonical_normalized_filename, breakpoint_id, line, condition, expression, func_name, hit_condition=None, is_logpoint=False, add_breakpoint_result=None, on_changed_breakpoint_state=None): + # def add_exception_breakpoint(plugin, py_db, type, exception): + + def after_breakpoints_consolidated(self, py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints): + for plugin in self.active_plugins: + plugin.after_breakpoints_consolidated(py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) + + def remove_exception_breakpoint(self, py_db, exception_type, exception): + ''' + :param exception_type: 'django', 'jinja2' (can be extended) + ''' + for plugin in self.active_plugins: + ret = plugin.remove_exception_breakpoint(py_db, exception_type, exception) + if ret: + return ret + return None -def create_dispatch(obj, name): - def dispatch(self, *args, **kwargs): - result = None - for p in self.active_plugins: - r = getattr(p, name)(self, *args, **kwargs) - if not result: - result = r - return result - return dispatch + def remove_all_exception_breakpoints(self, py_db): + for plugin in self.active_plugins: + plugin.remove_all_exception_breakpoints(py_db) + + def get_breakpoints(self, py_db, breakpoint_type): + ''' + :param breakpoint_type: 'django-line', 'jinja2-line' + ''' + for plugin in self.active_plugins: + ret = plugin.get_breakpoints(py_db, breakpoint_type) + if ret: + return ret + + def can_skip(self, py_db, frame): + for plugin in self.active_plugins: + if not plugin.can_skip(py_db, frame): + return False + return True + + def required_events_breakpoint(self) -> Tuple[Literal['line', 'call'], ...]: + ret = () + for plugin in self.active_plugins: + new = plugin.required_events_breakpoint() + if new: + ret += new + + return ret + + def required_events_stepping(self) -> Tuple[Literal['line', 'call', 'return'], ...]: + ret = () + for plugin in self.active_plugins: + new = plugin.required_events_stepping() + if new: + ret += new + + return ret + + def is_tracked_frame(self, frame) -> bool: + for plugin in self.active_plugins: + if plugin.is_tracked_frame(frame): + return True + return False + + def has_exception_breaks(self, py_db) -> bool: + for plugin in self.active_plugins: + if plugin.has_exception_breaks(py_db): + return True + return False + + def has_line_breaks(self, py_db) -> bool: + for plugin in self.active_plugins: + if plugin.has_line_breaks(py_db): + return True + return False + + def cmd_step_into(self, py_db, frame, event, info, thread, stop_info, stop: bool): + ''' + :param stop_info: in/out information. If it should stop then it'll be + filled by the plugin. + :param stop: whether the stop has already been flagged for this frame. + :returns: + tuple(stop, plugin_stop) + ''' + plugin_stop = False + for plugin in self.active_plugins: + stop, plugin_stop = plugin.cmd_step_into(py_db, frame, event, info, thread, stop_info, stop) + if plugin_stop: + return stop, plugin_stop + return stop, plugin_stop + + def cmd_step_over(self, py_db, frame, event, info, thread, stop_info, stop): + plugin_stop = False + for plugin in self.active_plugins: + stop, plugin_stop = plugin.cmd_step_over(py_db, frame, event, info, thread, stop_info, stop) + if plugin_stop: + return stop, plugin_stop + return stop, plugin_stop + + def stop(self, py_db, frame, event, thread, stop_info, arg, step_cmd): + ''' + The way this works is that the `cmd_step_into` or `cmd_step_over` + is called which then fills the `stop_info` and then this method + is called to do the actual stop. + ''' + for plugin in self.active_plugins: + stopped = plugin.stop(py_db, frame, event, thread, stop_info, arg, step_cmd) + if stopped: + return stopped + return False + + def get_breakpoint(self, py_db, frame, event, info): + for plugin in self.active_plugins: + ret = plugin.get_breakpoint(py_db, frame, event, info) + if ret: + return ret + return None + def suspend(self, py_db, thread, frame, bp_type): + ''' + :param bp_type: 'django' or 'jinja2' + :return: + The frame for the suspend or None if it should not be suspended. + ''' + for plugin in self.active_plugins: + ret = plugin.suspend(py_db, thread, frame, bp_type) + if ret is not None: + return ret + return None + def exception_break(self, py_db, frame, thread, arg): + for plugin in self.active_plugins: + ret = plugin.exception_break(py_db, frame, thread, arg) + if ret is not None: + return ret + return None + def change_variable(self, frame, attr, expression): + for plugin in self.active_plugins: + ret = plugin.change_variable(frame, attr, expression, self.EMPTY_SENTINEL) + if ret is not self.EMPTY_SENTINEL: + return ret + return self.EMPTY_SENTINEL diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_suspended_frames.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_suspended_frames.py index 34c404d0e6..b4016d534d 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_suspended_frames.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_suspended_frames.py @@ -433,13 +433,13 @@ def find_frame(self, thread_id, frame_id): with self._lock: return self._frame_id_to_frame.get(frame_id) - def create_thread_suspend_command(self, thread_id, stop_reason, message, suspend_type): + def create_thread_suspend_command(self, thread_id, stop_reason, message, trace_suspend_type): with self._lock: # First one is topmost frame suspended. frames_list = self._thread_id_to_frames_list[thread_id] cmd = self.py_db.cmd_factory.make_thread_suspend_message( - self.py_db, thread_id, frames_list, stop_reason, message, suspend_type) + self.py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type) frames_list = None return cmd diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_thread_lifecycle.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_thread_lifecycle.py index 5672163a75..a4129843d5 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_thread_lifecycle.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_thread_lifecycle.py @@ -2,7 +2,7 @@ from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info from _pydevd_bundle.pydevd_comm_constants import CMD_STEP_INTO, CMD_THREAD_SUSPEND from _pydevd_bundle.pydevd_constants import PYTHON_SUSPEND, STATE_SUSPEND, get_thread_id, STATE_RUN, \ - USE_SYS_MONITORING + PYDEVD_USE_SYS_MONITORING from _pydev_bundle._pydev_saved_modules import threading from _pydev_bundle import pydev_log import sys @@ -26,7 +26,7 @@ def pydevd_find_thread_by_id(thread_id): return None -def mark_thread_suspended(thread, stop_reason, original_step_cmd=-1): +def mark_thread_suspended(thread, stop_reason: int, original_step_cmd: int=-1): info = set_additional_thread_info(thread) info.suspend_type = PYTHON_SUSPEND if original_step_cmd != -1: @@ -80,6 +80,9 @@ def suspend_all_threads(py_db, except_thread): Suspend all except the one passed as a parameter. :param except_thread: ''' + if PYDEVD_USE_SYS_MONITORING: + pydevd_sys_monitoring.update_monitor_events(suspend_requested=True) + pydev_log.info('Suspending all threads except: %s', except_thread) all_threads = pydevd_utils.get_non_pydevd_threads() for t in all_threads: @@ -94,10 +97,10 @@ def suspend_all_threads(py_db, except_thread): # Reset the tracing as in this case as it could've set scopes to be untraced. if frame is not None: try: - py_db.set_trace_for_frame_and_parents(t, frame) + py_db.set_trace_for_frame_and_parents(t.ident, frame) finally: frame = None - if USE_SYS_MONITORING: + if PYDEVD_USE_SYS_MONITORING: # After suspending the frames we need the monitoring to be reset. pydevd_sys_monitoring.restart_events() diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_api.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_api.py deleted file mode 100644 index d37e969aa6..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_api.py +++ /dev/null @@ -1,62 +0,0 @@ -def add_line_breakpoint(plugin, pydb, type, canonical_normalized_filename, breakpoint_id, line, condition, expression, func_name, hit_condition=None, is_logpoint=False, add_breakpoint_result=None, on_changed_breakpoint_state=None): - return None - - -def after_breakpoints_consolidated(py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints): - return None - - -def add_exception_breakpoint(plugin, pydb, type, exception): - return False - - -def remove_exception_breakpoint(plugin, pydb, type, exception): - return False - - -def remove_all_exception_breakpoints(plugin, pydb): - return False - - -def get_breakpoints(plugin, pydb): - return None - - -def can_skip(plugin, pydb, frame): - return True - - -def has_exception_breaks(plugin): - return False - - -def has_line_breaks(plugin): - return False - - -def cmd_step_into(plugin, pydb, frame, event, args, stop_info, stop): - return False - - -def cmd_step_over(plugin, pydb, frame, event, args, stop_info, stop): - return False - - -def stop(plugin, pydb, frame, event, args, stop_info, arg, step_cmd): - return False - - -def get_breakpoint(plugin, pydb, frame, event, args): - return None - - -def suspend(plugin, pydb, thread, frame): - return None - - -def exception_break(plugin, pydb, pydb_frame, frame, args, arg): - return None - - -def change_variable(plugin, frame, attr, expression): - return False diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch.py index 40a683770f..f6291bd23f 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch.py @@ -34,16 +34,19 @@ def delete_old_compiled_extensions(): if USE_CYTHON_FLAG in ENV_TRUE_LOWER_VALUES: # We must import the cython version if forcing cython from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func + from _pydevd_bundle.pydevd_cython_wrapper import should_stop_on_exception, handle_exception, is_unhandled_exception USING_CYTHON = True elif USE_CYTHON_FLAG in ENV_FALSE_LOWER_VALUES: # Use the regular version if not forcing cython from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func # @UnusedImport + from .pydevd_frame import should_stop_on_exception, handle_exception, is_unhandled_exception else: # Regular: use fallback if not found and give message to user try: from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func + from _pydevd_bundle.pydevd_cython_wrapper import should_stop_on_exception, handle_exception, is_unhandled_exception # This version number is always available from _pydevd_bundle.pydevd_additional_thread_info_regular import version as regular_version @@ -58,5 +61,6 @@ def delete_old_compiled_extensions(): except ImportError: from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func # @UnusedImport + from .pydevd_frame import should_stop_on_exception, handle_exception, is_unhandled_exception pydev_log.show_compile_cython_command_line() diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch_regular.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch_regular.py index de20787cc2..0f2760de5a 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch_regular.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_trace_dispatch_regular.py @@ -2,7 +2,7 @@ from _pydev_bundle.pydev_log import exception as pydev_log_exception from _pydev_bundle._pydev_saved_modules import threading from _pydevd_bundle.pydevd_constants import (get_current_thread_id, NO_FTRACE, - USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock, USE_SYS_MONITORING) + USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, ForkSafeLock, PYDEVD_USE_SYS_MONITORING) from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER # IFDEF CYTHON @@ -489,7 +489,7 @@ def __call__(self, frame, event, arg): ThreadTracer.__call__ = __call__ -if USE_SYS_MONITORING: +if PYDEVD_USE_SYS_MONITORING: def fix_top_level_trace_and_get_trace_func(*args, **kwargs): raise RuntimeError('Not used in sys.monitoring mode.') diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_vars.py b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_vars.py index cdbe3085f9..58d87c2d45 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_vars.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_vars.py @@ -607,7 +607,7 @@ def change_attr_expression(frame, attr, expression, dbg, value=SENTINEL_VALUE): if dbg.plugin and value is SENTINEL_VALUE: result = dbg.plugin.change_variable(frame, attr, expression) - if result: + if result is not dbg.plugin.EMPTY_SENTINEL: return result if attr[:7] == "Globals": diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/pydevd_frame_evaluator.c b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/pydevd_frame_evaluator.c index 1b4b459e1c..745a59a840 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/pydevd_frame_evaluator.c +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/pydevd_frame_evaluator.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.3 */ +/* Generated by Cython 3.0.6 */ /* BEGIN: Cython Metadata { @@ -42,15 +42,15 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else -#if CYTHON_LIMITED_API +#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_3" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_6" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030003F0 +#define CYTHON_HEX_VERSION 0x030006F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -264,7 +264,7 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif -#elif defined(PY_NOGIL) +#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 @@ -593,8 +593,8 @@ END: Cython Metadata */ PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; // borrowed - #endif PyObject *py_minor_version = NULL; + #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); @@ -604,6 +604,7 @@ END: Cython Metadata */ if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; @@ -624,7 +625,6 @@ END: Cython Metadata */ Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); - Py_XDECREF(py_minor_version); if (type) { PyErr_Restore(type, value, traceback); } @@ -819,6 +819,8 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 @@ -894,7 +896,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { } #endif #endif -#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() @@ -906,7 +908,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); @@ -950,7 +952,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ - PyTypeObject *type = Py_TYPE(obj);\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ @@ -1094,6 +1096,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif +#if PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type @@ -1485,9 +1496,9 @@ static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { - "_pydevd_frame_eval/pydevd_frame_evaluator.pyx", + "_pydevd_frame_eval\\\\pydevd_frame_evaluator.pyx", "", - "_pydevd_bundle/pydevd_cython.pxd", + "_pydevd_bundle\\\\pydevd_cython.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ @@ -1826,7 +1837,11 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg // no-op, __Pyx_Arg_FASTCALL is direct and this needs #define __Pyx_Arg_XDECREF_FASTCALL(arg) // no-op - arg was returned from array #else @@ -2187,7 +2202,11 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif /* IncludeStructmemberH.proto */ #include @@ -2236,22 +2255,22 @@ static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_3 -#define __PYX_HAVE_RT_ImportType_proto_3_0_3 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_6 +#define __PYX_HAVE_RT_ImportType_proto_3_0_6 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_3(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_3(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_3 { - __Pyx_ImportType_CheckSize_Error_3_0_3 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_3 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_3 = 2 +enum __Pyx_ImportType_CheckSize_3_0_6 { + __Pyx_ImportType_CheckSize_Error_3_0_6 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_6 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_6 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_3 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size); #endif /* ImportDottedModule.proto */ @@ -2476,7 +2495,7 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ -static unsigned long __Pyx_get_runtime_version(); +static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ @@ -19669,7 +19688,7 @@ static int __Pyx_modinit_type_import_code(void) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule("_pydevd_bundle.pydevd_cython"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pydevd_bundle.pydevd_cython", "PyDBAdditionalThreadInfo", sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = __Pyx_ImportType_3_0_6(__pyx_t_1, "_pydevd_bundle.pydevd_cython", "PyDBAdditionalThreadInfo", sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -19897,10 +19916,8 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_pydevd_frame_evaluator(PyObject *_ CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_b); - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_cython_runtime); + __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -20773,14 +20790,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject #endif /* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } +#endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { @@ -20792,6 +20815,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; +#endif } /* GetBuiltinName */ @@ -21013,6 +21037,24 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO } return NULL; // not found (no exception set) } +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; i= 0x030500A1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { @@ -21129,9 +21171,15 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && @@ -21208,8 +21256,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -21228,8 +21281,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -21294,7 +21352,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL - #if Py_VERSION_HEX < 0x03090000 + #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); @@ -21718,6 +21776,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, } /* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -21727,9 +21786,14 @@ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { Py_INCREF(d); return d; } +#endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; -#if CYTHON_USE_TYPE_SLOTS +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS if (likely(PyString_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { @@ -21737,9 +21801,10 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject } return r; } -#endif + #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif } /* PyObjectCallNoArg */ @@ -22462,7 +22527,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } } #else - if (is_list || PySequence_Check(o)) { + if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif @@ -22928,6 +22993,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { } /* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { @@ -22944,6 +23010,7 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { return 1; } } +#endif /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS @@ -23063,38 +23130,38 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs #endif return -1; } -#if !CYTHON_USE_TYPE_SLOTS - if (dictoffset == 0) { - PyErr_Format(PyExc_TypeError, - "extension type '%s.200s': " - "unable to validate whether bases have a __dict__ " - "when CYTHON_USE_TYPE_SLOTS is off " - "(likely because you are building in the limited API). " - "Therefore, all extension types with multiple bases " - "must add 'cdef dict __dict__' in this compilation mode", - type_name); -#if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); -#endif - return -1; - } -#else - if (dictoffset == 0 && b->tp_dictoffset) + if (dictoffset == 0) { - __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); - PyErr_Format(PyExc_TypeError, - "extension type '%.200s' has no __dict__ slot, " - "but base type '" __Pyx_FMT_TYPENAME "' has: " - "either add 'cdef dict __dict__' to the extension type " - "or add '__slots__ = [...]' to the base type", - type_name, b_name); - __Pyx_DECREF_TypeName(b_name); + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) + dictoffset_return: +#endif #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); + Py_DECREF(b0); #endif - return -1; + return -1; + } } -#endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif @@ -23440,10 +23507,10 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { #endif /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_0_3 -#define __PYX_HAVE_RT_ImportType_3_0_3 -static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_3 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_0_6 +#define __PYX_HAVE_RT_ImportType_3_0_6 +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size) { PyObject *result = 0; char warning[200]; @@ -23497,7 +23564,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_3 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_6 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -23505,7 +23572,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_3 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_6 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -23649,10 +23716,7 @@ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { - PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME); - if (unlikely(!abi_module)) return NULL; - Py_INCREF(abi_module); - return abi_module; + return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ @@ -24975,8 +25039,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject Py_DECREF(replace); return result; } - #if __PYX_LIMITED_VERSION_HEX < 0x030780000 PyErr_Clear(); + #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; @@ -24996,6 +25060,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject if (result) Py_INCREF(result); return result; } + #else + return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, @@ -25197,13 +25263,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; @@ -25211,16 +25277,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -25396,7 +25464,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -25669,7 +25737,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -25805,13 +25873,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; @@ -25819,16 +25887,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -25967,7 +26037,7 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* CheckBinaryVersion */ -static unsigned long __Pyx_get_runtime_version() { +static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/README.txt b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/README.txt index d15aa20914..19d63d456b 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/README.txt +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/README.txt @@ -8,7 +8,7 @@ pip install bytecode --target . or from master (if needed for some early bugfix): -python -m pip install https://github.com/MatthieuDartiailh/bytecode/archive/main.zip --target . +python -m pip install git+https://github.com/MatthieuDartiailh/bytecode.git --target . Then run 'pydevd_fix_code.py' to fix the imports on the vendored file, run its tests (to see if things are still ok) and commit. diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA deleted file mode 100644 index e1d5e0120a..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA +++ /dev/null @@ -1,77 +0,0 @@ -Metadata-Version: 2.1 -Name: bytecode -Version: 0.13.0.dev0 -Summary: Python module to generate and modify bytecode -Home-page: https://github.com/MatthieuDartiailh/bytecode -Author: Victor Stinner -Author-email: victor.stinner@gmail.com -Maintainer: Matthieu C. Dartiailh -Maintainer-email: m.dartiailh@gmail.com -License: MIT license -Platform: UNKNOWN -Classifier: Development Status :: 4 - Beta -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Natural Language :: English -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.6 - -******** -bytecode -******** - -.. image:: https://img.shields.io/pypi/v/bytecode.svg - :alt: Latest release on the Python Cheeseshop (PyPI) - :target: https://pypi.python.org/pypi/bytecode - -.. image:: https://github.com/MatthieuDartiailh/bytecode/workflows/Continuous%20Integration/badge.svg - :target: https://github.com/MatthieuDartiailh/bytecode/actions - :alt: Continuous integration - -.. image:: https://github.com/MatthieuDartiailh/bytecode/workflows/Documentation%20building/badge.svg - :target: https://github.com/MatthieuDartiailh/bytecode/actions - :alt: Documentation building - -.. image:: https://img.shields.io/codecov/c/github/MatthieuDartiailh/bytecode/master.svg - :alt: Code coverage of bytecode on codecov.io - :target: https://codecov.io/github/MatthieuDartiailh/bytecode - -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :alt: Code formatted using Black - :target: https://github.com/psf/black - -``bytecode`` is a Python module to generate and modify bytecode. - -* `bytecode project homepage at GitHub - `_ (code, bugs) -* `bytecode documentation - `_ -* `Download latest bytecode release at the Python Cheeseshop (PyPI) - `_ - -Install bytecode: ``python3 -m pip install bytecode``. It requires Python 3.6 -or newer. The latest release that supports Python 3.5 is 0.12.0. For Python 2.7 -support, have a look at `dead-bytecode -`_ instead. - -Example executing ``print('Hello World!')``: - -.. code:: python - - from bytecode import Instr, Bytecode - - bytecode = Bytecode([Instr("LOAD_NAME", 'print'), - Instr("LOAD_CONST", 'Hello World!'), - Instr("CALL_FUNCTION", 1), - Instr("POP_TOP"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE")]) - code = bytecode.to_code() - exec(code) - diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD deleted file mode 100644 index 3890ece183..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD +++ /dev/null @@ -1,42 +0,0 @@ -bytecode-0.13.0.dev0.dist-info/COPYING,sha256=baWkm-Te2LLURwK7TL0zOkMSVjVCU_ezvObHBo298Tk,1074 -bytecode-0.13.0.dev0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -bytecode-0.13.0.dev0.dist-info/METADATA,sha256=9XadDK6YTQ-FPowYI5DS4ieA7hRGnRP_fM5Z9ioPkEQ,2929 -bytecode-0.13.0.dev0.dist-info/RECORD,, -bytecode-0.13.0.dev0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -bytecode-0.13.0.dev0.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92 -bytecode-0.13.0.dev0.dist-info/direct_url.json,sha256=s58Rb4KXRlMKxk-mzpvr_tJRQ-Hx8-DHsU6NdohCnAg,93 -bytecode-0.13.0.dev0.dist-info/top_level.txt,sha256=9BhdB7HqYZ-PvHNoWX6ilwLYWQqcgEOLwdb3aXm5Gys,9 -bytecode/__init__.py,sha256=d-yk4Xh4SwOWq9NgoD2rmBLG6RhUFNljeqs-NjMNSYM,3885 -bytecode/__pycache__/__init__.cpython-38.pyc,, -bytecode/__pycache__/bytecode.cpython-38.pyc,, -bytecode/__pycache__/cfg.cpython-38.pyc,, -bytecode/__pycache__/concrete.cpython-38.pyc,, -bytecode/__pycache__/flags.cpython-38.pyc,, -bytecode/__pycache__/instr.cpython-38.pyc,, -bytecode/__pycache__/peephole_opt.cpython-38.pyc,, -bytecode/bytecode.py,sha256=IMCcatHMtQ7M31nwj4r3drcvQuGVJAOP0d7C0O8P_SE,6894 -bytecode/cfg.py,sha256=RmJGJqwCxR-XYaPH9YGY4wNDycdtLvIBJb1OGSmxcN0,15274 -bytecode/concrete.py,sha256=0eb6Yh_NDLmzJNcMs2TFom0EqFVSM1cO3inMH90YE-s,21683 -bytecode/flags.py,sha256=hAvM_B2yQKRw44leHP0oCae0aaJraAbDDTpqIf4I1CM,5987 -bytecode/instr.py,sha256=HYc65LjNSOB3GCWkNkCSkee1rRzUyr89rgdjbKBaTpE,11616 -bytecode/peephole_opt.py,sha256=W-cFVPOZN-JKfDV3aImsYenDSZkSNBDTVQqeMrGPU18,15712 -bytecode/tests/__init__.py,sha256=BAdOXXNRdMVX4D8TuRYPlG9PHU7Cb0bzvyfA9s435kM,4968 -bytecode/tests/__pycache__/__init__.cpython-38.pyc,, -bytecode/tests/__pycache__/test_bytecode.cpython-38.pyc,, -bytecode/tests/__pycache__/test_cfg.cpython-38.pyc,, -bytecode/tests/__pycache__/test_code.cpython-38.pyc,, -bytecode/tests/__pycache__/test_concrete.cpython-38.pyc,, -bytecode/tests/__pycache__/test_flags.cpython-38.pyc,, -bytecode/tests/__pycache__/test_instr.cpython-38.pyc,, -bytecode/tests/__pycache__/test_misc.cpython-38.pyc,, -bytecode/tests/__pycache__/test_peephole_opt.cpython-38.pyc,, -bytecode/tests/__pycache__/util_annotation.cpython-38.pyc,, -bytecode/tests/test_bytecode.py,sha256=buvtlDC0NwoQ3zuZ7OENIIDngSqtiO9WkAa2-UvxGkI,15584 -bytecode/tests/test_cfg.py,sha256=c0xT8OfV-mDHu-DIDWr6LVlZQyK4GfgLSmT5AsodbMk,28194 -bytecode/tests/test_code.py,sha256=XCOH29rOXSoQz130s-AIC62r23e9qNjk8Y2xDB2LmSc,2100 -bytecode/tests/test_concrete.py,sha256=qT2qvabkF0yC7inniNx53cMSDN-2Qi0IE3pwBZSzF8g,49253 -bytecode/tests/test_flags.py,sha256=DY9U3c6tJdxJFm0jEm_To1Cc0I99EidQv_0guud-4oE,5684 -bytecode/tests/test_instr.py,sha256=rYeF8u-L0aW8bLPBxTUSy_T7KP6SaXyJKv9OhC8k6aA,11295 -bytecode/tests/test_misc.py,sha256=wyK1wpVPHRfaXgo-EqUI-F1nyB9-UACerHsHbExAo1U,6758 -bytecode/tests/test_peephole_opt.py,sha256=niUfhgEbiFR7IAmdQ_N9Qgh7D3wdRQ_zS0V8mKC4EzI,32640 -bytecode/tests/util_annotation.py,sha256=wKq6yPWrzkNlholl5Y10b3VjuCkoiYVgvcIjk_8jzf8,485 diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json deleted file mode 100644 index 3c32b57166..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json +++ /dev/null @@ -1 +0,0 @@ -{"archive_info": {}, "url": "https://github.com/MatthieuDartiailh/bytecode/archive/main.zip"} \ No newline at end of file diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/COPYING similarity index 95% rename from plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING rename to plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/COPYING index 81d7e37c3f..ba5a523fc9 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/COPYING @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright (c) 2016 Red Hat. +Copyright Contributors to the bytecode project. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/INSTALLER similarity index 100% rename from plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER rename to plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/INSTALLER diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/METADATA b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/METADATA new file mode 100644 index 0000000000..ae8fbe56cb --- /dev/null +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/METADATA @@ -0,0 +1,102 @@ +Metadata-Version: 2.1 +Name: bytecode +Version: 0.15.2.dev4+gc87faa2 +Summary: Python module to generate and modify bytecode +Author-email: Victor Stinner +Maintainer-email: "Matthieu C. Dartiailh" +License: The MIT License (MIT) + Copyright Contributors to the bytecode project. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Project-URL: homepage, https://github.com/MatthieuDartiailh/bytecode +Project-URL: documentation, https://bytecode.readthedocs.io/en/latest/ +Project-URL: repository, https://github.com/MatthieuDartiailh/bytecode +Project-URL: changelog, https://github.com/MatthieuDartiailh/bytecode/blob/main/doc/changelog.rst +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Natural Language :: English +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Requires-Python: >=3.8 +Description-Content-Type: text/x-rst +License-File: COPYING +Requires-Dist: typing-extensions ; python_version < "3.10" + +******** +bytecode +******** + +.. image:: https://img.shields.io/pypi/v/bytecode.svg + :alt: Latest release on the Python Cheeseshop (PyPI) + :target: https://pypi.python.org/pypi/bytecode + +.. image:: https://github.com/MatthieuDartiailh/bytecode/workflows/Continuous%20Integration/badge.svg + :target: https://github.com/MatthieuDartiailh/bytecode/actions + :alt: Continuous integration + +.. image:: https://github.com/MatthieuDartiailh/bytecode/workflows/Documentation%20building/badge.svg + :target: https://github.com/MatthieuDartiailh/bytecode/actions + :alt: Documentation building + +.. image:: https://img.shields.io/codecov/c/github/MatthieuDartiailh/bytecode/master.svg + :alt: Code coverage of bytecode on codecov.io + :target: https://codecov.io/github/MatthieuDartiailh/bytecode + +.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json + :target: https://github.com/astral-sh/ruff + :alt: Ruff + +``bytecode`` is a Python module to generate and modify bytecode. + +* `bytecode project homepage at GitHub + `_ (code, bugs) +* `bytecode documentation + `_ +* `Download latest bytecode release at the Python Cheeseshop (PyPI) + `_ + +Install bytecode: ``python3 -m pip install bytecode``. It requires Python 3.8 +or newer. The latest release that supports Python 3.7 and 3.6 is 0.13.0. +The latest release that supports Python 3.5 is 0.12.0. For Python 2.7 support, +have a look at `dead-bytecode `_ +instead. + +Example executing ``print('Hello World!')``: + +.. code:: python + + from bytecode import Instr, Bytecode + + bytecode = Bytecode([Instr("LOAD_NAME", 'print'), + Instr("LOAD_CONST", 'Hello World!'), + Instr("CALL_FUNCTION", 1), + Instr("POP_TOP"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE")]) + code = bytecode.to_code() + exec(code) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/RECORD b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/RECORD new file mode 100644 index 0000000000..ac7d4b362e --- /dev/null +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/RECORD @@ -0,0 +1,23 @@ +bytecode-0.15.2.dev4+gc87faa2.dist-info/COPYING,sha256=15CDvwHVcioF_s6S_mWdkWdw96tvB21WZKc8jvc8N5M,1094 +bytecode-0.15.2.dev4+gc87faa2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +bytecode-0.15.2.dev4+gc87faa2.dist-info/METADATA,sha256=msfGAb_7qRcxbHQwTg-b2IAAXopiE6KWzm5F2zCSPMg,4780 +bytecode-0.15.2.dev4+gc87faa2.dist-info/RECORD,, +bytecode-0.15.2.dev4+gc87faa2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +bytecode-0.15.2.dev4+gc87faa2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92 +bytecode-0.15.2.dev4+gc87faa2.dist-info/direct_url.json,sha256=If2BeyiZnL-o6_qt3rkJuCphTAj0k2pM1S7TvbCLAAw,145 +bytecode-0.15.2.dev4+gc87faa2.dist-info/top_level.txt,sha256=9BhdB7HqYZ-PvHNoWX6ilwLYWQqcgEOLwdb3aXm5Gys,9 +bytecode/__init__.py,sha256=QyRvM53HT111OMumYJRD1FC3al7MlZL1bXf2MJ5XBMo,6848 +bytecode/__pycache__/__init__.cpython-311.pyc,, +bytecode/__pycache__/bytecode.cpython-311.pyc,, +bytecode/__pycache__/cfg.cpython-311.pyc,, +bytecode/__pycache__/concrete.cpython-311.pyc,, +bytecode/__pycache__/flags.cpython-311.pyc,, +bytecode/__pycache__/instr.cpython-311.pyc,, +bytecode/__pycache__/version.cpython-311.pyc,, +bytecode/bytecode.py,sha256=6oveflTRGnrzTQEP9Z0tp6ySwmXQ_DXIibdAGOZt5lY,11126 +bytecode/cfg.py,sha256=F8GhLWqDJlQc8cbL6X8HMa1QSVLGmZmBuYC8G4P201A,41794 +bytecode/concrete.py,sha256=kVTVMtA6yUsxLFa6LpCiXOUlgo3OxCIS2ykANO-MWjw,52189 +bytecode/flags.py,sha256=2ONreTJOAFDPXlDZle1t9FnkxI1E7SQGj3DDtrnYoMg,6093 +bytecode/instr.py,sha256=T0y13qaYG_9N6KXoafmFASKHITqdkvjOQnEor6QkF-I,26785 +bytecode/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +bytecode/version.py,sha256=nfCHWDf48S87YSKe2l_-l3kZTq6AFgQOPx7-Q20xhnE,566 diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/REQUESTED b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/REQUESTED similarity index 100% rename from plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/REQUESTED rename to plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/REQUESTED diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/WHEEL similarity index 65% rename from plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL rename to plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/WHEEL index 385faab052..98c0d20b7a 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/WHEEL @@ -1,5 +1,5 @@ Wheel-Version: 1.0 -Generator: bdist_wheel (0.36.2) +Generator: bdist_wheel (0.42.0) Root-Is-Purelib: true Tag: py3-none-any diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/direct_url.json b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/direct_url.json new file mode 100644 index 0000000000..9ee6c4f887 --- /dev/null +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/direct_url.json @@ -0,0 +1 @@ +{"url": "https://github.com/MatthieuDartiailh/bytecode.git", "vcs_info": {"commit_id": "c87faa29ccc0cbc1198d581500848f1ab9096bd5", "vcs": "git"}} \ No newline at end of file diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/top_level.txt similarity index 100% rename from plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt rename to plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode-0.15.2.dev4+gc87faa2.dist-info/top_level.txt diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/__init__.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/__init__.py index f970fbc009..1d6c177518 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/__init__.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/__init__.py @@ -1,5 +1,3 @@ -__version__ = "0.13.0.dev" - __all__ = [ "Label", "Instr", @@ -10,34 +8,57 @@ "ControlFlowGraph", "CompilerFlags", "Compare", + "BinaryOp", + "__version__", ] -from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags -from _pydevd_frame_eval.vendored.bytecode.instr import ( - UNSET, - Label, - SetLineno, - Instr, - CellVar, - FreeVar, # noqa - Compare, -) +from io import StringIO +from typing import List, Union + +# import needed to use it in bytecode.py from _pydevd_frame_eval.vendored.bytecode.bytecode import ( BaseBytecode, + Bytecode, _BaseBytecodeList, _InstrList, - Bytecode, -) # noqa +) + +# import needed to use it in bytecode.py +from _pydevd_frame_eval.vendored.bytecode.cfg import BasicBlock, ControlFlowGraph + +# import needed to use it in bytecode.py from _pydevd_frame_eval.vendored.bytecode.concrete import ( + ConcreteBytecode, ConcreteInstr, - ConcreteBytecode, # noqa - # import needed to use it in bytecode.py _ConvertBytecodeToConcrete, ) -from _pydevd_frame_eval.vendored.bytecode.cfg import BasicBlock, ControlFlowGraph # noqa -import sys +from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags + +# import needed to use it in bytecode.py +from _pydevd_frame_eval.vendored.bytecode.instr import ( + UNSET, + BinaryOp, + CellVar, + Compare, + FreeVar, + Instr, + Intrinsic1Op, + Intrinsic2Op, + Label, + SetLineno, + TryBegin, + TryEnd, +) +from _pydevd_frame_eval.vendored.bytecode.version import __version__ + + +def format_bytecode( + bytecode: Union[Bytecode, ConcreteBytecode, ControlFlowGraph], + *, + lineno: bool = False, +) -> str: + try_begins: List[TryBegin] = [] -def dump_bytecode(bytecode, *, lineno=False, stream=sys.stdout): def format_line(index, line): nonlocal cur_lineno, prev_lineno if lineno: @@ -69,6 +90,34 @@ def format_instr(instr, labels=None): text = "%s %s" % (text, arg) return text + def format_try_begin(instr: TryBegin, labels: dict) -> str: + if isinstance(instr.target, Label): + try: + arg = "<%s>" % labels[instr.target] + except KeyError: + arg = "" + else: + try: + arg = "<%s>" % labels[id(instr.target)] + except KeyError: + arg = "" + line = "TryBegin %s -> %s [%s]" % ( + len(try_begins), + arg, + instr.stack_depth, + ) + (" last_i" if instr.push_lasti else "") + + # Track the seen try begin + try_begins.append(instr) + + return line + + def format_try_end(instr: TryEnd) -> str: + i = try_begins.index(instr.entry) if instr.entry in try_begins else "" + return "TryEnd (%s)" % i + + buffer = StringIO() + indent = " " * 4 cur_lineno = bytecode.first_lineno @@ -76,22 +125,35 @@ def format_instr(instr, labels=None): if isinstance(bytecode, ConcreteBytecode): offset = 0 - for instr in bytecode: + for c_instr in bytecode: fields = [] - if instr.lineno is not None: - cur_lineno = instr.lineno + if c_instr.lineno is not None: + cur_lineno = c_instr.lineno if lineno: - fields.append(format_instr(instr)) + fields.append(format_instr(c_instr)) line = "".join(fields) line = format_line(offset, line) else: - fields.append("% 3s %s" % (offset, format_instr(instr))) + fields.append("% 3s %s" % (offset, format_instr(c_instr))) line = "".join(fields) - print(line, file=stream) + buffer.write(line + "\n") + + if isinstance(c_instr, ConcreteInstr): + offset += c_instr.size + + if bytecode.exception_table: + buffer.write("\n") + buffer.write("Exception table:\n") + for entry in bytecode.exception_table: + buffer.write( + f"{entry.start_offset} to {entry.stop_offset} -> " + f"{entry.target} [{entry.stack_depth}]" + + (" lasti" if entry.push_lasti else "") + + "\n" + ) - offset += instr.size elif isinstance(bytecode, Bytecode): - labels = {} + labels: dict[Label, str] = {} for index, instr in enumerate(bytecode): if isinstance(instr, Label): labels[instr] = "label_instr%s" % index @@ -101,30 +163,59 @@ def format_instr(instr, labels=None): label = labels[instr] line = "%s:" % label if index != 0: - print(file=stream) + buffer.write("\n") + elif isinstance(instr, TryBegin): + line = indent + format_line(index, format_try_begin(instr, labels)) + indent += " " + elif isinstance(instr, TryEnd): + indent = indent[:-2] + line = indent + format_line(index, format_try_end(instr)) else: if instr.lineno is not None: cur_lineno = instr.lineno line = format_instr(instr, labels) line = indent + format_line(index, line) - print(line, file=stream) - print(file=stream) + buffer.write(line + "\n") + buffer.write("\n") + elif isinstance(bytecode, ControlFlowGraph): - labels = {} + cfg_labels = {} for block_index, block in enumerate(bytecode, 1): - labels[id(block)] = "block%s" % block_index + cfg_labels[id(block)] = "block%s" % block_index - for block_index, block in enumerate(bytecode, 1): - print("%s:" % labels[id(block)], file=stream) - prev_lineno = None + for block in bytecode: + buffer.write("%s:\n" % cfg_labels[id(block)]) + seen_instr = False for index, instr in enumerate(block): - if instr.lineno is not None: - cur_lineno = instr.lineno - line = format_instr(instr, labels) - line = indent + format_line(index, line) - print(line, file=stream) + if isinstance(instr, TryBegin): + line = indent + format_line( + index, format_try_begin(instr, cfg_labels) + ) + indent += " " + elif isinstance(instr, TryEnd): + if seen_instr: + indent = indent[:-2] + line = indent + format_line(index, format_try_end(instr)) + else: + if isinstance(instr, Instr): + seen_instr = True + if instr.lineno is not None: + cur_lineno = instr.lineno + line = format_instr(instr, cfg_labels) + line = indent + format_line(index, line) + buffer.write(line + "\n") if block.next_block is not None: - print(indent + "-> %s" % labels[id(block.next_block)], file=stream) - print(file=stream) + buffer.write(indent + "-> %s\n" % cfg_labels[id(block.next_block)]) + buffer.write("\n") else: raise TypeError("unknown bytecode class") + + return buffer.getvalue()[:-1] + + +def dump_bytecode( + bytecode: Union[Bytecode, ConcreteBytecode, ControlFlowGraph], + *, + lineno: bool = False, +) -> None: + print(format_bytecode(bytecode, lineno=lineno)) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/bytecode.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/bytecode.py index ca4d0ace51..6de7aa59de 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/bytecode.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/bytecode.py @@ -1,48 +1,75 @@ # alias to keep the 'bytecode' variable free import sys +import types +from abc import abstractmethod +from typing import ( + Any, + Dict, + Generic, + Iterator, + List, + Optional, + Sequence, + SupportsIndex, + TypeVar, + Union, + overload, +) + from _pydevd_frame_eval.vendored import bytecode as _bytecode -from _pydevd_frame_eval.vendored.bytecode.instr import UNSET, Label, SetLineno, Instr -from _pydevd_frame_eval.vendored.bytecode.flags import infer_flags +from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags, infer_flags +from _pydevd_frame_eval.vendored.bytecode.instr import ( + _UNSET, + UNSET, + BaseInstr, + Instr, + Label, + SetLineno, + TryBegin, + TryEnd, +) class BaseBytecode: - def __init__(self): + def __init__(self) -> None: self.argcount = 0 - if sys.version_info > (3, 8): - self.posonlyargcount = 0 + self.posonlyargcount = 0 self.kwonlyargcount = 0 self.first_lineno = 1 self.name = "" + self.qualname = self.name self.filename = "" - self.docstring = UNSET - self.cellvars = [] - # we cannot recreate freevars from instructions because of super() - # special-case - self.freevars = [] - self._flags = _bytecode.CompilerFlags(0) - - def _copy_attr_from(self, bytecode): + self.docstring: Union[str, None, _UNSET] = UNSET + # We cannot recreate cellvars/freevars from instructions because of super() + # special-case, which involves an implicit __class__ cell/free variable + # We could try to detect it. + # CPython itself breaks if one aliases super so we could maybe make it work + # but it will require careful design and will be done later in the future. + self.cellvars: List[str] = [] + self.freevars: List[str] = [] + self._flags: CompilerFlags = CompilerFlags(0) + + def _copy_attr_from(self, bytecode: "BaseBytecode") -> None: self.argcount = bytecode.argcount - if sys.version_info > (3, 8): - self.posonlyargcount = bytecode.posonlyargcount + self.posonlyargcount = bytecode.posonlyargcount self.kwonlyargcount = bytecode.kwonlyargcount self.flags = bytecode.flags self.first_lineno = bytecode.first_lineno self.name = bytecode.name + self.qualname = bytecode.qualname self.filename = bytecode.filename self.docstring = bytecode.docstring self.cellvars = list(bytecode.cellvars) self.freevars = list(bytecode.freevars) - def __eq__(self, other): - if type(self) != type(other): + def __eq__(self, other: Any) -> bool: + if type(self) is not type(other): return False if self.argcount != other.argcount: return False - if sys.version_info > (3, 8): - if self.posonlyargcount != other.posonlyargcount: - return False + if self.posonlyargcount != other.posonlyargcount: + return False if self.kwonlyargcount != other.kwonlyargcount: return False if self.flags != other.flags: @@ -53,6 +80,8 @@ def __eq__(self, other): return False if self.name != other.name: return False + if self.qualname != other.qualname: + return False if self.docstring != other.docstring: return False if self.cellvars != other.cellvars: @@ -65,22 +94,39 @@ def __eq__(self, other): return True @property - def flags(self): + def flags(self) -> CompilerFlags: return self._flags @flags.setter - def flags(self, value): - if not isinstance(value, _bytecode.CompilerFlags): - value = _bytecode.CompilerFlags(value) + def flags(self, value: CompilerFlags) -> None: + if not isinstance(value, CompilerFlags): + value = CompilerFlags(value) self._flags = value - def update_flags(self, *, is_async=None): - self.flags = infer_flags(self, is_async) + def update_flags(self, *, is_async: Optional[bool] = None) -> None: + # infer_flags reasonably only accept concrete subclasses + self.flags = infer_flags(self, is_async) # type: ignore + + @abstractmethod + def compute_stacksize(self, *, check_pre_and_post: bool = True) -> int: + raise NotImplementedError + +T = TypeVar("T", bound="_BaseBytecodeList") +U = TypeVar("U") -class _BaseBytecodeList(BaseBytecode, list): + +class _BaseBytecodeList(BaseBytecode, list, Generic[U]): """List subclass providing type stable slicing and copying.""" + @overload + def __getitem__(self, index: SupportsIndex) -> U: + ... + + @overload + def __getitem__(self: T, index: slice) -> T: + ... + def __getitem__(self, index): value = super().__getitem__(index) if isinstance(index, slice): @@ -89,12 +135,13 @@ def __getitem__(self, index): return value - def copy(self): - new = type(self)(super().copy()) + def copy(self: T) -> T: + # This is a list subclass and works + new = type(self)(super().copy()) # type: ignore new._copy_attr_from(self) return new - def legalize(self): + def legalize(self) -> None: """Check that all the element of the list are valid and remove SetLineno.""" lineno_pos = [] set_lineno = None @@ -105,20 +152,20 @@ def legalize(self): set_lineno = instr.lineno lineno_pos.append(pos) continue - # Filter out Labels - if not isinstance(instr, Instr): + # Filter out other pseudo instructions + if not isinstance(instr, BaseInstr): continue if set_lineno is not None: instr.lineno = set_lineno - elif instr.lineno is None: + elif instr.lineno is UNSET: instr.lineno = current_lineno - else: + elif instr.lineno is not None: current_lineno = instr.lineno for i in reversed(lineno_pos): del self[i] - def __iter__(self): + def __iter__(self) -> Iterator[U]: instructions = super().__iter__() for instr in instructions: self._check_instr(instr) @@ -128,21 +175,38 @@ def _check_instr(self, instr): raise NotImplementedError() -class _InstrList(list): - def _flat(self): - instructions = [] +V = TypeVar("V") + + +class _InstrList(List[V]): + # Providing a stricter typing for this helper whose use is limited to the __eq__ + # implementation is more effort than it is worth. + def _flat(self) -> List: + instructions: List = [] labels = {} jumps = [] + try_begins: Dict[TryBegin, int] = {} + try_jumps = [] offset = 0 + instr: Any for index, instr in enumerate(self): if isinstance(instr, Label): instructions.append("label_instr%s" % index) labels[instr] = offset + elif isinstance(instr, TryBegin): + try_begins.setdefault(instr, len(try_begins)) + assert isinstance(instr.target, Label) + try_jumps.append((instr.target, len(instructions))) + instructions.append(instr) + elif isinstance(instr, TryEnd): + instructions.append(("TryEnd", try_begins[instr.entry])) else: if isinstance(instr, Instr) and isinstance(instr.arg, Label): target_label = instr.arg - instr = _bytecode.ConcreteInstr(instr.name, 0, lineno=instr.lineno) + instr = _bytecode.ConcreteInstr( + instr.name, 0, location=instr.location + ) jumps.append((target_label, instr)) instructions.append(instr) offset += 1 @@ -150,61 +214,117 @@ def _flat(self): for target_label, instr in jumps: instr.arg = labels[target_label] + for target_label, index in try_jumps: + instr = instructions[index] + assert isinstance(instr, TryBegin) + instructions[index] = ( + "TryBegin", + try_begins[instr], + labels[target_label], + instr.push_lasti, + ) + return instructions - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: if not isinstance(other, _InstrList): other = _InstrList(other) return self._flat() == other._flat() -class Bytecode(_InstrList, _BaseBytecodeList): - def __init__(self, instructions=()): +class Bytecode( + _InstrList[Union[Instr, Label, TryBegin, TryEnd, SetLineno]], + _BaseBytecodeList[Union[Instr, Label, TryBegin, TryEnd, SetLineno]], +): + def __init__( + self, + instructions: Sequence[Union[Instr, Label, TryBegin, TryEnd, SetLineno]] = (), + ) -> None: BaseBytecode.__init__(self) - self.argnames = [] + self.argnames: List[str] = [] for instr in instructions: self._check_instr(instr) self.extend(instructions) - def __iter__(self): + def __iter__(self) -> Iterator[Union[Instr, Label, TryBegin, TryEnd, SetLineno]]: instructions = super().__iter__() + seen_try_begin = False for instr in instructions: self._check_instr(instr) + if isinstance(instr, TryBegin): + if seen_try_begin: + raise RuntimeError("TryBegin pseudo instructions cannot be nested.") + seen_try_begin = True + elif isinstance(instr, TryEnd): + seen_try_begin = False yield instr - def _check_instr(self, instr): - if not isinstance(instr, (Label, SetLineno, Instr)): + def _check_instr(self, instr: Any) -> None: + if not isinstance(instr, (Label, SetLineno, Instr, TryBegin, TryEnd)): raise ValueError( "Bytecode must only contain Label, " "SetLineno, and Instr objects, " "but %s was found" % type(instr).__name__ ) - def _copy_attr_from(self, bytecode): + def _copy_attr_from(self, bytecode: BaseBytecode) -> None: super()._copy_attr_from(bytecode) if isinstance(bytecode, Bytecode): self.argnames = bytecode.argnames @staticmethod - def from_code(code): + def from_code( + code: types.CodeType, + prune_caches: bool = True, + conserve_exception_block_stackdepth: bool = False, + ) -> "Bytecode": concrete = _bytecode.ConcreteBytecode.from_code(code) - return concrete.to_bytecode() + return concrete.to_bytecode( + prune_caches=prune_caches, + conserve_exception_block_stackdepth=conserve_exception_block_stackdepth, + ) - def compute_stacksize(self, *, check_pre_and_post=True): + def compute_stacksize(self, *, check_pre_and_post: bool = True) -> int: cfg = _bytecode.ControlFlowGraph.from_bytecode(self) return cfg.compute_stacksize(check_pre_and_post=check_pre_and_post) def to_code( - self, compute_jumps_passes=None, stacksize=None, *, check_pre_and_post=True - ): + self, + compute_jumps_passes: Optional[int] = None, + stacksize: Optional[int] = None, + *, + check_pre_and_post: bool = True, + compute_exception_stack_depths: bool = True, + ) -> types.CodeType: # Prevent reconverting the concrete bytecode to bytecode and cfg to do the # calculation if we need to do it. - if stacksize is None: - stacksize = self.compute_stacksize(check_pre_and_post=check_pre_and_post) - bc = self.to_concrete_bytecode(compute_jumps_passes=compute_jumps_passes) - return bc.to_code(stacksize=stacksize) - - def to_concrete_bytecode(self, compute_jumps_passes=None): + if stacksize is None or ( + sys.version_info >= (3, 11) and compute_exception_stack_depths + ): + cfg = _bytecode.ControlFlowGraph.from_bytecode(self) + stacksize = cfg.compute_stacksize( + check_pre_and_post=check_pre_and_post, + compute_exception_stack_depths=compute_exception_stack_depths, + ) + self = cfg.to_bytecode() + compute_exception_stack_depths = False # avoid redoing everything + bc = self.to_concrete_bytecode( + compute_jumps_passes=compute_jumps_passes, + compute_exception_stack_depths=compute_exception_stack_depths, + ) + return bc.to_code( + stacksize=stacksize, + compute_exception_stack_depths=compute_exception_stack_depths, + ) + + def to_concrete_bytecode( + self, + compute_jumps_passes: Optional[int] = None, + compute_exception_stack_depths: bool = True, + ) -> "_bytecode.ConcreteBytecode": converter = _bytecode._ConvertBytecodeToConcrete(self) - return converter.to_concrete_bytecode(compute_jumps_passes=compute_jumps_passes) + return converter.to_concrete_bytecode( + compute_jumps_passes=compute_jumps_passes, + compute_exception_stack_depths=compute_exception_stack_depths, + ) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/cfg.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/cfg.py index 5e2f322903..132085015e 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/cfg.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/cfg.py @@ -1,33 +1,61 @@ import sys +import types +from collections import defaultdict +from dataclasses import dataclass +from typing import ( + Any, + Dict, + Generator, + Iterable, + Iterator, + List, + Optional, + Set, + SupportsIndex, + Tuple, + TypeVar, + Union, + overload, +) # alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode from _pydevd_frame_eval.vendored.bytecode.concrete import ConcreteInstr from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags -from _pydevd_frame_eval.vendored.bytecode.instr import Label, SetLineno, Instr +from _pydevd_frame_eval.vendored.bytecode.instr import UNSET, Instr, Label, SetLineno, TryBegin, TryEnd +T = TypeVar("T", bound="BasicBlock") +U = TypeVar("U", bound="ControlFlowGraph") -class BasicBlock(_bytecode._InstrList): - def __init__(self, instructions=None): + +class BasicBlock(_bytecode._InstrList[Union[Instr, SetLineno, TryBegin, TryEnd]]): + def __init__( + self, + instructions: Optional[ + Iterable[Union[Instr, SetLineno, TryBegin, TryEnd]] + ] = None, + ) -> None: # a BasicBlock object, or None - self.next_block = None + self.next_block: Optional["BasicBlock"] = None if instructions: super().__init__(instructions) - def __iter__(self): + def __iter__(self) -> Iterator[Union[Instr, SetLineno, TryBegin, TryEnd]]: index = 0 while index < len(self): instr = self[index] index += 1 - if not isinstance(instr, (SetLineno, Instr)): + if not isinstance(instr, (SetLineno, Instr, TryBegin, TryEnd)): raise ValueError( "BasicBlock must only contain SetLineno and Instr objects, " "but %s was found" % instr.__class__.__name__ ) if isinstance(instr, Instr) and instr.has_jump(): - if index < len(self): + if index < len(self) and any( + isinstance(self[i], Instr) for i in range(index, len(self)) + ): raise ValueError( "Only the last instruction of a basic " "block can be a jump" ) @@ -38,8 +66,25 @@ def __iter__(self): type(instr.arg).__name__, ) + if isinstance(instr, TryBegin): + if not isinstance(instr.target, BasicBlock): + raise ValueError( + "TryBegin target must a BasicBlock, got %s", + type(instr.target).__name__, + ) + yield instr + @overload + def __getitem__( + self, index: SupportsIndex + ) -> Union[Instr, SetLineno, TryBegin, TryEnd]: + ... + + @overload + def __getitem__(self: T, index: slice) -> T: + ... + def __getitem__(self, index): value = super().__getitem__(index) if isinstance(index, slice): @@ -48,12 +93,19 @@ def __getitem__(self, index): return value - def copy(self): + def get_last_non_artificial_instruction(self) -> Optional[Instr]: + for instr in reversed(self): + if isinstance(instr, Instr): + return instr + + return None + + def copy(self: T) -> T: new = type(self)(super().copy()) new.next_block = self.next_block return new - def legalize(self, first_lineno): + def legalize(self, first_lineno: int) -> int: """Check that all the element of the list are valid and remove SetLineno.""" lineno_pos = [] set_lineno = None @@ -64,11 +116,14 @@ def legalize(self, first_lineno): set_lineno = current_lineno = instr.lineno lineno_pos.append(pos) continue + if isinstance(instr, (TryBegin, TryEnd)): + continue + if set_lineno is not None: instr.lineno = set_lineno - elif instr.lineno is None: + elif instr.lineno is UNSET: instr.lineno = current_lineno - else: + elif instr.lineno is not None: current_lineno = instr.lineno for i in reversed(lineno_pos): @@ -76,137 +131,373 @@ def legalize(self, first_lineno): return current_lineno - def get_jump(self): + def get_jump(self) -> Optional["BasicBlock"]: if not self: return None - last_instr = self[-1] - if not (isinstance(last_instr, Instr) and last_instr.has_jump()): + last_instr = self.get_last_non_artificial_instruction() + if last_instr is None or not last_instr.has_jump(): return None target_block = last_instr.arg assert isinstance(target_block, BasicBlock) return target_block + def get_trailing_try_end(self, index: int): + while index + 1 < len(self): + if isinstance(b := self[index + 1], TryEnd): + return b + index += 1 + + return None + + +def _update_size(pre_delta, post_delta, size, maxsize, minsize): + size += pre_delta + if size < 0: + msg = "Failed to compute stacksize, got negative size" + raise RuntimeError(msg) + size += post_delta + maxsize = max(maxsize, size) + minsize = min(minsize, size) + return size, maxsize, minsize + + +# We can never have nested TryBegin, so we can simply update the min stack size +# when we encounter one and use the number we have when we encounter the TryEnd + + +@dataclass +class _StackSizeComputationStorage: + """Common storage shared by the computers involved in computing CFG stack usage.""" + + #: Should we check that all stack operation are "safe" i.e. occurs while there + #: is a sufficient number of items on the stack. + check_pre_and_post: bool + + #: Id the blocks for which an analysis is under progress to avoid getting stuck + #: in recursions. + seen_blocks: Set[int] + + #: Sizes and exception handling status with which the analysis of the block + #: has been performed. Used to avoid running multiple times equivalent analysis. + blocks_startsizes: Dict[int, Set[Tuple[int, Optional[bool]]]] + + #: Track the encountered TryBegin pseudo-instruction to update their target + #: depth at the end of the calculation. + try_begins: List[TryBegin] + + #: Stacksize that should be used for exception blocks. This is the smallest size + #: with which this block was reached which is the only size that can be safely + #: restored. + exception_block_startsize: Dict[int, int] + + #: Largest stack size used in an exception block. We record the size corresponding + #: to the smallest start size for the block since the interpreter enforces that + #: we start with this size. + exception_block_maxsize: Dict[int, int] + + +class _StackSizeComputer: + """Helper computing the stack usage for a single block.""" + + #: Common storage shared by all helpers involved in the stack size computation + common: _StackSizeComputationStorage + + #: Block this helper is running the computation for. + block: BasicBlock + + #: Current stack usage. + size: int + + #: Maximal stack usage. + maxsize: int + + #: Minimal stack usage. This value is only relevant in between a TryBegin/TryEnd + #: pair and determine the startsize for the exception handling block associated + #: with the try begin. + minsize: int + + #: Flag indicating if the block analyzed is an exception handler (i.e. a target + #: of a TryBegin). + exception_handler: Optional[bool] + + #: TryBegin that was encountered before jumping to this block and for which + #: no try end was met yet. + pending_try_begin: Optional[TryBegin] + + def __init__( + self, + common: _StackSizeComputationStorage, + block: BasicBlock, + size: int, + maxsize: int, + minsize: int, + exception_handler: Optional[bool], + pending_try_begin: Optional[TryBegin], + ) -> None: + self.common = common + self.block = block + self.size = size + self.maxsize = maxsize + self.minsize = minsize + self.exception_handler = exception_handler + self.pending_try_begin = pending_try_begin + self._current_try_begin = pending_try_begin + + def run(self) -> Generator[Union["_StackSizeComputer", int], int, None]: + """Iterate over the block instructions to compute stack usage.""" + # Blocks are not hashable but in this particular context we know we won't be + # modifying blocks in place so we can safely use their id as hash rather than + # making them generally hashable which would be weird since they are list + # subclasses + block_id = id(self.block) + + # If the block is currently being visited (seen = True) or + # it was visited previously with parameters that makes the computation + # irrelevant return the maxsize. + fingerprint = (self.size, self.exception_handler) + if id(self.block) in self.common.seen_blocks or ( + not self._is_stacksize_computation_relevant(block_id, fingerprint) + ): + yield self.maxsize + + # Prevent recursive visit of block if two blocks are nested (jump from one + # to the other). + self.common.seen_blocks.add(block_id) + + # Track which size has been used to run an analysis to avoid re-running multiple + # times the same calculation. + self.common.blocks_startsizes[block_id].add(fingerprint) + + # If this block is an exception handler reached through the exception table + # we will push some extra objects on the stack before processing start. + if self.exception_handler is not None: + self._update_size(0, 1 + self.exception_handler) + # True is used to indicated that push_lasti is True, leading to pushing + # an extra object on the stack. + + for i, instr in enumerate(self.block): + # Ignore SetLineno + if isinstance(instr, (SetLineno)): + continue + + # When we encounter a TryBegin, we: + # - store it as the current TryBegin (since TryBegin cannot be nested) + # - record its existence to remember to update its stack size when + # the computation ends + # - update the minsize to the current size value since we need to + # know the minimal stack usage between the TryBegin/TryEnd pair to + # set the startsize of the exception handling block + # + # This approach does not require any special handling for with statements. + if isinstance(instr, TryBegin): + assert self._current_try_begin is None + self.common.try_begins.append(instr) + self._current_try_begin = instr + self.minsize = self.size -def _compute_stack_size(block, size, maxsize, *, check_pre_and_post=True): - """Generator used to reduce the use of function stacks. - - This allows to avoid nested recursion and allow to treat more cases. - - HOW-TO: - Following the methods of Trampoline - (see https://en.wikipedia.org/wiki/Trampoline_(computing)), - - We yield either: - - - the arguments that would be used in the recursive calls, i.e, - 'yield block, size, maxsize' instead of making a recursive call - '_compute_stack_size(block, size, maxsize)', if we encounter an - instruction jumping to another block or if the block is linked to - another one (ie `next_block` is set) - - the required stack from the stack if we went through all the instructions - or encountered an unconditional jump. - - In the first case, the calling function is then responsible for creating a - new generator with those arguments, iterating over it till exhaustion to - determine the stacksize required by the block and resuming this function - with the determined stacksize. - - """ - # If the block is currently being visited (seen = True) or if it was visited - # previously by using a larger starting size than the one in use, return the - # maxsize. - if block.seen or block.startsize >= size: - yield maxsize - - def update_size(pre_delta, post_delta, size, maxsize): - size += pre_delta - if size < 0: - msg = "Failed to compute stacksize, got negative size" - raise RuntimeError(msg) - size += post_delta - maxsize = max(maxsize, size) - return size, maxsize - - # Prevent recursive visit of block if two blocks are nested (jump from one - # to the other). - block.seen = True - block.startsize = size - - for instr in block: - - # Ignore SetLineno - if isinstance(instr, SetLineno): - continue - - # For instructions with a jump first compute the stacksize required when the - # jump is taken. - if instr.has_jump(): + continue + + elif isinstance(instr, TryEnd): + # When we encounter a TryEnd we can start the computation for the + # exception block using the minimum stack size encountered since + # the TryBegin matching this TryEnd. + + # TryBegin cannot be nested so a TryEnd should always match the + # current try begin. However inside the CFG some blocks may + # start with a TryEnd relevant only when reaching this block + # through a particular jump. So we are lenient here. + if instr.entry is not self._current_try_begin: + continue + + # Compute the stack usage of the exception handler + assert isinstance(instr.entry.target, BasicBlock) + yield from self._compute_exception_handler_stack_usage( + instr.entry.target, + instr.entry.push_lasti, + ) + self._current_try_begin = None + continue + + # For instructions with a jump first compute the stacksize required when the + # jump is taken. + if instr.has_jump(): + effect = ( + instr.pre_and_post_stack_effect(jump=True) + if self.common.check_pre_and_post + else (instr.stack_effect(jump=True), 0) + ) + taken_size, maxsize, minsize = _update_size( + *effect, self.size, self.maxsize, self.minsize + ) + + # Yield the parameters required to compute the stacksize required + # by the block to which the jump points to and resume when we now + # the maxsize. + assert isinstance(instr.arg, BasicBlock) + maxsize = yield _StackSizeComputer( + self.common, + instr.arg, + taken_size, + maxsize, + minsize, + None, + # Do not propagate the TryBegin if a final instruction is followed + # by a TryEnd. + None + if instr.is_final() and self.block.get_trailing_try_end(i) + else self._current_try_begin, + ) + + # Update the maximum used size by the usage implied by the following + # the jump + self.maxsize = max(self.maxsize, maxsize) + + # For unconditional jumps abort early since the other instruction will + # never be seen. + if instr.is_uncond_jump(): + # Check for TryEnd after the final instruction which is possible + # TryEnd being only pseudo instructions + if te := self.block.get_trailing_try_end(i): + # TryBegin cannot be nested + assert te.entry is self._current_try_begin + + assert isinstance(te.entry.target, BasicBlock) + yield from self._compute_exception_handler_stack_usage( + te.entry.target, + te.entry.push_lasti, + ) + + self.common.seen_blocks.remove(id(self.block)) + yield self.maxsize + + # jump=False: non-taken path of jumps, or any non-jump effect = ( - instr.pre_and_post_stack_effect(jump=True) - if check_pre_and_post - else (instr.stack_effect(jump=True), 0) + instr.pre_and_post_stack_effect(jump=False) + if self.common.check_pre_and_post + else (instr.stack_effect(jump=False), 0) ) - taken_size, maxsize = update_size(*effect, size, maxsize) - # Yield the parameters required to compute the stacksize required - # by the block to which the jumnp points to and resume when we now - # the maxsize. - maxsize = yield instr.arg, taken_size, maxsize - - # For unconditional jumps abort early since the other instruction will - # never be seen. - if instr.is_uncond_jump(): - block.seen = False - yield maxsize - - # jump=False: non-taken path of jumps, or any non-jump - effect = ( - instr.pre_and_post_stack_effect(jump=False) - if check_pre_and_post - else (instr.stack_effect(jump=False), 0) - ) - size, maxsize = update_size(*effect, size, maxsize) + self._update_size(*effect) + + # Instruction is final (return, raise, ...) so any following instruction + # in the block is dead code. + if instr.is_final(): + # Check for TryEnd after the final instruction which is possible + # TryEnd being only pseudo instructions. + if te := self.block.get_trailing_try_end(i): + assert isinstance(te.entry.target, BasicBlock) + yield from self._compute_exception_handler_stack_usage( + te.entry.target, + te.entry.push_lasti, + ) + + self.common.seen_blocks.remove(id(self.block)) - if block.next_block: - maxsize = yield block.next_block, size, maxsize + yield self.maxsize - block.seen = False - yield maxsize + if self.block.next_block: + self.maxsize = yield _StackSizeComputer( + self.common, + self.block.next_block, + self.size, + self.maxsize, + self.minsize, + None, + self._current_try_begin, + ) + + self.common.seen_blocks.remove(id(self.block)) + + yield self.maxsize + + # --- Private API + + _current_try_begin: Optional[TryBegin] + + def _update_size(self, pre_delta: int, post_delta: int) -> None: + size, maxsize, minsize = _update_size( + pre_delta, post_delta, self.size, self.maxsize, self.minsize + ) + self.size = size + self.minsize = minsize + self.maxsize = maxsize + + def _compute_exception_handler_stack_usage( + self, block: BasicBlock, push_lasti: bool + ) -> Generator[Union["_StackSizeComputer", int], int, None]: + b_id = id(block) + if self.minsize < self.common.exception_block_startsize[b_id]: + block_size = yield _StackSizeComputer( + self.common, + block, + self.minsize, + self.maxsize, + self.minsize, + push_lasti, + None, + ) + # The entry cannot be smaller than abs(stc.minimal_entry_size) as otherwise + # we an underflow would have occured. + self.common.exception_block_startsize[b_id] = self.minsize + self.common.exception_block_maxsize[b_id] = block_size + + def _is_stacksize_computation_relevant( + self, block_id: int, fingerprint: Tuple[int, Optional[bool]] + ) -> bool: + if sys.version_info >= (3, 11): + # The computation is relevant if the block was not visited previously + # with the same starting size and exception handler status than the + # one in use + return fingerprint not in self.common.blocks_startsizes[block_id] + else: + # The computation is relevant if the block was only visited with smaller + # starting sizes than the one in use + if sizes := self.common.blocks_startsizes[block_id]: + return fingerprint[0] > max(f[0] for f in sizes) + else: + return True class ControlFlowGraph(_bytecode.BaseBytecode): - def __init__(self): + def __init__(self) -> None: super().__init__() - self._blocks = [] - self._block_index = {} - self.argnames = [] + self._blocks: List[BasicBlock] = [] + self._block_index: Dict[int, int] = {} + self.argnames: List[str] = [] self.add_block() - def legalize(self): + def legalize(self) -> None: """Legalize all blocks.""" current_lineno = self.first_lineno for block in self._blocks: current_lineno = block.legalize(current_lineno) - def get_block_index(self, block): + def get_block_index(self, block: BasicBlock) -> int: try: return self._block_index[id(block)] except KeyError: - raise ValueError("the block is not part of this bytecode") + raise ValueError(f"the block {block} is not part of this bytecode") # noqa - def _add_block(self, block): + def _add_block(self, block: BasicBlock) -> None: block_index = len(self._blocks) self._blocks.append(block) self._block_index[id(block)] = block_index - def add_block(self, instructions=None): + def add_block( + self, instructions: Optional[Iterable[Union[Instr, SetLineno]]] = None + ) -> BasicBlock: block = BasicBlock(instructions) self._add_block(block) return block - def compute_stacksize(self, *, check_pre_and_post=True): + def compute_stacksize( + self, + *, + check_pre_and_post: bool = True, + compute_exception_stack_depths: bool = True, + ) -> int: """Compute the stack size by iterating through the blocks The implementation make use of a generator function to avoid issue with @@ -217,10 +508,15 @@ def compute_stacksize(self, *, check_pre_and_post=True): if not self: return 0 - # Ensure that previous calculation do not impact this one. - for block in self: - block.seen = False - block.startsize = -32768 # INT_MIN + # Create the common storage for the calculation + common = _StackSizeComputationStorage( + check_pre_and_post, + seen_blocks=set(), + blocks_startsizes={id(b): set() for b in self}, + exception_block_startsize=dict.fromkeys([id(b) for b in self], 32768), + exception_block_maxsize=dict.fromkeys([id(b) for b in self], -32768), + try_begins=[], + ) # Starting with Python 3.10, generator and coroutines start with one object # on the stack (None, anything is an error). @@ -233,12 +529,12 @@ def compute_stacksize(self, *, check_pre_and_post=True): initial_stack_size = 1 # Create a generator/coroutine responsible of dealing with the first block - coro = _compute_stack_size( - self[0], initial_stack_size, 0, check_pre_and_post=check_pre_and_post - ) + coro = _StackSizeComputer( + common, self[0], initial_stack_size, 0, 0, None, None + ).run() # Create a list of generator that have not yet been exhausted - coroutines = [] + coroutines: List[Generator[Union[_StackSizeComputer, int], int, None]] = [] push_coroutine = coroutines.append pop_coroutine = coroutines.pop @@ -246,10 +542,12 @@ def compute_stacksize(self, *, check_pre_and_post=True): try: while True: - args = coro.send(None) + # Mypy does not seem to honor the fact that one must send None + # to a brand new generator irrespective of its send type. + args = coro.send(None) # type: ignore # Consume the stored generators as long as they return a simple - # interger that is to be used to resume the last stored generator. + # integer that is to be used to resume the last stored generator. while isinstance(args, int): coro = pop_coroutine() args = coro.send(args) @@ -257,75 +555,134 @@ def compute_stacksize(self, *, check_pre_and_post=True): # Otherwise we enter a new block and we store the generator under # use and create a new one to process the new block push_coroutine(coro) - coro = _compute_stack_size(*args, check_pre_and_post=check_pre_and_post) + coro = args.run() except IndexError: # The exception occurs when all the generators have been exhausted - # in which case teh last yielded value is the stacksize. - assert args is not None + # in which case the last yielded value is the stacksize. + assert args is not None and isinstance(args, int) + + # Exception handling block size is reported separately since we need + # to report only the stack usage for the smallest start size for the + # block + args = max(args, *common.exception_block_maxsize.values()) + + # Check if there is dead code that may contain TryBegin/TryEnd pairs. + # For any such pair we set a huge size (the exception table format does not + # mandate a maximum value). We do so so that if the pair is fused with + # another it does not alter the computed size. + for block in self: + if not common.blocks_startsizes[id(block)]: + for i in block: + if isinstance(i, TryBegin) and i.stack_depth is UNSET: + i.stack_depth = 32768 + + # If requested update the TryBegin stack size + if compute_exception_stack_depths: + for tb in common.try_begins: + size = common.exception_block_startsize[id(tb.target)] + assert size >= 0 + tb.stack_depth = size + return args - def __repr__(self): + def __repr__(self) -> str: return "" % len(self._blocks) - def get_instructions(self): - instructions = [] - jumps = [] + # Helper to obtain a flat list of instr, which does not refer to block at + # anymore. Used for comparison of different CFG. + def _get_instructions( + self, + ) -> List: + instructions: List = [] + try_begins: Dict[TryBegin, int] = {} for block in self: - target_block = block.get_jump() - if target_block is not None: - instr = block[-1] - instr = ConcreteInstr(instr.name, 0, lineno=instr.lineno) - jumps.append((target_block, instr)) - - instructions.extend(block[:-1]) - instructions.append(instr) - else: - instructions.extend(block) - - for target_block, instr in jumps: - instr.arg = self.get_block_index(target_block) + for index, instr in enumerate(block): + if isinstance(instr, TryBegin): + assert isinstance(instr.target, BasicBlock) + try_begins.setdefault(instr, len(try_begins)) + instructions.append( + ( + "TryBegin", + try_begins[instr], + self.get_block_index(instr.target), + instr.push_lasti, + ) + ) + elif isinstance(instr, TryEnd): + instructions.append(("TryEnd", try_begins[instr.entry])) + elif isinstance(instr, Instr) and ( + instr.has_jump() or instr.is_final() + ): + if instr.has_jump(): + target_block = instr.arg + assert isinstance(target_block, BasicBlock) + # We use a concrete instr here to be able to use an integer as + # argument rather than a Label. This is fine for comparison + # purposes which is our sole goal here. + c_instr = ConcreteInstr( + instr.name, + self.get_block_index(target_block), + location=instr.location, + ) + instructions.append(c_instr) + else: + instructions.append(instr) + + if te := block.get_trailing_try_end(index): + instructions.append(("TryEnd", try_begins[te.entry])) + break + else: + instructions.append(instr) return instructions - def __eq__(self, other): - if type(self) != type(other): + def __eq__(self, other: Any) -> bool: + if type(self) is not type(other): return False if self.argnames != other.argnames: return False - instrs1 = self.get_instructions() - instrs2 = other.get_instructions() + instrs1 = self._get_instructions() + instrs2 = other._get_instructions() if instrs1 != instrs2: return False # FIXME: compare block.next_block return super().__eq__(other) - def __len__(self): + def __len__(self) -> int: return len(self._blocks) - def __iter__(self): + def __iter__(self) -> Iterator[BasicBlock]: return iter(self._blocks) + @overload + def __getitem__(self, index: Union[int, BasicBlock]) -> BasicBlock: + ... + + @overload + def __getitem__(self: U, index: slice) -> U: + ... + def __getitem__(self, index): if isinstance(index, BasicBlock): index = self.get_block_index(index) return self._blocks[index] - def __delitem__(self, index): + def __delitem__(self, index: Union[int, BasicBlock]) -> None: if isinstance(index, BasicBlock): index = self.get_block_index(index) block = self._blocks[index] del self._blocks[index] del self._block_index[id(block)] - for index in range(index, len(self)): - block = self._blocks[index] + for i in range(index, len(self)): + block = self._blocks[i] self._block_index[id(block)] -= 1 - def split_block(self, block, index): + def split_block(self, block: BasicBlock, index: int) -> BasicBlock: if not isinstance(block, BasicBlock): raise TypeError("expected block") block_index = self.get_block_index(block) @@ -358,66 +715,225 @@ def split_block(self, block, index): return block2 + def get_dead_blocks(self) -> List[BasicBlock]: + if not self: + return [] + + seen_block_ids = set() + stack = [self[0]] + while stack: + block = stack.pop() + if id(block) in seen_block_ids: + continue + seen_block_ids.add(id(block)) + for i in block: + if isinstance(i, Instr) and isinstance(i.arg, BasicBlock): + stack.append(i.arg) + elif isinstance(i, TryBegin): + assert isinstance(i.target, BasicBlock) + stack.append(i.target) + + return [b for b in self if id(b) not in seen_block_ids] + @staticmethod - def from_bytecode(bytecode): + def from_bytecode(bytecode: _bytecode.Bytecode) -> "ControlFlowGraph": # label => instruction index label_to_block_index = {} jumps = [] - block_starts = {} + try_end_locations = {} for index, instr in enumerate(bytecode): if isinstance(instr, Label): label_to_block_index[instr] = index - else: - if isinstance(instr, Instr) and isinstance(instr.arg, Label): - jumps.append((index, instr.arg)) - + elif isinstance(instr, Instr) and isinstance(instr.arg, Label): + jumps.append((index, instr.arg)) + elif isinstance(instr, TryBegin): + assert isinstance(instr.target, Label) + jumps.append((index, instr.target)) + elif isinstance(instr, TryEnd): + try_end_locations[instr.entry] = index + + # Figure out on which index block targeted by a label start + block_starts = {} for target_index, target_label in jumps: target_index = label_to_block_index[target_label] block_starts[target_index] = target_label - bytecode_blocks = _bytecode.ControlFlowGraph() + bytecode_blocks = ControlFlowGraph() bytecode_blocks._copy_attr_from(bytecode) bytecode_blocks.argnames = list(bytecode.argnames) # copy instructions, convert labels to block labels block = bytecode_blocks[0] labels = {} - jumps = [] + jumping_instrs: List[Instr] = [] + # Map input TryBegin to CFG TryBegins (split across blocks may yield multiple + # TryBegin from a single in the bytecode). + try_begins: Dict[TryBegin, list[TryBegin]] = {} + # Storage for TryEnds that need to be inserted at the beginning of a block. + # We use a list because the same block can be reached through several paths + # with different active TryBegins + add_try_end: Dict[Label, List[TryEnd]] = defaultdict(list) + + # Track the currently active try begin + active_try_begin: Optional[TryBegin] = None + try_begin_inserted_in_block = False + last_instr: Optional[Instr] = None for index, instr in enumerate(bytecode): + # Reference to the current block if we create a new one in the following. + old_block: BasicBlock | None = None + + # First we determine if we need to create a new block: + # - by checking the current instruction index if index in block_starts: old_label = block_starts[index] - if index != 0: + # Create a new block if the last created one is not empty + # (of real instructions) + if index != 0 and (li := block.get_last_non_artificial_instruction()): + old_block = block new_block = bytecode_blocks.add_block() - if not block[-1].is_final(): + # If the last non artificial instruction is not final connect + # this block to the next. + if not li.is_final(): block.next_block = new_block block = new_block if old_label is not None: labels[old_label] = block - elif block and isinstance(block[-1], Instr): - if block[-1].is_final(): + + # - by inspecting the last instr + elif block.get_last_non_artificial_instruction() and last_instr is not None: + # The last instruction is final but we did not create a block + # -> sounds like a block of dead code but we preserve it + if last_instr.is_final(): + old_block = block block = bytecode_blocks.add_block() - elif block[-1].has_jump(): + + # We are dealing with a conditional jump + elif last_instr.has_jump(): + assert isinstance(last_instr.arg, Label) + old_block = block new_block = bytecode_blocks.add_block() block.next_block = new_block block = new_block + # If we created a new block, we check: + # - if the current instruction is a TryEnd and if the last instruction + # is final in which case we insert the TryEnd in the old block. + # - if we have a currently active TryBegin for which we may need to + # create a TryEnd in the previous block and a new TryBegin in the + # new one because the blocks are not connected. + if old_block is not None: + temp = try_begin_inserted_in_block + try_begin_inserted_in_block = False + + if old_block is not None and last_instr is not None: + # The last instruction is final, if the current instruction is a + # TryEnd insert it in the same block and move to the next instruction + if last_instr.is_final() and isinstance(instr, TryEnd): + assert active_try_begin + nte = instr.copy() + nte.entry = try_begins[active_try_begin][-1] + old_block.append(nte) + active_try_begin = None + continue + + # If we have an active TryBegin and last_instr is: + elif active_try_begin is not None: + # - a jump whose target is beyond the TryEnd of the active + # TryBegin: we remember TryEnd should be prepended to the + # target block. + if ( + last_instr.has_jump() + and active_try_begin in try_end_locations + and ( + # last_instr is a jump so arg is a Label + label_to_block_index[last_instr.arg] # type: ignore + >= try_end_locations[active_try_begin] + ) + ): + assert isinstance(last_instr.arg, Label) + add_try_end[last_instr.arg].append( + TryEnd(try_begins[active_try_begin][-1]) + ) + + # - final and the try begin originate from the current block: + # we insert a TryEnd in the old block and a new TryBegin in + # the new one since the blocks are disconnected. + if last_instr.is_final() and temp: + old_block.append(TryEnd(try_begins[active_try_begin][-1])) + new_tb = TryBegin( + active_try_begin.target, active_try_begin.push_lasti + ) + block.append(new_tb) + # Add this new TryBegin to the map to properly update + # the target. + try_begins[active_try_begin].append(new_tb) + try_begin_inserted_in_block = True + + last_instr = None + if isinstance(instr, Label): continue # don't copy SetLineno objects - if isinstance(instr, Instr): - instr = instr.copy() - if isinstance(instr.arg, Label): - jumps.append(instr) + if isinstance(instr, (Instr, TryBegin, TryEnd)): + new = instr.copy() + if isinstance(instr, TryBegin): + assert active_try_begin is None + active_try_begin = instr + try_begin_inserted_in_block = True + assert isinstance(new, TryBegin) + try_begins[instr] = [new] + elif isinstance(instr, TryEnd): + assert isinstance(new, TryEnd) + new.entry = try_begins[instr.entry][-1] + active_try_begin = None + try_begin_inserted_in_block = False + else: + last_instr = instr + if isinstance(instr.arg, Label): + assert isinstance(new, Instr) + jumping_instrs.append(new) + + instr = new + block.append(instr) - for instr in jumps: + # Insert the necessary TryEnds at the beginning of block that were marked + # (if we did not already insert an equivalent TryEnd earlier). + for lab, tes in add_try_end.items(): + block = labels[lab] + existing_te_entries = set() + index = 0 + # We use a while loop since the block cannot yet be iterated on since + # jumps still use labels instead of blocks + while index < len(block): + i = block[index] + index += 1 + if isinstance(i, TryEnd): + existing_te_entries.add(i.entry) + else: + break + for te in tes: + if te.entry not in existing_te_entries: + labels[lab].insert(0, te) + existing_te_entries.add(te.entry) + + # Replace labels by block in jumping instructions + for instr in jumping_instrs: label = instr.arg + assert isinstance(label, Label) instr.arg = labels[label] + # Replace labels by block in TryBegin + for b_tb, c_tbs in try_begins.items(): + label = b_tb.target + assert isinstance(label, Label) + for c_tb in c_tbs: + c_tb.target = labels[label] + return bytecode_blocks - def to_bytecode(self): + def to_bytecode(self) -> _bytecode.Bytecode: """Convert to Bytecode.""" used_blocks = set() @@ -426,9 +942,21 @@ def to_bytecode(self): if target_block is not None: used_blocks.add(id(target_block)) + for tb in (i for i in block if isinstance(i, TryBegin)): + used_blocks.add(id(tb.target)) + labels = {} jumps = [] - instructions = [] + try_begins = {} + seen_try_end: Set[TryBegin] = set() + instructions: List[Union[Instr, Label, TryBegin, TryEnd, SetLineno]] = [] + + # Track the last seen TryBegin and TryEnd to be able to fuse adjacent + # TryEnd/TryBegin pair which share the same target. + # In each case, we store the value found in the CFG and the value + # inserted in the bytecode. + last_try_begin: tuple[TryBegin, TryBegin] | None = None + last_try_end: tuple[TryEnd, TryEnd] | None = None for block in self: if id(block) in used_blocks: @@ -438,16 +966,73 @@ def to_bytecode(self): for instr in block: # don't copy SetLineno objects - if isinstance(instr, Instr): - instr = instr.copy() - if isinstance(instr.arg, BasicBlock): - jumps.append(instr) + if isinstance(instr, (Instr, TryBegin, TryEnd)): + new = instr.copy() + if isinstance(instr, TryBegin): + # If due to jumps and split TryBegin, we encounter a TryBegin + # while we still have a TryBegin ensure they can be fused. + if last_try_begin is not None: + cfg_tb, byt_tb = last_try_begin + assert instr.target is cfg_tb.target + assert instr.push_lasti == cfg_tb.push_lasti + byt_tb.stack_depth = min( + byt_tb.stack_depth, instr.stack_depth + ) + + # If the TryBegin share the target and push_lasti of the + # entry of an adjacent TryEnd, omit the new TryBegin that + # was inserted to allow analysis of the CFG and remove + # the already inserted TryEnd. + if last_try_end is not None: + cfg_te, byt_te = last_try_end + entry = cfg_te.entry + if ( + entry.target is instr.target + and entry.push_lasti == instr.push_lasti + ): + # If we did not yet compute the required stack depth + # keep the value as UNSET + if entry.stack_depth is UNSET: + assert instr.stack_depth is UNSET + byt_te.entry.stack_depth = UNSET + else: + byt_te.entry.stack_depth = min( + entry.stack_depth, instr.stack_depth + ) + try_begins[instr] = byt_te.entry + instructions.remove(byt_te) + continue + assert isinstance(new, TryBegin) + try_begins[instr] = new + last_try_begin = (instr, new) + last_try_end = None + elif isinstance(instr, TryEnd): + # Only keep the first seen TryEnd matching a TryBegin + assert isinstance(new, TryEnd) + if instr.entry in seen_try_end: + continue + seen_try_end.add(instr.entry) + new.entry = try_begins[instr.entry] + last_try_begin = None + last_try_end = (instr, new) + elif isinstance(instr.arg, BasicBlock): + assert isinstance(new, Instr) + jumps.append(new) + last_try_end = None + else: + last_try_end = None + + instr = new + instructions.append(instr) # Map to new labels for instr in jumps: instr.arg = labels[id(instr.arg)] + for tb in set(try_begins.values()): + tb.target = labels[id(tb.target)] + bytecode = _bytecode.Bytecode() bytecode._copy_attr_from(self) bytecode.argnames = list(self.argnames) @@ -455,9 +1040,22 @@ def to_bytecode(self): return bytecode - def to_code(self, stacksize=None): + def to_code( + self, + stacksize: Optional[int] = None, + *, + check_pre_and_post: bool = True, + compute_exception_stack_depths: bool = True, + ) -> types.CodeType: """Convert to code.""" if stacksize is None: - stacksize = self.compute_stacksize() + stacksize = self.compute_stacksize( + check_pre_and_post=check_pre_and_post, + compute_exception_stack_depths=compute_exception_stack_depths, + ) bc = self.to_bytecode() - return bc.to_code(stacksize=stacksize) + return bc.to_code( + stacksize=stacksize, + check_pre_and_post=False, + compute_exception_stack_depths=False, + ) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/concrete.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/concrete.py index bd756cba7c..609150b102 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/concrete.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/concrete.py @@ -4,29 +4,59 @@ import struct import sys import types +from typing import ( + Any, + Dict, + Iterable, + Iterator, + List, + MutableSequence, + Optional, + Sequence, + Set, + Tuple, + Type, + TypeVar, + Union, +) # alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode +from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags from _pydevd_frame_eval.vendored.bytecode.instr import ( + _UNSET, + BITFLAG2_INSTRUCTIONS, + BITFLAG_INSTRUCTIONS, + INTRINSIC, + INTRINSIC_1OP, + INTRINSIC_2OP, + PLACEHOLDER_LABEL, UNSET, + BaseInstr, + CellVar, + Compare, + FreeVar, Instr, + InstrArg, + InstrLocation, + Intrinsic1Op, + Intrinsic2Op, Label, SetLineno, - FreeVar, - CellVar, - Compare, - const_key, + TryBegin, + TryEnd, _check_arg_int, + const_key, + opcode_has_argument, ) - # - jumps use instruction # - lineno use bytes (dis.findlinestarts(code)) # - dis displays bytes OFFSET_AS_INSTRUCTION = sys.version_info >= (3, 10) -def _set_docstring(code, consts): +def _set_docstring(code: _bytecode.BaseBytecode, consts: Sequence) -> None: if not consts: return first_const = consts[0] @@ -34,36 +64,60 @@ def _set_docstring(code, consts): code.docstring = first_const -class ConcreteInstr(Instr): +T = TypeVar("T", bound="ConcreteInstr") + + +class ConcreteInstr(BaseInstr[int]): """Concrete instruction. arg must be an integer in the range 0..2147483647. It has a read-only size attribute. + """ + # For ConcreteInstr the argument is always an integer + _arg: int + __slots__ = ("_size", "_extended_args", "offset") - def __init__(self, name, arg=UNSET, *, lineno=None, extended_args=None, offset=None): + def __init__( + self, + name: str, + arg: int=UNSET, + *, + lineno: Union[int, None, _UNSET]=UNSET, + location: Optional[InstrLocation]=None, + extended_args: Optional[int]=None, + offset=None, + ): # Allow to remember a potentially meaningless EXTENDED_ARG emitted by # Python to properly compute the size and avoid messing up the jump # targets self._extended_args = extended_args - self._set(name, arg, lineno) self.offset = offset + super().__init__(name, arg, lineno=lineno, location=location) - def _check_arg(self, name, opcode, arg): - if opcode >= _opcode.HAVE_ARGUMENT: + def _check_arg(self, name: str, opcode: int, arg: int) -> None: + if opcode_has_argument(opcode): if arg is UNSET: raise ValueError("operation %s requires an argument" % name) - _check_arg_int(name, arg) + _check_arg_int(arg, name) + # opcode == 0 corresponds to CACHE instruction in 3.11+ and was unused before + elif opcode == 0: + arg = arg if arg is not UNSET else 0 + _check_arg_int(arg, name) else: if arg is not UNSET: raise ValueError("operation %s has no argument" % name) - def _set(self, name, arg, lineno): - super()._set(name, arg, lineno) + def _set( + self, + name: str, + arg: int, + ) -> None: + super()._set(name, arg) size = 2 if arg is not UNSET: while arg > 0xFF: @@ -74,21 +128,30 @@ def _set(self, name, arg, lineno): self._size = size @property - def size(self): + def size(self) -> int: return self._size - def _cmp_key(self, labels=None): - return (self._lineno, self._name, self._arg) - - def get_jump_target(self, instr_offset): - if self._opcode in _opcode.hasjrel: - s = (self._size // 2) if OFFSET_AS_INSTRUCTION else self._size + def _cmp_key(self) -> Tuple[Optional[InstrLocation], str, int]: + return (self._location, self._name, self._arg) + + def get_jump_target(self, instr_offset: int) -> Optional[int]: + # When a jump arg is zero the jump always points to the first non-CACHE + # opcode following the jump. The passed in offset is the offset at + # which the jump opcode starts. So to compute the target, we add to it + # the instruction size (accounting for extended args) and the + # number of caches expected to follow the jump instruction. + s = ( + (self._size // 2) if OFFSET_AS_INSTRUCTION else self._size + ) + self.use_cache_opcodes() + if self.is_forward_rel_jump(): return instr_offset + s + self._arg - if self._opcode in _opcode.hasjabs: + if self.is_backward_rel_jump(): + return instr_offset + s - self._arg + if self.is_abs_jump(): return self._arg return None - def assemble(self): + def assemble(self) -> bytes: if self._arg is UNSET: return bytes((self._opcode, 0)) @@ -105,10 +168,10 @@ def assemble(self): return bytes(b) @classmethod - def disassemble(cls, lineno, code, offset): + def disassemble(cls: Type[T], lineno: Optional[int], code: bytes, offset: int) -> T: index = 2 * offset if OFFSET_AS_INSTRUCTION else offset op = code[index] - if op >= _opcode.HAVE_ARGUMENT: + if opcode_has_argument(op): arg = code[index + 1] else: arg = UNSET @@ -116,26 +179,112 @@ def disassemble(cls, lineno, code, offset): # fabioz: added offset to ConcreteBytecode # Need to keep an eye on https://github.com/MatthieuDartiailh/bytecode/issues/48 in # case the library decides to add this in some other way. - return cls(name, arg, lineno=lineno, offset=index) + return cls(name, arg, lineno=lineno, offset=offset) + + def use_cache_opcodes(self) -> int: + return ( + # Not supposed to be used but we need it + dis._inline_cache_entries[self._opcode] # type: ignore + if sys.version_info >= (3, 11) + else 0 + ) + +class ExceptionTableEntry: + """Entry for a given line in the exception table. -class ConcreteBytecode(_bytecode._BaseBytecodeList): - def __init__(self, instructions=(), *, consts=(), names=(), varnames=()): + All offset are expressed in instructions not in bytes. + + """ + + # : Offset in instruction between the beginning of the bytecode and the beginning + # : of this entry. + start_offset: int + + # : Offset in instruction between the beginning of the bytecode and the end + # : of this entry. This offset is inclusive meaning that the instruction it points + # : to is included in the try/except handling. + stop_offset: int + + # : Offset in instruction to the first instruction of the exception handling block. + target: int + + # : Minimal stack depth in the block delineated by start and stop + # : offset of the exception table entry. Used to restore the stack (by + # : popping items) when entering the exception handling block. + stack_depth: int + + # : Should the offset, at which an exception was raised, be pushed on the stack + # : before the exception itself (which is pushed as a single value)). + push_lasti: bool + + __slots__ = ("start_offset", "stop_offset", "target", "stack_depth", "push_lasti") + + def __init__( + self, + start_offset: int, + stop_offset: int, + target: int, + stack_depth: int, + push_lasti: bool, + ) -> None: + self.start_offset = start_offset + self.stop_offset = stop_offset + self.target = target + self.stack_depth = stack_depth + self.push_lasti = push_lasti + + def __repr__(self) -> str: + return ( + "ExceptionTableEntry(" + f"start_offset={self.start_offset}, " + f"stop_offset={self.stop_offset}, " + f"target={self.target}, " + f"stack_depth={self.stack_depth}, " + f"push_lasti={self.push_lasti}" + ) + + +class ConcreteBytecode(_bytecode._BaseBytecodeList[Union[ConcreteInstr, SetLineno]]): + # : List of "constant" objects for the bytecode + consts: List + + # : List of names used by local variables. + names: List[str] + + # : List of names used by input variables. + varnames: List[str] + + # : Table describing portion of the bytecode in which exceptions are caught and + # : where there are handled. + # : Used only in Python 3.11+ + exception_table: List[ExceptionTableEntry] + + def __init__( + self, + instructions=(), + *, + consts: tuple=(), + names: Tuple[str, ...]=(), + varnames: Iterable[str]=(), + exception_table: Optional[List[ExceptionTableEntry]]=None, + ): super().__init__() self.consts = list(consts) self.names = list(names) self.varnames = list(varnames) + self.exception_table = exception_table or [] for instr in instructions: self._check_instr(instr) self.extend(instructions) - def __iter__(self): + def __iter__(self) -> Iterator[Union[ConcreteInstr, SetLineno]]: instructions = super().__iter__() for instr in instructions: self._check_instr(instr) yield instr - def _check_instr(self, instr): + def _check_instr(self, instr: Any) -> None: if not isinstance(instr, (ConcreteInstr, SetLineno)): raise ValueError( "ConcreteBytecode must only contain " @@ -150,11 +299,11 @@ def _copy_attr_from(self, bytecode): self.names = bytecode.names self.varnames = bytecode.varnames - def __repr__(self): + def __repr__(self) -> str: return "" % len(self) - def __eq__(self, other): - if type(self) != type(other): + def __eq__(self, other: Any) -> bool: + if type(self) is not type(other): return False const_keys1 = list(map(const_key, self.consts)) @@ -170,26 +319,48 @@ def __eq__(self, other): return super().__eq__(other) @staticmethod - def from_code(code, *, extended_arg=False): - line_starts = dict(dis.findlinestarts(code)) + def from_code( + code: types.CodeType, *, extended_arg: bool=False + ) -> "ConcreteBytecode": + instructions: MutableSequence[Union[SetLineno, ConcreteInstr]] + # For Python 3.11+ we use dis to extract the detailed location information at + # reduced maintenance cost. + if sys.version_info >= (3, 11): + instructions = [ + # dis.get_instructions automatically handle extended arg which + # we do not want, so we fold back arguments to be between 0 and 255 + ConcreteInstr( + i.opname, + i.arg % 256 if i.arg is not None else UNSET, + location=InstrLocation.from_positions(i.positions) + if i.positions + else None, + offset=i.offset + ) + for i in dis.get_instructions(code, show_caches=True) + ] + else: + if sys.version_info >= (3, 10): + line_starts = {offset: lineno for offset, _, lineno in code.co_lines()} + else: + line_starts = dict(dis.findlinestarts(code)) - # find block starts - instructions = [] - offset = 0 - lineno = code.co_firstlineno - while offset < (len(code.co_code) // (2 if OFFSET_AS_INSTRUCTION else 1)): - lineno_off = (2 * offset) if OFFSET_AS_INSTRUCTION else offset - if lineno_off in line_starts: - lineno = line_starts[lineno_off] + # find block starts + instructions = [] + offset = 0 + lineno: Optional[int] = code.co_firstlineno + while offset < (len(code.co_code) // (2 if OFFSET_AS_INSTRUCTION else 1)): + lineno_off = (2 * offset) if OFFSET_AS_INSTRUCTION else offset + if lineno_off in line_starts: + lineno = line_starts[lineno_off] - instr = ConcreteInstr.disassemble(lineno, code.co_code, offset) + instr = ConcreteInstr.disassemble(lineno, code.co_code, offset) - instructions.append(instr) - offset += (instr.size // 2) if OFFSET_AS_INSTRUCTION else instr.size + instructions.append(instr) + offset += (instr.size // 2) if OFFSET_AS_INSTRUCTION else instr.size bytecode = ConcreteBytecode() - # replace jump targets with blocks # HINT : in some cases Python generate useless EXTENDED_ARG opcode # with a value of zero. Such opcodes do not increases the size of the # following opcode the way a normal EXTENDED_ARG does. As a @@ -201,10 +372,9 @@ def from_code(code, *, extended_arg=False): bytecode.name = code.co_name bytecode.filename = code.co_filename - bytecode.flags = code.co_flags + bytecode.flags = CompilerFlags(code.co_flags) bytecode.argcount = code.co_argcount - if sys.version_info >= (3, 8): - bytecode.posonlyargcount = code.co_posonlyargcount + bytecode.posonlyargcount = code.co_posonlyargcount bytecode.kwonlyargcount = code.co_kwonlyargcount bytecode.first_lineno = code.co_firstlineno bytecode.names = list(code.co_names) @@ -213,23 +383,38 @@ def from_code(code, *, extended_arg=False): bytecode.freevars = list(code.co_freevars) bytecode.cellvars = list(code.co_cellvars) _set_docstring(bytecode, code.co_consts) + if sys.version_info >= (3, 11): + bytecode.exception_table = bytecode._parse_exception_table( + code.co_exceptiontable + ) + bytecode.qualname = code.co_qualname + else: + bytecode.qualname = bytecode.qualname bytecode[:] = instructions return bytecode @staticmethod - def _normalize_lineno(instructions, first_lineno): + def _normalize_lineno( + instructions: Sequence[Union[ConcreteInstr, SetLineno]], first_lineno: int + ) -> Iterator[Tuple[int, ConcreteInstr]]: lineno = first_lineno + # For each instruction compute an "inherited" lineno used: + # - on 3.8 and 3.9 for which a lineno is mandatory + # - to infer a lineno on 3.10+ if no lineno was provided for instr in instructions: + i_lineno = instr.lineno # if instr.lineno is not set, it's inherited from the previous # instruction, or from self.first_lineno - if instr.lineno is not None: - lineno = instr.lineno + if i_lineno is not None and i_lineno is not UNSET: + lineno = i_lineno if isinstance(instr, ConcreteInstr): yield (lineno, instr) - def _assemble_code(self): + def _assemble_code( + self, + ) -> Tuple[bytes, List[Tuple[int, int, int, Optional[InstrLocation]]]]: offset = 0 code_str = [] linenos = [] @@ -237,26 +422,29 @@ def _assemble_code(self): code_str.append(instr.assemble()) i_size = instr.size linenos.append( - ((offset * 2) if OFFSET_AS_INSTRUCTION else offset, i_size, lineno) + ( + (offset * 2) if OFFSET_AS_INSTRUCTION else offset, + i_size, + lineno, + instr.location, + ) ) offset += (i_size // 2) if OFFSET_AS_INSTRUCTION else i_size - code_str = b"".join(code_str) - return (code_str, linenos) + return (b"".join(code_str), linenos) + + # Used on 3.8 and 3.9 @staticmethod - def _assemble_lnotab(first_lineno, linenos): + def _assemble_lnotab( + first_lineno: int, linenos: List[Tuple[int, int, int, Optional[InstrLocation]]] + ) -> bytes: lnotab = [] old_offset = 0 old_lineno = first_lineno - for offset, _, lineno in linenos: + for offset, _, lineno, _ in linenos: dlineno = lineno - old_lineno if dlineno == 0: continue - # FIXME: be kind, force monotonic line numbers? add an option? - if dlineno < 0 and sys.version_info < (3, 6): - raise ValueError( - "negative line number delta is not supported " "on Python < 3.6" - ) old_lineno = lineno doff = offset - old_offset @@ -284,16 +472,28 @@ def _assemble_lnotab(first_lineno, linenos): return b"".join(lnotab) @staticmethod - def _pack_linetable(doff, dlineno, linetable): + def _pack_linetable( + linetable: List[bytes], doff: int, dlineno: Optional[int] + ) -> None: + if dlineno is not None: + # Ensure linenos are between -126 and +126, by using 127 lines jumps with + # a 0 byte offset + while dlineno < -127: + linetable.append(struct.pack("Bb", 0, -127)) + dlineno -= -127 - while dlineno < -127: - linetable.append(struct.pack("Bb", 0, -127)) - dlineno -= -127 + while dlineno > 127: + linetable.append(struct.pack("Bb", 0, 127)) + dlineno -= 127 - while dlineno > 127: - linetable.append(struct.pack("Bb", 0, 127)) - dlineno -= 127 + assert -127 <= dlineno <= 127 + else: + dlineno = -128 + # Ensure offsets are less than 255. + # If an offset is larger, we first mark the line change with an offset of 254 + # then use as many 254 offset with no line change to reduce the offset to + # less than 254. if doff > 254: linetable.append(struct.pack("Bb", 254, dlineno)) doff -= 254 @@ -307,40 +507,238 @@ def _pack_linetable(doff, dlineno, linetable): linetable.append(struct.pack("Bb", doff, dlineno)) assert 0 <= doff <= 254 - assert -127 <= dlineno <= 127 - - def _assemble_linestable(self, first_lineno, linenos): + # Used on 3.10 + def _assemble_linestable( + self, + first_lineno: int, + linenos: Iterable[Tuple[int, int, int, Optional[InstrLocation]]], + ) -> bytes: if not linenos: return b"" - linetable = [] + linetable: List[bytes] = [] old_offset = 0 - + iter_in = iter(linenos) - - offset, i_size, old_lineno = next(iter_in) - old_dlineno = old_lineno - first_lineno - for offset, i_size, lineno in iter_in: - dlineno = lineno - old_lineno - if dlineno == 0: + + offset, i_size, old_lineno, old_location = next(iter_in) + if old_location is not None: + old_dlineno = ( + old_location.lineno - first_lineno + if old_location.lineno is not None + else None + ) + else: + old_dlineno = old_lineno - first_lineno + + # i_size is used after we exit the loop + for offset, i_size, lineno, location in iter_in: # noqa + if location is not None: + dlineno = ( + location.lineno - old_lineno + if location.lineno is not None + else None + ) + else: + dlineno = lineno - old_lineno + + if dlineno == 0 or (old_dlineno is None and dlineno is None): continue old_lineno = lineno doff = offset - old_offset old_offset = offset - self._pack_linetable(doff, old_dlineno, linetable) + self._pack_linetable(linetable, doff, old_dlineno) old_dlineno = dlineno # Pack the line of the last instruction. doff = offset + i_size - old_offset - self._pack_linetable(doff, old_dlineno, linetable) + self._pack_linetable(linetable, doff, old_dlineno) return b"".join(linetable) + # The formats are describes in CPython/Objects/locations.md + @staticmethod + def _encode_location_varint(varint: int) -> bytearray: + encoded = bytearray() + # We encode on 6 bits + while True: + encoded.append(varint & 0x3F) + varint >>= 6 + if varint: + encoded[-1] |= 0x40 # bit 6 is set except on the last entry + else: + break + return encoded + + def _encode_location_svarint(self, svarint: int) -> bytearray: + if svarint < 0: + return self._encode_location_varint(((-svarint) << 1) | 1) + else: + return self._encode_location_varint(svarint << 1) + + # Python 3.11+ location format encoding + @staticmethod + def _pack_location_header(code: int, size: int) -> int: + return (1 << 7) + (code << 3) + (size - 1 if size <= 8 else 7) + + def _pack_location( + self, size: int, lineno: int, location: Optional[InstrLocation] + ) -> bytearray: + packed = bytearray() + + l_lineno: Optional[int] + # The location was not set so we infer a line. + if location is None: + l_lineno, end_lineno, col_offset, end_col_offset = ( + lineno, + None, + None, + None, + ) + else: + l_lineno, end_lineno, col_offset, end_col_offset = ( + location.lineno, + location.end_lineno, + location.col_offset, + location.end_col_offset, + ) + + # We have no location information so the code is 15 + if l_lineno is None: + packed.append(self._pack_location_header(15, size)) + + # No column info, code 13 + elif col_offset is None: + if end_lineno is not None and end_lineno != l_lineno: + raise ValueError( + "An instruction cannot have no column offset and span " + f"multiple lines (lineno: {l_lineno}, end lineno: {end_lineno}" + ) + packed.extend( + ( + self._pack_location_header(13, size), + *self._encode_location_svarint(l_lineno - lineno), + ) + ) + + # We enforce the end_lineno to be defined + else: + assert end_lineno is not None + assert end_col_offset is not None + + # Short forms + if ( + end_lineno == l_lineno + and l_lineno - lineno == 0 + and col_offset < 72 + and (end_col_offset - col_offset) <= 15 + ): + packed.extend( + ( + self._pack_location_header(col_offset // 8, size), + ((col_offset % 8) << 4) + (end_col_offset - col_offset), + ) + ) + + # One line form + elif ( + end_lineno == l_lineno + and l_lineno - lineno in (1, 2) + and col_offset < 256 + and end_col_offset < 256 + ): + packed.extend( + ( + self._pack_location_header(10 + l_lineno - lineno, size), + col_offset, + end_col_offset, + ) + ) + + # Long form + else: + packed.extend( + ( + self._pack_location_header(14, size), + *self._encode_location_svarint(l_lineno - lineno), + *self._encode_location_varint(end_lineno - l_lineno), + # When decoding in codeobject.c::advance_with_locations + # we remove 1 from the offset ... + *self._encode_location_varint(col_offset + 1), + *self._encode_location_varint(end_col_offset + 1), + ) + ) + + return packed + + def _push_locations( + self, + locations: List[bytearray], + size: int, + lineno: int, + location: InstrLocation, + ) -> int: + # We need the size in instruction not in bytes + size //= 2 + + # Repeatedly add element since we cannot cover more than 8 code + # elements. We recompute each time since in practice we will + # rarely loop. + while True: + locations.append(self._pack_location(size, lineno, location)) + # Update the lineno since if we need more than one entry the + # reference for the delta of the lineno change + lineno = location.lineno if location.lineno is not None else lineno + size -= 8 + if size < 1: + break + + return lineno + + def _assemble_locations( + self, + first_lineno: int, + linenos: Iterable[Tuple[int, int, int, Optional[InstrLocation]]], + ) -> bytes: + if not linenos: + return b"" + + locations: List[bytearray] = [] + + iter_in = iter(linenos) + + _, size, lineno, old_location = next(iter_in) + # Infer the line if location is None + old_location = old_location or InstrLocation(lineno, None, None, None) + lineno = first_lineno + + # We track the last set lineno to be able to compute deltas + for _, i_size, new_lineno, location in iter_in: + # Infer the line if location is None + location = location or InstrLocation(new_lineno, None, None, None) + + # Group together instruction with equivalent locations + if old_location.lineno and old_location == location: + size += i_size + continue + + lineno = self._push_locations(locations, size, lineno, old_location) + + size = i_size + old_location = location + + # Pack the line of the last instruction. + self._push_locations(locations, size, lineno, old_location) + + return b"".join(locations) + @staticmethod - def _remove_extended_args(instructions): + def _remove_extended_args( + instructions: MutableSequence[Union[SetLineno, ConcreteInstr]] + ) -> None: # replace jump targets with blocks # HINT : in some cases Python generate useless EXTENDED_ARG opcode # with a value of zero. Such opcodes do not increases the size of the @@ -369,13 +767,13 @@ def _remove_extended_args(instructions): continue if extended_arg is not None: - arg = (extended_arg << 8) + instr.arg + arg = UNSET if instr.name == "NOP" else (extended_arg << 8) + instr.arg extended_arg = None instr = ConcreteInstr( instr.name, arg, - lineno=instr.lineno, + location=instr.location, extended_args=nb_extended_args, offset=instr.offset, ) @@ -387,25 +785,106 @@ def _remove_extended_args(instructions): if extended_arg is not None: raise ValueError("EXTENDED_ARG at the end of the code") - def compute_stacksize(self, *, check_pre_and_post=True): + # Taken and adapted from exception_handling_notes.txt in cpython/Objects + @staticmethod + def _parse_varint(except_table_iterator: Iterator[int]) -> int: + b = next(except_table_iterator) + val = b & 63 + while b & 64: + val <<= 6 + b = next(except_table_iterator) + val |= b & 63 + return val + + def _parse_exception_table( + self, exception_table: bytes + ) -> List[ExceptionTableEntry]: + assert sys.version_info >= (3, 11) + table = [] + iterator = iter(exception_table) + try: + while True: + start = self._parse_varint(iterator) + length = self._parse_varint(iterator) + end = start + length - 1 # Present as inclusive + target = self._parse_varint(iterator) + dl = self._parse_varint(iterator) + depth = dl >> 1 + lasti = bool(dl & 1) + table.append(ExceptionTableEntry(start, end, target, depth, lasti)) + except StopIteration: + return table + + @staticmethod + def _encode_varint(value: int, set_begin_marker: bool=False) -> Iterator[int]: + # Encode value as a varint on 7 bits (MSB should come first) and set + # the begin marker if requested. + temp: List[int] = [] + assert value >= 0 + while value: + temp.append(value & 63 | (64 if temp else 0)) + value >>= 6 + temp = temp or [0] + if set_begin_marker: + temp[-1] |= 128 + return reversed(temp) + + def _assemble_exception_table(self) -> bytes: + table = bytearray() + for entry in self.exception_table or []: + size = entry.stop_offset - entry.start_offset + 1 + depth = (entry.stack_depth << 1) + entry.push_lasti + table.extend(self._encode_varint(entry.start_offset, True)) + table.extend(self._encode_varint(size)) + table.extend(self._encode_varint(entry.target)) + table.extend(self._encode_varint(depth)) + + return bytes(table) + + def compute_stacksize(self, *, check_pre_and_post: bool=True) -> int: bytecode = self.to_bytecode() cfg = _bytecode.ControlFlowGraph.from_bytecode(bytecode) return cfg.compute_stacksize(check_pre_and_post=check_pre_and_post) - def to_code(self, stacksize=None, *, check_pre_and_post=True): + def to_code( + self, + stacksize: Optional[int]=None, + *, + check_pre_and_post: bool=True, + compute_exception_stack_depths: bool=True, + ) -> types.CodeType: + # Prevent reconverting the concrete bytecode to bytecode and cfg to do the + # calculation if we need to do it. + if stacksize is None or ( + sys.version_info >= (3, 11) and compute_exception_stack_depths + ): + cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) + stacksize = cfg.compute_stacksize( + check_pre_and_post=check_pre_and_post, + compute_exception_stack_depths=compute_exception_stack_depths, + ) + self = cfg.to_bytecode().to_concrete_bytecode( + compute_exception_stack_depths=False + ) + + # Assemble the code string after round tripping to CFG if necessary. code_str, linenos = self._assemble_code() + lnotab = ( - self._assemble_linestable(self.first_lineno, linenos) - if sys.version_info >= (3, 10) - else self._assemble_lnotab(self.first_lineno, linenos) + self._assemble_locations(self.first_lineno, linenos) + if sys.version_info >= (3, 11) + else ( + self._assemble_linestable(self.first_lineno, linenos) + if sys.version_info >= (3, 10) + else self._assemble_lnotab(self.first_lineno, linenos) + ) ) nlocals = len(self.varnames) - if stacksize is None: - stacksize = self.compute_stacksize(check_pre_and_post=check_pre_and_post) - if sys.version_info < (3, 8): + if sys.version_info >= (3, 11): return types.CodeType( self.argcount, + self.posonlyargcount, self.kwonlyargcount, nlocals, stacksize, @@ -416,8 +895,10 @@ def to_code(self, stacksize=None, *, check_pre_and_post=True): tuple(self.varnames), self.filename, self.name, + self.qualname, self.first_lineno, lnotab, + self._assemble_exception_table(), tuple(self.freevars), tuple(self.cellvars), ) @@ -441,80 +922,172 @@ def to_code(self, stacksize=None, *, check_pre_and_post=True): tuple(self.cellvars), ) - def to_bytecode(self): + def to_bytecode( + self, + prune_caches: bool=True, + conserve_exception_block_stackdepth: bool=False, + ) -> _bytecode.Bytecode: + # On 3.11 we generate pseudo-instruction from the exception table # Copy instruction and remove extended args if any (in-place) c_instructions = self[:] self._remove_extended_args(c_instructions) - # find jump targets - jump_targets = set() + # Find jump targets + jump_targets: Set[int] = set() offset = 0 - for instr in c_instructions: - if isinstance(instr, SetLineno): + for c_instr in c_instructions: + if isinstance(c_instr, SetLineno): continue - target = instr.get_jump_target(offset) + target = c_instr.get_jump_target(offset) if target is not None: jump_targets.add(target) - offset += (instr.size // 2) if OFFSET_AS_INSTRUCTION else instr.size - - # create labels - jumps = [] - instructions = [] + offset += (c_instr.size // 2) if OFFSET_AS_INSTRUCTION else c_instr.size + + # On 3.11+ we need to also look at the exception table for jump targets + for ex_entry in self.exception_table: + jump_targets.add(ex_entry.target) + + # Create look up dict to find entries based on either exception handling + # block exit or entry offsets. Several blocks can end on the same instruction + # so we store a list of entry per offset. + ex_start: Dict[int, ExceptionTableEntry] = {} + ex_end: Dict[int, List[ExceptionTableEntry]] = {} + for entry in self.exception_table: + # Ensure we do not have more than one entry with identical starting + # offsets + assert entry.start_offset not in ex_start + ex_start[entry.start_offset] = entry + ex_end.setdefault(entry.stop_offset, []).append(entry) + + # Create labels and instructions + jumps: List[Tuple[int, int]] = [] + instructions: List[Union[Instr, Label, TryBegin, TryEnd, SetLineno]] = [] labels = {} + tb_instrs: Dict[ExceptionTableEntry, TryBegin] = {} offset = 0 - ncells = len(self.cellvars) + # In Python 3.11+ cell and varnames can be shared and are indexed in a single + # array. + # As a consequence, the instruction argument can be either: + # - < len(varnames): the name is shared an we can directly use + # the index to access the name in cellvars + # - > len(varnames): the name is not shared and is offset by the + # number unshared varname. + # Free vars are never shared and correspond to index larger than the + # largest cell var. + # See PyCode_NewWithPosOnlyArgs + if sys.version_info >= (3, 11): + cells_lookup = self.varnames + [ + n for n in self.cellvars if n not in self.varnames + ] + ncells = len(cells_lookup) + else: + ncells = len(self.cellvars) + cells_lookup = self.cellvars - for lineno, instr in self._normalize_lineno(c_instructions, self.first_lineno): + for lineno, c_instr in self._normalize_lineno( + c_instructions, self.first_lineno + ): if offset in jump_targets: label = Label() labels[offset] = label instructions.append(label) - jump_target = instr.get_jump_target(offset) - size = instr.size - - arg = instr.arg - # FIXME: better error reporting - if instr.opcode in _opcode.hasconst: - arg = self.consts[arg] - elif instr.opcode in _opcode.haslocal: - arg = self.varnames[arg] - elif instr.opcode in _opcode.hasname: - arg = self.names[arg] - elif instr.opcode in _opcode.hasfree: - if arg < ncells: - name = self.cellvars[arg] - arg = CellVar(name) + # Handle TryBegin pseudo instructions + if offset in ex_start: + entry = ex_start[offset] + tb_instr = TryBegin( + Label(), + entry.push_lasti, + entry.stack_depth if conserve_exception_block_stackdepth else UNSET, + ) + # Per entry store the pseudo instruction associated + tb_instrs[entry] = tb_instr + instructions.append(tb_instr) + + jump_target = c_instr.get_jump_target(offset) + size = c_instr.size + # If an instruction uses extended args, those appear before the instruction + # causing the instruction to appear at offset that accounts for extended + # args. So we first update the offset to account for extended args, then + # record the instruction offset and then add the instruction itself to the + # offset. + offset += (size // 2 - 1) if OFFSET_AS_INSTRUCTION else (size - 2) + current_instr_offset = offset + offset += 1 if OFFSET_AS_INSTRUCTION else 2 + + # on Python 3.11+ remove CACHE opcodes if we are requested to do so. + # We are careful to first advance the offset and check that the CACHE + # is not a jump target. It should never be the case but we double check. + if prune_caches and c_instr.name == "CACHE": + assert jump_target is None + + # We may need to insert a TryEnd after a CACHE so we need to run the + # through the last block. + else: + arg: InstrArg + c_arg = c_instr.arg + # FIXME: better error reporting + if c_instr.opcode in _opcode.hasconst: + arg = self.consts[c_arg] + elif c_instr.opcode in _opcode.haslocal: + arg = self.varnames[c_arg] + elif c_instr.opcode in _opcode.hasname: + if c_instr.name in BITFLAG_INSTRUCTIONS: + arg = (bool(c_arg & 1), self.names[c_arg >> 1]) + elif c_instr.name in BITFLAG2_INSTRUCTIONS: + arg = (bool(c_arg & 1), bool(c_arg & 2), self.names[c_arg >> 2]) + else: + arg = self.names[c_arg] + elif c_instr.opcode in _opcode.hasfree: + if c_arg < ncells: + name = cells_lookup[c_arg] + arg = CellVar(name) + else: + name = self.freevars[c_arg - ncells] + arg = FreeVar(name) + elif c_instr.opcode in _opcode.hascompare: + arg = Compare( + (c_arg >> 4) if sys.version_info >= (3, 12) else c_arg + ) + elif c_instr.opcode in INTRINSIC_1OP: + arg = Intrinsic1Op(c_arg) + elif c_instr.opcode in INTRINSIC_2OP: + arg = Intrinsic2Op(c_arg) else: - name = self.freevars[arg - ncells] - arg = FreeVar(name) - elif instr.opcode in _opcode.hascompare: - arg = Compare(arg) + arg = c_arg - if jump_target is None: - instr = Instr(instr.name, arg, lineno=lineno, offset=instr.offset) - else: - instr_index = len(instructions) - instructions.append(instr) - offset += (size // 2) if OFFSET_AS_INSTRUCTION else size + location = c_instr.location or InstrLocation(lineno, None, None, None) + + if jump_target is not None: + arg = PLACEHOLDER_LABEL + instr_index = len(instructions) + jumps.append((instr_index, jump_target)) - if jump_target is not None: - jumps.append((instr_index, jump_target)) + instructions.append(Instr(c_instr.name, arg, location=location, offset=c_instr.offset)) - # replace jump targets with labels + # We now insert the TryEnd entries + if current_instr_offset in ex_end: + entries = ex_end[current_instr_offset] + for entry in reversed(entries): + instructions.append(TryEnd(tb_instrs[entry])) + + # Replace jump targets with labels for index, jump_target in jumps: instr = instructions[index] + assert isinstance(instr, Instr) and instr.arg is PLACEHOLDER_LABEL # FIXME: better error reporting on missing label - label = labels[jump_target] - instructions[index] = Instr(instr.name, label, lineno=instr.lineno, offset=instr.offset) + instr.arg = labels[jump_target] + + # Set the label for TryBegin + for entry, tb in tb_instrs.items(): + tb.target = labels[entry.target] bytecode = _bytecode.Bytecode() bytecode._copy_attr_from(self) nargs = bytecode.argcount + bytecode.kwonlyargcount - if sys.version_info > (3, 8): - nargs += bytecode.posonlyargcount + nargs += bytecode.posonlyargcount if bytecode.flags & inspect.CO_VARARGS: nargs += 1 if bytecode.flags & inspect.CO_VARKEYWORDS: @@ -527,27 +1100,31 @@ def to_bytecode(self): class _ConvertBytecodeToConcrete: + # XXX document attributes - # Default number of passes of compute_jumps() before giving up. Refer to - # assemble_jump_offsets() in compile.c for background. + # : Default number of passes of compute_jumps() before giving up. Refer to + # : assemble_jump_offsets() in compile.c for background. _compute_jumps_passes = 10 - def __init__(self, code): + def __init__(self, code: _bytecode.Bytecode) -> None: assert isinstance(code, _bytecode.Bytecode) self.bytecode = code # temporary variables - self.instructions = [] - self.jumps = [] - self.labels = {} + self.instructions: List[ConcreteInstr] = [] + self.jumps: List[Tuple[int, Label, ConcreteInstr]] = [] + self.labels: Dict[Label, int] = {} + self.exception_handling_blocks: Dict[TryBegin, ExceptionTableEntry] = {} + self.required_caches = 0 + self.seen_manual_cache = False # used to build ConcreteBytecode() object - self.consts_indices = {} - self.consts_list = [] - self.names = [] - self.varnames = [] + self.consts_indices: Dict[Union[bytes, Tuple[type, int]], int] = {} + self.consts_list: List[Any] = [] + self.names: List[str] = [] + self.varnames: List[str] = [] - def add_const(self, value): + def add_const(self, value: Any) -> int: key = const_key(value) if key in self.consts_indices: return self.consts_indices[key] @@ -557,7 +1134,7 @@ def add_const(self, value): return index @staticmethod - def add(names, name): + def add(names: List[str], name: str) -> int: try: index = names.index(name) except ValueError: @@ -565,11 +1142,42 @@ def add(names, name): names.append(name) return index - def concrete_instructions(self): - ncells = len(self.bytecode.cellvars) + def concrete_instructions(self) -> None: lineno = self.bytecode.first_lineno + # Track instruction (index) using cell vars and free vars to be able to update + # the index used once all the names are known. + cell_instrs: List[int] = [] + free_instrs: List[int] = [] for instr in self.bytecode: + # Enforce proper use of CACHE opcode on Python 3.11+ by checking we get the + # number we expect or directly generate the needed ones. + if isinstance(instr, Instr) and instr.name == "CACHE": + if not self.required_caches: + raise RuntimeError("Found a CACHE opcode when none was expected.") + self.seen_manual_cache = True + self.required_caches -= 1 + + elif self.required_caches: + if not self.seen_manual_cache: + # We preserve the location of the instruction requiring the + # presence of cache instructions + self.instructions.extend( + [ + ConcreteInstr( + "CACHE", 0, location=self.instructions[-1].location + ) + for i in range(self.required_caches) + ] + ) + self.required_caches = 0 + self.seen_manual_cache = False + else: + raise RuntimeError( + "Found some manual opcode but less than expected. " + f"Missing {self.required_caches} CACHE opcodes." + ) + if isinstance(instr, Label): self.labels[instr] = len(self.instructions) continue @@ -578,62 +1186,177 @@ def concrete_instructions(self): lineno = instr.lineno continue - if isinstance(instr, ConcreteInstr): - instr = instr.copy() - else: - assert isinstance(instr, Instr) - - if instr.lineno is not None: - lineno = instr.lineno - - arg = instr.arg - is_jump = isinstance(arg, Label) - if is_jump: - label = arg - # fake value, real value is set in compute_jumps() - arg = 0 - elif instr.opcode in _opcode.hasconst: - arg = self.add_const(arg) - elif instr.opcode in _opcode.haslocal: - arg = self.add(self.varnames, arg) - elif instr.opcode in _opcode.hasname: + if isinstance(instr, TryBegin): + # We expect the stack depth to have be provided or computed earlier + assert instr.stack_depth is not UNSET + # NOTE here we store the index of the instruction at which the + # exception table entry starts. This is not the final value we want, + # we want the offset in the bytecode but that requires to compute + # the jumps first to resolve any possible extended arg needed in a + # jump. + self.exception_handling_blocks[instr] = ExceptionTableEntry( + len(self.instructions), 0, 0, instr.stack_depth, instr.push_lasti + ) + continue + + # Do not handle TryEnd before we insert possible CACHE opcode + if isinstance(instr, TryEnd): + entry = self.exception_handling_blocks[instr.entry] + # The TryEnd is located after the last opcode in the exception entry + # so we move the offset by one. We choose one so that the end does + # encompass a possible EXTENDED_ARG + entry.stop_offset = len(self.instructions) - 1 + continue + + assert isinstance(instr, Instr) + + if instr.lineno is not UNSET and instr.lineno is not None: + lineno = instr.lineno + elif instr.lineno is UNSET: + instr.lineno = lineno + + arg = instr.arg + is_jump = False + if isinstance(arg, Label): + label = arg + # fake value, real value is set in compute_jumps() + arg = 0 + is_jump = True + elif instr.opcode in _opcode.hasconst: + arg = self.add_const(arg) + elif instr.opcode in _opcode.haslocal: + assert isinstance(arg, str) + arg = self.add(self.varnames, arg) + elif instr.opcode in _opcode.hasname: + if instr.name in BITFLAG_INSTRUCTIONS: + assert ( + isinstance(arg, tuple) + and len(arg) == 2 + and isinstance(arg[0], bool) + and isinstance(arg[1], str) + ), arg + index = self.add(self.names, arg[1]) + arg = int(arg[0]) + (index << 1) + elif instr.name in BITFLAG2_INSTRUCTIONS: + assert ( + isinstance(arg, tuple) + and len(arg) == 3 + and isinstance(arg[0], bool) + and isinstance(arg[1], bool) + and isinstance(arg[2], str) + ), arg + index = self.add(self.names, arg[2]) + arg = int(arg[0]) + 2 * int(arg[1]) + (index << 2) + else: + assert isinstance(arg, str), f"Got {arg}, expected a str" arg = self.add(self.names, arg) - elif instr.opcode in _opcode.hasfree: - if isinstance(arg, CellVar): - arg = self.bytecode.cellvars.index(arg.name) + elif instr.opcode in _opcode.hasfree: + if isinstance(arg, CellVar): + cell_instrs.append(len(self.instructions)) + arg = self.bytecode.cellvars.index(arg.name) + else: + assert isinstance(arg, FreeVar) + free_instrs.append(len(self.instructions)) + arg = self.bytecode.freevars.index(arg.name) + elif instr.opcode in _opcode.hascompare: + if isinstance(arg, Compare): + # In Python 3.12 the 4 lowest bits are used for caching + # See compare_masks in compile.c + if sys.version_info >= (3, 12): + arg = arg._get_mask() + (arg.value << 4) else: - assert isinstance(arg, FreeVar) - arg = ncells + self.bytecode.freevars.index(arg.name) - elif instr.opcode in _opcode.hascompare: - if isinstance(arg, Compare): arg = arg.value + elif instr.opcode in INTRINSIC: + if isinstance(arg, (Intrinsic1Op, Intrinsic2Op)): + arg = arg.value + + # The above should have performed all the necessary conversion + assert isinstance(arg, int) + c_instr = ConcreteInstr(instr.name, arg, location=instr.location) + if is_jump: + self.jumps.append((len(self.instructions), label, c_instr)) + + # If the instruction expect some cache + if sys.version_info >= (3, 11): + self.required_caches = c_instr.use_cache_opcodes() + self.seen_manual_cache = False + + self.instructions.append(c_instr) + + # On Python 3.11 varnames and cells can share some names. Wind the shared + # names and update the arg argument of instructions using cell vars. + # We also track by how much to offset free vars which are stored in a + # contiguous array after the cell vars + if sys.version_info >= (3, 11): + # Map naive cell index to shared index + shared_name_indexes: Dict[int, int] = {} + n_shared = 0 + n_unshared = 0 + for i, name in enumerate(self.bytecode.cellvars): + if name in self.varnames: + shared_name_indexes[i] = self.varnames.index(name) + n_shared += 1 + else: + shared_name_indexes[i] = len(self.varnames) + n_unshared + n_unshared += 1 - instr = ConcreteInstr(instr.name, arg, lineno=lineno) - if is_jump: - self.jumps.append((len(self.instructions), label, instr)) - - self.instructions.append(instr) + for index in cell_instrs: + c_instr = self.instructions[index] + c_instr.arg = shared_name_indexes[c_instr.arg] - def compute_jumps(self): - offsets = [] + free_offset = len(self.varnames) + len(self.bytecode.cellvars) - n_shared + else: + free_offset = len(self.bytecode.cellvars) + + for index in free_instrs: + c_instr = self.instructions[index] + c_instr.arg += free_offset + + def compute_jumps(self) -> bool: + # For labels we need the offset before the instruction at a given index but for + # exception table entries we need the offset of the instruction which can differ + # in the presence of extended args... + label_offsets = [] + instruction_offsets = [] offset = 0 - for index, instr in enumerate(self.instructions): - offsets.append(offset) - offset += instr.size // 2 if OFFSET_AS_INSTRUCTION else instr.size + for instr in self.instructions: + label_offsets.append(offset) + # If an instruction uses extended args, those appear before the instruction + # causing the instruction to appear at offset that accounts for extended + # args. + offset += ( + (instr.size // 2 - 1) if OFFSET_AS_INSTRUCTION else (instr.size - 2) + ) + instruction_offsets.append(offset) + offset += 1 if OFFSET_AS_INSTRUCTION else 2 # needed if a label is at the end - offsets.append(offset) + label_offsets.append(offset) + # FIXME may need some extra check to validate jump forward vs jump backward # fix argument of jump instructions: resolve labels modified = False for index, label, instr in self.jumps: target_index = self.labels[label] - target_offset = offsets[target_index] + target_offset = label_offsets[target_index] - if instr.opcode in _opcode.hasjrel: - instr_offset = offsets[index] + # FIXME use opcode + # Under 3.12+, FOR_ITER, SEND jump is increased by 1 implicitely + # to skip over END_FOR, END_SEND see Python/instrumentation.c + if sys.version_info >= (3, 12) and instr.name in ("FOR_ITER", "SEND"): + target_offset -= 1 + + if instr.is_forward_rel_jump(): + instr_offset = label_offsets[index] target_offset -= instr_offset + ( instr.size // 2 if OFFSET_AS_INSTRUCTION else instr.size ) + elif instr.is_backward_rel_jump(): + instr_offset = label_offsets[index] + target_offset = ( + instr_offset + +(instr.size // 2 if OFFSET_AS_INSTRUCTION else instr.size) + -target_offset + ) old_size = instr.size # FIXME: better error report if target_offset is negative @@ -641,9 +1364,37 @@ def compute_jumps(self): if instr.size != old_size: modified = True - return modified + # If a jump required an extended arg hence invalidating the calculation + # we return early before filling the exception table entries + if modified: + return modified + + # Resolve labels for exception handling entries + for tb, entry in self.exception_handling_blocks.items(): + # Set the offset for the start and end offset from the instruction + # index stored when assembling the concrete instructions. + entry.start_offset = instruction_offsets[entry.start_offset] + entry.stop_offset = instruction_offsets[entry.stop_offset] + + # Set the offset to the target instruction + lb = tb.target + assert isinstance(lb, Label) + target_index = self.labels[lb] + target_offset = label_offsets[target_index] + entry.target = target_offset + + return False + + def to_concrete_bytecode( + self, + compute_jumps_passes: Optional[int]=None, + compute_exception_stack_depths: bool=True, + ) -> ConcreteBytecode: + if sys.version_info >= (3, 11) and compute_exception_stack_depths: + cfg = _bytecode.ControlFlowGraph.from_bytecode(self.bytecode) + cfg.compute_stacksize(compute_exception_stack_depths=True) + self.bytecode = cfg.to_bytecode() - def to_concrete_bytecode(self, compute_jumps_passes=None): if compute_jumps_passes is None: compute_jumps_passes = self._compute_jumps_passes @@ -654,20 +1405,22 @@ def to_concrete_bytecode(self, compute_jumps_passes=None): self.varnames.extend(self.bytecode.argnames) self.concrete_instructions() - for pas in range(0, compute_jumps_passes): + for _ in range(0, compute_jumps_passes): modified = self.compute_jumps() if not modified: break else: raise RuntimeError( - "compute_jumps() failed to converge after" " %d passes" % (pas + 1) + "compute_jumps() failed to converge after" + " %d passes" % (compute_jumps_passes) ) concrete = ConcreteBytecode( self.instructions, - consts=self.consts_list.copy(), - names=self.names, + consts=tuple(self.consts_list), + names=tuple(self.names), varnames=self.varnames, + exception_table=list(self.exception_handling_blocks.values()), ) concrete._copy_attr_from(self.bytecode) return concrete diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/flags.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/flags.py index b0c5239cd4..d5ba3b5800 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/flags.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/flags.py @@ -1,6 +1,9 @@ -# alias to keep the 'bytecode' variable free +import opcode import sys from enum import IntFlag +from typing import Optional, Union + +# alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode @@ -12,35 +15,39 @@ class CompilerFlags(IntFlag): """ - OPTIMIZED = 0x00001 # noqa - NEWLOCALS = 0x00002 # noqa - VARARGS = 0x00004 # noqa - VARKEYWORDS = 0x00008 # noqa - NESTED = 0x00010 # noqa - GENERATOR = 0x00020 # noqa - NOFREE = 0x00040 # noqa + OPTIMIZED = 0x00001 + NEWLOCALS = 0x00002 + VARARGS = 0x00004 + VARKEYWORDS = 0x00008 + NESTED = 0x00010 + GENERATOR = 0x00020 + NOFREE = 0x00040 # New in Python 3.5 # Used for coroutines defined using async def ie native coroutine - COROUTINE = 0x00080 # noqa + COROUTINE = 0x00080 # Used for coroutines defined as a generator and then decorated using # types.coroutine - ITERABLE_COROUTINE = 0x00100 # noqa + ITERABLE_COROUTINE = 0x00100 # New in Python 3.6 # Generator defined in an async def function - ASYNC_GENERATOR = 0x00200 # noqa + ASYNC_GENERATOR = 0x00200 # __future__ flags # future flags changed in Python 3.9 if sys.version_info < (3, 9): - FUTURE_GENERATOR_STOP = 0x80000 # noqa - if sys.version_info > (3, 6): - FUTURE_ANNOTATIONS = 0x100000 + FUTURE_GENERATOR_STOP = 0x80000 + FUTURE_ANNOTATIONS = 0x100000 else: - FUTURE_GENERATOR_STOP = 0x800000 # noqa + FUTURE_GENERATOR_STOP = 0x800000 FUTURE_ANNOTATIONS = 0x1000000 -def infer_flags(bytecode, is_async=None): +def infer_flags( + bytecode: Union[ + "_bytecode.Bytecode", "_bytecode.ConcreteBytecode", "_bytecode.ControlFlowGraph" + ], + is_async: Optional[bool] = None, +): """Infer the proper flags for a bytecode based on the instructions. Because the bytecode does not have enough context to guess if a function @@ -69,14 +76,22 @@ def infer_flags(bytecode, is_async=None): raise ValueError(msg % bytecode) instructions = ( - bytecode.get_instructions() + bytecode._get_instructions() if isinstance(bytecode, _bytecode.ControlFlowGraph) else bytecode ) instr_names = { i.name for i in instructions - if not isinstance(i, (_bytecode.SetLineno, _bytecode.Label)) + if not isinstance( + i, + ( + _bytecode.SetLineno, + _bytecode.Label, + _bytecode.TryBegin, + _bytecode.TryEnd, + ), + ) } # Identify optimized code @@ -84,16 +99,7 @@ def infer_flags(bytecode, is_async=None): flags |= CompilerFlags.OPTIMIZED # Check for free variables - if not ( - instr_names - & { - "LOAD_CLOSURE", - "LOAD_DEREF", - "STORE_DEREF", - "DELETE_DEREF", - "LOAD_CLASSDEREF", - } - ): + if not (instr_names & {opcode.opname[i] for i in opcode.hasfree}): flags |= CompilerFlags.NOFREE # Copy flags for which we cannot infer the right value @@ -114,12 +120,12 @@ def infer_flags(bytecode, is_async=None): "BEFORE_ASYNC_WITH", "SETUP_ASYNC_WITH", "END_ASYNC_FOR", + "ASYNC_GEN_WRAP", # New in 3.11 } # If performing inference or forcing an async behavior, first inspect # the flags since this is the only way to identify iterable coroutines if is_async in (None, True): - if bytecode.flags & CompilerFlags.COROUTINE: if sure_generator: flags |= CompilerFlags.ASYNC_GENERATOR diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/instr.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/instr.py index 9247a54950..49362ebc7a 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/instr.py +++ b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/instr.py @@ -1,12 +1,46 @@ -import enum import dis +import enum import opcode as _opcode import sys +from abc import abstractmethod +from dataclasses import dataclass from marshal import dumps as _dumps +from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar, Union + +try: + from typing import TypeGuard +except ImportError: + from typing_extensions import TypeGuard # type: ignore from _pydevd_frame_eval.vendored import bytecode as _bytecode +# --- Instruction argument tools and + +MIN_INSTRUMENTED_OPCODE = getattr(_opcode, "MIN_INSTRUMENTED_OPCODE", 256) + +# Instructions relying on a bit to modify its behavior. +# The lowest bit is used to encode custom behavior. +BITFLAG_INSTRUCTIONS = ( + ("LOAD_GLOBAL", "LOAD_ATTR") + if sys.version_info >= (3, 12) + else ("LOAD_GLOBAL",) + if sys.version_info >= (3, 11) + else () +) + +BITFLAG2_INSTRUCTIONS = ("LOAD_SUPER_ATTR",) if sys.version_info >= (3, 12) else () + +# Intrinsic related opcodes +INTRINSIC_1OP = ( + (_opcode.opmap["CALL_INTRINSIC_1"],) if sys.version_info >= (3, 12) else () +) +INTRINSIC_2OP = ( + (_opcode.opmap["CALL_INTRINSIC_2"],) if sys.version_info >= (3, 12) else () +) +INTRINSIC = INTRINSIC_1OP + INTRINSIC_2OP + +# Used for COMPARE_OP opcode argument @enum.unique class Compare(enum.IntEnum): LT = 0 @@ -15,17 +49,152 @@ class Compare(enum.IntEnum): NE = 3 GT = 4 GE = 5 - IN = 6 - NOT_IN = 7 - IS = 8 - IS_NOT = 9 - EXC_MATCH = 10 + if sys.version_info < (3, 9): + IN = 6 + NOT_IN = 7 + IS = 8 + IS_NOT = 9 + EXC_MATCH = 10 + + if sys.version_info >= (3, 12): + + def _get_mask(self): + if self == Compare.EQ: + return 8 + elif self == Compare.NE: + return 1 + 2 + 4 + elif self == Compare.LT: + return 2 + elif self == Compare.LE: + return 2 + 8 + elif self == Compare.GT: + return 4 + elif self == Compare.GE: + return 4 + 8 + + +# Used for BINARY_OP under Python 3.11+ +@enum.unique +class BinaryOp(enum.IntEnum): + ADD = 0 + AND = 1 + FLOOR_DIVIDE = 2 + LSHIFT = 3 + MATRIX_MULTIPLY = 4 + MULTIPLY = 5 + REMAINDER = 6 + OR = 7 + POWER = 8 + RSHIFT = 9 + SUBTRACT = 10 + TRUE_DIVIDE = 11 + XOR = 12 + INPLACE_ADD = 13 + INPLACE_AND = 14 + INPLACE_FLOOR_DIVIDE = 15 + INPLACE_LSHIFT = 16 + INPLACE_MATRIX_MULTIPLY = 17 + INPLACE_MULTIPLY = 18 + INPLACE_REMAINDER = 19 + INPLACE_OR = 20 + INPLACE_POWER = 21 + INPLACE_RSHIFT = 22 + INPLACE_SUBTRACT = 23 + INPLACE_TRUE_DIVIDE = 24 + INPLACE_XOR = 25 -UNSET = object() +@enum.unique +class Intrinsic1Op(enum.IntEnum): + INTRINSIC_1_INVALID = 0 + INTRINSIC_PRINT = 1 + INTRINSIC_IMPORT_STAR = 2 + INTRINSIC_STOPITERATION_ERROR = 3 + INTRINSIC_ASYNC_GEN_WRAP = 4 + INTRINSIC_UNARY_POSITIVE = 5 + INTRINSIC_LIST_TO_TUPLE = 6 + INTRINSIC_TYPEVAR = 7 + INTRINSIC_PARAMSPEC = 8 + INTRINSIC_TYPEVARTUPLE = 9 + INTRINSIC_SUBSCRIPT_GENERIC = 10 + INTRINSIC_TYPEALIAS = 11 -def const_key(obj): +@enum.unique +class Intrinsic2Op(enum.IntEnum): + INTRINSIC_2_INVALID = 0 + INTRINSIC_PREP_RERAISE_STAR = 1 + INTRINSIC_TYPEVAR_WITH_BOUND = 2 + INTRINSIC_TYPEVAR_WITH_CONSTRAINTS = 3 + INTRINSIC_SET_FUNCTION_TYPE_PARAMS = 4 + + +# This make type checking happy but means it won't catch attempt to manipulate an unset +# statically. We would need guard on object attribute narrowed down through methods +class _UNSET(int): + instance = None + + def __new__(cls): + if cls.instance is None: + cls.instance = super().__new__(cls) + return cls.instance + + def __eq__(self, other) -> bool: + return self is other + + +for op in [ + "__abs__", + "__add__", + "__and__", + "__bool__", + "__ceil__", + "__divmod__", + "__float__", + "__floor__", + "__floordiv__", + "__ge__", + "__gt__", + "__hash__", + "__index__", + "__int__", + "__invert__", + "__le__", + "__lshift__", + "__lt__", + "__mod__", + "__mul__", + "__ne__", + "__neg__", + "__or__", + "__pos__", + "__pow__", + "__radd__", + "__rand__", + "__rdivmod__", + "__rfloordiv__", + "__rlshift__", + "__rmod__", + "__rmul__", + "__ror__", + "__round__", + "__rpow__", + "__rrshift__", + "__rshift__", + "__rsub__", + "__rtruediv__", + "__rxor__", + "__sub__", + "__truediv__", + "__trunc__", + "__xor__", +]: + setattr(_UNSET, op, lambda *args: NotImplemented) + +UNSET = _UNSET() + + +def const_key(obj: Any) -> Union[bytes, Tuple[type, int]]: try: return _dumps(obj) except ValueError: @@ -34,82 +203,30 @@ def const_key(obj): return (type(obj), id(obj)) -def _pushes_back(opname): - if opname in ["CALL_FINALLY"]: - # CALL_FINALLY pushes the address of the "finally" block instead of a - # value, hence we don't treat it as pushing back op - return False - return ( - opname.startswith("UNARY_") - or opname.startswith("GET_") - # BUILD_XXX_UNPACK have been removed in 3.9 - or opname.startswith("BINARY_") - or opname.startswith("INPLACE_") - or opname.startswith("BUILD_") - or opname.startswith("CALL_") - ) or opname in ( - "LIST_TO_TUPLE", - "LIST_EXTEND", - "SET_UPDATE", - "DICT_UPDATE", - "DICT_MERGE", - "IS_OP", - "CONTAINS_OP", - "FORMAT_VALUE", - "MAKE_FUNCTION", - "IMPORT_NAME", - # technically, these three do not push back, but leave the container - # object on TOS - "SET_ADD", - "LIST_APPEND", - "MAP_ADD", - "LOAD_ATTR", - ) - - -def _check_lineno(lineno): - if not isinstance(lineno, int): - raise TypeError("lineno must be an int") - if lineno < 1: - raise ValueError("invalid lineno") - - -class SetLineno: - __slots__ = ("_lineno",) - - def __init__(self, lineno): - _check_lineno(lineno) - self._lineno = lineno - - @property - def lineno(self): - return self._lineno - - def __eq__(self, other): - if not isinstance(other, SetLineno): - return False - return self._lineno == other._lineno - - class Label: __slots__ = () +# : Placeholder label temporarily used when performing some conversions +# : concrete -> bytecode +PLACEHOLDER_LABEL = Label() + + class _Variable: __slots__ = ("name",) - def __init__(self, name): - self.name = name + def __init__(self, name: str) -> None: + self.name: str = name - def __eq__(self, other): - if type(self) != type(other): + def __eq__(self, other: Any) -> bool: + if type(self) is not type(other): return False return self.name == other.name - def __str__(self): + def __str__(self) -> str: return self.name - def __repr__(self): + def __repr__(self) -> str: return "<%s %r>" % (self.__class__.__name__, self.name) @@ -121,7 +238,7 @@ class FreeVar(_Variable): __slots__ = () -def _check_arg_int(name, arg): +def _check_arg_int(arg: Any, name: str) -> TypeGuard[int]: if not isinstance(arg, int): raise TypeError( "operation %s argument must be an int, " @@ -133,143 +250,325 @@ def _check_arg_int(name, arg): "operation %s argument must be in " "the range 0..2,147,483,647" % name ) - -if sys.version_info < (3, 8): - _stack_effects = { - # NOTE: the entries are all 2-tuples. Entry[0/False] is non-taken jumps. - # Entry[1/True] is for taken jumps. - # opcodes not in dis.stack_effect - _opcode.opmap["EXTENDED_ARG"]: (0, 0), - _opcode.opmap["NOP"]: (0, 0), - # Jump taken/not-taken are different: - _opcode.opmap["JUMP_IF_TRUE_OR_POP"]: (-1, 0), - _opcode.opmap["JUMP_IF_FALSE_OR_POP"]: (-1, 0), - _opcode.opmap["FOR_ITER"]: (1, -1), - _opcode.opmap["SETUP_WITH"]: (1, 6), - _opcode.opmap["SETUP_ASYNC_WITH"]: (0, 5), - _opcode.opmap["SETUP_EXCEPT"]: (0, 6), # as of 3.7, below for <=3.6 - _opcode.opmap["SETUP_FINALLY"]: (0, 6), # as of 3.7, below for <=3.6 - } - - # More stack effect values that are unique to the version of Python. - if sys.version_info < (3, 7): - _stack_effects.update( - { - _opcode.opmap["SETUP_WITH"]: (7, 7), - _opcode.opmap["SETUP_EXCEPT"]: (6, 9), - _opcode.opmap["SETUP_FINALLY"]: (6, 9), - } + return True + + +if sys.version_info >= (3, 12): + + def opcode_has_argument(opcode: int) -> bool: + return opcode in dis.hasarg + +else: + + def opcode_has_argument(opcode: int) -> bool: + return opcode >= dis.HAVE_ARGUMENT + +# --- Instruction stack effect impact + +# We split the stack effect between the manipulations done on the stack before +# executing the instruction (fetching the elements that are going to be used) +# and what is pushed back on the stack after the execution is complete. + +# Stack effects that do not depend on the argument of the instruction +STATIC_STACK_EFFECTS: Dict[str, Tuple[int, int]] = { + "ROT_TWO": (-2, 2), + "ROT_THREE": (-3, 3), + "ROT_FOUR": (-4, 4), + "DUP_TOP": (-1, 2), + "DUP_TOP_TWO": (-2, 4), + "GET_LEN": (-1, 2), + "GET_ITER": (-1, 1), + "GET_YIELD_FROM_ITER": (-1, 1), + "GET_AWAITABLE": (-1, 1), + "GET_AITER": (-1, 1), + "GET_ANEXT": (-1, 2), + "LIST_TO_TUPLE": (-1, 1), + "LIST_EXTEND": (-2, 1), + "SET_UPDATE": (-2, 1), + "DICT_UPDATE": (-2, 1), + "DICT_MERGE": (-2, 1), + "COMPARE_OP": (-2, 1), + "IS_OP": (-2, 1), + "CONTAINS_OP": (-2, 1), + "IMPORT_NAME": (-2, 1), + "ASYNC_GEN_WRAP": (-1, 1), + "PUSH_EXC_INFO": (-1, 2), + # Pop TOS and push TOS.__aexit__ and result of TOS.__aenter__() + "BEFORE_ASYNC_WITH": (-1, 2), + # Replace TOS based on TOS and TOS1 + "IMPORT_FROM": (-1, 2), + "COPY_DICT_WITHOUT_KEYS": (-2, 2), + # Call a function at position 7 (4 3.11+) on the stack and push the return value + "WITH_EXCEPT_START": (-4, 5) if sys.version_info >= (3, 11) else (-7, 8), + # Starting with Python 3.11 MATCH_CLASS does not push a boolean anymore + "MATCH_CLASS": (-3, 1 if sys.version_info >= (3, 11) else 2), + "MATCH_MAPPING": (-1, 2), + "MATCH_SEQUENCE": (-1, 2), + "MATCH_KEYS": (-2, 3 if sys.version_info >= (3, 11) else 4), + "CHECK_EXC_MATCH": (-2, 2), # (TOS1, TOS) -> (TOS1, bool) + "CHECK_EG_MATCH": (-2, 2), # (TOS, TOS1) -> non-matched, matched or TOS1, None) + "PREP_RERAISE_STAR": (-2, 1), # (TOS1, TOS) -> new exception group) + ** {k: (-1, 1) for k in (o for o in _opcode.opmap if (o.startswith("UNARY_")))}, + **{ + k: (-2, 1) + for k in ( + o + for o in _opcode.opmap + if (o.startswith("BINARY_") or o.startswith("INPLACE_")) ) + }, + # Python 3.12 changes not covered by dis.stack_effect + "BINARY_SLICE": (-3, 1), + # "STORE_SLICE" handled by dis.stack_effect + "LOAD_FROM_DICT_OR_GLOBALS": (-1, 1), + "LOAD_FROM_DICT_OR_DEREF": (-1, 1), + "LOAD_INTRISIC_1": (-1, 1), + "LOAD_INTRISIC_2": (-2, 1), +} + +DYNAMIC_STACK_EFFECTS: Dict[ + str, Callable[[int, Any, Optional[bool]], Tuple[int, int]] +] = { + # PRECALL pops all arguments (as per its stack effect) and leaves + # the callable and either self or NULL + # CALL pops the 2 above items and push the return + # (when PRECALL does not exist it pops more as encoded by the effect) + "CALL": lambda effect, arg, jump: ( + -2 - arg if sys.version_info >= (3, 12) else -2, + 1, + ), + # 3.12 changed the behavior of LOAD_ATTR + "LOAD_ATTR": lambda effect, arg, jump: (-1, 1 + effect), + "LOAD_SUPER_ATTR": lambda effect, arg, jump: (-3, 3 + effect), + "SWAP": lambda effect, arg, jump: (-arg, arg), + "COPY": lambda effect, arg, jump: (-arg, arg + effect), + "ROT_N": lambda effect, arg, jump: (-arg, arg), + "SET_ADD": lambda effect, arg, jump: (-arg, arg - 1), + "LIST_APPEND": lambda effect, arg, jump: (-arg, arg - 1), + "MAP_ADD": lambda effect, arg, jump: (-arg, arg - 2), + "FORMAT_VALUE": lambda effect, arg, jump: (effect - 1, 1), + # FOR_ITER needs TOS to be an iterator, hence a prerequisite of 1 on the stack + "FOR_ITER": lambda effect, arg, jump: (effect, 0) if jump else (-1, 2), + **{ + # Instr(UNPACK_* , n) pops 1 and pushes n + k: lambda effect, arg, jump: (-1, effect + 1) + for k in ( + "UNPACK_SEQUENCE", + "UNPACK_EX", + ) + }, + **{ + k: lambda effect, arg, jump: (effect - 1, 1) + for k in ( + "MAKE_FUNCTION", + "CALL_FUNCTION", + "CALL_FUNCTION_EX", + "CALL_FUNCTION_KW", + "CALL_METHOD", + *(o for o in _opcode.opmap if o.startswith("BUILD_")), + ) + }, +} +# --- Instruction location -class Instr: - """Abstract instruction.""" - - __slots__ = ("_name", "_opcode", "_arg", "_lineno", "offset") - - def __init__(self, name, arg=UNSET, *, lineno=None, offset=None): - self._set(name, arg, lineno) - self.offset = offset - def _check_arg(self, name, opcode, arg): - if name == "EXTENDED_ARG": - raise ValueError( - "only concrete instruction can contain EXTENDED_ARG, " - "highlevel instruction can represent arbitrary argument without it" - ) - - if opcode >= _opcode.HAVE_ARGUMENT: - if arg is UNSET: - raise ValueError("operation %s requires an argument" % name) - else: - if arg is not UNSET: - raise ValueError("operation %s has no argument" % name) +def _check_location( + location: Optional[int], location_name: str, min_value: int +) -> None: + if location is None: + return + if not isinstance(location, int): + raise TypeError(f"{location_name} must be an int, got {type(location)}") + if location < min_value: + raise ValueError( + f"invalid {location_name}, expected >= {min_value}, got {location}" + ) - if self._has_jump(opcode): - if not isinstance(arg, (Label, _bytecode.BasicBlock)): - raise TypeError( - "operation %s argument type must be " - "Label or BasicBlock, got %s" % (name, type(arg).__name__) - ) - elif opcode in _opcode.hasfree: - if not isinstance(arg, (CellVar, FreeVar)): - raise TypeError( - "operation %s argument must be CellVar " - "or FreeVar, got %s" % (name, type(arg).__name__) - ) - - elif opcode in _opcode.haslocal or opcode in _opcode.hasname: - if not isinstance(arg, str): - raise TypeError( - "operation %s argument must be a str, " - "got %s" % (name, type(arg).__name__) +@dataclass(frozen=True) +class InstrLocation: + """Location information for an instruction.""" + + # : Lineno at which the instruction corresponds. + # : Optional so that a location of None in an instruction encode an unset value. + lineno: Optional[int] + + # : End lineno at which the instruction corresponds (Python 3.11+ only) + end_lineno: Optional[int] + + # : Column offset at which the instruction corresponds (Python 3.11+ only) + col_offset: Optional[int] + + # : End column offset at which the instruction corresponds (Python 3.11+ only) + end_col_offset: Optional[int] + + __slots__ = ["lineno", "end_lineno", "col_offset", "end_col_offset"] + + def __init__( + self, + lineno: Optional[int], + end_lineno: Optional[int], + col_offset: Optional[int], + end_col_offset: Optional[int], + ) -> None: + # Needed because we want the class to be frozen + object.__setattr__(self, "lineno", lineno) + object.__setattr__(self, "end_lineno", end_lineno) + object.__setattr__(self, "col_offset", col_offset) + object.__setattr__(self, "end_col_offset", end_col_offset) + # In Python 3.11 0 is a valid lineno for some instructions (RESUME for example) + _check_location(lineno, "lineno", 0 if sys.version_info >= (3, 11) else 1) + _check_location(end_lineno, "end_lineno", 1) + _check_location(col_offset, "col_offset", 0) + _check_location(end_col_offset, "end_col_offset", 0) + if end_lineno: + if lineno is None: + raise ValueError("End lineno specified with no lineno.") + elif lineno > end_lineno: + raise ValueError( + f"End lineno {end_lineno} cannot be smaller than lineno {lineno}." ) - elif opcode in _opcode.hasconst: - if isinstance(arg, Label): + if col_offset is not None or end_col_offset is not None: + if lineno is None or end_lineno is None: raise ValueError( - "label argument cannot be used " "in %s operation" % name + "Column offsets were specified but lineno information are " + f"incomplete. Lineno: {lineno}, end lineno: {end_lineno}." ) - if isinstance(arg, _bytecode.BasicBlock): + if end_col_offset is not None: + if col_offset is None: + raise ValueError( + "End column offset specified with no column offset." + ) + # Column offset must be increasing inside a signle line but + # have no relations between different lines. + elif lineno == end_lineno and col_offset > end_col_offset: + raise ValueError( + f"End column offset {end_col_offset} cannot be smaller than " + f"column offset: {col_offset}." + ) + else: raise ValueError( - "block argument cannot be used " "in %s operation" % name + "No end column offset was specified but a column offset was given." ) - elif opcode in _opcode.hascompare: - if not isinstance(arg, Compare): - raise TypeError( - "operation %s argument type must be " - "Compare, got %s" % (name, type(arg).__name__) - ) + @classmethod + def from_positions(cls, position: "dis.Positions") -> "InstrLocation": # type: ignore + return InstrLocation( + position.lineno, + position.end_lineno, + position.col_offset, + position.end_col_offset, + ) - elif opcode >= _opcode.HAVE_ARGUMENT: - _check_arg_int(name, arg) - def _set(self, name, arg, lineno): - if not isinstance(name, str): - raise TypeError("operation name must be a str") - try: - opcode = _opcode.opmap[name] - except KeyError: - raise ValueError("invalid operation name") +class SetLineno: + __slots__ = ("_lineno",) - # check lineno - if lineno is not None: - _check_lineno(lineno) + def __init__(self, lineno: int) -> None: + # In Python 3.11 0 is a valid lineno for some instructions (RESUME for example) + _check_location(lineno, "lineno", 0 if sys.version_info >= (3, 11) else 1) + self._lineno: int = lineno - self._check_arg(name, opcode, arg) + @property + def lineno(self) -> int: + return self._lineno - self._name = name - self._opcode = opcode - self._arg = arg - self._lineno = lineno + def __eq__(self, other: Any) -> bool: + if not isinstance(other, SetLineno): + return False + return self._lineno == other._lineno + +# --- Pseudo instructions used to represent exception handling (3.11+) + + +class TryBegin: + __slots__ = ("target", "push_lasti", "stack_depth") + + def __init__( + self, + target: Union[Label, "_bytecode.BasicBlock"], + push_lasti: bool, + stack_depth: Union[int, _UNSET]=UNSET, + ) -> None: + self.target: Union[Label, "_bytecode.BasicBlock"] = target + self.push_lasti: bool = push_lasti + self.stack_depth: Union[int, _UNSET] = stack_depth + + def copy(self) -> "TryBegin": + return TryBegin(self.target, self.push_lasti, self.stack_depth) + + +class TryEnd: + __slots__ = "entry" + + def __init__(self, entry: TryBegin) -> None: + self.entry: TryBegin = entry - def set(self, name, arg=UNSET): + def copy(self) -> "TryEnd": + return TryEnd(self.entry) + + +T = TypeVar("T", bound="BaseInstr") +A = TypeVar("A", bound=object) + + +class BaseInstr(Generic[A]): + """Abstract instruction.""" + + __slots__ = ("_name", "_opcode", "_arg", "_location", "_offset") + + # Work around an issue with the default value of arg + def __init__( + self, + name: str, + arg: A=UNSET, # type: ignore + * , + lineno: Union[int, None, _UNSET]=UNSET, + location: Optional[InstrLocation]=None, + offset=None, + ) -> None: + self._set(name, arg) + if location: + self._location = location + elif lineno is UNSET: + self._location = None + else: + self._location = InstrLocation(lineno, None, None, None) + self._offset = offset + + # Work around an issue with the default value of arg + def set(self, name: str, arg: A=UNSET) -> None: # type: ignore """Modify the instruction in-place. Replace name and arg attributes. Don't modify lineno. + """ - self._set(name, arg, self._lineno) + self._set(name, arg) - def require_arg(self): + def require_arg(self) -> bool: """Does the instruction require an argument?""" - return self._opcode >= _opcode.HAVE_ARGUMENT + return opcode_has_argument(self._opcode) @property - def name(self): + def name(self) -> str: return self._name + @property + def offset(self) -> int: + return self._offset + @name.setter - def name(self, name): - self._set(name, self._arg, self._lineno) + def name(self, name: str) -> None: + self._set(name, self._arg) @property - def opcode(self): + def opcode(self) -> int: return self._opcode @opcode.setter - def opcode(self, op): + def opcode(self, op: int) -> None: if not isinstance(op, int): raise TypeError("operator code must be an int") if 0 <= op <= 255: @@ -280,27 +579,62 @@ def opcode(self, op): if not valid: raise ValueError("invalid operator code") - self._set(name, self._arg, self._lineno) + self._set(name, self._arg) @property - def arg(self): + def arg(self) -> A: return self._arg @arg.setter - def arg(self, arg): - self._set(self._name, arg, self._lineno) + def arg(self, arg: A): + self._set(self._name, arg) @property - def lineno(self): - return self._lineno + def lineno(self) -> Union[int, _UNSET, None]: + return self._location.lineno if self._location is not None else UNSET @lineno.setter - def lineno(self, lineno): - self._set(self._name, self._arg, lineno) + def lineno(self, lineno: Union[int, _UNSET, None]) -> None: + loc = self._location + if loc and ( + loc.end_lineno is not None + or loc.col_offset is not None + or loc.end_col_offset is not None + ): + raise RuntimeError( + "The lineno of an instruction with detailed location information " + "cannot be set." + ) + + if lineno is UNSET: + self._location = None + else: + self._location = InstrLocation(lineno, None, None, None) + + @property + def location(self) -> Optional[InstrLocation]: + return self._location + + @location.setter + def location(self, location: Optional[InstrLocation]) -> None: + if location and not isinstance(location, InstrLocation): + raise TypeError( + "The instr location must be an instance of InstrLocation or None." + ) + self._location = location - def stack_effect(self, jump=None): - if self._opcode < _opcode.HAVE_ARGUMENT: + def stack_effect(self, jump: Optional[bool]=None) -> int: + if not self.require_arg(): arg = None + # 3.11 where LOAD_GLOBAL arg encode whether or we push a null + # 3.12 does the same for LOAD_ATTR + elif self.name in BITFLAG_INSTRUCTIONS and isinstance(self._arg, tuple): + assert len(self._arg) == 2 + arg = self._arg[0] + # 3.12 does a similar trick for LOAD_SUPER_ATTR + elif self.name in BITFLAG2_INSTRUCTIONS and isinstance(self._arg, tuple): + assert len(self._arg) == 3 + arg = self._arg[0] elif not isinstance(self._arg, int) or self._opcode in _opcode.hasconst: # Argument is either a non-integer or an integer constant, # not oparg. @@ -308,83 +642,62 @@ def stack_effect(self, jump=None): else: arg = self._arg - if sys.version_info < (3, 8): - effect = _stack_effects.get(self._opcode, None) - if effect is not None: - return max(effect) if jump is None else effect[jump] - return dis.stack_effect(self._opcode, arg) - else: - return dis.stack_effect(self._opcode, arg, jump=jump) + return dis.stack_effect(self._opcode, arg, jump=jump) - def pre_and_post_stack_effect(self, jump=None): + def pre_and_post_stack_effect(self, jump: Optional[bool]=None) -> Tuple[int, int]: + # Allow to check that execution will not cause a stack underflow _effect = self.stack_effect(jump=jump) - # To compute pre size and post size to avoid segfault cause by not enough - # stack element - _opname = _opcode.opname[self._opcode] - if _opname.startswith("DUP_TOP"): - return _effect * -1, _effect * 2 - if _pushes_back(_opname): - # if the op pushes value back to the stack, then the stack effect given - # by dis.stack_effect actually equals pre + post effect, therefore we need - # -1 from the stack effect as a pre condition - return _effect - 1, 1 - if _opname.startswith("UNPACK_"): - # Instr(UNPACK_* , n) pops 1 and pushes n - # _effect = n - 1 - # hence we return -1, _effect + 1 - return -1, _effect + 1 - if _opname == "FOR_ITER" and not jump: - # Since FOR_ITER needs TOS to be an iterator, which basically means - # a prerequisite of 1 on the stack - return -1, 2 - if _opname == "ROT_N": - return (-self._arg, self._arg) - return {"ROT_TWO": (-2, 2), "ROT_THREE": (-3, 3), "ROT_FOUR": (-4, 4)}.get( - _opname, (_effect, 0) - ) - - def copy(self): - return self.__class__(self._name, self._arg, lineno=self._lineno, offset=self.offset) - - def __repr__(self): - if self._arg is not UNSET: - return "<%s arg=%r lineno=%s>" % (self._name, self._arg, self._lineno) + n = self.name + if n in STATIC_STACK_EFFECTS: + return STATIC_STACK_EFFECTS[n] + elif n in DYNAMIC_STACK_EFFECTS: + return DYNAMIC_STACK_EFFECTS[n](_effect, self.arg, jump) else: - return "<%s lineno=%s>" % (self._name, self._lineno) + # For instruction with no special value we simply consider the effect apply + # before execution + return (_effect, 0) - def _cmp_key(self, labels=None): - arg = self._arg - if self._opcode in _opcode.hasconst: - arg = const_key(arg) - elif isinstance(arg, Label) and labels is not None: - arg = labels[arg] - return (self._lineno, self._name, arg) + def copy(self: T) -> T: + return self.__class__(self._name, self._arg, location=self._location, offset=self._offset) - def __eq__(self, other): - if type(self) != type(other): - return False - return self._cmp_key() == other._cmp_key() - - @staticmethod - def _has_jump(opcode): - return opcode in _opcode.hasjrel or opcode in _opcode.hasjabs - - def has_jump(self): + def has_jump(self) -> bool: return self._has_jump(self._opcode) - def is_cond_jump(self): + def is_cond_jump(self) -> bool: """Is a conditional jump?""" # Ex: POP_JUMP_IF_TRUE, JUMP_IF_FALSE_OR_POP - return "JUMP_IF_" in self._name + # IN 3.11+ the JUMP and the IF are no necessary adjacent in the name. + name = self._name + return "JUMP_" in name and "IF_" in name - def is_uncond_jump(self): + def is_uncond_jump(self) -> bool: """Is an unconditional jump?""" - return self.name in {"JUMP_FORWARD", "JUMP_ABSOLUTE"} - - def is_final(self): + # JUMP_BACKWARD has been introduced in 3.11+ + # JUMP_ABSOLUTE was removed in 3.11+ + return self.name in { + "JUMP_FORWARD", + "JUMP_ABSOLUTE", + "JUMP_BACKWARD", + "JUMP_BACKWARD_NO_INTERRUPT", + } + + def is_abs_jump(self) -> bool: + """Is an absolute jump.""" + return self._opcode in _opcode.hasjabs + + def is_forward_rel_jump(self) -> bool: + """Is a forward relative jump.""" + return self._opcode in _opcode.hasjrel and "BACKWARD" not in self._name + + def is_backward_rel_jump(self) -> bool: + """Is a backward relative jump.""" + return self._opcode in _opcode.hasjrel and "BACKWARD" in self._name + + def is_final(self) -> bool: if self._name in { "RETURN_VALUE", + "RETURN_CONST", "RAISE_VARARGS", "RERAISE", "BREAK_LOOP", @@ -394,3 +707,173 @@ def is_final(self): if self.is_uncond_jump(): return True return False + + def __repr__(self) -> str: + if self._arg is not UNSET: + return "<%s arg=%r location=%s>" % (self._name, self._arg, self._location) + else: + return "<%s location=%s>" % (self._name, self._location) + + def __eq__(self, other: Any) -> bool: + if type(self) is not type(other): + return False + return self._cmp_key() == other._cmp_key() + + # --- Private API + + _name: str + + _location: Optional[InstrLocation] + + _opcode: int + + _arg: A + + def _set(self, name: str, arg: A) -> None: + if not isinstance(name, str): + raise TypeError("operation name must be a str") + try: + opcode = _opcode.opmap[name] + except KeyError: + raise ValueError(f"invalid operation name: {name}") # noqa + + if opcode >= MIN_INSTRUMENTED_OPCODE: + raise ValueError( + f"operation {name} is an instrumented or pseudo opcode. " + "Only base opcodes are supported" + ) + + self._check_arg(name, opcode, arg) + + self._name = name + self._opcode = opcode + self._arg = arg + + @staticmethod + def _has_jump(opcode) -> bool: + return opcode in _opcode.hasjrel or opcode in _opcode.hasjabs + + @abstractmethod + def _check_arg(self, name: str, opcode: int, arg: A) -> None: + pass + + @abstractmethod + def _cmp_key(self) -> Tuple[Optional[InstrLocation], str, Any]: + pass + + +InstrArg = Union[ + int, + str, + Label, + CellVar, + FreeVar, + "_bytecode.BasicBlock", + Compare, + Tuple[bool, str], + Tuple[bool, bool, str], +] + + +class Instr(BaseInstr[InstrArg]): + __slots__ = () + + def _cmp_key(self) -> Tuple[Optional[InstrLocation], str, Any]: + arg: Any = self._arg + if self._opcode in _opcode.hasconst: + arg = const_key(arg) + return (self._location, self._name, arg) + + def _check_arg(self, name: str, opcode: int, arg: InstrArg) -> None: + if name == "EXTENDED_ARG": + raise ValueError( + "only concrete instruction can contain EXTENDED_ARG, " + "highlevel instruction can represent arbitrary argument without it" + ) + + if opcode_has_argument(opcode): + if arg is UNSET: + raise ValueError("operation %s requires an argument" % name) + else: + if arg is not UNSET: + raise ValueError("operation %s has no argument" % name) + + if self._has_jump(opcode): + if not isinstance(arg, (Label, _bytecode.BasicBlock)): + raise TypeError( + "operation %s argument type must be " + "Label or BasicBlock, got %s" % (name, type(arg).__name__) + ) + + elif opcode in _opcode.hasfree: + if not isinstance(arg, (CellVar, FreeVar)): + raise TypeError( + "operation %s argument must be CellVar " + "or FreeVar, got %s" % (name, type(arg).__name__) + ) + + elif opcode in _opcode.haslocal or opcode in _opcode.hasname: + if name in BITFLAG_INSTRUCTIONS: + if not ( + isinstance(arg, tuple) + and len(arg) == 2 + and isinstance(arg[0], bool) + and isinstance(arg[1], str) + ): + raise TypeError( + "operation %s argument must be a tuple[bool, str], " + "got %s (value=%s)" % (name, type(arg).__name__, str(arg)) + ) + + elif name in BITFLAG2_INSTRUCTIONS: + if not ( + isinstance(arg, tuple) + and len(arg) == 3 + and isinstance(arg[0], bool) + and isinstance(arg[1], bool) + and isinstance(arg[2], str) + ): + raise TypeError( + "operation %s argument must be a tuple[bool, bool, str], " + "got %s (value=%s)" % (name, type(arg).__name__, str(arg)) + ) + + elif not isinstance(arg, str): + raise TypeError( + "operation %s argument must be a str, " + "got %s" % (name, type(arg).__name__) + ) + + elif opcode in _opcode.hasconst: + if isinstance(arg, Label): + raise ValueError( + "label argument cannot be used " "in %s operation" % name + ) + if isinstance(arg, _bytecode.BasicBlock): + raise ValueError( + "block argument cannot be used " "in %s operation" % name + ) + + elif opcode in _opcode.hascompare: + if not isinstance(arg, Compare): + raise TypeError( + "operation %s argument type must be " + "Compare, got %s" % (name, type(arg).__name__) + ) + + elif opcode in INTRINSIC_1OP: + if not isinstance(arg, Intrinsic1Op): + raise TypeError( + "operation %s argument type must be " + "Intrinsic1Op, got %s" % (name, type(arg).__name__) + ) + + elif opcode in INTRINSIC_2OP: + if not isinstance(arg, Intrinsic2Op): + raise TypeError( + "operation %s argument type must be " + "Intrinsic2Op, got %s" % (name, type(arg).__name__) + ) + + elif opcode_has_argument(opcode): + _check_arg_int(arg, name) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py deleted file mode 100644 index 9ece96bf03..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py +++ /dev/null @@ -1,491 +0,0 @@ -""" -Peephole optimizer of CPython 3.6 reimplemented in pure Python using -the bytecode module. -""" -import opcode -import operator -import sys -from _pydevd_frame_eval.vendored.bytecode import Instr, Bytecode, ControlFlowGraph, BasicBlock, Compare - -JUMPS_ON_TRUE = frozenset( - ( - "POP_JUMP_IF_TRUE", - "JUMP_IF_TRUE_OR_POP", - ) -) - -NOT_COMPARE = { - Compare.IN: Compare.NOT_IN, - Compare.NOT_IN: Compare.IN, - Compare.IS: Compare.IS_NOT, - Compare.IS_NOT: Compare.IS, -} - -MAX_SIZE = 20 - - -class ExitUnchanged(Exception): - """Exception used to skip the peephole optimizer""" - - pass - - -class PeepholeOptimizer: - """Python reimplementation of the peephole optimizer. - - Copy of the C comment: - - Perform basic peephole optimizations to components of a code object. - The consts object should still be in list form to allow new constants - to be appended. - - To keep the optimizer simple, it bails out (does nothing) for code that - has a length over 32,700, and does not calculate extended arguments. - That allows us to avoid overflow and sign issues. Likewise, it bails when - the lineno table has complex encoding for gaps >= 255. EXTENDED_ARG can - appear before MAKE_FUNCTION; in this case both opcodes are skipped. - EXTENDED_ARG preceding any other opcode causes the optimizer to bail. - - Optimizations are restricted to simple transformations occuring within a - single basic block. All transformations keep the code size the same or - smaller. For those that reduce size, the gaps are initially filled with - NOPs. Later those NOPs are removed and the jump addresses retargeted in - a single pass. Code offset is adjusted accordingly. - """ - - def __init__(self): - # bytecode.ControlFlowGraph instance - self.code = None - self.const_stack = None - self.block_index = None - self.block = None - # index of the current instruction in self.block instructions - self.index = None - # whether we are in a LOAD_CONST sequence - self.in_consts = False - - def check_result(self, value): - try: - size = len(value) - except TypeError: - return True - return size <= MAX_SIZE - - def replace_load_const(self, nconst, instr, result): - # FIXME: remove temporary computed constants? - # FIXME: or at least reuse existing constants? - - self.in_consts = True - - load_const = Instr("LOAD_CONST", result, lineno=instr.lineno) - start = self.index - nconst - 1 - self.block[start : self.index] = (load_const,) - self.index -= nconst - - if nconst: - del self.const_stack[-nconst:] - self.const_stack.append(result) - self.in_consts = True - - def eval_LOAD_CONST(self, instr): - self.in_consts = True - value = instr.arg - self.const_stack.append(value) - self.in_consts = True - - def unaryop(self, op, instr): - try: - value = self.const_stack[-1] - result = op(value) - except IndexError: - return - - if not self.check_result(result): - return - - self.replace_load_const(1, instr, result) - - def eval_UNARY_POSITIVE(self, instr): - return self.unaryop(operator.pos, instr) - - def eval_UNARY_NEGATIVE(self, instr): - return self.unaryop(operator.neg, instr) - - def eval_UNARY_INVERT(self, instr): - return self.unaryop(operator.invert, instr) - - def get_next_instr(self, name): - try: - next_instr = self.block[self.index] - except IndexError: - return None - if next_instr.name == name: - return next_instr - return None - - def eval_UNARY_NOT(self, instr): - # Note: UNARY_NOT is not optimized - - next_instr = self.get_next_instr("POP_JUMP_IF_FALSE") - if next_instr is None: - return None - - # Replace UNARY_NOT+POP_JUMP_IF_FALSE with POP_JUMP_IF_TRUE - instr.set("POP_JUMP_IF_TRUE", next_instr.arg) - del self.block[self.index] - - def binop(self, op, instr): - try: - left = self.const_stack[-2] - right = self.const_stack[-1] - except IndexError: - return - - try: - result = op(left, right) - except Exception: - return - - if not self.check_result(result): - return - - self.replace_load_const(2, instr, result) - - def eval_BINARY_ADD(self, instr): - return self.binop(operator.add, instr) - - def eval_BINARY_SUBTRACT(self, instr): - return self.binop(operator.sub, instr) - - def eval_BINARY_MULTIPLY(self, instr): - return self.binop(operator.mul, instr) - - def eval_BINARY_TRUE_DIVIDE(self, instr): - return self.binop(operator.truediv, instr) - - def eval_BINARY_FLOOR_DIVIDE(self, instr): - return self.binop(operator.floordiv, instr) - - def eval_BINARY_MODULO(self, instr): - return self.binop(operator.mod, instr) - - def eval_BINARY_POWER(self, instr): - return self.binop(operator.pow, instr) - - def eval_BINARY_LSHIFT(self, instr): - return self.binop(operator.lshift, instr) - - def eval_BINARY_RSHIFT(self, instr): - return self.binop(operator.rshift, instr) - - def eval_BINARY_AND(self, instr): - return self.binop(operator.and_, instr) - - def eval_BINARY_OR(self, instr): - return self.binop(operator.or_, instr) - - def eval_BINARY_XOR(self, instr): - return self.binop(operator.xor, instr) - - def eval_BINARY_SUBSCR(self, instr): - return self.binop(operator.getitem, instr) - - def replace_container_of_consts(self, instr, container_type): - items = self.const_stack[-instr.arg :] - value = container_type(items) - self.replace_load_const(instr.arg, instr, value) - - def build_tuple_unpack_seq(self, instr): - next_instr = self.get_next_instr("UNPACK_SEQUENCE") - if next_instr is None or next_instr.arg != instr.arg: - return - - if instr.arg < 1: - return - - if self.const_stack and instr.arg <= len(self.const_stack): - nconst = instr.arg - start = self.index - 1 - - # Rewrite LOAD_CONST instructions in the reverse order - load_consts = self.block[start - nconst : start] - self.block[start - nconst : start] = reversed(load_consts) - - # Remove BUILD_TUPLE+UNPACK_SEQUENCE - self.block[start : start + 2] = () - self.index -= 2 - self.const_stack.clear() - return - - if instr.arg == 1: - # Replace BUILD_TUPLE 1 + UNPACK_SEQUENCE 1 with NOP - del self.block[self.index - 1 : self.index + 1] - elif instr.arg == 2: - # Replace BUILD_TUPLE 2 + UNPACK_SEQUENCE 2 with ROT_TWO - rot2 = Instr("ROT_TWO", lineno=instr.lineno) - self.block[self.index - 1 : self.index + 1] = (rot2,) - self.index -= 1 - self.const_stack.clear() - elif instr.arg == 3: - # Replace BUILD_TUPLE 3 + UNPACK_SEQUENCE 3 - # with ROT_THREE + ROT_TWO - rot3 = Instr("ROT_THREE", lineno=instr.lineno) - rot2 = Instr("ROT_TWO", lineno=instr.lineno) - self.block[self.index - 1 : self.index + 1] = (rot3, rot2) - self.index -= 1 - self.const_stack.clear() - - def build_tuple(self, instr, container_type): - if instr.arg > len(self.const_stack): - return - - next_instr = self.get_next_instr("COMPARE_OP") - if next_instr is None or next_instr.arg not in (Compare.IN, Compare.NOT_IN): - return - - self.replace_container_of_consts(instr, container_type) - return True - - def eval_BUILD_TUPLE(self, instr): - if not instr.arg: - return - - if instr.arg <= len(self.const_stack): - self.replace_container_of_consts(instr, tuple) - else: - self.build_tuple_unpack_seq(instr) - - def eval_BUILD_LIST(self, instr): - if not instr.arg: - return - - if not self.build_tuple(instr, tuple): - self.build_tuple_unpack_seq(instr) - - def eval_BUILD_SET(self, instr): - if not instr.arg: - return - - self.build_tuple(instr, frozenset) - - # Note: BUILD_SLICE is not optimized - - def eval_COMPARE_OP(self, instr): - # Note: COMPARE_OP: 2 < 3 is not optimized - - try: - new_arg = NOT_COMPARE[instr.arg] - except KeyError: - return - - if self.get_next_instr("UNARY_NOT") is None: - return - - # not (a is b) --> a is not b - # not (a in b) --> a not in b - # not (a is not b) --> a is b - # not (a not in b) --> a in b - instr.arg = new_arg - self.block[self.index - 1 : self.index + 1] = (instr,) - - def jump_if_or_pop(self, instr): - # Simplify conditional jump to conditional jump where the - # result of the first test implies the success of a similar - # test or the failure of the opposite test. - # - # Arises in code like: - # "if a and b:" - # "if a or b:" - # "a and b or c" - # "(a and b) and c" - # - # x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_FALSE_OR_POP z - # --> x:JUMP_IF_FALSE_OR_POP z - # - # x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_TRUE_OR_POP z - # --> x:POP_JUMP_IF_FALSE y+3 - # where y+3 is the instruction following the second test. - target_block = instr.arg - try: - target_instr = target_block[0] - except IndexError: - return - - if not target_instr.is_cond_jump(): - self.optimize_jump_to_cond_jump(instr) - return - - if (target_instr.name in JUMPS_ON_TRUE) == (instr.name in JUMPS_ON_TRUE): - # The second jump will be taken iff the first is. - - target2 = target_instr.arg - # The current opcode inherits its target's stack behaviour - instr.name = target_instr.name - instr.arg = target2 - self.block[self.index - 1] = instr - self.index -= 1 - else: - # The second jump is not taken if the first is (so jump past it), - # and all conditional jumps pop their argument when they're not - # taken (so change the first jump to pop its argument when it's - # taken). - if instr.name in JUMPS_ON_TRUE: - name = "POP_JUMP_IF_TRUE" - else: - name = "POP_JUMP_IF_FALSE" - - new_label = self.code.split_block(target_block, 1) - - instr.name = name - instr.arg = new_label - self.block[self.index - 1] = instr - self.index -= 1 - - def eval_JUMP_IF_FALSE_OR_POP(self, instr): - self.jump_if_or_pop(instr) - - def eval_JUMP_IF_TRUE_OR_POP(self, instr): - self.jump_if_or_pop(instr) - - def eval_NOP(self, instr): - # Remove NOP - del self.block[self.index - 1] - self.index -= 1 - - def optimize_jump_to_cond_jump(self, instr): - # Replace jumps to unconditional jumps - jump_label = instr.arg - assert isinstance(jump_label, BasicBlock), jump_label - - try: - target_instr = jump_label[0] - except IndexError: - return - - if instr.is_uncond_jump() and target_instr.name == "RETURN_VALUE": - # Replace JUMP_ABSOLUTE => RETURN_VALUE with RETURN_VALUE - self.block[self.index - 1] = target_instr - - elif target_instr.is_uncond_jump(): - # Replace JUMP_FORWARD t1 jumping to JUMP_FORWARD t2 - # with JUMP_ABSOLUTE t2 - jump_target2 = target_instr.arg - - name = instr.name - if instr.name == "JUMP_FORWARD": - name = "JUMP_ABSOLUTE" - else: - # FIXME: reimplement this check - # if jump_target2 < 0: - # # No backward relative jumps - # return - - # FIXME: remove this workaround and implement comment code ^^ - if instr.opcode in opcode.hasjrel: - return - - instr.name = name - instr.arg = jump_target2 - self.block[self.index - 1] = instr - - def optimize_jump(self, instr): - if instr.is_uncond_jump() and self.index == len(self.block): - # JUMP_ABSOLUTE at the end of a block which points to the - # following block: remove the jump, link the current block - # to the following block - block_index = self.block_index - target_block = instr.arg - target_block_index = self.code.get_block_index(target_block) - if target_block_index == block_index: - del self.block[self.index - 1] - self.block.next_block = target_block - return - - self.optimize_jump_to_cond_jump(instr) - - def iterblock(self, block): - self.block = block - self.index = 0 - while self.index < len(block): - instr = self.block[self.index] - self.index += 1 - yield instr - - def optimize_block(self, block): - self.const_stack.clear() - self.in_consts = False - - for instr in self.iterblock(block): - if not self.in_consts: - self.const_stack.clear() - self.in_consts = False - - meth_name = "eval_%s" % instr.name - meth = getattr(self, meth_name, None) - if meth is not None: - meth(instr) - elif instr.has_jump(): - self.optimize_jump(instr) - - # Note: Skipping over LOAD_CONST trueconst; POP_JUMP_IF_FALSE - # is not implemented, since it looks like the optimization - # is never trigerred in practice. The compiler already optimizes if - # and while statements. - - def remove_dead_blocks(self): - # FIXME: remove empty blocks? - - used_blocks = {id(self.code[0])} - for block in self.code: - if block.next_block is not None: - used_blocks.add(id(block.next_block)) - for instr in block: - if isinstance(instr, Instr) and isinstance(instr.arg, BasicBlock): - used_blocks.add(id(instr.arg)) - - block_index = 0 - while block_index < len(self.code): - block = self.code[block_index] - if id(block) not in used_blocks: - del self.code[block_index] - else: - block_index += 1 - - # FIXME: merge following blocks if block1 does not contain any - # jump and block1.next_block is block2 - - def optimize_cfg(self, cfg): - self.code = cfg - self.const_stack = [] - - self.remove_dead_blocks() - - self.block_index = 0 - while self.block_index < len(self.code): - block = self.code[self.block_index] - self.block_index += 1 - self.optimize_block(block) - - def optimize(self, code_obj): - bytecode = Bytecode.from_code(code_obj) - cfg = ControlFlowGraph.from_bytecode(bytecode) - - self.optimize_cfg(cfg) - - bytecode = cfg.to_bytecode() - code = bytecode.to_code() - return code - - -# Code transformer for the PEP 511 -class CodeTransformer: - name = "pyopt" - - def code_transformer(self, code, context): - if sys.flags.verbose: - print( - "Optimize %s:%s: %s" - % (code.co_filename, code.co_firstlineno, code.co_name) - ) - optimizer = PeepholeOptimizer() - return optimizer.optimize(code) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/py.typed b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py deleted file mode 100644 index ee0f7d1b55..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -import sys -import textwrap -import types -import unittest - -from _pydevd_frame_eval.vendored.bytecode import ( - UNSET, - Label, - Instr, - ConcreteInstr, - BasicBlock, # noqa - Bytecode, - ControlFlowGraph, - ConcreteBytecode, -) - - -def _format_instr_list(block, labels, lineno): - instr_list = [] - for instr in block: - if not isinstance(instr, Label): - if isinstance(instr, ConcreteInstr): - cls_name = "ConcreteInstr" - else: - cls_name = "Instr" - arg = instr.arg - if arg is not UNSET: - if isinstance(arg, Label): - arg = labels[arg] - elif isinstance(arg, BasicBlock): - arg = labels[id(arg)] - else: - arg = repr(arg) - if lineno: - text = "%s(%r, %s, lineno=%s)" % ( - cls_name, - instr.name, - arg, - instr.lineno, - ) - else: - text = "%s(%r, %s)" % (cls_name, instr.name, arg) - else: - if lineno: - text = "%s(%r, lineno=%s)" % (cls_name, instr.name, instr.lineno) - else: - text = "%s(%r)" % (cls_name, instr.name) - else: - text = labels[instr] - instr_list.append(text) - return "[%s]" % ",\n ".join(instr_list) - - -def dump_bytecode(code, lineno=False): - """ - Use this function to write unit tests: copy/paste its output to - write a self.assertBlocksEqual() check. - """ - print() - - if isinstance(code, (Bytecode, ConcreteBytecode)): - is_concrete = isinstance(code, ConcreteBytecode) - if is_concrete: - block = list(code) - else: - block = code - - indent = " " * 8 - labels = {} - for index, instr in enumerate(block): - if isinstance(instr, Label): - name = "label_instr%s" % index - labels[instr] = name - - if is_concrete: - name = "ConcreteBytecode" - print(indent + "code = %s()" % name) - if code.argcount: - print(indent + "code.argcount = %s" % code.argcount) - if sys.version_info > (3, 8): - if code.posonlyargcount: - print(indent + "code.posonlyargcount = %s" % code.posonlyargcount) - if code.kwonlyargcount: - print(indent + "code.kwargonlycount = %s" % code.kwonlyargcount) - print(indent + "code.flags = %#x" % code.flags) - if code.consts: - print(indent + "code.consts = %r" % code.consts) - if code.names: - print(indent + "code.names = %r" % code.names) - if code.varnames: - print(indent + "code.varnames = %r" % code.varnames) - - for name in sorted(labels.values()): - print(indent + "%s = Label()" % name) - - if is_concrete: - text = indent + "code.extend(" - indent = " " * len(text) - else: - text = indent + "code = Bytecode(" - indent = " " * len(text) - - lines = _format_instr_list(code, labels, lineno).splitlines() - last_line = len(lines) - 1 - for index, line in enumerate(lines): - if index == 0: - print(text + lines[0]) - elif index == last_line: - print(indent + line + ")") - else: - print(indent + line) - - print() - else: - assert isinstance(code, ControlFlowGraph) - labels = {} - for block_index, block in enumerate(code): - labels[id(block)] = "code[%s]" % block_index - - for block_index, block in enumerate(code): - text = _format_instr_list(block, labels, lineno) - if block_index != len(code) - 1: - text += "," - print(text) - print() - - -def get_code(source, *, filename="", function=False): - source = textwrap.dedent(source).strip() - code = compile(source, filename, "exec") - if function: - sub_code = [ - const for const in code.co_consts if isinstance(const, types.CodeType) - ] - if len(sub_code) != 1: - raise ValueError("unable to find function code") - code = sub_code[0] - return code - - -def disassemble(source, *, filename="", function=False): - code = get_code(source, filename=filename, function=function) - return Bytecode.from_code(code) - - -class TestCase(unittest.TestCase): - def assertBlocksEqual(self, code, *expected_blocks): - self.assertEqual(len(code), len(expected_blocks)) - - for block1, block2 in zip(code, expected_blocks): - block_index = code.get_block_index(block1) - self.assertListEqual( - list(block1), block2, "Block #%s is different" % block_index - ) diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py deleted file mode 100644 index c629f75e94..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py +++ /dev/null @@ -1,488 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -#!/usr/bin/env python3 -import sys -import textwrap -import unittest -from _pydevd_frame_eval.vendored.bytecode import Label, Instr, FreeVar, Bytecode, SetLineno, ConcreteInstr -from _pydevd_frame_eval.vendored.bytecode.tests import TestCase, get_code - - -class BytecodeTests(TestCase): - maxDiff = 80 * 100 - - def test_constructor(self): - code = Bytecode() - self.assertEqual(code.name, "") - self.assertEqual(code.filename, "") - self.assertEqual(code.flags, 0) - self.assertEqual(code, []) - - def test_invalid_types(self): - code = Bytecode() - code.append(123) - with self.assertRaises(ValueError): - list(code) - with self.assertRaises(ValueError): - code.legalize() - with self.assertRaises(ValueError): - Bytecode([123]) - - def test_legalize(self): - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - Instr("LOAD_CONST", 8, lineno=4), - Instr("STORE_NAME", "y"), - Label(), - SetLineno(5), - Instr("LOAD_CONST", 9, lineno=6), - Instr("STORE_NAME", "z"), - ] - ) - - code.legalize() - self.assertListEqual( - code, - [ - Instr("LOAD_CONST", 7, lineno=3), - Instr("STORE_NAME", "x", lineno=3), - Instr("LOAD_CONST", 8, lineno=4), - Instr("STORE_NAME", "y", lineno=4), - Label(), - Instr("LOAD_CONST", 9, lineno=5), - Instr("STORE_NAME", "z", lineno=5), - ], - ) - - def test_slice(self): - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - SetLineno(4), - Instr("LOAD_CONST", 8), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "z"), - ] - ) - sliced_code = code[:] - self.assertEqual(code, sliced_code) - for name in ( - "argcount", - "posonlyargcount", - "kwonlyargcount", - "first_lineno", - "name", - "filename", - "docstring", - "cellvars", - "freevars", - "argnames", - ): - self.assertEqual( - getattr(code, name, None), getattr(sliced_code, name, None) - ) - - def test_copy(self): - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - SetLineno(4), - Instr("LOAD_CONST", 8), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "z"), - ] - ) - - copy_code = code.copy() - self.assertEqual(code, copy_code) - for name in ( - "argcount", - "posonlyargcount", - "kwonlyargcount", - "first_lineno", - "name", - "filename", - "docstring", - "cellvars", - "freevars", - "argnames", - ): - self.assertEqual(getattr(code, name, None), getattr(copy_code, name, None)) - - def test_from_code(self): - code = get_code( - """ - if test: - x = 1 - else: - x = 2 - """ - ) - bytecode = Bytecode.from_code(code) - label_else = Label() - label_exit = Label() - if sys.version_info < (3, 10): - self.assertEqual( - bytecode, - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label_else, lineno=1), - Instr("LOAD_CONST", 1, lineno=2), - Instr("STORE_NAME", "x", lineno=2), - Instr("JUMP_FORWARD", label_exit, lineno=2), - label_else, - Instr("LOAD_CONST", 2, lineno=4), - Instr("STORE_NAME", "x", lineno=4), - label_exit, - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ], - ) - # Control flow handling appears to have changed under Python 3.10 - else: - self.assertEqual( - bytecode, - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label_else, lineno=1), - Instr("LOAD_CONST", 1, lineno=2), - Instr("STORE_NAME", "x", lineno=2), - Instr("LOAD_CONST", None, lineno=2), - Instr("RETURN_VALUE", lineno=2), - label_else, - Instr("LOAD_CONST", 2, lineno=4), - Instr("STORE_NAME", "x", lineno=4), - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ], - ) - - def test_from_code_freevars(self): - ns = {} - exec( - textwrap.dedent( - """ - def create_func(): - x = 1 - def func(): - return x - return func - - func = create_func() - """ - ), - ns, - ns, - ) - code = ns["func"].__code__ - - bytecode = Bytecode.from_code(code) - self.assertEqual( - bytecode, - [ - Instr("LOAD_DEREF", FreeVar("x"), lineno=5), - Instr("RETURN_VALUE", lineno=5), - ], - ) - - def test_from_code_load_fast(self): - code = get_code( - """ - def func(): - x = 33 - y = x - """, - function=True, - ) - code = Bytecode.from_code(code) - self.assertEqual( - code, - [ - Instr("LOAD_CONST", 33, lineno=2), - Instr("STORE_FAST", "x", lineno=2), - Instr("LOAD_FAST", "x", lineno=3), - Instr("STORE_FAST", "y", lineno=3), - Instr("LOAD_CONST", None, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ], - ) - - def test_setlineno(self): - # x = 7 - # y = 8 - # z = 9 - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - SetLineno(4), - Instr("LOAD_CONST", 8), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "z"), - ] - ) - - concrete = code.to_concrete_bytecode() - self.assertEqual(concrete.consts, [7, 8, 9]) - self.assertEqual(concrete.names, ["x", "y", "z"]) - self.assertListEqual( - list(concrete), - [ - ConcreteInstr("LOAD_CONST", 0, lineno=3), - ConcreteInstr("STORE_NAME", 0, lineno=3), - ConcreteInstr("LOAD_CONST", 1, lineno=4), - ConcreteInstr("STORE_NAME", 1, lineno=4), - ConcreteInstr("LOAD_CONST", 2, lineno=5), - ConcreteInstr("STORE_NAME", 2, lineno=5), - ], - ) - - def test_to_code(self): - code = Bytecode() - code.first_lineno = 50 - code.extend( - [ - Instr("LOAD_NAME", "print"), - Instr("LOAD_CONST", "%s"), - Instr("LOAD_GLOBAL", "a"), - Instr("BINARY_MODULO"), - Instr("CALL_FUNCTION", 1), - Instr("RETURN_VALUE"), - ] - ) - co = code.to_code() - # hopefully this is obvious from inspection? :-) - self.assertEqual(co.co_stacksize, 3) - - co = code.to_code(stacksize=42) - self.assertEqual(co.co_stacksize, 42) - - def test_negative_size_unary(self): - opnames = ( - "UNARY_POSITIVE", - "UNARY_NEGATIVE", - "UNARY_NOT", - "UNARY_INVERT", - ) - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr(opname)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_negative_size_unary_with_disable_check_of_pre_and_post(self): - opnames = ( - "UNARY_POSITIVE", - "UNARY_NEGATIVE", - "UNARY_NOT", - "UNARY_INVERT", - ) - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr(opname)]) - co = code.to_code(check_pre_and_post=False) - self.assertEqual(co.co_stacksize, 0) - - def test_negative_size_binary(self): - opnames = ( - "BINARY_POWER", - "BINARY_MULTIPLY", - "BINARY_MATRIX_MULTIPLY", - "BINARY_FLOOR_DIVIDE", - "BINARY_TRUE_DIVIDE", - "BINARY_MODULO", - "BINARY_ADD", - "BINARY_SUBTRACT", - "BINARY_SUBSCR", - "BINARY_LSHIFT", - "BINARY_RSHIFT", - "BINARY_AND", - "BINARY_XOR", - "BINARY_OR", - ) - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_negative_size_binary_with_disable_check_of_pre_and_post(self): - opnames = ( - "BINARY_POWER", - "BINARY_MULTIPLY", - "BINARY_MATRIX_MULTIPLY", - "BINARY_FLOOR_DIVIDE", - "BINARY_TRUE_DIVIDE", - "BINARY_MODULO", - "BINARY_ADD", - "BINARY_SUBTRACT", - "BINARY_SUBSCR", - "BINARY_LSHIFT", - "BINARY_RSHIFT", - "BINARY_AND", - "BINARY_XOR", - "BINARY_OR", - ) - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) - co = code.to_code(check_pre_and_post=False) - self.assertEqual(co.co_stacksize, 1) - - def test_negative_size_call(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("CALL_FUNCTION", 0)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_negative_size_unpack(self): - opnames = ( - "UNPACK_SEQUENCE", - "UNPACK_EX", - ) - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr(opname, 1)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_negative_size_build(self): - opnames = ( - "BUILD_TUPLE", - "BUILD_LIST", - "BUILD_SET", - ) - if sys.version_info >= (3, 6): - opnames = (*opnames, "BUILD_STRING") - - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr(opname, 1)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_negative_size_build_map(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr("BUILD_MAP", 1)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_negative_size_build_map_with_disable_check_of_pre_and_post(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr("BUILD_MAP", 1)]) - co = code.to_code(check_pre_and_post=False) - self.assertEqual(co.co_stacksize, 1) - - @unittest.skipIf(sys.version_info < (3, 6), "Inexistent opcode") - def test_negative_size_build_const_map(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", ("a",)), Instr("BUILD_CONST_KEY_MAP", 1)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - @unittest.skipIf(sys.version_info < (3, 6), "Inexistent opcode") - def test_negative_size_build_const_map_with_disable_check_of_pre_and_post(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", ("a",)), Instr("BUILD_CONST_KEY_MAP", 1)]) - co = code.to_code(check_pre_and_post=False) - self.assertEqual(co.co_stacksize, 1) - - def test_empty_dup(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("DUP_TOP")]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_not_enough_dup(self): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr("DUP_TOP_TWO")]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_not_enough_rot(self): - opnames = ["ROT_TWO", "ROT_THREE"] - if sys.version_info >= (3, 8): - opnames.append("ROT_FOUR") - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_not_enough_rot_with_disable_check_of_pre_and_post(self): - opnames = ["ROT_TWO", "ROT_THREE"] - if sys.version_info >= (3, 8): - opnames.append("ROT_FOUR") - for opname in opnames: - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) - co = code.to_code(check_pre_and_post=False) - self.assertEqual(co.co_stacksize, 1) - - def test_for_iter_stack_effect_computation(self): - with self.subTest(): - code = Bytecode() - code.first_lineno = 1 - lab1 = Label() - lab2 = Label() - code.extend( - [ - lab1, - Instr("FOR_ITER", lab2), - Instr("STORE_FAST", "i"), - Instr("JUMP_ABSOLUTE", lab1), - lab2, - ] - ) - with self.assertRaises(RuntimeError): - # Use compute_stacksize since the code is so broken that conversion - # to from concrete is actually broken - code.compute_stacksize(check_pre_and_post=False) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py deleted file mode 100644 index 9b5b07b1c7..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py +++ /dev/null @@ -1,836 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -#!/usr/bin/env python3 -import io -import sys -import unittest -import contextlib -from _pydevd_frame_eval.vendored.bytecode import ( - Label, - Compare, - SetLineno, - Instr, - Bytecode, - BasicBlock, - ControlFlowGraph, -) -from _pydevd_frame_eval.vendored.bytecode.concrete import OFFSET_AS_INSTRUCTION -from _pydevd_frame_eval.vendored.bytecode.tests import disassemble as _disassemble, TestCase - - -def disassemble( - source, *, filename="", function=False, remove_last_return_none=False -): - code = _disassemble(source, filename=filename, function=function) - blocks = ControlFlowGraph.from_bytecode(code) - if remove_last_return_none: - # drop LOAD_CONST+RETURN_VALUE to only keep 2 instructions, - # to make unit tests shorter - block = blocks[-1] - test = ( - block[-2].name == "LOAD_CONST" - and block[-2].arg is None - and block[-1].name == "RETURN_VALUE" - ) - if not test: - raise ValueError( - "unable to find implicit RETURN_VALUE : %s" % block[-2:] - ) - del block[-2:] - return blocks - - -class BlockTests(unittest.TestCase): - def test_iter_invalid_types(self): - # Labels are not allowed in basic blocks - block = BasicBlock() - block.append(Label()) - with self.assertRaises(ValueError): - list(block) - with self.assertRaises(ValueError): - block.legalize(1) - - # Only one jump allowed and only at the end - block = BasicBlock() - block2 = BasicBlock() - block.extend([Instr("JUMP_ABSOLUTE", block2), Instr("NOP")]) - with self.assertRaises(ValueError): - list(block) - with self.assertRaises(ValueError): - block.legalize(1) - - # jump target must be a BasicBlock - block = BasicBlock() - label = Label() - block.extend([Instr("JUMP_ABSOLUTE", label)]) - with self.assertRaises(ValueError): - list(block) - with self.assertRaises(ValueError): - block.legalize(1) - - def test_slice(self): - block = BasicBlock([Instr("NOP")]) - next_block = BasicBlock() - block.next_block = next_block - self.assertEqual(block, block[:]) - self.assertIs(next_block, block[:].next_block) - - def test_copy(self): - block = BasicBlock([Instr("NOP")]) - next_block = BasicBlock() - block.next_block = next_block - self.assertEqual(block, block.copy()) - self.assertIs(next_block, block.copy().next_block) - - -class BytecodeBlocksTests(TestCase): - maxDiff = 80 * 100 - - def test_constructor(self): - code = ControlFlowGraph() - self.assertEqual(code.name, "") - self.assertEqual(code.filename, "") - self.assertEqual(code.flags, 0) - self.assertBlocksEqual(code, []) - - def test_attr(self): - source = """ - first_line = 1 - - def func(arg1, arg2, *, arg3): - x = 1 - y = 2 - return arg1 - """ - code = disassemble(source, filename="hello.py", function=True) - self.assertEqual(code.argcount, 2) - self.assertEqual(code.filename, "hello.py") - self.assertEqual(code.first_lineno, 3) - if sys.version_info > (3, 8): - self.assertEqual(code.posonlyargcount, 0) - self.assertEqual(code.kwonlyargcount, 1) - self.assertEqual(code.name, "func") - self.assertEqual(code.cellvars, []) - - code.name = "name" - code.filename = "filename" - code.flags = 123 - self.assertEqual(code.name, "name") - self.assertEqual(code.filename, "filename") - self.assertEqual(code.flags, 123) - - # FIXME: test non-empty cellvars - - def test_add_del_block(self): - code = ControlFlowGraph() - code[0].append(Instr("LOAD_CONST", 0)) - - block = code.add_block() - self.assertEqual(len(code), 2) - self.assertIs(block, code[1]) - - code[1].append(Instr("LOAD_CONST", 2)) - self.assertBlocksEqual(code, [Instr("LOAD_CONST", 0)], [Instr("LOAD_CONST", 2)]) - - del code[0] - self.assertBlocksEqual(code, [Instr("LOAD_CONST", 2)]) - - del code[0] - self.assertEqual(len(code), 0) - - def test_setlineno(self): - # x = 7 - # y = 8 - # z = 9 - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - SetLineno(4), - Instr("LOAD_CONST", 8), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "z"), - ] - ) - - blocks = ControlFlowGraph.from_bytecode(code) - self.assertBlocksEqual( - blocks, - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - SetLineno(4), - Instr("LOAD_CONST", 8), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "z"), - ], - ) - - def test_legalize(self): - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - Instr("LOAD_CONST", 8, lineno=4), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9, lineno=6), - Instr("STORE_NAME", "z"), - ] - ) - - blocks = ControlFlowGraph.from_bytecode(code) - blocks.legalize() - self.assertBlocksEqual( - blocks, - [ - Instr("LOAD_CONST", 7, lineno=3), - Instr("STORE_NAME", "x", lineno=3), - Instr("LOAD_CONST", 8, lineno=4), - Instr("STORE_NAME", "y", lineno=4), - Instr("LOAD_CONST", 9, lineno=5), - Instr("STORE_NAME", "z", lineno=5), - ], - ) - - def test_repr(self): - r = repr(ControlFlowGraph()) - self.assertIn("ControlFlowGraph", r) - self.assertIn("1", r) - - def test_to_bytecode(self): - # if test: - # x = 2 - # x = 5 - blocks = ControlFlowGraph() - blocks.add_block() - blocks.add_block() - blocks[0].extend( - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", blocks[2], lineno=1), - ] - ) - - blocks[1].extend( - [ - Instr("LOAD_CONST", 5, lineno=2), - Instr("STORE_NAME", "x", lineno=2), - Instr("JUMP_FORWARD", blocks[2], lineno=2), - ] - ) - - blocks[2].extend( - [ - Instr("LOAD_CONST", 7, lineno=3), - Instr("STORE_NAME", "x", lineno=3), - Instr("LOAD_CONST", None, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ] - ) - - bytecode = blocks.to_bytecode() - label = Label() - self.assertEqual( - bytecode, - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label, lineno=1), - Instr("LOAD_CONST", 5, lineno=2), - Instr("STORE_NAME", "x", lineno=2), - Instr("JUMP_FORWARD", label, lineno=2), - label, - Instr("LOAD_CONST", 7, lineno=3), - Instr("STORE_NAME", "x", lineno=3), - Instr("LOAD_CONST", None, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ], - ) - # FIXME: test other attributes - - def test_label_at_the_end(self): - label = Label() - code = Bytecode( - [ - Instr("LOAD_NAME", "x"), - Instr("UNARY_NOT"), - Instr("POP_JUMP_IF_FALSE", label), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "y"), - label, - ] - ) - - cfg = ControlFlowGraph.from_bytecode(code) - self.assertBlocksEqual( - cfg, - [ - Instr("LOAD_NAME", "x"), - Instr("UNARY_NOT"), - Instr("POP_JUMP_IF_FALSE", cfg[2]), - ], - [Instr("LOAD_CONST", 9), Instr("STORE_NAME", "y")], - [], - ) - - def test_from_bytecode(self): - bytecode = Bytecode() - label = Label() - bytecode.extend( - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label, lineno=1), - Instr("LOAD_CONST", 5, lineno=2), - Instr("STORE_NAME", "x", lineno=2), - Instr("JUMP_FORWARD", label, lineno=2), - # dead code! - Instr("LOAD_CONST", 7, lineno=4), - Instr("STORE_NAME", "x", lineno=4), - Label(), # unused label - label, - Label(), # unused label - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ] - ) - - blocks = ControlFlowGraph.from_bytecode(bytecode) - label2 = blocks[3] - self.assertBlocksEqual( - blocks, - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label2, lineno=1), - ], - [ - Instr("LOAD_CONST", 5, lineno=2), - Instr("STORE_NAME", "x", lineno=2), - Instr("JUMP_FORWARD", label2, lineno=2), - ], - [Instr("LOAD_CONST", 7, lineno=4), Instr("STORE_NAME", "x", lineno=4)], - [Instr("LOAD_CONST", None, lineno=4), Instr("RETURN_VALUE", lineno=4)], - ) - # FIXME: test other attributes - - def test_from_bytecode_loop(self): - # for x in (1, 2, 3): - # if x == 2: - # break - # continue - - if sys.version_info < (3, 8): - label_loop_start = Label() - label_loop_exit = Label() - label_loop_end = Label() - - code = Bytecode() - code.extend( - ( - Instr("SETUP_LOOP", label_loop_end, lineno=1), - Instr("LOAD_CONST", (1, 2, 3), lineno=1), - Instr("GET_ITER", lineno=1), - label_loop_start, - Instr("FOR_ITER", label_loop_exit, lineno=1), - Instr("STORE_NAME", "x", lineno=1), - Instr("LOAD_NAME", "x", lineno=2), - Instr("LOAD_CONST", 2, lineno=2), - Instr("COMPARE_OP", Compare.EQ, lineno=2), - Instr("POP_JUMP_IF_FALSE", label_loop_start, lineno=2), - Instr("BREAK_LOOP", lineno=3), - Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), - Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), - label_loop_exit, - Instr("POP_BLOCK", lineno=4), - label_loop_end, - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ) - ) - blocks = ControlFlowGraph.from_bytecode(code) - - expected = [ - [Instr("SETUP_LOOP", blocks[8], lineno=1)], - [Instr("LOAD_CONST", (1, 2, 3), lineno=1), Instr("GET_ITER", lineno=1)], - [Instr("FOR_ITER", blocks[7], lineno=1)], - [ - Instr("STORE_NAME", "x", lineno=1), - Instr("LOAD_NAME", "x", lineno=2), - Instr("LOAD_CONST", 2, lineno=2), - Instr("COMPARE_OP", Compare.EQ, lineno=2), - Instr("POP_JUMP_IF_FALSE", blocks[2], lineno=2), - ], - [Instr("BREAK_LOOP", lineno=3)], - [Instr("JUMP_ABSOLUTE", blocks[2], lineno=4)], - [Instr("JUMP_ABSOLUTE", blocks[2], lineno=4)], - [Instr("POP_BLOCK", lineno=4)], - [Instr("LOAD_CONST", None, lineno=4), Instr("RETURN_VALUE", lineno=4)], - ] - self.assertBlocksEqual(blocks, *expected) - else: - label_loop_start = Label() - label_loop_exit = Label() - - code = Bytecode() - code.extend( - ( - Instr("LOAD_CONST", (1, 2, 3), lineno=1), - Instr("GET_ITER", lineno=1), - label_loop_start, - Instr("FOR_ITER", label_loop_exit, lineno=1), - Instr("STORE_NAME", "x", lineno=1), - Instr("LOAD_NAME", "x", lineno=2), - Instr("LOAD_CONST", 2, lineno=2), - Instr("COMPARE_OP", Compare.EQ, lineno=2), - Instr("POP_JUMP_IF_FALSE", label_loop_start, lineno=2), - Instr("JUMP_ABSOLUTE", label_loop_exit, lineno=3), - Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), - Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), - label_loop_exit, - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ) - ) - blocks = ControlFlowGraph.from_bytecode(code) - - expected = [ - [Instr("LOAD_CONST", (1, 2, 3), lineno=1), Instr("GET_ITER", lineno=1)], - [Instr("FOR_ITER", blocks[6], lineno=1)], - [ - Instr("STORE_NAME", "x", lineno=1), - Instr("LOAD_NAME", "x", lineno=2), - Instr("LOAD_CONST", 2, lineno=2), - Instr("COMPARE_OP", Compare.EQ, lineno=2), - Instr("POP_JUMP_IF_FALSE", blocks[1], lineno=2), - ], - [Instr("JUMP_ABSOLUTE", blocks[6], lineno=3)], - [Instr("JUMP_ABSOLUTE", blocks[1], lineno=4)], - [Instr("JUMP_ABSOLUTE", blocks[1], lineno=4)], - [Instr("LOAD_CONST", None, lineno=4), Instr("RETURN_VALUE", lineno=4)], - ] - self.assertBlocksEqual(blocks, *expected) - - -class BytecodeBlocksFunctionalTests(TestCase): - def test_eq(self): - # compare codes with multiple blocks and labels, - # Code.__eq__() renumbers labels to get equal labels - source = "x = 1 if test else 2" - code1 = disassemble(source) - code2 = disassemble(source) - self.assertEqual(code1, code2) - - # Type mismatch - self.assertFalse(code1 == 1) - - # argnames mismatch - cfg = ControlFlowGraph() - cfg.argnames = 10 - self.assertFalse(code1 == cfg) - - # instr mismatch - cfg = ControlFlowGraph() - cfg.argnames = code1.argnames - self.assertFalse(code1 == cfg) - - def check_getitem(self, code): - # check internal Code block indexes (index by index, index by label) - for block_index, block in enumerate(code): - self.assertIs(code[block_index], block) - self.assertIs(code[block], block) - self.assertEqual(code.get_block_index(block), block_index) - - def test_delitem(self): - cfg = ControlFlowGraph() - b = cfg.add_block() - del cfg[b] - self.assertEqual(len(cfg.get_instructions()), 0) - - def sample_code(self): - code = disassemble("x = 1", remove_last_return_none=True) - self.assertBlocksEqual( - code, [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)] - ) - return code - - def test_split_block(self): - code = self.sample_code() - code[0].append(Instr("NOP", lineno=1)) - - label = code.split_block(code[0], 2) - self.assertIs(label, code[1]) - self.assertBlocksEqual( - code, - [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)], - [Instr("NOP", lineno=1)], - ) - self.check_getitem(code) - - label2 = code.split_block(code[0], 1) - self.assertIs(label2, code[1]) - self.assertBlocksEqual( - code, - [Instr("LOAD_CONST", 1, lineno=1)], - [Instr("STORE_NAME", "x", lineno=1)], - [Instr("NOP", lineno=1)], - ) - self.check_getitem(code) - - with self.assertRaises(TypeError): - code.split_block(1, 1) - - with self.assertRaises(ValueError) as e: - code.split_block(code[0], -2) - self.assertIn("positive", e.exception.args[0]) - - def test_split_block_end(self): - code = self.sample_code() - - # split at the end of the last block requires to add a new empty block - label = code.split_block(code[0], 2) - self.assertIs(label, code[1]) - self.assertBlocksEqual( - code, - [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)], - [], - ) - self.check_getitem(code) - - # split at the end of a block which is not the end doesn't require to - # add a new block - label = code.split_block(code[0], 2) - self.assertIs(label, code[1]) - self.assertBlocksEqual( - code, - [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)], - [], - ) - - def test_split_block_dont_split(self): - code = self.sample_code() - - # FIXME: is it really useful to support that? - block = code.split_block(code[0], 0) - self.assertIs(block, code[0]) - self.assertBlocksEqual( - code, [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)] - ) - - def test_split_block_error(self): - code = self.sample_code() - - with self.assertRaises(ValueError): - # invalid index - code.split_block(code[0], 3) - - def test_to_code(self): - # test resolution of jump labels - bytecode = ControlFlowGraph() - bytecode.first_lineno = 3 - bytecode.argcount = 3 - if sys.version_info > (3, 8): - bytecode.posonlyargcount = 0 - bytecode.kwonlyargcount = 2 - bytecode.name = "func" - bytecode.filename = "hello.py" - bytecode.flags = 0x43 - bytecode.argnames = ("arg", "arg2", "arg3", "kwonly", "kwonly2") - bytecode.docstring = None - block0 = bytecode[0] - block1 = bytecode.add_block() - block2 = bytecode.add_block() - block0.extend( - [ - Instr("LOAD_FAST", "x", lineno=4), - Instr("POP_JUMP_IF_FALSE", block2, lineno=4), - ] - ) - block1.extend( - [Instr("LOAD_FAST", "arg", lineno=5), Instr("STORE_FAST", "x", lineno=5)] - ) - block2.extend( - [ - Instr("LOAD_CONST", 3, lineno=6), - Instr("STORE_FAST", "x", lineno=6), - Instr("LOAD_FAST", "x", lineno=7), - Instr("RETURN_VALUE", lineno=7), - ] - ) - - if OFFSET_AS_INSTRUCTION: - # The argument of the jump is divided by 2 - expected = ( - b"|\x05" b"r\x04" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" - ) - else: - expected = ( - b"|\x05" b"r\x08" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" - ) - - code = bytecode.to_code() - self.assertEqual(code.co_consts, (None, 3)) - self.assertEqual(code.co_argcount, 3) - if sys.version_info > (3, 8): - self.assertEqual(code.co_posonlyargcount, 0) - self.assertEqual(code.co_kwonlyargcount, 2) - self.assertEqual(code.co_nlocals, 6) - self.assertEqual(code.co_stacksize, 1) - # FIXME: don't use hardcoded constants - self.assertEqual(code.co_flags, 0x43) - self.assertEqual(code.co_code, expected) - self.assertEqual(code.co_names, ()) - self.assertEqual( - code.co_varnames, ("arg", "arg2", "arg3", "kwonly", "kwonly2", "x") - ) - self.assertEqual(code.co_filename, "hello.py") - self.assertEqual(code.co_name, "func") - self.assertEqual(code.co_firstlineno, 3) - - # verify stacksize argument is honored - explicit_stacksize = code.co_stacksize + 42 - code = bytecode.to_code(stacksize=explicit_stacksize) - self.assertEqual(code.co_stacksize, explicit_stacksize) - - def test_get_block_index(self): - blocks = ControlFlowGraph() - block0 = blocks[0] - block1 = blocks.add_block() - block2 = blocks.add_block() - self.assertEqual(blocks.get_block_index(block0), 0) - self.assertEqual(blocks.get_block_index(block1), 1) - self.assertEqual(blocks.get_block_index(block2), 2) - - other_block = BasicBlock() - self.assertRaises(ValueError, blocks.get_block_index, other_block) - - -class CFGStacksizeComputationTests(TestCase): - def check_stack_size(self, func): - code = func.__code__ - bytecode = Bytecode.from_code(code) - cfg = ControlFlowGraph.from_bytecode(bytecode) - self.assertEqual(code.co_stacksize, cfg.compute_stacksize()) - - def test_empty_code(self): - cfg = ControlFlowGraph() - del cfg[0] - self.assertEqual(cfg.compute_stacksize(), 0) - - def test_handling_of_set_lineno(self): - code = Bytecode() - code.first_lineno = 3 - code.extend( - [ - Instr("LOAD_CONST", 7), - Instr("STORE_NAME", "x"), - SetLineno(4), - Instr("LOAD_CONST", 8), - Instr("STORE_NAME", "y"), - SetLineno(5), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "z"), - ] - ) - self.assertEqual(code.compute_stacksize(), 1) - - def test_invalid_stacksize(self): - code = Bytecode() - code.extend([Instr("STORE_NAME", "x")]) - with self.assertRaises(RuntimeError): - code.compute_stacksize() - - def test_stack_size_computation_and(self): - def test(arg1, *args, **kwargs): # pragma: no cover - return arg1 and args # Test JUMP_IF_FALSE_OR_POP - - self.check_stack_size(test) - - def test_stack_size_computation_or(self): - def test(arg1, *args, **kwargs): # pragma: no cover - return arg1 or args # Test JUMP_IF_TRUE_OR_POP - - self.check_stack_size(test) - - def test_stack_size_computation_if_else(self): - def test(arg1, *args, **kwargs): # pragma: no cover - if args: - return 0 - elif kwargs: - return 1 - else: - return 2 - - self.check_stack_size(test) - - def test_stack_size_computation_for_loop_continue(self): - def test(arg1, *args, **kwargs): # pragma: no cover - for k in kwargs: - if k in args: - continue - else: - return 1 - - self.check_stack_size(test) - - def test_stack_size_computation_while_loop_break(self): - def test(arg1, *args, **kwargs): # pragma: no cover - while True: - if arg1: - break - - self.check_stack_size(test) - - def test_stack_size_computation_with(self): - def test(arg1, *args, **kwargs): # pragma: no cover - with open(arg1) as f: - return f.read() - - self.check_stack_size(test) - - def test_stack_size_computation_try_except(self): - def test(arg1, *args, **kwargs): # pragma: no cover - try: - return args[0] - except Exception: - return 2 - - self.check_stack_size(test) - - def test_stack_size_computation_try_finally(self): - def test(arg1, *args, **kwargs): # pragma: no cover - try: - return args[0] - finally: - return 2 - - self.check_stack_size(test) - - def test_stack_size_computation_try_except_finally(self): - def test(arg1, *args, **kwargs): # pragma: no cover - try: - return args[0] - except Exception: - return 2 - finally: - print("Interrupt") - - self.check_stack_size(test) - - def test_stack_size_computation_try_except_else_finally(self): - def test(arg1, *args, **kwargs): # pragma: no cover - try: - return args[0] - except Exception: - return 2 - else: - return arg1 - finally: - print("Interrupt") - - self.check_stack_size(test) - - def test_stack_size_computation_nested_try_except_finally(self): - def test(arg1, *args, **kwargs): # pragma: no cover - k = 1 - try: - getattr(arg1, k) - except AttributeError: - pass - except Exception: - try: - assert False - except Exception: - return 2 - finally: - print("unexpected") - finally: - print("attempted to get {}".format(k)) - - self.check_stack_size(test) - - def test_stack_size_computation_nested_try_except_else_finally(self): - def test(*args, **kwargs): - try: - v = args[1] - except IndexError: - try: - w = kwargs["value"] - except KeyError: - return -1 - else: - return w - finally: - print("second finally") - else: - return v - finally: - print("first finally") - - # A direct comparison of the stack depth fails because CPython - # generate dead code that is used in stack computation. - cpython_stacksize = test.__code__.co_stacksize - test.__code__ = Bytecode.from_code(test.__code__).to_code() - self.assertLessEqual(test.__code__.co_stacksize, cpython_stacksize) - with contextlib.redirect_stdout(io.StringIO()) as stdout: - self.assertEqual(test(1, 4), 4) - self.assertEqual(stdout.getvalue(), "first finally\n") - - with contextlib.redirect_stdout(io.StringIO()) as stdout: - self.assertEqual(test([], value=3), 3) - self.assertEqual(stdout.getvalue(), "second finally\nfirst finally\n") - - with contextlib.redirect_stdout(io.StringIO()) as stdout: - self.assertEqual(test([], name=None), -1) - self.assertEqual(stdout.getvalue(), "second finally\nfirst finally\n") - - def test_stack_size_with_dead_code(self): - # Simply demonstrate more directly the previously mentioned issue. - def test(*args): # pragma: no cover - return 0 - try: - a = args[0] - except IndexError: - return -1 - else: - return a - - test.__code__ = Bytecode.from_code(test.__code__).to_code() - self.assertEqual(test.__code__.co_stacksize, 1) - self.assertEqual(test(1), 0) - - def test_huge_code_with_numerous_blocks(self): - def base_func(x): - pass - - def mk_if_then_else(depth): - instructions = [] - for i in range(depth): - label_else = Label() - instructions.extend( - [ - Instr("LOAD_FAST", "x"), - Instr("POP_JUMP_IF_FALSE", label_else), - Instr("LOAD_GLOBAL", "f{}".format(i)), - Instr("RETURN_VALUE"), - label_else, - ] - ) - instructions.extend([Instr("LOAD_CONST", None), Instr("RETURN_VALUE")]) - return instructions - - bytecode = Bytecode(mk_if_then_else(5000)) - bytecode.compute_stacksize() - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py deleted file mode 100644 index 6938bd1bfe..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py +++ /dev/null @@ -1,93 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -import unittest - -from _pydevd_frame_eval.vendored.bytecode import ConcreteBytecode, Bytecode, ControlFlowGraph -from _pydevd_frame_eval.vendored.bytecode.tests import get_code - - -class CodeTests(unittest.TestCase): - """Check that bytecode.from_code(code).to_code() returns code.""" - - def check(self, source, function=False): - ref_code = get_code(source, function=function) - - code = ConcreteBytecode.from_code(ref_code).to_code() - self.assertEqual(code, ref_code) - - code = Bytecode.from_code(ref_code).to_code() - self.assertEqual(code, ref_code) - - bytecode = Bytecode.from_code(ref_code) - blocks = ControlFlowGraph.from_bytecode(bytecode) - code = blocks.to_bytecode().to_code() - self.assertEqual(code, ref_code) - - def test_loop(self): - self.check( - """ - for x in range(1, 10): - x += 1 - if x == 3: - continue - x -= 1 - if x > 7: - break - x = 0 - print(x) - """ - ) - - def test_varargs(self): - self.check( - """ - def func(a, b, *varargs): - pass - """, - function=True, - ) - - def test_kwargs(self): - self.check( - """ - def func(a, b, **kwargs): - pass - """, - function=True, - ) - - def test_kwonlyargs(self): - self.check( - """ - def func(*, arg, arg2): - pass - """, - function=True, - ) - - # Added because Python 3.10 added some special beahavior with respect to - # generators in term of stack size - def test_generator_func(self): - self.check( - """ - def func(arg, arg2): - yield - """, - function=True, - ) - - def test_async_func(self): - self.check( - """ - async def func(arg, arg2): - pass - """, - function=True, - ) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py deleted file mode 100644 index 510f6cd55a..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py +++ /dev/null @@ -1,1513 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -#!/usr/bin/env python3 -import opcode -import sys -import textwrap -import types -import unittest - -from _pydevd_frame_eval.vendored.bytecode import ( - UNSET, - Label, - Instr, - SetLineno, - Bytecode, - CellVar, - FreeVar, - CompilerFlags, - ConcreteInstr, - ConcreteBytecode, -) -from _pydevd_frame_eval.vendored.bytecode.concrete import OFFSET_AS_INSTRUCTION -from _pydevd_frame_eval.vendored.bytecode.tests import get_code, TestCase - - -class ConcreteInstrTests(TestCase): - def test_constructor(self): - with self.assertRaises(ValueError): - # need an argument - ConcreteInstr("LOAD_CONST") - with self.assertRaises(ValueError): - # must not have an argument - ConcreteInstr("ROT_TWO", 33) - - # invalid argument - with self.assertRaises(TypeError): - ConcreteInstr("LOAD_CONST", 1.0) - with self.assertRaises(ValueError): - ConcreteInstr("LOAD_CONST", -1) - with self.assertRaises(TypeError): - ConcreteInstr("LOAD_CONST", 5, lineno=1.0) - with self.assertRaises(ValueError): - ConcreteInstr("LOAD_CONST", 5, lineno=-1) - - # test maximum argument - with self.assertRaises(ValueError): - ConcreteInstr("LOAD_CONST", 2147483647 + 1) - instr = ConcreteInstr("LOAD_CONST", 2147483647) - self.assertEqual(instr.arg, 2147483647) - - # test meaningless extended args - instr = ConcreteInstr("LOAD_FAST", 8, lineno=3, extended_args=1) - self.assertEqual(instr.name, "LOAD_FAST") - self.assertEqual(instr.arg, 8) - self.assertEqual(instr.lineno, 3) - self.assertEqual(instr.size, 4) - - def test_attr(self): - instr = ConcreteInstr("LOAD_CONST", 5, lineno=12) - self.assertEqual(instr.name, "LOAD_CONST") - self.assertEqual(instr.opcode, 100) - self.assertEqual(instr.arg, 5) - self.assertEqual(instr.lineno, 12) - self.assertEqual(instr.size, 2) - - def test_set(self): - instr = ConcreteInstr("LOAD_CONST", 5, lineno=3) - - instr.set("NOP") - self.assertEqual(instr.name, "NOP") - self.assertIs(instr.arg, UNSET) - self.assertEqual(instr.lineno, 3) - - instr.set("LOAD_FAST", 8) - self.assertEqual(instr.name, "LOAD_FAST") - self.assertEqual(instr.arg, 8) - self.assertEqual(instr.lineno, 3) - - # invalid - with self.assertRaises(ValueError): - instr.set("LOAD_CONST") - with self.assertRaises(ValueError): - instr.set("NOP", 5) - - def test_set_attr(self): - instr = ConcreteInstr("LOAD_CONST", 5, lineno=12) - - # operator name - instr.name = "LOAD_FAST" - self.assertEqual(instr.name, "LOAD_FAST") - self.assertEqual(instr.opcode, 124) - self.assertRaises(TypeError, setattr, instr, "name", 3) - self.assertRaises(ValueError, setattr, instr, "name", "xxx") - - # operator code - instr.opcode = 100 - self.assertEqual(instr.name, "LOAD_CONST") - self.assertEqual(instr.opcode, 100) - self.assertRaises(ValueError, setattr, instr, "opcode", -12) - self.assertRaises(TypeError, setattr, instr, "opcode", "abc") - - # extended argument - instr.arg = 0x1234ABCD - self.assertEqual(instr.arg, 0x1234ABCD) - self.assertEqual(instr.size, 8) - - # small argument - instr.arg = 0 - self.assertEqual(instr.arg, 0) - self.assertEqual(instr.size, 2) - - # invalid argument - self.assertRaises(ValueError, setattr, instr, "arg", -1) - self.assertRaises(ValueError, setattr, instr, "arg", 2147483647 + 1) - - # size attribute is read-only - self.assertRaises(AttributeError, setattr, instr, "size", 3) - - # lineno - instr.lineno = 33 - self.assertEqual(instr.lineno, 33) - self.assertRaises(TypeError, setattr, instr, "lineno", 1.0) - self.assertRaises(ValueError, setattr, instr, "lineno", -1) - - def test_size(self): - self.assertEqual(ConcreteInstr("ROT_TWO").size, 2) - self.assertEqual(ConcreteInstr("LOAD_CONST", 3).size, 2) - self.assertEqual(ConcreteInstr("LOAD_CONST", 0x1234ABCD).size, 8) - - def test_disassemble(self): - code = b"\t\x00d\x03" - instr = ConcreteInstr.disassemble(1, code, 0) - self.assertEqual(instr, ConcreteInstr("NOP", lineno=1)) - - instr = ConcreteInstr.disassemble(2, code, 1 if OFFSET_AS_INSTRUCTION else 2) - self.assertEqual(instr, ConcreteInstr("LOAD_CONST", 3, lineno=2)) - - code = b"\x90\x12\x904\x90\xabd\xcd" - - instr = ConcreteInstr.disassemble(3, code, 0) - self.assertEqual(instr, ConcreteInstr("EXTENDED_ARG", 0x12, lineno=3)) - - def test_assemble(self): - instr = ConcreteInstr("NOP") - self.assertEqual(instr.assemble(), b"\t\x00") - - instr = ConcreteInstr("LOAD_CONST", 3) - self.assertEqual(instr.assemble(), b"d\x03") - - instr = ConcreteInstr("LOAD_CONST", 0x1234ABCD) - self.assertEqual( - instr.assemble(), - (b"\x90\x12\x904\x90\xabd\xcd"), - ) - - instr = ConcreteInstr("LOAD_CONST", 3, extended_args=1) - self.assertEqual( - instr.assemble(), - (b"\x90\x00d\x03"), - ) - - def test_get_jump_target(self): - jump_abs = ConcreteInstr("JUMP_ABSOLUTE", 3) - self.assertEqual(jump_abs.get_jump_target(100), 3) - - jump_forward = ConcreteInstr("JUMP_FORWARD", 5) - self.assertEqual( - jump_forward.get_jump_target(10), 16 if OFFSET_AS_INSTRUCTION else 17 - ) - - -class ConcreteBytecodeTests(TestCase): - def test_repr(self): - r = repr(ConcreteBytecode()) - self.assertIn("ConcreteBytecode", r) - self.assertIn("0", r) - - def test_eq(self): - code = ConcreteBytecode() - self.assertFalse(code == 1) - - for name, val in ( - ("names", ["a"]), - ("varnames", ["a"]), - ("consts", [1]), - ("argcount", 1), - ("kwonlyargcount", 2), - ("flags", CompilerFlags(CompilerFlags.GENERATOR)), - ("first_lineno", 10), - ("filename", "xxxx.py"), - ("name", "__x"), - ("docstring", "x-x-x"), - ("cellvars", [CellVar("x")]), - ("freevars", [FreeVar("x")]), - ): - c = ConcreteBytecode() - setattr(c, name, val) - # For obscure reasons using assertNotEqual here fail - self.assertFalse(code == c) - - if sys.version_info > (3, 8): - c = ConcreteBytecode() - c.posonlyargcount = 10 - self.assertFalse(code == c) - - c = ConcreteBytecode() - c.consts = [1] - code.consts = [1] - c.append(ConcreteInstr("LOAD_CONST", 0)) - self.assertFalse(code == c) - - def test_attr(self): - code_obj = get_code("x = 5") - code = ConcreteBytecode.from_code(code_obj) - self.assertEqual(code.consts, [5, None]) - self.assertEqual(code.names, ["x"]) - self.assertEqual(code.varnames, []) - self.assertEqual(code.freevars, []) - self.assertListEqual( - list(code), - [ - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("STORE_NAME", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 1, lineno=1), - ConcreteInstr("RETURN_VALUE", lineno=1), - ], - ) - # FIXME: test other attributes - - def test_invalid_types(self): - code = ConcreteBytecode() - code.append(Label()) - with self.assertRaises(ValueError): - list(code) - with self.assertRaises(ValueError): - code.legalize() - with self.assertRaises(ValueError): - ConcreteBytecode([Label()]) - - def test_to_code_lnotab(self): - - # We use an actual function for the simple case to - # ensure we get lnotab right - def f(): - # - # - x = 7 # noqa - y = 8 # noqa - z = 9 # noqa - - fl = f.__code__.co_firstlineno - concrete = ConcreteBytecode() - concrete.consts = [None, 7, 8, 9] - concrete.varnames = ["x", "y", "z"] - concrete.first_lineno = fl - concrete.extend( - [ - SetLineno(fl + 3), - ConcreteInstr("LOAD_CONST", 1), - ConcreteInstr("STORE_FAST", 0), - SetLineno(fl + 4), - ConcreteInstr("LOAD_CONST", 2), - ConcreteInstr("STORE_FAST", 1), - SetLineno(fl + 5), - ConcreteInstr("LOAD_CONST", 3), - ConcreteInstr("STORE_FAST", 2), - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("RETURN_VALUE"), - ] - ) - - code = concrete.to_code() - self.assertEqual(code.co_code, f.__code__.co_code) - self.assertEqual(code.co_lnotab, f.__code__.co_lnotab) - if sys.version_info >= (3, 10): - self.assertEqual(code.co_linetable, f.__code__.co_linetable) - - def test_negative_lnotab(self): - # x = 7 - # y = 8 - concrete = ConcreteBytecode( - [ - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("STORE_NAME", 0), - # line number goes backward! - SetLineno(2), - ConcreteInstr("LOAD_CONST", 1), - ConcreteInstr("STORE_NAME", 1), - ] - ) - concrete.consts = [7, 8] - concrete.names = ["x", "y"] - concrete.first_lineno = 5 - - code = concrete.to_code() - expected = b"d\x00Z\x00d\x01Z\x01" - self.assertEqual(code.co_code, expected) - self.assertEqual(code.co_firstlineno, 5) - self.assertEqual(code.co_lnotab, b"\x04\xfd") - - def test_extended_lnotab(self): - # x = 7 - # 200 blank lines - # y = 8 - concrete = ConcreteBytecode( - [ - ConcreteInstr("LOAD_CONST", 0), - SetLineno(1 + 128), - ConcreteInstr("STORE_NAME", 0), - # line number goes backward! - SetLineno(1 + 129), - ConcreteInstr("LOAD_CONST", 1), - SetLineno(1), - ConcreteInstr("STORE_NAME", 1), - ] - ) - concrete.consts = [7, 8] - concrete.names = ["x", "y"] - concrete.first_lineno = 1 - - code = concrete.to_code() - expected = b"d\x00Z\x00d\x01Z\x01" - self.assertEqual(code.co_code, expected) - self.assertEqual(code.co_firstlineno, 1) - self.assertEqual(code.co_lnotab, b"\x02\x7f\x00\x01\x02\x01\x02\x80\x00\xff") - - def test_extended_lnotab2(self): - # x = 7 - # 200 blank lines - # y = 8 - base_code = compile("x = 7" + "\n" * 200 + "y = 8", "", "exec") - concrete = ConcreteBytecode( - [ - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("STORE_NAME", 0), - SetLineno(201), - ConcreteInstr("LOAD_CONST", 1), - ConcreteInstr("STORE_NAME", 1), - ConcreteInstr("LOAD_CONST", 2), - ConcreteInstr("RETURN_VALUE"), - ] - ) - concrete.consts = [None, 7, 8] - concrete.names = ["x", "y"] - concrete.first_lineno = 1 - - code = concrete.to_code() - self.assertEqual(code.co_code, base_code.co_code) - self.assertEqual(code.co_firstlineno, base_code.co_firstlineno) - self.assertEqual(code.co_lnotab, base_code.co_lnotab) - if sys.version_info >= (3, 10): - self.assertEqual(code.co_linetable, base_code.co_linetable) - - def test_to_bytecode_consts(self): - # x = -0.0 - # x = +0.0 - # - # code optimized by the CPython 3.6 peephole optimizer which emits - # duplicated constants (0.0 is twice in consts). - code = ConcreteBytecode() - code.consts = [0.0, None, -0.0, 0.0] - code.names = ["x", "y"] - code.extend( - [ - ConcreteInstr("LOAD_CONST", 2, lineno=1), - ConcreteInstr("STORE_NAME", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 3, lineno=2), - ConcreteInstr("STORE_NAME", 1, lineno=2), - ConcreteInstr("LOAD_CONST", 1, lineno=2), - ConcreteInstr("RETURN_VALUE", lineno=2), - ] - ) - - code = code.to_bytecode().to_concrete_bytecode() - # the conversion changes the constant order: the order comes from - # the order of LOAD_CONST instructions - self.assertEqual(code.consts, [-0.0, 0.0, None]) - code.names = ["x", "y"] - self.assertListEqual( - list(code), - [ - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("STORE_NAME", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 1, lineno=2), - ConcreteInstr("STORE_NAME", 1, lineno=2), - ConcreteInstr("LOAD_CONST", 2, lineno=2), - ConcreteInstr("RETURN_VALUE", lineno=2), - ], - ) - - def test_cellvar(self): - concrete = ConcreteBytecode() - concrete.cellvars = ["x"] - concrete.append(ConcreteInstr("LOAD_DEREF", 0)) - code = concrete.to_code() - - concrete = ConcreteBytecode.from_code(code) - self.assertEqual(concrete.cellvars, ["x"]) - self.assertEqual(concrete.freevars, []) - self.assertEqual(list(concrete), [ConcreteInstr("LOAD_DEREF", 0, lineno=1)]) - - bytecode = concrete.to_bytecode() - self.assertEqual(bytecode.cellvars, ["x"]) - self.assertEqual(list(bytecode), [Instr("LOAD_DEREF", CellVar("x"), lineno=1)]) - - def test_freevar(self): - concrete = ConcreteBytecode() - concrete.freevars = ["x"] - concrete.append(ConcreteInstr("LOAD_DEREF", 0)) - code = concrete.to_code() - - concrete = ConcreteBytecode.from_code(code) - self.assertEqual(concrete.cellvars, []) - self.assertEqual(concrete.freevars, ["x"]) - self.assertEqual(list(concrete), [ConcreteInstr("LOAD_DEREF", 0, lineno=1)]) - - bytecode = concrete.to_bytecode() - self.assertEqual(bytecode.cellvars, []) - self.assertEqual(list(bytecode), [Instr("LOAD_DEREF", FreeVar("x"), lineno=1)]) - - def test_cellvar_freevar(self): - concrete = ConcreteBytecode() - concrete.cellvars = ["cell"] - concrete.freevars = ["free"] - concrete.append(ConcreteInstr("LOAD_DEREF", 0)) - concrete.append(ConcreteInstr("LOAD_DEREF", 1)) - code = concrete.to_code() - - concrete = ConcreteBytecode.from_code(code) - self.assertEqual(concrete.cellvars, ["cell"]) - self.assertEqual(concrete.freevars, ["free"]) - self.assertEqual( - list(concrete), - [ - ConcreteInstr("LOAD_DEREF", 0, lineno=1), - ConcreteInstr("LOAD_DEREF", 1, lineno=1), - ], - ) - - bytecode = concrete.to_bytecode() - self.assertEqual(bytecode.cellvars, ["cell"]) - self.assertEqual( - list(bytecode), - [ - Instr("LOAD_DEREF", CellVar("cell"), lineno=1), - Instr("LOAD_DEREF", FreeVar("free"), lineno=1), - ], - ) - - def test_load_classderef(self): - concrete = ConcreteBytecode() - concrete.cellvars = ["__class__"] - concrete.freevars = ["__class__"] - concrete.extend( - [ConcreteInstr("LOAD_CLASSDEREF", 1), ConcreteInstr("STORE_DEREF", 1)] - ) - - bytecode = concrete.to_bytecode() - self.assertEqual(bytecode.freevars, ["__class__"]) - self.assertEqual(bytecode.cellvars, ["__class__"]) - self.assertEqual( - list(bytecode), - [ - Instr("LOAD_CLASSDEREF", FreeVar("__class__"), lineno=1), - Instr("STORE_DEREF", FreeVar("__class__"), lineno=1), - ], - ) - - concrete = bytecode.to_concrete_bytecode() - self.assertEqual(concrete.freevars, ["__class__"]) - self.assertEqual(concrete.cellvars, ["__class__"]) - self.assertEqual( - list(concrete), - [ - ConcreteInstr("LOAD_CLASSDEREF", 1, lineno=1), - ConcreteInstr("STORE_DEREF", 1, lineno=1), - ], - ) - - code = concrete.to_code() - self.assertEqual(code.co_freevars, ("__class__",)) - self.assertEqual(code.co_cellvars, ("__class__",)) - self.assertEqual( - code.co_code, - b"\x94\x01\x89\x01", - ) - - def test_explicit_stacksize(self): - # Passing stacksize=... to ConcreteBytecode.to_code should result in a - # code object with the specified stacksize. We pass some silly values - # and assert that they are honored. - code_obj = get_code("print('%s' % (a,b,c))") - original_stacksize = code_obj.co_stacksize - concrete = ConcreteBytecode.from_code(code_obj) - - # First with something bigger than necessary. - explicit_stacksize = original_stacksize + 42 - new_code_obj = concrete.to_code(stacksize=explicit_stacksize) - self.assertEqual(new_code_obj.co_stacksize, explicit_stacksize) - - # Then with something bogus. We probably don't want to advertise this - # in the documentation. If this fails then decide if it's for good - # reason, and remove if so. - explicit_stacksize = 0 - new_code_obj = concrete.to_code(stacksize=explicit_stacksize) - self.assertEqual(new_code_obj.co_stacksize, explicit_stacksize) - - def test_legalize(self): - concrete = ConcreteBytecode() - concrete.first_lineno = 3 - concrete.consts = [7, 8, 9] - concrete.names = ["x", "y", "z"] - concrete.extend( - [ - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("STORE_NAME", 0), - ConcreteInstr("LOAD_CONST", 1, lineno=4), - ConcreteInstr("STORE_NAME", 1), - SetLineno(5), - ConcreteInstr("LOAD_CONST", 2, lineno=6), - ConcreteInstr("STORE_NAME", 2), - ] - ) - - concrete.legalize() - self.assertListEqual( - list(concrete), - [ - ConcreteInstr("LOAD_CONST", 0, lineno=3), - ConcreteInstr("STORE_NAME", 0, lineno=3), - ConcreteInstr("LOAD_CONST", 1, lineno=4), - ConcreteInstr("STORE_NAME", 1, lineno=4), - ConcreteInstr("LOAD_CONST", 2, lineno=5), - ConcreteInstr("STORE_NAME", 2, lineno=5), - ], - ) - - def test_slice(self): - concrete = ConcreteBytecode() - concrete.first_lineno = 3 - concrete.consts = [7, 8, 9] - concrete.names = ["x", "y", "z"] - concrete.extend( - [ - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("STORE_NAME", 0), - SetLineno(4), - ConcreteInstr("LOAD_CONST", 1), - ConcreteInstr("STORE_NAME", 1), - SetLineno(5), - ConcreteInstr("LOAD_CONST", 2), - ConcreteInstr("STORE_NAME", 2), - ] - ) - self.assertEqual(concrete, concrete[:]) - - def test_copy(self): - concrete = ConcreteBytecode() - concrete.first_lineno = 3 - concrete.consts = [7, 8, 9] - concrete.names = ["x", "y", "z"] - concrete.extend( - [ - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("STORE_NAME", 0), - SetLineno(4), - ConcreteInstr("LOAD_CONST", 1), - ConcreteInstr("STORE_NAME", 1), - SetLineno(5), - ConcreteInstr("LOAD_CONST", 2), - ConcreteInstr("STORE_NAME", 2), - ] - ) - self.assertEqual(concrete, concrete.copy()) - - -class ConcreteFromCodeTests(TestCase): - def test_extended_arg(self): - # Create a code object from arbitrary bytecode - co_code = b"\x90\x12\x904\x90\xabd\xcd" - code = get_code("x=1") - args = ( - (code.co_argcount,) - if sys.version_info < (3, 8) - else (code.co_argcount, code.co_posonlyargcount) - ) - args += ( - code.co_kwonlyargcount, - code.co_nlocals, - code.co_stacksize, - code.co_flags, - co_code, - code.co_consts, - code.co_names, - code.co_varnames, - code.co_filename, - code.co_name, - code.co_firstlineno, - code.co_linetable if sys.version_info >= (3, 10) else code.co_lnotab, - code.co_freevars, - code.co_cellvars, - ) - - code = types.CodeType(*args) - - # without EXTENDED_ARG opcode - bytecode = ConcreteBytecode.from_code(code) - self.assertListEqual( - list(bytecode), [ConcreteInstr("LOAD_CONST", 0x1234ABCD, lineno=1)] - ) - - # with EXTENDED_ARG opcode - bytecode = ConcreteBytecode.from_code(code, extended_arg=True) - expected = [ - ConcreteInstr("EXTENDED_ARG", 0x12, lineno=1), - ConcreteInstr("EXTENDED_ARG", 0x34, lineno=1), - ConcreteInstr("EXTENDED_ARG", 0xAB, lineno=1), - ConcreteInstr("LOAD_CONST", 0xCD, lineno=1), - ] - self.assertListEqual(list(bytecode), expected) - - def test_extended_arg_make_function(self): - if (3, 9) <= sys.version_info < (3, 10): - from _pydevd_frame_eval.vendored.bytecode.tests.util_annotation import get_code as get_code_future - - code_obj = get_code_future( - """ - def foo(x: int, y: int): - pass - """ - ) - else: - code_obj = get_code( - """ - def foo(x: int, y: int): - pass - """ - ) - - # without EXTENDED_ARG - concrete = ConcreteBytecode.from_code(code_obj) - if sys.version_info >= (3, 10): - func_code = concrete.consts[2] - names = ["int", "foo"] - consts = ["x", "y", func_code, "foo", None] - const_offset = 1 - name_offset = 1 - first_instrs = [ - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("LOAD_NAME", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 1, lineno=1), - ConcreteInstr("LOAD_NAME", 0, lineno=1), - ConcreteInstr("BUILD_TUPLE", 4, lineno=1), - ] - elif ( - sys.version_info >= (3, 7) - and concrete.flags & CompilerFlags.FUTURE_ANNOTATIONS - ): - func_code = concrete.consts[2] - names = ["foo"] - consts = ["int", ("x", "y"), func_code, "foo", None] - const_offset = 1 - name_offset = 0 - first_instrs = [ - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 0 + const_offset, lineno=1), - ConcreteInstr("BUILD_CONST_KEY_MAP", 2, lineno=1), - ] - else: - func_code = concrete.consts[1] - names = ["int", "foo"] - consts = [("x", "y"), func_code, "foo", None] - const_offset = 0 - name_offset = 1 - first_instrs = [ - ConcreteInstr("LOAD_NAME", 0, lineno=1), - ConcreteInstr("LOAD_NAME", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 0 + const_offset, lineno=1), - ConcreteInstr("BUILD_CONST_KEY_MAP", 2, lineno=1), - ] - - self.assertEqual(concrete.names, names) - self.assertEqual(concrete.consts, consts) - expected = first_instrs + [ - ConcreteInstr("LOAD_CONST", 1 + const_offset, lineno=1), - ConcreteInstr("LOAD_CONST", 2 + const_offset, lineno=1), - ConcreteInstr("MAKE_FUNCTION", 4, lineno=1), - ConcreteInstr("STORE_NAME", name_offset, lineno=1), - ConcreteInstr("LOAD_CONST", 3 + const_offset, lineno=1), - ConcreteInstr("RETURN_VALUE", lineno=1), - ] - self.assertListEqual(list(concrete), expected) - - # with EXTENDED_ARG - concrete = ConcreteBytecode.from_code(code_obj, extended_arg=True) - # With future annotation the int annotation is stringified and - # stored as constant this the default behavior under Python 3.10 - if sys.version_info >= (3, 10): - func_code = concrete.consts[2] - names = ["int", "foo"] - consts = ["x", "y", func_code, "foo", None] - elif concrete.flags & CompilerFlags.FUTURE_ANNOTATIONS: - func_code = concrete.consts[2] - names = ["foo"] - consts = ["int", ("x", "y"), func_code, "foo", None] - else: - func_code = concrete.consts[1] - names = ["int", "foo"] - consts = [("x", "y"), func_code, "foo", None] - - self.assertEqual(concrete.names, names) - self.assertEqual(concrete.consts, consts) - self.assertListEqual(list(concrete), expected) - - # The next three tests ensure we can round trip ConcreteBytecode generated - # with extended_args=True - - def test_extended_arg_unpack_ex(self): - def test(): - p = [1, 2, 3, 4, 5, 6] - q, r, *s, t = p - return q, r, s, t - - cpython_stacksize = test.__code__.co_stacksize - test.__code__ = ConcreteBytecode.from_code( - test.__code__, extended_arg=True - ).to_code() - self.assertEqual(test.__code__.co_stacksize, cpython_stacksize) - self.assertEqual(test(), (1, 2, [3, 4, 5], 6)) - - def test_expected_arg_with_many_consts(self): - def test(): - var = 0 - var = 1 - var = 2 - var = 3 - var = 4 - var = 5 - var = 6 - var = 7 - var = 8 - var = 9 - var = 10 - var = 11 - var = 12 - var = 13 - var = 14 - var = 15 - var = 16 - var = 17 - var = 18 - var = 19 - var = 20 - var = 21 - var = 22 - var = 23 - var = 24 - var = 25 - var = 26 - var = 27 - var = 28 - var = 29 - var = 30 - var = 31 - var = 32 - var = 33 - var = 34 - var = 35 - var = 36 - var = 37 - var = 38 - var = 39 - var = 40 - var = 41 - var = 42 - var = 43 - var = 44 - var = 45 - var = 46 - var = 47 - var = 48 - var = 49 - var = 50 - var = 51 - var = 52 - var = 53 - var = 54 - var = 55 - var = 56 - var = 57 - var = 58 - var = 59 - var = 60 - var = 61 - var = 62 - var = 63 - var = 64 - var = 65 - var = 66 - var = 67 - var = 68 - var = 69 - var = 70 - var = 71 - var = 72 - var = 73 - var = 74 - var = 75 - var = 76 - var = 77 - var = 78 - var = 79 - var = 80 - var = 81 - var = 82 - var = 83 - var = 84 - var = 85 - var = 86 - var = 87 - var = 88 - var = 89 - var = 90 - var = 91 - var = 92 - var = 93 - var = 94 - var = 95 - var = 96 - var = 97 - var = 98 - var = 99 - var = 100 - var = 101 - var = 102 - var = 103 - var = 104 - var = 105 - var = 106 - var = 107 - var = 108 - var = 109 - var = 110 - var = 111 - var = 112 - var = 113 - var = 114 - var = 115 - var = 116 - var = 117 - var = 118 - var = 119 - var = 120 - var = 121 - var = 122 - var = 123 - var = 124 - var = 125 - var = 126 - var = 127 - var = 128 - var = 129 - var = 130 - var = 131 - var = 132 - var = 133 - var = 134 - var = 135 - var = 136 - var = 137 - var = 138 - var = 139 - var = 140 - var = 141 - var = 142 - var = 143 - var = 144 - var = 145 - var = 146 - var = 147 - var = 148 - var = 149 - var = 150 - var = 151 - var = 152 - var = 153 - var = 154 - var = 155 - var = 156 - var = 157 - var = 158 - var = 159 - var = 160 - var = 161 - var = 162 - var = 163 - var = 164 - var = 165 - var = 166 - var = 167 - var = 168 - var = 169 - var = 170 - var = 171 - var = 172 - var = 173 - var = 174 - var = 175 - var = 176 - var = 177 - var = 178 - var = 179 - var = 180 - var = 181 - var = 182 - var = 183 - var = 184 - var = 185 - var = 186 - var = 187 - var = 188 - var = 189 - var = 190 - var = 191 - var = 192 - var = 193 - var = 194 - var = 195 - var = 196 - var = 197 - var = 198 - var = 199 - var = 200 - var = 201 - var = 202 - var = 203 - var = 204 - var = 205 - var = 206 - var = 207 - var = 208 - var = 209 - var = 210 - var = 211 - var = 212 - var = 213 - var = 214 - var = 215 - var = 216 - var = 217 - var = 218 - var = 219 - var = 220 - var = 221 - var = 222 - var = 223 - var = 224 - var = 225 - var = 226 - var = 227 - var = 228 - var = 229 - var = 230 - var = 231 - var = 232 - var = 233 - var = 234 - var = 235 - var = 236 - var = 237 - var = 238 - var = 239 - var = 240 - var = 241 - var = 242 - var = 243 - var = 244 - var = 245 - var = 246 - var = 247 - var = 248 - var = 249 - var = 250 - var = 251 - var = 252 - var = 253 - var = 254 - var = 255 - var = 256 - var = 257 - var = 258 - var = 259 - - return var - - test.__code__ = ConcreteBytecode.from_code( - test.__code__, extended_arg=True - ).to_code() - self.assertEqual(test.__code__.co_stacksize, 1) - self.assertEqual(test(), 259) - - if sys.version_info >= (3, 6): - - def test_fail_extended_arg_jump(self): - def test(): - var = None - for _ in range(0, 1): - var = 0 - var = 1 - var = 2 - var = 3 - var = 4 - var = 5 - var = 6 - var = 7 - var = 8 - var = 9 - var = 10 - var = 11 - var = 12 - var = 13 - var = 14 - var = 15 - var = 16 - var = 17 - var = 18 - var = 19 - var = 20 - var = 21 - var = 22 - var = 23 - var = 24 - var = 25 - var = 26 - var = 27 - var = 28 - var = 29 - var = 30 - var = 31 - var = 32 - var = 33 - var = 34 - var = 35 - var = 36 - var = 37 - var = 38 - var = 39 - var = 40 - var = 41 - var = 42 - var = 43 - var = 44 - var = 45 - var = 46 - var = 47 - var = 48 - var = 49 - var = 50 - var = 51 - var = 52 - var = 53 - var = 54 - var = 55 - var = 56 - var = 57 - var = 58 - var = 59 - var = 60 - var = 61 - var = 62 - var = 63 - var = 64 - var = 65 - var = 66 - var = 67 - var = 68 - var = 69 - var = 70 - return var - - # Generate the bytecode with extended arguments - bytecode = ConcreteBytecode.from_code(test.__code__, extended_arg=True) - bytecode.to_code() - - -class BytecodeToConcreteTests(TestCase): - def test_label(self): - code = Bytecode() - label = Label() - code.extend( - [ - Instr("LOAD_CONST", "hello", lineno=1), - Instr("JUMP_FORWARD", label, lineno=1), - label, - Instr("POP_TOP", lineno=1), - ] - ) - - code = code.to_concrete_bytecode() - expected = [ - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("JUMP_FORWARD", 0, lineno=1), - ConcreteInstr("POP_TOP", lineno=1), - ] - self.assertListEqual(list(code), expected) - self.assertListEqual(code.consts, ["hello"]) - - def test_label2(self): - bytecode = Bytecode() - label = Label() - bytecode.extend( - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label), - Instr("LOAD_CONST", 5, lineno=2), - Instr("STORE_NAME", "x"), - Instr("JUMP_FORWARD", label), - Instr("LOAD_CONST", 7, lineno=4), - Instr("STORE_NAME", "x"), - label, - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - - concrete = bytecode.to_concrete_bytecode() - expected = [ - ConcreteInstr("LOAD_NAME", 0, lineno=1), - ConcreteInstr( - "POP_JUMP_IF_FALSE", 7 if OFFSET_AS_INSTRUCTION else 14, lineno=1 - ), - ConcreteInstr("LOAD_CONST", 0, lineno=2), - ConcreteInstr("STORE_NAME", 1, lineno=2), - ConcreteInstr("JUMP_FORWARD", 2 if OFFSET_AS_INSTRUCTION else 4, lineno=2), - ConcreteInstr("LOAD_CONST", 1, lineno=4), - ConcreteInstr("STORE_NAME", 1, lineno=4), - ConcreteInstr("LOAD_CONST", 2, lineno=4), - ConcreteInstr("RETURN_VALUE", lineno=4), - ] - self.assertListEqual(list(concrete), expected) - self.assertListEqual(concrete.consts, [5, 7, None]) - self.assertListEqual(concrete.names, ["test", "x"]) - self.assertListEqual(concrete.varnames, []) - - def test_label3(self): - """ - CPython generates useless EXTENDED_ARG 0 in some cases. We need to - properly track them as otherwise we can end up with broken offset for - jumps. - """ - source = """ - def func(x): - if x == 1: - return x + 0 - elif x == 2: - return x + 1 - elif x == 3: - return x + 2 - elif x == 4: - return x + 3 - elif x == 5: - return x + 4 - elif x == 6: - return x + 5 - elif x == 7: - return x + 6 - elif x == 8: - return x + 7 - elif x == 9: - return x + 8 - elif x == 10: - return x + 9 - elif x == 11: - return x + 10 - elif x == 12: - return x + 11 - elif x == 13: - return x + 12 - elif x == 14: - return x + 13 - elif x == 15: - return x + 14 - elif x == 16: - return x + 15 - elif x == 17: - return x + 16 - return -1 - """ - code = get_code(source, function=True) - bcode = Bytecode.from_code(code) - concrete = bcode.to_concrete_bytecode() - self.assertIsInstance(concrete, ConcreteBytecode) - - # Ensure that we do not generate broken code - loc = {} - exec(textwrap.dedent(source), loc) - func = loc["func"] - func.__code__ = bcode.to_code() - for i, x in enumerate(range(1, 18)): - self.assertEqual(func(x), x + i) - self.assertEqual(func(18), -1) - - # Ensure that we properly round trip in such cases - self.assertEqual( - ConcreteBytecode.from_code(code).to_code().co_code, code.co_code - ) - - def test_setlineno(self): - # x = 7 - # y = 8 - # z = 9 - concrete = ConcreteBytecode() - concrete.consts = [7, 8, 9] - concrete.names = ["x", "y", "z"] - concrete.first_lineno = 3 - concrete.extend( - [ - ConcreteInstr("LOAD_CONST", 0), - ConcreteInstr("STORE_NAME", 0), - SetLineno(4), - ConcreteInstr("LOAD_CONST", 1), - ConcreteInstr("STORE_NAME", 1), - SetLineno(5), - ConcreteInstr("LOAD_CONST", 2), - ConcreteInstr("STORE_NAME", 2), - ] - ) - - code = concrete.to_bytecode() - self.assertEqual( - code, - [ - Instr("LOAD_CONST", 7, lineno=3), - Instr("STORE_NAME", "x", lineno=3), - Instr("LOAD_CONST", 8, lineno=4), - Instr("STORE_NAME", "y", lineno=4), - Instr("LOAD_CONST", 9, lineno=5), - Instr("STORE_NAME", "z", lineno=5), - ], - ) - - def test_extended_jump(self): - NOP = bytes((opcode.opmap["NOP"],)) - - class BigInstr(ConcreteInstr): - def __init__(self, size): - super().__init__("NOP") - self._size = size - - def copy(self): - return self - - def assemble(self): - return NOP * self._size - - # (invalid) code using jumps > 0xffff to test extended arg - label = Label() - nb_nop = 2 ** 16 - code = Bytecode( - [ - Instr("JUMP_ABSOLUTE", label), - BigInstr(nb_nop), - label, - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - - code_obj = code.to_code() - if OFFSET_AS_INSTRUCTION: - expected = b"\x90\x80q\x02" + NOP * nb_nop + b"d\x00S\x00" - else: - expected = b"\x90\x01\x90\x00q\x06" + NOP * nb_nop + b"d\x00S\x00" - self.assertEqual(code_obj.co_code, expected) - - def test_jumps(self): - # if test: - # x = 12 - # else: - # x = 37 - code = Bytecode() - label_else = Label() - label_return = Label() - code.extend( - [ - Instr("LOAD_NAME", "test", lineno=1), - Instr("POP_JUMP_IF_FALSE", label_else), - Instr("LOAD_CONST", 12, lineno=2), - Instr("STORE_NAME", "x"), - Instr("JUMP_FORWARD", label_return), - label_else, - Instr("LOAD_CONST", 37, lineno=4), - Instr("STORE_NAME", "x"), - label_return, - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE"), - ] - ) - - code = code.to_concrete_bytecode() - expected = [ - ConcreteInstr("LOAD_NAME", 0, lineno=1), - ConcreteInstr( - "POP_JUMP_IF_FALSE", 5 if OFFSET_AS_INSTRUCTION else 10, lineno=1 - ), - ConcreteInstr("LOAD_CONST", 0, lineno=2), - ConcreteInstr("STORE_NAME", 1, lineno=2), - ConcreteInstr("JUMP_FORWARD", 2 if OFFSET_AS_INSTRUCTION else 4, lineno=2), - ConcreteInstr("LOAD_CONST", 1, lineno=4), - ConcreteInstr("STORE_NAME", 1, lineno=4), - ConcreteInstr("LOAD_CONST", 2, lineno=4), - ConcreteInstr("RETURN_VALUE", lineno=4), - ] - self.assertListEqual(list(code), expected) - self.assertListEqual(code.consts, [12, 37, None]) - self.assertListEqual(code.names, ["test", "x"]) - self.assertListEqual(code.varnames, []) - - def test_dont_merge_constants(self): - # test two constants which are equal but have a different type - code = Bytecode() - code.extend( - [ - Instr("LOAD_CONST", 5, lineno=1), - Instr("LOAD_CONST", 5.0, lineno=1), - Instr("LOAD_CONST", -0.0, lineno=1), - Instr("LOAD_CONST", +0.0, lineno=1), - ] - ) - - code = code.to_concrete_bytecode() - expected = [ - ConcreteInstr("LOAD_CONST", 0, lineno=1), - ConcreteInstr("LOAD_CONST", 1, lineno=1), - ConcreteInstr("LOAD_CONST", 2, lineno=1), - ConcreteInstr("LOAD_CONST", 3, lineno=1), - ] - self.assertListEqual(list(code), expected) - self.assertListEqual(code.consts, [5, 5.0, -0.0, +0.0]) - - def test_cellvars(self): - code = Bytecode() - code.cellvars = ["x"] - code.freevars = ["y"] - code.extend( - [ - Instr("LOAD_DEREF", CellVar("x"), lineno=1), - Instr("LOAD_DEREF", FreeVar("y"), lineno=1), - ] - ) - concrete = code.to_concrete_bytecode() - self.assertEqual(concrete.cellvars, ["x"]) - self.assertEqual(concrete.freevars, ["y"]) - code.extend( - [ - ConcreteInstr("LOAD_DEREF", 0, lineno=1), - ConcreteInstr("LOAD_DEREF", 1, lineno=1), - ] - ) - - def test_compute_jumps_convergence(self): - # Consider the following sequence of instructions: - # - # JUMP_ABSOLUTE Label1 - # JUMP_ABSOLUTE Label2 - # ...126 instructions... - # Label1: Offset 254 on first pass, 256 second pass - # NOP - # ... many more instructions ... - # Label2: Offset > 256 on first pass - # - # On first pass of compute_jumps(), Label2 will be at address 254, so - # that value encodes into the single byte arg of JUMP_ABSOLUTE. - # - # On second pass compute_jumps() the instr at Label1 will have offset - # of 256 so will also be given an EXTENDED_ARG. - # - # Thus we need to make an additional pass. This test only verifies - # case where 2 passes is insufficient but three is enough. - # - # On Python > 3.10 we need to double the number since the offset is now - # in term of instructions and not bytes. - - # Create code from comment above. - code = Bytecode() - label1 = Label() - label2 = Label() - nop = "NOP" - code.append(Instr("JUMP_ABSOLUTE", label1)) - code.append(Instr("JUMP_ABSOLUTE", label2)) - # Need 254 * 2 + 2 since the arg will change by 1 instruction rather than 2 - # bytes. - for x in range(4, 510 if OFFSET_AS_INSTRUCTION else 254, 2): - code.append(Instr(nop)) - code.append(label1) - code.append(Instr(nop)) - for x in range( - 514 if OFFSET_AS_INSTRUCTION else 256, - 600 if OFFSET_AS_INSTRUCTION else 300, - 2, - ): - code.append(Instr(nop)) - code.append(label2) - code.append(Instr(nop)) - - # This should pass by default. - code.to_code() - - # Try with max of two passes: it should raise - with self.assertRaises(RuntimeError): - code.to_code(compute_jumps_passes=2) - - def test_extreme_compute_jumps_convergence(self): - """Test of compute_jumps() requiring absurd number of passes. - - NOTE: This test also serves to demonstrate that there is no worst - case: the number of passes can be unlimited (or, actually, limited by - the size of the provided code). - - This is an extension of test_compute_jumps_convergence. Instead of - two jumps, where the earlier gets extended after the latter, we - instead generate a series of many jumps. Each pass of compute_jumps() - extends one more instruction, which in turn causes the one behind it - to be extended on the next pass. - - """ - - # N: the number of unextended instructions that can be squeezed into a - # set of bytes adressable by the arg of an unextended instruction. - # The answer is "128", but here's how we arrive at it. - max_unextended_offset = 1 << 8 - unextended_branch_instr_size = 2 - N = max_unextended_offset // unextended_branch_instr_size - - # When using instruction rather than bytes in the offset multiply by 2 - if OFFSET_AS_INSTRUCTION: - N *= 2 - - nop = "UNARY_POSITIVE" # don't use NOP, dis.stack_effect will raise - - # The number of jumps will be equal to the number of labels. The - # number of passes of compute_jumps() required will be one greater - # than this. - labels = [Label() for x in range(0, 3 * N)] - - code = Bytecode() - code.extend( - Instr("JUMP_FORWARD", labels[len(labels) - x - 1]) - for x in range(0, len(labels)) - ) - end_of_jumps = len(code) - code.extend(Instr(nop) for x in range(0, N)) - - # Now insert the labels. The first is N instructions (i.e. 256 - # bytes) after the last jump. Then they proceed to earlier positions - # 4 bytes at a time. While the targets are in the range of the nop - # instructions, 4 bytes is two instructions. When the targets are in - # the range of JUMP_FORWARD instructions we have to allow for the fact - # that the instructions will have been extended to four bytes each, so - # working backwards 4 bytes per label means just one instruction per - # label. - offset = end_of_jumps + N - for index in range(0, len(labels)): - code.insert(offset, labels[index]) - if offset <= end_of_jumps: - offset -= 1 - else: - offset -= 2 - - code.insert(0, Instr("LOAD_CONST", 0)) - del end_of_jumps - code.append(Instr("RETURN_VALUE")) - - code.to_code(compute_jumps_passes=(len(labels) + 1)) - - def test_general_constants(self): - """Test if general object could be linked as constants.""" - - class CustomObject: - pass - - class UnHashableCustomObject: - __hash__ = None - - obj1 = [1, 2, 3] - obj2 = {1, 2, 3} - obj3 = CustomObject() - obj4 = UnHashableCustomObject() - code = Bytecode( - [ - Instr("LOAD_CONST", obj1, lineno=1), - Instr("LOAD_CONST", obj2, lineno=1), - Instr("LOAD_CONST", obj3, lineno=1), - Instr("LOAD_CONST", obj4, lineno=1), - Instr("BUILD_TUPLE", 4, lineno=1), - Instr("RETURN_VALUE", lineno=1), - ] - ) - self.assertEqual(code.to_code().co_consts, (obj1, obj2, obj3, obj4)) - - def f(): - return # pragma: no cover - - f.__code__ = code.to_code() - self.assertEqual(f(), (obj1, obj2, obj3, obj4)) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py deleted file mode 100644 index b7744fbd0c..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py +++ /dev/null @@ -1,159 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -#!/usr/bin/env python3 -import unittest -from _pydevd_frame_eval.vendored.bytecode import ( - CompilerFlags, - ConcreteBytecode, - ConcreteInstr, - Bytecode, - ControlFlowGraph, -) -from _pydevd_frame_eval.vendored.bytecode.flags import infer_flags - - -class FlagsTests(unittest.TestCase): - def test_type_validation_on_inference(self): - with self.assertRaises(ValueError): - infer_flags(1) - - def test_flag_inference(self): - - # Check no loss of non-infered flags - code = ControlFlowGraph() - code.flags |= ( - CompilerFlags.NEWLOCALS - | CompilerFlags.VARARGS - | CompilerFlags.VARKEYWORDS - | CompilerFlags.NESTED - | CompilerFlags.FUTURE_GENERATOR_STOP - ) - code.update_flags() - for f in ( - CompilerFlags.NEWLOCALS, - CompilerFlags.VARARGS, - CompilerFlags.VARKEYWORDS, - CompilerFlags.NESTED, - CompilerFlags.NOFREE, - CompilerFlags.OPTIMIZED, - CompilerFlags.FUTURE_GENERATOR_STOP, - ): - self.assertTrue(bool(code.flags & f)) - - # Infer optimized and nofree - code = Bytecode() - flags = infer_flags(code) - self.assertTrue(bool(flags & CompilerFlags.OPTIMIZED)) - self.assertTrue(bool(flags & CompilerFlags.NOFREE)) - code.append(ConcreteInstr("STORE_NAME", 1)) - flags = infer_flags(code) - self.assertFalse(bool(flags & CompilerFlags.OPTIMIZED)) - self.assertTrue(bool(flags & CompilerFlags.NOFREE)) - code.append(ConcreteInstr("STORE_DEREF", 2)) - code.update_flags() - self.assertFalse(bool(code.flags & CompilerFlags.OPTIMIZED)) - self.assertFalse(bool(code.flags & CompilerFlags.NOFREE)) - - def test_async_gen_no_flag_is_async_None(self): - # Test inference in the absence of any flag set on the bytecode - - # Infer generator - code = ConcreteBytecode() - code.append(ConcreteInstr("YIELD_VALUE")) - code.update_flags() - self.assertTrue(bool(code.flags & CompilerFlags.GENERATOR)) - - # Infer coroutine - code = ConcreteBytecode() - code.append(ConcreteInstr("GET_AWAITABLE")) - code.update_flags() - self.assertTrue(bool(code.flags & CompilerFlags.COROUTINE)) - - # Infer coroutine or async generator - for i, expected in ( - ("YIELD_VALUE", CompilerFlags.ASYNC_GENERATOR), - ("YIELD_FROM", CompilerFlags.COROUTINE), - ): - code = ConcreteBytecode() - code.append(ConcreteInstr("GET_AWAITABLE")) - code.append(ConcreteInstr(i)) - code.update_flags() - self.assertTrue(bool(code.flags & expected)) - - def test_async_gen_no_flag_is_async_True(self): - # Test inference when we request an async function - - # Force coroutine - code = ConcreteBytecode() - code.update_flags(is_async=True) - self.assertTrue(bool(code.flags & CompilerFlags.COROUTINE)) - - # Infer coroutine or async generator - for i, expected in ( - ("YIELD_VALUE", CompilerFlags.ASYNC_GENERATOR), - ("YIELD_FROM", CompilerFlags.COROUTINE), - ): - code = ConcreteBytecode() - code.append(ConcreteInstr(i)) - code.update_flags(is_async=True) - self.assertTrue(bool(code.flags & expected)) - - def test_async_gen_no_flag_is_async_False(self): - # Test inference when we request a non-async function - - # Infer generator - code = ConcreteBytecode() - code.append(ConcreteInstr("YIELD_VALUE")) - code.flags = CompilerFlags(CompilerFlags.COROUTINE) - code.update_flags(is_async=False) - self.assertTrue(bool(code.flags & CompilerFlags.GENERATOR)) - - # Abort on coroutine - code = ConcreteBytecode() - code.append(ConcreteInstr("GET_AWAITABLE")) - code.flags = CompilerFlags(CompilerFlags.COROUTINE) - with self.assertRaises(ValueError): - code.update_flags(is_async=False) - - def test_async_gen_flags(self): - # Test inference in the presence of pre-existing flags - - for is_async in (None, True): - - # Infer generator - code = ConcreteBytecode() - code.append(ConcreteInstr("YIELD_VALUE")) - for f, expected in ( - (CompilerFlags.COROUTINE, CompilerFlags.ASYNC_GENERATOR), - (CompilerFlags.ASYNC_GENERATOR, CompilerFlags.ASYNC_GENERATOR), - (CompilerFlags.ITERABLE_COROUTINE, CompilerFlags.ITERABLE_COROUTINE), - ): - code.flags = CompilerFlags(f) - code.update_flags(is_async=is_async) - self.assertTrue(bool(code.flags & expected)) - - # Infer coroutine - code = ConcreteBytecode() - code.append(ConcreteInstr("YIELD_FROM")) - for f, expected in ( - (CompilerFlags.COROUTINE, CompilerFlags.COROUTINE), - (CompilerFlags.ASYNC_GENERATOR, CompilerFlags.COROUTINE), - (CompilerFlags.ITERABLE_COROUTINE, CompilerFlags.ITERABLE_COROUTINE), - ): - code.flags = CompilerFlags(f) - code.update_flags(is_async=is_async) - self.assertTrue(bool(code.flags & expected)) - - # Crash on ITERABLE_COROUTINE with async bytecode - code = ConcreteBytecode() - code.append(ConcreteInstr("GET_AWAITABLE")) - code.flags = CompilerFlags(CompilerFlags.ITERABLE_COROUTINE) - with self.assertRaises(ValueError): - code.update_flags(is_async=is_async) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py deleted file mode 100644 index ca4a66a73a..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py +++ /dev/null @@ -1,362 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -#!/usr/bin/env python3 -import opcode -import unittest -from _pydevd_frame_eval.vendored.bytecode import ( - UNSET, - Label, - Instr, - CellVar, - FreeVar, - BasicBlock, - SetLineno, - Compare, -) -from _pydevd_frame_eval.vendored.bytecode.tests import TestCase - - -class SetLinenoTests(TestCase): - def test_lineno(self): - lineno = SetLineno(1) - self.assertEqual(lineno.lineno, 1) - - def test_equality(self): - lineno = SetLineno(1) - self.assertNotEqual(lineno, 1) - self.assertEqual(lineno, SetLineno(1)) - self.assertNotEqual(lineno, SetLineno(2)) - - -class VariableTests(TestCase): - def test_str(self): - for cls in (CellVar, FreeVar): - var = cls("a") - self.assertEqual(str(var), "a") - - def test_repr(self): - for cls in (CellVar, FreeVar): - var = cls("_a_x_a_") - r = repr(var) - self.assertIn("_a_x_a_", r) - self.assertIn(cls.__name__, r) - - def test_eq(self): - f1 = FreeVar("a") - f2 = FreeVar("b") - c1 = CellVar("a") - c2 = CellVar("b") - - for v1, v2, eq in ( - (f1, f1, True), - (f1, f2, False), - (f1, c1, False), - (c1, c1, True), - (c1, c2, False), - ): - if eq: - self.assertEqual(v1, v2) - else: - self.assertNotEqual(v1, v2) - - -class InstrTests(TestCase): - def test_constructor(self): - # invalid line number - with self.assertRaises(TypeError): - Instr("NOP", lineno="x") - with self.assertRaises(ValueError): - Instr("NOP", lineno=0) - - # invalid name - with self.assertRaises(TypeError): - Instr(1) - with self.assertRaises(ValueError): - Instr("xxx") - - def test_repr(self): - - # No arg - r = repr(Instr("NOP", lineno=10)) - self.assertIn("NOP", r) - self.assertIn("10", r) - self.assertIn("lineno", r) - - # Arg - r = repr(Instr("LOAD_FAST", "_x_", lineno=10)) - self.assertIn("LOAD_FAST", r) - self.assertIn("lineno", r) - self.assertIn("10", r) - self.assertIn("arg", r) - self.assertIn("_x_", r) - - def test_invalid_arg(self): - label = Label() - block = BasicBlock() - - # EXTENDED_ARG - self.assertRaises(ValueError, Instr, "EXTENDED_ARG", 0) - - # has_jump() - self.assertRaises(TypeError, Instr, "JUMP_ABSOLUTE", 1) - self.assertRaises(TypeError, Instr, "JUMP_ABSOLUTE", 1.0) - Instr("JUMP_ABSOLUTE", label) - Instr("JUMP_ABSOLUTE", block) - - # hasfree - self.assertRaises(TypeError, Instr, "LOAD_DEREF", "x") - Instr("LOAD_DEREF", CellVar("x")) - Instr("LOAD_DEREF", FreeVar("x")) - - # haslocal - self.assertRaises(TypeError, Instr, "LOAD_FAST", 1) - Instr("LOAD_FAST", "x") - - # hasname - self.assertRaises(TypeError, Instr, "LOAD_NAME", 1) - Instr("LOAD_NAME", "x") - - # hasconst - self.assertRaises(ValueError, Instr, "LOAD_CONST") # UNSET - self.assertRaises(ValueError, Instr, "LOAD_CONST", label) - self.assertRaises(ValueError, Instr, "LOAD_CONST", block) - Instr("LOAD_CONST", 1.0) - Instr("LOAD_CONST", object()) - - # hascompare - self.assertRaises(TypeError, Instr, "COMPARE_OP", 1) - Instr("COMPARE_OP", Compare.EQ) - - # HAVE_ARGUMENT - self.assertRaises(ValueError, Instr, "CALL_FUNCTION", -1) - self.assertRaises(TypeError, Instr, "CALL_FUNCTION", 3.0) - Instr("CALL_FUNCTION", 3) - - # test maximum argument - self.assertRaises(ValueError, Instr, "CALL_FUNCTION", 2147483647 + 1) - instr = Instr("CALL_FUNCTION", 2147483647) - self.assertEqual(instr.arg, 2147483647) - - # not HAVE_ARGUMENT - self.assertRaises(ValueError, Instr, "NOP", 0) - Instr("NOP") - - def test_require_arg(self): - i = Instr("CALL_FUNCTION", 3) - self.assertTrue(i.require_arg()) - i = Instr("NOP") - self.assertFalse(i.require_arg()) - - def test_attr(self): - instr = Instr("LOAD_CONST", 3, lineno=5) - self.assertEqual(instr.name, "LOAD_CONST") - self.assertEqual(instr.opcode, 100) - self.assertEqual(instr.arg, 3) - self.assertEqual(instr.lineno, 5) - - # invalid values/types - self.assertRaises(ValueError, setattr, instr, "lineno", 0) - self.assertRaises(TypeError, setattr, instr, "lineno", 1.0) - self.assertRaises(TypeError, setattr, instr, "name", 5) - self.assertRaises(TypeError, setattr, instr, "opcode", 1.0) - self.assertRaises(ValueError, setattr, instr, "opcode", -1) - self.assertRaises(ValueError, setattr, instr, "opcode", 255) - - # arg can take any attribute but cannot be deleted - instr.arg = -8 - instr.arg = object() - self.assertRaises(AttributeError, delattr, instr, "arg") - - # no argument - instr = Instr("ROT_TWO") - self.assertIs(instr.arg, UNSET) - - def test_modify_op(self): - instr = Instr("LOAD_NAME", "x") - load_fast = opcode.opmap["LOAD_FAST"] - instr.opcode = load_fast - self.assertEqual(instr.name, "LOAD_FAST") - self.assertEqual(instr.opcode, load_fast) - - def test_extended_arg(self): - instr = Instr("LOAD_CONST", 0x1234ABCD) - self.assertEqual(instr.arg, 0x1234ABCD) - - def test_slots(self): - instr = Instr("NOP") - with self.assertRaises(AttributeError): - instr.myattr = 1 - - def test_compare(self): - instr = Instr("LOAD_CONST", 3, lineno=7) - self.assertEqual(instr, Instr("LOAD_CONST", 3, lineno=7)) - self.assertNotEqual(instr, 1) - - # different lineno - self.assertNotEqual(instr, Instr("LOAD_CONST", 3)) - self.assertNotEqual(instr, Instr("LOAD_CONST", 3, lineno=6)) - # different op - self.assertNotEqual(instr, Instr("LOAD_FAST", "x", lineno=7)) - # different arg - self.assertNotEqual(instr, Instr("LOAD_CONST", 4, lineno=7)) - - def test_has_jump(self): - label = Label() - jump = Instr("JUMP_ABSOLUTE", label) - self.assertTrue(jump.has_jump()) - - instr = Instr("LOAD_FAST", "x") - self.assertFalse(instr.has_jump()) - - def test_is_cond_jump(self): - label = Label() - jump = Instr("POP_JUMP_IF_TRUE", label) - self.assertTrue(jump.is_cond_jump()) - - instr = Instr("LOAD_FAST", "x") - self.assertFalse(instr.is_cond_jump()) - - def test_is_uncond_jump(self): - label = Label() - jump = Instr("JUMP_ABSOLUTE", label) - self.assertTrue(jump.is_uncond_jump()) - - instr = Instr("POP_JUMP_IF_TRUE", label) - self.assertFalse(instr.is_uncond_jump()) - - def test_const_key_not_equal(self): - def check(value): - self.assertEqual(Instr("LOAD_CONST", value), Instr("LOAD_CONST", value)) - - def func(): - pass - - check(None) - check(0) - check(0.0) - check(b"bytes") - check("text") - check(Ellipsis) - check((1, 2, 3)) - check(frozenset({1, 2, 3})) - check(func.__code__) - check(object()) - - def test_const_key_equal(self): - neg_zero = -0.0 - pos_zero = +0.0 - - # int and float: 0 == 0.0 - self.assertNotEqual(Instr("LOAD_CONST", 0), Instr("LOAD_CONST", 0.0)) - - # float: -0.0 == +0.0 - self.assertNotEqual( - Instr("LOAD_CONST", neg_zero), Instr("LOAD_CONST", pos_zero) - ) - - # complex - self.assertNotEqual( - Instr("LOAD_CONST", complex(neg_zero, 1.0)), - Instr("LOAD_CONST", complex(pos_zero, 1.0)), - ) - self.assertNotEqual( - Instr("LOAD_CONST", complex(1.0, neg_zero)), - Instr("LOAD_CONST", complex(1.0, pos_zero)), - ) - - # tuple - self.assertNotEqual(Instr("LOAD_CONST", (0,)), Instr("LOAD_CONST", (0.0,))) - nested_tuple1 = (0,) - nested_tuple1 = (nested_tuple1,) - nested_tuple2 = (0.0,) - nested_tuple2 = (nested_tuple2,) - self.assertNotEqual( - Instr("LOAD_CONST", nested_tuple1), Instr("LOAD_CONST", nested_tuple2) - ) - - # frozenset - self.assertNotEqual( - Instr("LOAD_CONST", frozenset({0})), Instr("LOAD_CONST", frozenset({0.0})) - ) - - def test_stack_effects(self): - # Verify all opcodes are handled and that "jump=None" really returns - # the max of the other cases. - from _pydevd_frame_eval.vendored.bytecode.concrete import ConcreteInstr - - def check(instr): - jump = instr.stack_effect(jump=True) - no_jump = instr.stack_effect(jump=False) - max_effect = instr.stack_effect(jump=None) - self.assertEqual(instr.stack_effect(), max_effect) - self.assertEqual(max_effect, max(jump, no_jump)) - - if not instr.has_jump(): - self.assertEqual(jump, no_jump) - - for name, op in opcode.opmap.items(): - with self.subTest(name): - # Use ConcreteInstr instead of Instr because it doesn't care - # what kind of argument it is constructed with. - if op < opcode.HAVE_ARGUMENT: - check(ConcreteInstr(name)) - else: - for arg in range(256): - check(ConcreteInstr(name, arg)) - - # LOAD_CONST uses a concrete python object as its oparg, however, in - # dis.stack_effect(opcode.opmap['LOAD_CONST'], oparg), - # oparg should be the index of that python object in the constants. - # - # Fortunately, for an instruction whose oparg isn't equivalent to its - # form in binary files(pyc format), the stack effect is a - # constant which does not depend on its oparg. - # - # The second argument of dis.stack_effect cannot be - # more than 2**31 - 1. If stack effect of an instruction is - # independent of its oparg, we pass 0 as the second argument - # of dis.stack_effect. - # (As a result we can calculate stack_effect for - # any LOAD_CONST instructions, even for large integers) - - for arg in 2 ** 31, 2 ** 32, 2 ** 63, 2 ** 64, -1: - self.assertEqual(Instr("LOAD_CONST", arg).stack_effect(), 1) - - def test_code_object_containing_mutable_data(self): - from _pydevd_frame_eval.vendored.bytecode import Bytecode, Instr - from types import CodeType - - def f(): - def g(): - return "value" - - return g - - f_code = Bytecode.from_code(f.__code__) - instr_load_code = None - mutable_datum = [4, 2] - - for each in f_code: - if ( - isinstance(each, Instr) - and each.name == "LOAD_CONST" - and isinstance(each.arg, CodeType) - ): - instr_load_code = each - break - - self.assertIsNotNone(instr_load_code) - - g_code = Bytecode.from_code(instr_load_code.arg) - g_code[0].arg = mutable_datum - instr_load_code.arg = g_code.to_code() - f.__code__ = f_code.to_code() - - self.assertIs(f()(), mutable_datum) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py deleted file mode 100644 index 5f4c0636a4..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py +++ /dev/null @@ -1,270 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -#!/usr/bin/env python3 -import contextlib -import io -import sys -import textwrap -import unittest - -from _pydevd_frame_eval.vendored import bytecode -from _pydevd_frame_eval.vendored.bytecode import Label, Instr, Bytecode, BasicBlock, ControlFlowGraph -from _pydevd_frame_eval.vendored.bytecode.concrete import OFFSET_AS_INSTRUCTION -from _pydevd_frame_eval.vendored.bytecode.tests import disassemble - - -class DumpCodeTests(unittest.TestCase): - maxDiff = 80 * 100 - - def check_dump_bytecode(self, code, expected, lineno=None): - with contextlib.redirect_stdout(io.StringIO()) as stderr: - if lineno is not None: - bytecode.dump_bytecode(code, lineno=True) - else: - bytecode.dump_bytecode(code) - output = stderr.getvalue() - - self.assertEqual(output, expected) - - def test_bytecode(self): - source = """ - def func(test): - if test == 1: - return 1 - elif test == 2: - return 2 - return 3 - """ - code = disassemble(source, function=True) - - # without line numbers - enum_repr = "" - expected = f""" - LOAD_FAST 'test' - LOAD_CONST 1 - COMPARE_OP {enum_repr} - POP_JUMP_IF_FALSE - LOAD_CONST 1 - RETURN_VALUE - -label_instr6: - LOAD_FAST 'test' - LOAD_CONST 2 - COMPARE_OP {enum_repr} - POP_JUMP_IF_FALSE - LOAD_CONST 2 - RETURN_VALUE - -label_instr13: - LOAD_CONST 3 - RETURN_VALUE - - """[ - 1: - ].rstrip( - " " - ) - self.check_dump_bytecode(code, expected) - - # with line numbers - expected = f""" - L. 2 0: LOAD_FAST 'test' - 1: LOAD_CONST 1 - 2: COMPARE_OP {enum_repr} - 3: POP_JUMP_IF_FALSE - L. 3 4: LOAD_CONST 1 - 5: RETURN_VALUE - -label_instr6: - L. 4 7: LOAD_FAST 'test' - 8: LOAD_CONST 2 - 9: COMPARE_OP {enum_repr} - 10: POP_JUMP_IF_FALSE - L. 5 11: LOAD_CONST 2 - 12: RETURN_VALUE - -label_instr13: - L. 6 14: LOAD_CONST 3 - 15: RETURN_VALUE - - """[ - 1: - ].rstrip( - " " - ) - self.check_dump_bytecode(code, expected, lineno=True) - - def test_bytecode_broken_label(self): - label = Label() - code = Bytecode([Instr("JUMP_ABSOLUTE", label)]) - - expected = " JUMP_ABSOLUTE \n\n" - self.check_dump_bytecode(code, expected) - - def test_blocks_broken_jump(self): - block = BasicBlock() - code = ControlFlowGraph() - code[0].append(Instr("JUMP_ABSOLUTE", block)) - - expected = textwrap.dedent( - """ - block1: - JUMP_ABSOLUTE - - """ - ).lstrip("\n") - self.check_dump_bytecode(code, expected) - - def test_bytecode_blocks(self): - source = """ - def func(test): - if test == 1: - return 1 - elif test == 2: - return 2 - return 3 - """ - code = disassemble(source, function=True) - code = ControlFlowGraph.from_bytecode(code) - - # without line numbers - enum_repr = "" - expected = textwrap.dedent( - f""" - block1: - LOAD_FAST 'test' - LOAD_CONST 1 - COMPARE_OP {enum_repr} - POP_JUMP_IF_FALSE - -> block2 - - block2: - LOAD_CONST 1 - RETURN_VALUE - - block3: - LOAD_FAST 'test' - LOAD_CONST 2 - COMPARE_OP {enum_repr} - POP_JUMP_IF_FALSE - -> block4 - - block4: - LOAD_CONST 2 - RETURN_VALUE - - block5: - LOAD_CONST 3 - RETURN_VALUE - - """ - ).lstrip() - self.check_dump_bytecode(code, expected) - - # with line numbers - expected = textwrap.dedent( - f""" - block1: - L. 2 0: LOAD_FAST 'test' - 1: LOAD_CONST 1 - 2: COMPARE_OP {enum_repr} - 3: POP_JUMP_IF_FALSE - -> block2 - - block2: - L. 3 0: LOAD_CONST 1 - 1: RETURN_VALUE - - block3: - L. 4 0: LOAD_FAST 'test' - 1: LOAD_CONST 2 - 2: COMPARE_OP {enum_repr} - 3: POP_JUMP_IF_FALSE - -> block4 - - block4: - L. 5 0: LOAD_CONST 2 - 1: RETURN_VALUE - - block5: - L. 6 0: LOAD_CONST 3 - 1: RETURN_VALUE - - """ - ).lstrip() - self.check_dump_bytecode(code, expected, lineno=True) - - def test_concrete_bytecode(self): - source = """ - def func(test): - if test == 1: - return 1 - elif test == 2: - return 2 - return 3 - """ - code = disassemble(source, function=True) - code = code.to_concrete_bytecode() - - # without line numbers - expected = f""" - 0 LOAD_FAST 0 - 2 LOAD_CONST 1 - 4 COMPARE_OP 2 - 6 POP_JUMP_IF_FALSE {6 if OFFSET_AS_INSTRUCTION else 12} - 8 LOAD_CONST 1 - 10 RETURN_VALUE - 12 LOAD_FAST 0 - 14 LOAD_CONST 2 - 16 COMPARE_OP 2 - 18 POP_JUMP_IF_FALSE {12 if OFFSET_AS_INSTRUCTION else 24} - 20 LOAD_CONST 2 - 22 RETURN_VALUE - 24 LOAD_CONST 3 - 26 RETURN_VALUE -""".lstrip( - "\n" - ) - self.check_dump_bytecode(code, expected) - - # with line numbers - expected = f""" -L. 2 0: LOAD_FAST 0 - 2: LOAD_CONST 1 - 4: COMPARE_OP 2 - 6: POP_JUMP_IF_FALSE {6 if OFFSET_AS_INSTRUCTION else 12} -L. 3 8: LOAD_CONST 1 - 10: RETURN_VALUE -L. 4 12: LOAD_FAST 0 - 14: LOAD_CONST 2 - 16: COMPARE_OP 2 - 18: POP_JUMP_IF_FALSE {12 if OFFSET_AS_INSTRUCTION else 24} -L. 5 20: LOAD_CONST 2 - 22: RETURN_VALUE -L. 6 24: LOAD_CONST 3 - 26: RETURN_VALUE -""".lstrip( - "\n" - ) - self.check_dump_bytecode(code, expected, lineno=True) - - def test_type_validation(self): - class T: - first_lineno = 1 - - with self.assertRaises(TypeError): - bytecode.dump_bytecode(T()) - - -class MiscTests(unittest.TestCase): - def skip_test_version(self): - import setup - - self.assertEqual(bytecode.__version__, setup.VERSION) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff --git a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py b/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py deleted file mode 100644 index 387a7829f9..0000000000 --- a/plugins/org.python.pydev.core/pysrc/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py +++ /dev/null @@ -1,985 +0,0 @@ - -import pytest -from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON -from tests_python.debug_constants import TEST_CYTHON -pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') -import sys -import unittest -from _pydevd_frame_eval.vendored.bytecode import Label, Instr, Compare, Bytecode, ControlFlowGraph -from _pydevd_frame_eval.vendored.bytecode import peephole_opt -from _pydevd_frame_eval.vendored.bytecode.tests import TestCase, dump_bytecode -from unittest import mock - - -class Tests(TestCase): - - maxDiff = 80 * 100 - - def optimize_blocks(self, code): - if isinstance(code, Bytecode): - code = ControlFlowGraph.from_bytecode(code) - optimizer = peephole_opt.PeepholeOptimizer() - optimizer.optimize_cfg(code) - return code - - def check(self, code, *expected): - if isinstance(code, Bytecode): - code = ControlFlowGraph.from_bytecode(code) - optimizer = peephole_opt.PeepholeOptimizer() - optimizer.optimize_cfg(code) - code = code.to_bytecode() - - try: - self.assertEqual(code, expected) - except AssertionError: - print("Optimized code:") - dump_bytecode(code) - - print("Expected code:") - for instr in expected: - print(instr) - - raise - - def check_dont_optimize(self, code): - code = ControlFlowGraph.from_bytecode(code) - noopt = code.to_bytecode() - - optim = self.optimize_blocks(code) - optim = optim.to_bytecode() - self.assertEqual(optim, noopt) - - def test_unary_op(self): - def check_unary_op(op, value, result): - code = Bytecode( - [Instr("LOAD_CONST", value), Instr(op), Instr("STORE_NAME", "x")] - ) - self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) - - check_unary_op("UNARY_POSITIVE", 2, 2) - check_unary_op("UNARY_NEGATIVE", 3, -3) - check_unary_op("UNARY_INVERT", 5, -6) - - def test_binary_op(self): - def check_bin_op(left, op, right, result): - code = Bytecode( - [ - Instr("LOAD_CONST", left), - Instr("LOAD_CONST", right), - Instr(op), - Instr("STORE_NAME", "x"), - ] - ) - self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) - - check_bin_op(10, "BINARY_ADD", 20, 30) - check_bin_op(5, "BINARY_SUBTRACT", 1, 4) - check_bin_op(5, "BINARY_MULTIPLY", 3, 15) - check_bin_op(10, "BINARY_TRUE_DIVIDE", 3, 10 / 3) - check_bin_op(10, "BINARY_FLOOR_DIVIDE", 3, 3) - check_bin_op(10, "BINARY_MODULO", 3, 1) - check_bin_op(2, "BINARY_POWER", 8, 256) - check_bin_op(1, "BINARY_LSHIFT", 3, 8) - check_bin_op(16, "BINARY_RSHIFT", 3, 2) - check_bin_op(10, "BINARY_AND", 3, 2) - check_bin_op(2, "BINARY_OR", 3, 3) - check_bin_op(2, "BINARY_XOR", 3, 1) - - def test_combined_unary_bin_ops(self): - # x = 1 + 3 + 7 - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 3), - Instr("BINARY_ADD"), - Instr("LOAD_CONST", 7), - Instr("BINARY_ADD"), - Instr("STORE_NAME", "x"), - ] - ) - self.check(code, Instr("LOAD_CONST", 11), Instr("STORE_NAME", "x")) - - # x = ~(~(5)) - code = Bytecode( - [ - Instr("LOAD_CONST", 5), - Instr("UNARY_INVERT"), - Instr("UNARY_INVERT"), - Instr("STORE_NAME", "x"), - ] - ) - self.check(code, Instr("LOAD_CONST", 5), Instr("STORE_NAME", "x")) - - # "events = [(0, 'call'), (1, 'line'), (-(3), 'call')]" - code = Bytecode( - [ - Instr("LOAD_CONST", 0), - Instr("LOAD_CONST", "call"), - Instr("BUILD_TUPLE", 2), - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", "line"), - Instr("BUILD_TUPLE", 2), - Instr("LOAD_CONST", 3), - Instr("UNARY_NEGATIVE"), - Instr("LOAD_CONST", "call"), - Instr("BUILD_TUPLE", 2), - Instr("BUILD_LIST", 3), - Instr("STORE_NAME", "events"), - ] - ) - self.check( - code, - Instr("LOAD_CONST", (0, "call")), - Instr("LOAD_CONST", (1, "line")), - Instr("LOAD_CONST", (-3, "call")), - Instr("BUILD_LIST", 3), - Instr("STORE_NAME", "events"), - ) - - # 'x = (1,) + (0,) * 8' - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("BUILD_TUPLE", 1), - Instr("LOAD_CONST", 0), - Instr("BUILD_TUPLE", 1), - Instr("LOAD_CONST", 8), - Instr("BINARY_MULTIPLY"), - Instr("BINARY_ADD"), - Instr("STORE_NAME", "x"), - ] - ) - zeros = (0,) * 8 - result = (1,) + zeros - self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) - - def test_max_size(self): - max_size = 3 - with mock.patch.object(peephole_opt, "MAX_SIZE", max_size): - # optimized binary operation: size <= maximum size - # - # (9,) * size - size = max_size - result = (9,) * size - code = Bytecode( - [ - Instr("LOAD_CONST", 9), - Instr("BUILD_TUPLE", 1), - Instr("LOAD_CONST", size), - Instr("BINARY_MULTIPLY"), - Instr("STORE_NAME", "x"), - ] - ) - self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) - - # don't optimize binary operation: size > maximum size - # - # x = (9,) * size - size = max_size + 1 - code = Bytecode( - [ - Instr("LOAD_CONST", 9), - Instr("BUILD_TUPLE", 1), - Instr("LOAD_CONST", size), - Instr("BINARY_MULTIPLY"), - Instr("STORE_NAME", "x"), - ] - ) - self.check( - code, - Instr("LOAD_CONST", (9,)), - Instr("LOAD_CONST", size), - Instr("BINARY_MULTIPLY"), - Instr("STORE_NAME", "x"), - ) - - def test_bin_op_dont_optimize(self): - # 1 / 0 - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 0), - Instr("BINARY_TRUE_DIVIDE"), - Instr("POP_TOP"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - self.check_dont_optimize(code) - - # 1 // 0 - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 0), - Instr("BINARY_FLOOR_DIVIDE"), - Instr("POP_TOP"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - self.check_dont_optimize(code) - - # 1 % 0 - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 0), - Instr("BINARY_MODULO"), - Instr("POP_TOP"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - self.check_dont_optimize(code) - - # 1 % 1j - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 1j), - Instr("BINARY_MODULO"), - Instr("POP_TOP"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - self.check_dont_optimize(code) - - def test_build_tuple(self): - # x = (1, 2, 3) - code = Bytecode( - [ - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 2), - Instr("LOAD_CONST", 3), - Instr("BUILD_TUPLE", 3), - Instr("STORE_NAME", "x"), - ] - ) - self.check(code, Instr("LOAD_CONST", (1, 2, 3)), Instr("STORE_NAME", "x")) - - def test_build_list(self): - # test = x in [1, 2, 3] - code = Bytecode( - [ - Instr("LOAD_NAME", "x"), - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 2), - Instr("LOAD_CONST", 3), - Instr("BUILD_LIST", 3), - Instr("COMPARE_OP", Compare.IN), - Instr("STORE_NAME", "test"), - ] - ) - - self.check( - code, - Instr("LOAD_NAME", "x"), - Instr("LOAD_CONST", (1, 2, 3)), - Instr("COMPARE_OP", Compare.IN), - Instr("STORE_NAME", "test"), - ) - - def test_build_list_unpack_seq(self): - for build_list in ("BUILD_TUPLE", "BUILD_LIST"): - # x, = [a] - code = Bytecode( - [ - Instr("LOAD_NAME", "a"), - Instr(build_list, 1), - Instr("UNPACK_SEQUENCE", 1), - Instr("STORE_NAME", "x"), - ] - ) - self.check(code, Instr("LOAD_NAME", "a"), Instr("STORE_NAME", "x")) - - # x, y = [a, b] - code = Bytecode( - [ - Instr("LOAD_NAME", "a"), - Instr("LOAD_NAME", "b"), - Instr(build_list, 2), - Instr("UNPACK_SEQUENCE", 2), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - ] - ) - self.check( - code, - Instr("LOAD_NAME", "a"), - Instr("LOAD_NAME", "b"), - Instr("ROT_TWO"), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - ) - - # x, y, z = [a, b, c] - code = Bytecode( - [ - Instr("LOAD_NAME", "a"), - Instr("LOAD_NAME", "b"), - Instr("LOAD_NAME", "c"), - Instr(build_list, 3), - Instr("UNPACK_SEQUENCE", 3), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - Instr("STORE_NAME", "z"), - ] - ) - self.check( - code, - Instr("LOAD_NAME", "a"), - Instr("LOAD_NAME", "b"), - Instr("LOAD_NAME", "c"), - Instr("ROT_THREE"), - Instr("ROT_TWO"), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - Instr("STORE_NAME", "z"), - ) - - def test_build_tuple_unpack_seq_const(self): - # x, y = (3, 4) - code = Bytecode( - [ - Instr("LOAD_CONST", 3), - Instr("LOAD_CONST", 4), - Instr("BUILD_TUPLE", 2), - Instr("UNPACK_SEQUENCE", 2), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - ] - ) - self.check( - code, - Instr("LOAD_CONST", (3, 4)), - Instr("UNPACK_SEQUENCE", 2), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - ) - - def test_build_list_unpack_seq_const(self): - # x, y, z = [3, 4, 5] - code = Bytecode( - [ - Instr("LOAD_CONST", 3), - Instr("LOAD_CONST", 4), - Instr("LOAD_CONST", 5), - Instr("BUILD_LIST", 3), - Instr("UNPACK_SEQUENCE", 3), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - Instr("STORE_NAME", "z"), - ] - ) - self.check( - code, - Instr("LOAD_CONST", 5), - Instr("LOAD_CONST", 4), - Instr("LOAD_CONST", 3), - Instr("STORE_NAME", "x"), - Instr("STORE_NAME", "y"), - Instr("STORE_NAME", "z"), - ) - - def test_build_set(self): - # test = x in {1, 2, 3} - code = Bytecode( - [ - Instr("LOAD_NAME", "x"), - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", 2), - Instr("LOAD_CONST", 3), - Instr("BUILD_SET", 3), - Instr("COMPARE_OP", Compare.IN), - Instr("STORE_NAME", "test"), - ] - ) - - self.check( - code, - Instr("LOAD_NAME", "x"), - Instr("LOAD_CONST", frozenset((1, 2, 3))), - Instr("COMPARE_OP", Compare.IN), - Instr("STORE_NAME", "test"), - ) - - def test_compare_op_unary_not(self): - for op, not_op in ( - (Compare.IN, Compare.NOT_IN), # in => not in - (Compare.NOT_IN, Compare.IN), # not in => in - (Compare.IS, Compare.IS_NOT), # is => is not - (Compare.IS_NOT, Compare.IS), # is not => is - ): - code = Bytecode( - [ - Instr("LOAD_NAME", "a"), - Instr("LOAD_NAME", "b"), - Instr("COMPARE_OP", op), - Instr("UNARY_NOT"), - Instr("STORE_NAME", "x"), - ] - ) - self.check( - code, - Instr("LOAD_NAME", "a"), - Instr("LOAD_NAME", "b"), - Instr("COMPARE_OP", not_op), - Instr("STORE_NAME", "x"), - ) - - # don't optimize: - # x = not (a and b is True) - label_instr5 = Label() - code = Bytecode( - [ - Instr("LOAD_NAME", "a"), - Instr("JUMP_IF_FALSE_OR_POP", label_instr5), - Instr("LOAD_NAME", "b"), - Instr("LOAD_CONST", True), - Instr("COMPARE_OP", Compare.IS), - label_instr5, - Instr("UNARY_NOT"), - Instr("STORE_NAME", "x"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - self.check_dont_optimize(code) - - def test_dont_optimize(self): - # x = 3 < 5 - code = Bytecode( - [ - Instr("LOAD_CONST", 3), - Instr("LOAD_CONST", 5), - Instr("COMPARE_OP", Compare.LT), - Instr("STORE_NAME", "x"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - self.check_dont_optimize(code) - - # x = (10, 20, 30)[1:] - code = Bytecode( - [ - Instr("LOAD_CONST", (10, 20, 30)), - Instr("LOAD_CONST", 1), - Instr("LOAD_CONST", None), - Instr("BUILD_SLICE", 2), - Instr("BINARY_SUBSCR"), - Instr("STORE_NAME", "x"), - ] - ) - self.check_dont_optimize(code) - - def test_optimize_code_obj(self): - # Test optimize() method with a code object - # - # x = 3 + 5 => x = 8 - noopt = Bytecode( - [ - Instr("LOAD_CONST", 3), - Instr("LOAD_CONST", 5), - Instr("BINARY_ADD"), - Instr("STORE_NAME", "x"), - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - noopt = noopt.to_code() - - optimizer = peephole_opt.PeepholeOptimizer() - optim = optimizer.optimize(noopt) - - code = Bytecode.from_code(optim) - self.assertEqual( - code, - [ - Instr("LOAD_CONST", 8, lineno=1), - Instr("STORE_NAME", "x", lineno=1), - Instr("LOAD_CONST", None, lineno=1), - Instr("RETURN_VALUE", lineno=1), - ], - ) - - def test_return_value(self): - # return+return: remove second return - # - # def func(): - # return 4 - # return 5 - code = Bytecode( - [ - Instr("LOAD_CONST", 4, lineno=2), - Instr("RETURN_VALUE", lineno=2), - Instr("LOAD_CONST", 5, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ] - ) - code = ControlFlowGraph.from_bytecode(code) - self.check( - code, Instr("LOAD_CONST", 4, lineno=2), Instr("RETURN_VALUE", lineno=2) - ) - - # return+return + return+return: remove second and fourth return - # - # def func(): - # return 4 - # return 5 - # return 6 - # return 7 - code = Bytecode( - [ - Instr("LOAD_CONST", 4, lineno=2), - Instr("RETURN_VALUE", lineno=2), - Instr("LOAD_CONST", 5, lineno=3), - Instr("RETURN_VALUE", lineno=3), - Instr("LOAD_CONST", 6, lineno=4), - Instr("RETURN_VALUE", lineno=4), - Instr("LOAD_CONST", 7, lineno=5), - Instr("RETURN_VALUE", lineno=5), - ] - ) - code = ControlFlowGraph.from_bytecode(code) - self.check( - code, Instr("LOAD_CONST", 4, lineno=2), Instr("RETURN_VALUE", lineno=2) - ) - - # return + JUMP_ABSOLUTE: remove JUMP_ABSOLUTE - # while 1: - # return 7 - if sys.version_info < (3, 8): - setup_loop = Label() - return_label = Label() - code = Bytecode( - [ - setup_loop, - Instr("SETUP_LOOP", return_label, lineno=2), - Instr("LOAD_CONST", 7, lineno=3), - Instr("RETURN_VALUE", lineno=3), - Instr("JUMP_ABSOLUTE", setup_loop, lineno=3), - Instr("POP_BLOCK", lineno=3), - return_label, - Instr("LOAD_CONST", None, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ] - ) - code = ControlFlowGraph.from_bytecode(code) - - end_loop = Label() - self.check( - code, - Instr("SETUP_LOOP", end_loop, lineno=2), - Instr("LOAD_CONST", 7, lineno=3), - Instr("RETURN_VALUE", lineno=3), - end_loop, - Instr("LOAD_CONST", None, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ) - else: - setup_loop = Label() - return_label = Label() - code = Bytecode( - [ - setup_loop, - Instr("LOAD_CONST", 7, lineno=3), - Instr("RETURN_VALUE", lineno=3), - Instr("JUMP_ABSOLUTE", setup_loop, lineno=3), - Instr("LOAD_CONST", None, lineno=3), - Instr("RETURN_VALUE", lineno=3), - ] - ) - code = ControlFlowGraph.from_bytecode(code) - - self.check( - code, Instr("LOAD_CONST", 7, lineno=3), Instr("RETURN_VALUE", lineno=3) - ) - - def test_not_jump_if_false(self): - # Replace UNARY_NOT+POP_JUMP_IF_FALSE with POP_JUMP_IF_TRUE - # - # if not x: - # y = 9 - label = Label() - code = Bytecode( - [ - Instr("LOAD_NAME", "x"), - Instr("UNARY_NOT"), - Instr("POP_JUMP_IF_FALSE", label), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "y"), - label, - ] - ) - - code = self.optimize_blocks(code) - label = Label() - self.check( - code, - Instr("LOAD_NAME", "x"), - Instr("POP_JUMP_IF_TRUE", label), - Instr("LOAD_CONST", 9), - Instr("STORE_NAME", "y"), - label, - ) - - def test_unconditional_jump_to_return(self): - # def func(): - # if test: - # if test2: - # x = 10 - # else: - # x = 20 - # else: - # x = 30 - - label_instr11 = Label() - label_instr14 = Label() - label_instr7 = Label() - code = Bytecode( - [ - Instr("LOAD_GLOBAL", "test", lineno=2), - Instr("POP_JUMP_IF_FALSE", label_instr11, lineno=2), - Instr("LOAD_GLOBAL", "test2", lineno=3), - Instr("POP_JUMP_IF_FALSE", label_instr7, lineno=3), - Instr("LOAD_CONST", 10, lineno=4), - Instr("STORE_FAST", "x", lineno=4), - Instr("JUMP_ABSOLUTE", label_instr14, lineno=4), - label_instr7, - Instr("LOAD_CONST", 20, lineno=6), - Instr("STORE_FAST", "x", lineno=6), - Instr("JUMP_FORWARD", label_instr14, lineno=6), - label_instr11, - Instr("LOAD_CONST", 30, lineno=8), - Instr("STORE_FAST", "x", lineno=8), - label_instr14, - Instr("LOAD_CONST", None, lineno=8), - Instr("RETURN_VALUE", lineno=8), - ] - ) - - label1 = Label() - label3 = Label() - label4 = Label() - self.check( - code, - Instr("LOAD_GLOBAL", "test", lineno=2), - Instr("POP_JUMP_IF_FALSE", label3, lineno=2), - Instr("LOAD_GLOBAL", "test2", lineno=3), - Instr("POP_JUMP_IF_FALSE", label1, lineno=3), - Instr("LOAD_CONST", 10, lineno=4), - Instr("STORE_FAST", "x", lineno=4), - Instr("JUMP_ABSOLUTE", label4, lineno=4), - label1, - Instr("LOAD_CONST", 20, lineno=6), - Instr("STORE_FAST", "x", lineno=6), - Instr("JUMP_FORWARD", label4, lineno=6), - label3, - Instr("LOAD_CONST", 30, lineno=8), - Instr("STORE_FAST", "x", lineno=8), - label4, - Instr("LOAD_CONST", None, lineno=8), - Instr("RETURN_VALUE", lineno=8), - ) - - def test_unconditional_jumps(self): - # def func(): - # if x: - # if y: - # func() - label_instr7 = Label() - code = Bytecode( - [ - Instr("LOAD_GLOBAL", "x", lineno=2), - Instr("POP_JUMP_IF_FALSE", label_instr7, lineno=2), - Instr("LOAD_GLOBAL", "y", lineno=3), - Instr("POP_JUMP_IF_FALSE", label_instr7, lineno=3), - Instr("LOAD_GLOBAL", "func", lineno=4), - Instr("CALL_FUNCTION", 0, lineno=4), - Instr("POP_TOP", lineno=4), - label_instr7, - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ] - ) - - label_return = Label() - self.check( - code, - Instr("LOAD_GLOBAL", "x", lineno=2), - Instr("POP_JUMP_IF_FALSE", label_return, lineno=2), - Instr("LOAD_GLOBAL", "y", lineno=3), - Instr("POP_JUMP_IF_FALSE", label_return, lineno=3), - Instr("LOAD_GLOBAL", "func", lineno=4), - Instr("CALL_FUNCTION", 0, lineno=4), - Instr("POP_TOP", lineno=4), - label_return, - Instr("LOAD_CONST", None, lineno=4), - Instr("RETURN_VALUE", lineno=4), - ) - - def test_jump_to_return(self): - # def func(condition): - # return 'yes' if condition else 'no' - label_instr4 = Label() - label_instr6 = Label() - code = Bytecode( - [ - Instr("LOAD_FAST", "condition"), - Instr("POP_JUMP_IF_FALSE", label_instr4), - Instr("LOAD_CONST", "yes"), - Instr("JUMP_FORWARD", label_instr6), - label_instr4, - Instr("LOAD_CONST", "no"), - label_instr6, - Instr("RETURN_VALUE"), - ] - ) - - label = Label() - self.check( - code, - Instr("LOAD_FAST", "condition"), - Instr("POP_JUMP_IF_FALSE", label), - Instr("LOAD_CONST", "yes"), - Instr("RETURN_VALUE"), - label, - Instr("LOAD_CONST", "no"), - Instr("RETURN_VALUE"), - ) - - def test_jump_if_true_to_jump_if_false(self): - # Replace JUMP_IF_TRUE_OR_POP jumping to POP_JUMP_IF_FALSE - # with POP_JUMP_IF_TRUE - # - # if x or y: - # z = 1 - - label_instr3 = Label() - label_instr7 = Label() - code = Bytecode( - [ - Instr("LOAD_NAME", "x"), - Instr("JUMP_IF_TRUE_OR_POP", label_instr3), - Instr("LOAD_NAME", "y"), - label_instr3, - Instr("POP_JUMP_IF_FALSE", label_instr7), - Instr("LOAD_CONST", 1), - Instr("STORE_NAME", "z"), - label_instr7, - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ] - ) - - label_instr4 = Label() - label_instr7 = Label() - self.check( - code, - Instr("LOAD_NAME", "x"), - Instr("POP_JUMP_IF_TRUE", label_instr4), - Instr("LOAD_NAME", "y"), - Instr("POP_JUMP_IF_FALSE", label_instr7), - label_instr4, - Instr("LOAD_CONST", 1), - Instr("STORE_NAME", "z"), - label_instr7, - Instr("LOAD_CONST", None), - Instr("RETURN_VALUE"), - ) - - def test_jump_if_false_to_jump_if_false(self): - # Replace JUMP_IF_FALSE_OR_POP jumping to POP_JUMP_IF_FALSE