diff --git a/src/debugpy/_vendored/pydevd/.travis.yml b/src/debugpy/_vendored/pydevd/.travis.yml index 7a36acea4..d6055b08a 100644 --- a/src/debugpy/_vendored/pydevd/.travis.yml +++ b/src/debugpy/_vendored/pydevd/.travis.yml @@ -77,7 +77,6 @@ matrix: - PYDEVD_PYTHON_VERSION=3.8 - PYDEVD_USE_CYTHON=NO - PYDEVD_TEST_VM=CPYTHON - - CHECK_CYTHON_GENERATED=YES - PYDEVD_USE_CONDA=NO # i.e.: https://www.python.org/download/pre-releases/ @@ -94,7 +93,6 @@ matrix: - PYDEVD_PYTHON_VERSION=3.6 - PYDEVD_USE_CYTHON=YES - PYDEVD_TEST_VM=CPYTHON - - CHECK_CYTHON_GENERATED=YES before_install: # CPython / Pypy setup diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py index 775062f60..d151e9390 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py @@ -25,6 +25,9 @@ import os import subprocess import ctypes +from _pydevd_bundle.pydevd_collect_bytecode_info import code_to_bytecode_representation +import itertools +import linecache try: import dis @@ -631,6 +634,36 @@ def request_load_source(self, py_db, seq, filename): py_db.writer.add_command(cmd) + def get_decompiled_source_from_frame_id(self, py_db, frame_id): + ''' + :param py_db: + :param frame_id: + :throws Exception: + If unable to get the frame in the currently paused frames or if some error happened + when decompiling. + ''' + variable = py_db.suspended_frames_manager.get_variable(int(frame_id)) + frame = variable.value + + # Check if it's in the linecache first. + lines = (linecache.getline(frame.f_code.co_filename, i) for i in itertools.count(1)) + lines = itertools.takewhile(bool, lines) # empty lines are '\n', EOF is '' + + source = ''.join(lines) + if not source: + source = code_to_bytecode_representation(frame.f_code) + + return source + + def request_load_source_from_frame_id(self, py_db, seq, frame_id): + try: + source = self.get_decompiled_source_from_frame_id(py_db, frame_id) + cmd = py_db.cmd_factory.make_load_source_from_frame_id_message(seq, source) + except: + cmd = py_db.cmd_factory.make_error_message(seq, get_exception_traceback_str()) + + py_db.writer.add_command(cmd) + def add_python_exception_breakpoint( self, py_db, @@ -983,5 +1016,5 @@ class PROCESSENTRY32(ctypes.Structure): break finally: kernel32.CloseHandle(snapshot) - + return ppid_and_pids diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py new file mode 100644 index 000000000..da1b53864 --- /dev/null +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py @@ -0,0 +1,642 @@ +""" +Decompiler that can be used with the debugger (where statements correctly represent the +line numbers). + +Note: this is a work in progress / proof of concept / not ready to be used. +""" + +import dis + +from _pydevd_bundle.pydevd_collect_bytecode_info import _iter_instructions +from _pydevd_bundle.pydevd_constants import dict_iter_items, IS_PY2 +from _pydev_bundle import pydev_log +import sys +import inspect + +try: + xrange = xrange +except: + xrange = range + + +class _Stack(object): + + def __init__(self): + self._contents = [] + + def push(self, obj): + # print('push', obj) + self._contents.append(obj) + + def pop(self): + return self._contents.pop(-1) + + +INDENT_MARKER = object() +DEDENT_MARKER = object() +_SENTINEL = object() + +DEBUG = False + + +class _Token(object): + + def __init__(self, i_line, instruction=None, tok=_SENTINEL, priority=0, after=None, end_of_line=False): + ''' + :param i_line: + :param instruction: + :param tok: + :param priority: + :param after: + :param end_of_line: + Marker to signal only after all the other tokens have been written. + ''' + self.i_line = i_line + if tok is not _SENTINEL: + self.tok = tok + else: + if instruction is not None: + if inspect.iscode(instruction.argval): + self.tok = '' + else: + self.tok = str(instruction.argval) + else: + raise AssertionError('Either the tok or the instruction is needed.') + self.instruction = instruction + self.priority = priority + self.end_of_line = end_of_line + self._after_tokens = set() + self._after_handler_tokens = set() + if after: + self.mark_after(after) + + def mark_after(self, v): + if isinstance(v, _Token): + self._after_tokens.add(v) + elif isinstance(v, _BaseHandler): + self._after_handler_tokens.add(v) + + else: + raise AssertionError('Unhandled: %s' % (v,)) + + def get_after_tokens(self): + ret = self._after_tokens.copy() + for handler in self._after_handler_tokens: + ret.update(handler.tokens) + return ret + + def __repr__(self): + return 'Token(%s, after: %s)' % (self.tok, self.get_after_tokens()) + + __str__ = __repr__ + + +class _Writer(object): + + def __init__(self): + self.line_to_contents = {} + self.all_tokens = set() + + def get_line(self, line): + lst = self.line_to_contents.get(line) + if lst is None: + lst = self.line_to_contents[line] = [] + return lst + + def indent(self, line): + self.get_line(line).append(INDENT_MARKER) + + def dedent(self, line): + self.get_line(line).append(DEDENT_MARKER) + + def write(self, line, token): + if token in self.all_tokens: + return + self.all_tokens.add(token) + assert isinstance(token, _Token) + lst = self.get_line(line) + lst.append(token) + + +class _BaseHandler(object): + + def __init__(self, i_line, instruction, stack, writer, disassembler): + self.i_line = i_line + self.instruction = instruction + self.stack = stack + self.writer = writer + self.disassembler = disassembler + self.tokens = [] + self._handle() + + def _write_tokens(self): + for token in self.tokens: + self.writer.write(token.i_line, token) + + def _handle(self): + raise NotImplementedError(self) + + def __repr__(self, *args, **kwargs): + try: + return "%s line:%s" % (self.instruction, self.i_line) + except: + return object.__repr__(self) + + __str__ = __repr__ + + +_op_name_to_handler = {} + + +def _register(cls): + _op_name_to_handler[cls.opname] = cls + return cls + + +class _BasePushHandler(_BaseHandler): + + def _handle(self): + self.stack.push(self) + + +class _BaseLoadHandler(_BasePushHandler): + + def _handle(self): + _BasePushHandler._handle(self) + self.tokens = [_Token(self.i_line, self.instruction)] + + +@_register +class _LoadBuildClass(_BasePushHandler): + opname = "LOAD_BUILD_CLASS" + + +@_register +class _LoadConst(_BaseLoadHandler): + opname = "LOAD_CONST" + + +@_register +class _LoadName(_BaseLoadHandler): + opname = "LOAD_NAME" + + +@_register +class _LoadGlobal(_BaseLoadHandler): + opname = "LOAD_GLOBAL" + + +@_register +class _LoadFast(_BaseLoadHandler): + opname = "LOAD_FAST" + + +@_register +class _GetIter(_BaseHandler): + ''' + Implements TOS = iter(TOS). + ''' + opname = "GET_ITER" + iter_target = None + + def _handle(self): + self.iter_target = self.stack.pop() + self.tokens.extend(self.iter_target.tokens) + self.stack.push(self) + + +@_register +class _ForIter(_BaseHandler): + ''' + TOS is an iterator. Call its __next__() method. If this yields a new value, push it on the stack + (leaving the iterator below it). If the iterator indicates it is exhausted TOS is popped, and + the byte code counter is incremented by delta. + ''' + opname = "FOR_ITER" + + iter_in = None + + def _handle(self): + self.iter_in = self.stack.pop() + self.stack.push(self) + + def store_in_name(self, store_name): + for_token = _Token(self.i_line, None, 'for ') + self.tokens.append(for_token) + prev = for_token + + t_name = _Token(store_name.i_line, store_name.instruction, after=prev) + self.tokens.append(t_name) + prev = t_name + + in_token = _Token(store_name.i_line, None, ' in ', after=prev) + self.tokens.append(in_token) + prev = in_token + + max_line = store_name.i_line + if self.iter_in: + for t in self.iter_in.tokens: + t.mark_after(prev) + max_line = max(max_line, t.i_line) + prev = t + self.tokens.extend(self.iter_in.tokens) + + colon_token = _Token(self.i_line, None, ':', after=prev) + self.tokens.append(colon_token) + prev = for_token + + self._write_tokens() + + +@_register +class _StoreName(_BaseHandler): + ''' + Implements name = TOS. namei is the index of name in the attribute co_names of the code object. + The compiler tries to use STORE_FAST or STORE_GLOBAL if possible. + ''' + + opname = "STORE_NAME" + + def _handle(self): + v = self.stack.pop() + + if isinstance(v, _ForIter): + v.store_in_name(self) + else: + if not isinstance(v, _MakeFunction) or v.is_lambda: + line = self.i_line + for t in v.tokens: + line = min(line, t.i_line) + + t_name = _Token(line, self.instruction) + t_equal = _Token(line, None, '=', after=t_name) + + self.tokens.append(t_name) + self.tokens.append(t_equal) + + for t in v.tokens: + t.mark_after(t_equal) + self.tokens.extend(v.tokens) + + self._write_tokens() + + +@_register +class _ReturnValue(_BaseHandler): + """ + Returns with TOS to the caller of the function. + """ + + opname = "RETURN_VALUE" + + def _handle(self): + v = self.stack.pop() + return_token = _Token(self.i_line, None, 'return ', end_of_line=True) + self.tokens.append(return_token) + for token in v.tokens: + token.mark_after(return_token) + self.tokens.extend(v.tokens) + + self._write_tokens() + + +@_register +class _CallFunction(_BaseHandler): + """ + + CALL_FUNCTION(argc) + + Calls a callable object with positional arguments. argc indicates the number of positional + arguments. The top of the stack contains positional arguments, with the right-most argument + on top. Below the arguments is a callable object to call. CALL_FUNCTION pops all arguments + and the callable object off the stack, calls the callable object with those arguments, and + pushes the return value returned by the callable object. + + Changed in version 3.6: This opcode is used only for calls with positional arguments. + + """ + + opname = "CALL_FUNCTION" + + def _handle(self): + args = [] + for _i in xrange(self.instruction.argval + 1): + arg = self.stack.pop() + args.append(arg) + it = reversed(args) + name = next(it) + max_line = name.i_line + for t in name.tokens: + self.tokens.append(t) + + tok_open_parens = _Token(name.i_line, None, '(', after=name) + self.tokens.append(tok_open_parens) + + prev = tok_open_parens + for i, arg in enumerate(it): + for t in arg.tokens: + t.mark_after(name) + t.mark_after(prev) + max_line = max(max_line, t.i_line) + self.tokens.append(t) + prev = arg + + if i > 0: + comma_token = _Token(prev.i_line, None, ',', after=prev) + self.tokens.append(comma_token) + prev = comma_token + + tok_close_parens = _Token(max_line, None, ')', after=prev) + self.tokens.append(tok_close_parens) + + self._write_tokens() + + self.stack.push(self) + + +if IS_PY2: + + @_register + class _MakeFunctionPy2(_BaseHandler): + """ + Pushes a new function object on the stack. TOS is the code associated with the function. The + function object is defined to have argc default parameters, which are found below TOS. + """ + + opname = "MAKE_FUNCTION" + + def _handle(self): + stack = self.stack + self.code = stack.pop() + + stack.push(self) + + _MakeFunction = _MakeFunctionPy2 + +else: + + @_register + class _MakeFunctionPy3(_BaseHandler): + """ + Pushes a new function object on the stack. From bottom to top, the consumed stack must consist + of values if the argument carries a specified flag value + + 0x01 a tuple of default values for positional-only and positional-or-keyword parameters in positional order + + 0x02 a dictionary of keyword-only parameters' default values + + 0x04 an annotation dictionary + + 0x08 a tuple containing cells for free variables, making a closure + + the code associated with the function (at TOS1) + + the qualified name of the function (at TOS) + """ + + opname = "MAKE_FUNCTION" + is_lambda = False + + def _handle(self): + stack = self.stack + self.qualified_name = stack.pop() + self.code = stack.pop() + + default_node = None + if self.instruction.argval & 0x01: + default_node = stack.pop() + + is_lambda = self.is_lambda = '' in [x.tok for x in self.qualified_name.tokens] + + if not is_lambda: + def_token = _Token(self.i_line, None, 'def ') + self.tokens.append(def_token) + + for token in self.qualified_name.tokens: + self.tokens.append(token) + if not is_lambda: + token.mark_after(def_token) + prev = token + + open_parens_token = _Token(self.i_line, None, '(', after=prev) + self.tokens.append(open_parens_token) + prev = open_parens_token + + code = self.code.instruction.argval + + if default_node: + defaults = ([_SENTINEL] * (len(code.co_varnames) - len(default_node.instruction.argval))) + list(default_node.instruction.argval) + else: + defaults = [_SENTINEL] * len(code.co_varnames) + + for i, arg in enumerate(code.co_varnames): + if i > 0: + comma_token = _Token(prev.i_line, None, ', ', after=prev) + self.tokens.append(comma_token) + prev = comma_token + + arg_token = _Token(self.i_line, None, arg, after=prev) + self.tokens.append(arg_token) + + default = defaults[i] + if default is not _SENTINEL: + eq_token = _Token(default_node.i_line, None, '=', after=prev) + self.tokens.append(eq_token) + prev = eq_token + + default_token = _Token(default_node.i_line, None, str(default), after=prev) + self.tokens.append(default_token) + prev = default_token + + tok_close_parens = _Token(prev.i_line, None, '):', after=prev) + self.tokens.append(tok_close_parens) + + self._write_tokens() + + stack.push(self) + self.writer.indent(prev.i_line + 1) + self.writer.dedent(max(self.disassembler.merge_code(code))) + + _MakeFunction = _MakeFunctionPy3 + + +def _print_after_info(line_contents, stream=None): + if stream is None: + stream = sys.stdout + for token in line_contents: + after_tokens = token.get_after_tokens() + if after_tokens: + s = '%s after: %s\n' % ( + repr(token.tok), + ('"' + '", "'.join(t.tok for t in token.get_after_tokens()) + '"')) + stream.write(s) + else: + stream.write('%s (NO REQUISITES)' % repr(token.tok)) + + +def _compose_line_contents(line_contents, previous_line_tokens): + lst = [] + handled = set() + + add_to_end_of_line = [] + delete_indexes = [] + for i, token in enumerate(line_contents): + if token.end_of_line: + add_to_end_of_line.append(token) + delete_indexes.append(i) + for i in reversed(delete_indexes): + del line_contents[i] + del delete_indexes + + while line_contents: + added = False + delete_indexes = [] + + for i, token in enumerate(line_contents): + after_tokens = token.get_after_tokens() + for after in after_tokens: + if after not in handled and after not in previous_line_tokens: + break + else: + added = True + previous_line_tokens.add(token) + handled.add(token) + lst.append(token.tok) + delete_indexes.append(i) + + for i in reversed(delete_indexes): + del line_contents[i] + + if not added: + if add_to_end_of_line: + line_contents.extend(add_to_end_of_line) + del add_to_end_of_line[:] + continue + + # Something is off, let's just add as is. + for token in line_contents: + if token not in handled: + lst.append(token.tok) + + try: + from StringIO import StringIO + except: + from io import StringIO + stream = StringIO() + _print_after_info(line_contents, stream) + pydev_log.critical('Error. After markers are not correct:\n%s', stream.getvalue()) + break + return ''.join(lst) + + +class _PyCodeToSource(object): + + def __init__(self, co, memo=None): + if memo is None: + memo = {} + self.memo = memo + self.co = co + self.instructions = list(_iter_instructions(co)) + self.stack = _Stack() + self.writer = _Writer() + + def _process_next(self, i_line): + instruction = self.instructions.pop(0) + handler_class = _op_name_to_handler.get(instruction.opname) + if handler_class is not None: + s = handler_class(i_line, instruction, self.stack, self.writer, self) + if DEBUG: + print(s) + + else: + if DEBUG: + print("UNHANDLED", instruction) + + def build_line_to_contents(self): + co = self.co + + op_offset_to_line = dict(dis.findlinestarts(co)) + curr_line_index = 0 + + instructions = self.instructions + while instructions: + instruction = instructions[0] + new_line_index = op_offset_to_line.get(instruction.offset) + if new_line_index is not None: + if new_line_index is not None: + curr_line_index = new_line_index + + self._process_next(curr_line_index) + return self.writer.line_to_contents + + def merge_code(self, code): + if DEBUG: + print('merge code ----') + # for d in dir(code): + # if not d.startswith('_'): + # print(d, getattr(code, d)) + line_to_contents = _PyCodeToSource(code, self.memo).build_line_to_contents() + lines = [] + for line, contents in sorted(dict_iter_items(line_to_contents)): + lines.append(line) + self.writer.get_line(line).extend(contents) + if DEBUG: + print('end merge code ----') + return lines + + def disassemble(self): + show_lines = False + line_to_contents = self.build_line_to_contents() + from io import StringIO + + stream = StringIO() + last_line = 0 + indent = '' + previous_line_tokens = set() + for i_line, contents in sorted(dict_iter_items(line_to_contents)): + while last_line < i_line - 1: + if show_lines: + stream.write(u"%s.\n" % (last_line + 1,)) + else: + stream.write(u"\n") + last_line += 1 + + line_contents = [] + dedents_found = 0 + for part in contents: + if part is INDENT_MARKER: + if DEBUG: + print('found indent', i_line) + indent += ' ' + continue + if part is DEDENT_MARKER: + if DEBUG: + print('found dedent', i_line) + dedents_found += 1 + continue + line_contents.append(part) + + s = indent + _compose_line_contents(line_contents, previous_line_tokens) + if show_lines: + stream.write(u"%s. %s\n" % (i_line, s)) + else: + stream.write(u"%s\n" % s) + + if dedents_found: + indent = indent[:-(4 * dedents_found)] + last_line = i_line + + return stream.getvalue() + + +def code_obj_to_source(co): + """ + Converts a code object to source code to provide a suitable representation for the compiler when + the actual source code is not found. + + This is a work in progress / proof of concept / not ready to be used. + """ + ret = _PyCodeToSource(co).disassemble() + if DEBUG: + print(ret) + return ret diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py index 62bf09749..5251749bd 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py @@ -4,7 +4,7 @@ import sys import inspect from collections import namedtuple -from _pydevd_bundle.pydevd_constants import IS_PY38_OR_GREATER +from _pydevd_bundle.pydevd_constants import IS_PY38_OR_GREATER, dict_iter_items, dict_iter_values try: xrange @@ -113,20 +113,20 @@ def _iter_as_bytecode_as_instructions_py2(co): if op in hasconst: yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), co.co_consts[oparg], is_jump_target, initial_bytecode_offset, repr(co.co_consts[oparg])) elif op in hasname: - yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), co.co_names[oparg], is_jump_target, initial_bytecode_offset, repr(co.co_names[oparg])) + yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), co.co_names[oparg], is_jump_target, initial_bytecode_offset, str(co.co_names[oparg])) elif op in hasjrel: argval = i + oparg yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), argval, is_jump_target, initial_bytecode_offset, "to " + repr(argval)) elif op in haslocal: - yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), co.co_varnames[oparg], is_jump_target, initial_bytecode_offset, repr(co.co_varnames[oparg])) + yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), co.co_varnames[oparg], is_jump_target, initial_bytecode_offset, str(co.co_varnames[oparg])) elif op in hascompare: yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), cmp_op[oparg], is_jump_target, initial_bytecode_offset, cmp_op[oparg]) elif op in hasfree: if free is None: free = co.co_cellvars + co.co_freevars - yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), free[oparg], is_jump_target, initial_bytecode_offset, repr(free[oparg])) + yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), free[oparg], is_jump_target, initial_bytecode_offset, str(free[oparg])) else: - yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), oparg, is_jump_target, initial_bytecode_offset, repr(oparg)) + yield _Instruction(curr_op_name, op, _get_line(op_offset_to_line, initial_bytecode_offset, 0), oparg, is_jump_target, initial_bytecode_offset, str(oparg)) def _iter_instructions(co): @@ -330,117 +330,366 @@ def collect_try_except_info(co, use_func_first_line=False): return try_except_info_lst +RESTART_FROM_LOOKAHEAD = object() +SEPARATOR = object() -class _Uncompyler(object): - def __init__(self, co, firstlineno): +class _MsgPart(object): + + def __init__(self, line, tok): + assert line >= 0 + self.line = line + self.tok = tok + + @classmethod + def add_to_line_to_contents(cls, obj, line_to_contents, line=None): + if isinstance(obj, (list, tuple)): + for o in obj: + cls.add_to_line_to_contents(o, line_to_contents, line=line) + return + + if isinstance(obj, str): + assert line is not None + line = int(line) + lst = line_to_contents.setdefault(line, []) + lst.append(obj) + return + + if isinstance(obj, _MsgPart): + if isinstance(obj.tok, (list, tuple)): + cls.add_to_line_to_contents(obj.tok, line_to_contents, line=obj.line) + return + + if isinstance(obj.tok, str): + lst = line_to_contents.setdefault(obj.line, []) + lst.append(obj.tok) + return + + raise AssertionError("Unhandled: %" % (obj,)) + + +class _Disassembler(object): + + def __init__(self, co, firstlineno, level=0): self.co = co self.firstlineno = firstlineno + self.level = level self.instructions = list(_iter_instructions(co)) + op_offset_to_line = self.op_offset_to_line = dict(dis.findlinestarts(co)) + + # Update offsets so that all offsets have the line index (and update it based on + # the passed firstlineno). + line_index = co.co_firstlineno - firstlineno + for instruction in self.instructions: + new_line_index = op_offset_to_line.get(instruction.offset) + if new_line_index is not None: + line_index = new_line_index - firstlineno + op_offset_to_line[instruction.offset] = line_index + else: + op_offset_to_line[instruction.offset] = line_index + + BIG_LINE_INT = 9999999 + SMALL_LINE_INT = -1 + + def min_line(self, *args): + m = self.BIG_LINE_INT + for arg in args: + if isinstance(arg, (list, tuple)): + m = min(m, self.min_line(*arg)) + + elif isinstance(arg, _MsgPart): + m = min(m, arg.line) + + elif hasattr(arg, 'offset'): + m = min(m, self.op_offset_to_line[arg.offset]) + return m + + def max_line(self, *args): + m = self.SMALL_LINE_INT + for arg in args: + if isinstance(arg, (list, tuple)): + m = max(m, self.max_line(*arg)) + + elif isinstance(arg, _MsgPart): + m = max(m, arg.line) + + elif hasattr(arg, 'offset'): + m = max(m, self.op_offset_to_line[arg.offset]) + return m + + def _lookahead(self): + ''' + This handles and converts some common constructs from bytecode to actual source code. + + It may change the list of instructions. + ''' + msg = self._create_msg_part + found = [] + fullrepr = None + + # Collect all the load instructions + for next_instruction in self.instructions: + if next_instruction.opname in ('LOAD_GLOBAL', 'LOAD_FAST', 'LOAD_CONST', 'LOAD_NAME'): + found.append(next_instruction) + else: + break + + if not found: + return None + + if next_instruction.opname == 'LOAD_ATTR': + prev_instruction = found[-1] + # Remove the current LOAD_ATTR + assert self.instructions.pop(len(found)) is next_instruction + + # Add the LOAD_ATTR to the previous LOAD + self.instructions[len(found) - 1] = _Instruction( + prev_instruction.opname, + prev_instruction.opcode, + prev_instruction.starts_line, + prev_instruction.argval, + False, # prev_instruction.is_jump_target, + prev_instruction.offset, + ( + msg(prev_instruction), + msg(prev_instruction, '.'), + msg(next_instruction) + ), + ) + return RESTART_FROM_LOOKAHEAD + + if next_instruction.opname == 'CALL_FUNCTION': + if len(found) == next_instruction.argval + 1: + force_restart = False + delta = 0 + else: + force_restart = True + if len(found) > next_instruction.argval + 1: + delta = len(found) - (next_instruction.argval + 1) + else: + return None # This is odd + + del self.instructions[delta:delta + next_instruction.argval + 2] # +2 = NAME / CALL_FUNCTION + + found = iter(found[delta:]) + call_func = next(found) + args = list(found) + fullrepr = [ + msg(call_func), + msg(call_func, '('), + ] + prev = call_func + for i, arg in enumerate(args): + if i > 0: + fullrepr.append(msg(prev, ', ')) + prev = arg + fullrepr.append(msg(arg)) + + fullrepr.append(msg(prev, ')')) + + if force_restart: + self.instructions.insert(delta, _Instruction( + call_func.opname, + call_func.opcode, + call_func.starts_line, + call_func.argval, + False, # call_func.is_jump_target, + call_func.offset, + tuple(fullrepr), + )) + return RESTART_FROM_LOOKAHEAD + + elif next_instruction.opname == 'BUILD_TUPLE': + + if len(found) == next_instruction.argval: + force_restart = False + delta = 0 + else: + force_restart = True + if len(found) > next_instruction.argval: + delta = len(found) - (next_instruction.argval) + else: + return None # This is odd + + del self.instructions[delta:delta + next_instruction.argval + 1] # +1 = BUILD_TUPLE + + found = iter(found[delta:]) + + args = [instruction for instruction in found] + if args: + first_instruction = args[0] + else: + first_instruction = next_instruction + prev = first_instruction + + fullrepr = [] + fullrepr.append(msg(prev, '(')) + for i, arg in enumerate(args): + if i > 0: + fullrepr.append(msg(prev, ', ')) + prev = arg + fullrepr.append(msg(arg)) + + fullrepr.append(msg(prev, ')')) + + if force_restart: + self.instructions.insert(delta, _Instruction( + first_instruction.opname, + first_instruction.opcode, + first_instruction.starts_line, + first_instruction.argval, + False, # first_instruction.is_jump_target, + first_instruction.offset, + tuple(fullrepr), + )) + return RESTART_FROM_LOOKAHEAD + + if fullrepr is not None and self.instructions: + if self.instructions[0].opname == 'POP_TOP': + self.instructions.pop(0) + + if self.instructions[0].opname in ('STORE_FAST', 'STORE_NAME'): + next_instruction = self.instructions.pop(0) + return msg(next_instruction), msg(next_instruction, ' = '), fullrepr + + if self.instructions[0].opname == 'RETURN_VALUE': + next_instruction = self.instructions.pop(0) + return msg(next_instruction, 'return ', line=self.min_line(next_instruction, fullrepr)), fullrepr + + return fullrepr def _decorate_jump_target(self, instruction, instruction_repr): if instruction.is_jump_target: - return '|%s|%s' % (instruction.offset, instruction_repr) + return ('|', str(instruction.offset), '|', instruction_repr) return instruction_repr - def _next_instruction_to_str(self, line_to_contents): + def _create_msg_part(self, instruction, tok=None, line=None): dec = self._decorate_jump_target + if line is None or line in (self.BIG_LINE_INT, self.SMALL_LINE_INT): + line = self.op_offset_to_line[instruction.offset] + return _MsgPart( + line, tok if tok is not None else dec(instruction, instruction.argrepr)) + + def _next_instruction_to_str(self, line_to_contents): + # indent = '' + # if self.level > 0: + # indent += ' ' * self.level + # print(indent, 'handle', self.instructions[0]) + + if self.instructions: + ret = self._lookahead() + if ret: + return ret + + msg = self._create_msg_part instruction = self.instructions.pop(0) - if instruction.opname in ('LOAD_GLOBAL', 'LOAD_FAST', 'LOAD_CONST'): - if self.instructions: - next_instruction = self.instructions[0] - if next_instruction.opname == 'STORE_FAST': - self.instructions.pop(0) - return '%s = %s' % (dec(next_instruction, next_instruction.argrepr), dec(instruction, instruction.argrepr)) - - if next_instruction.opname == 'CALL_FUNCTION': - if next_instruction.argval == 0: - self.instructions.pop(0) - return dec(instruction, '%s()' % (instruction.argrepr)) - - if next_instruction.opname == 'RETURN_VALUE': - self.instructions.pop(0) - return dec(instruction, 'return %s' % (instruction.argrepr)) - - if next_instruction.opname == 'RAISE_VARARGS' and next_instruction.argval == 1: - self.instructions.pop(0) - return dec(next_instruction, 'raise %s' % dec(instruction, instruction.argrepr)) + + if instruction.opname in ('LOAD_GLOBAL', 'LOAD_FAST', 'LOAD_CONST', 'LOAD_NAME'): + next_instruction = self.instructions[0] + if next_instruction.opname in ('STORE_FAST', 'STORE_NAME'): + self.instructions.pop(0) + return ( + msg(next_instruction), + msg(next_instruction, ' = '), + msg(instruction)) + + if next_instruction.opname == 'RETURN_VALUE': + self.instructions.pop(0) + return (msg(instruction, 'return ', line=self.min_line(instruction)), msg(instruction)) + + if next_instruction.opname == 'RAISE_VARARGS' and next_instruction.argval == 1: + self.instructions.pop(0) + return (msg(instruction, 'raise ', line=self.min_line(instruction)), msg(instruction)) if instruction.opname == 'LOAD_CONST': if inspect.iscode(instruction.argval): - code_line_to_contents = _Uncompyler(instruction.argval, self.firstlineno).build_line_to_contents() - for contents in code_line_to_contents.values(): + + code_line_to_contents = _Disassembler( + instruction.argval, self.firstlineno, self.level + 1 + ).build_line_to_contents() + + for contents in dict_iter_values(code_line_to_contents): contents.insert(0, ' ') - line_to_contents.update(code_line_to_contents) + for line, contents in dict_iter_items(code_line_to_contents): + line_to_contents.setdefault(line, []).extend(contents) + return msg(instruction, 'LOAD_CONST(code)') if instruction.opname == 'RAISE_VARARGS': if instruction.argval == 0: - return 'raise' + return msg(instruction, 'raise') if instruction.opname == 'SETUP_FINALLY': - return dec(instruction, 'try(%s):' % (instruction.argrepr,)) + return msg(instruction, ('try(', instruction.argrepr, '):')) if instruction.argrepr: - return dec(instruction, '%s(%s)' % (instruction.opname, instruction.argrepr,)) + return msg(instruction, (instruction.opname, '(', instruction.argrepr, ')')) if instruction.argval: - return dec(instruction, '%s{%s}' % (instruction.opname, instruction.argval,)) + return msg(instruction, '%s{%s}' % (instruction.opname, instruction.argval,)) - return dec(instruction, instruction.opname) + return msg(instruction, instruction.opname) def build_line_to_contents(self): - co = self.co - firstlineno = self.firstlineno - # print('----') # for instruction in self.instructions: # print(instruction) # print('----\n\n') - op_offset_to_line = dict(dis.findlinestarts(co)) - curr_line_index = 0 - line_to_contents = {} instructions = self.instructions while instructions: - instruction = instructions[0] - new_line_index = op_offset_to_line.get(instruction.offset) - if new_line_index is not None: - if new_line_index is not None: - curr_line_index = new_line_index - firstlineno - - lst = line_to_contents.setdefault(curr_line_index, []) - lst.append(self._next_instruction_to_str(line_to_contents)) + s = self._next_instruction_to_str(line_to_contents) + if s is RESTART_FROM_LOOKAHEAD: + continue + + _MsgPart.add_to_line_to_contents(s, line_to_contents) + m = self.max_line(s) + if m != self.SMALL_LINE_INT: + line_to_contents.setdefault(m, []).append(SEPARATOR) return line_to_contents - def uncompyle(self): + def disassemble(self): line_to_contents = self.build_line_to_contents() - from io import StringIO + try: + from StringIO import StringIO + except ImportError: + from io import StringIO stream = StringIO() last_line = 0 - for line, contents in line_to_contents.items(): + show_lines = False + for line, contents in sorted(dict_iter_items(line_to_contents)): while last_line < line - 1: - stream.write(u'%s.\n' % (last_line + 1,)) + if show_lines: + stream.write('%s.\n' % (last_line + 1,)) + else: + stream.write('\n') last_line += 1 - if contents and not contents[0].strip(): - # i.e.: don't put a comma after the indentation. - stream.write(u'%s. %s%s\n' % (line, contents[0], ', '.join(contents[1:]))) - else: - stream.write(u'%s. %s\n' % (line, ', '.join(contents))) + if show_lines: + stream.write('%s. ' % (line,)) + + for i, content in enumerate(contents): + if content == SEPARATOR: + if i != len(contents) - 1: + stream.write(', ') + else: + stream.write(content) + + stream.write('\n') + last_line = line return stream.getvalue() -def uncompyle(co, use_func_first_line=False): +def code_to_bytecode_representation(co, use_func_first_line=False): ''' - A simple uncompyle of bytecode. + A simple disassemble of bytecode. - It does not attempt to provide a full uncompyle to Python, rather, it provides a low-level + It does not attempt to provide the full Python source code, rather, it provides a low-level representation of the bytecode, respecting the lines (so, its target is making the bytecode easier to grasp and not providing the original source code). @@ -454,5 +703,5 @@ def uncompyle(co, use_func_first_line=False): else: firstlineno = 0 - return _Uncompyler(co, firstlineno).uncompyle() + return _Disassembler(co, firstlineno).disassemble() diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py index 18d488fd7..5be8cfe26 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py @@ -89,6 +89,8 @@ CMD_STEP_INTO_COROUTINE = 206 +CMD_LOAD_SOURCE_FROM_FRAME_ID = 207 + CMD_VERSION = 501 CMD_RETURN = 502 CMD_SET_PROTOCOL = 503 @@ -179,6 +181,8 @@ '206': 'CMD_STEP_INTO_COROUTINE', + '207': 'CMD_LOAD_SOURCE_FROM_FRAME_ID', + '501': 'CMD_VERSION', '502': 'CMD_RETURN', '503': 'CMD_SET_PROTOCOL', diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c index a9e4384af..ac459e2fa 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.15 */ +/* Generated by Cython 0.29.16 */ /* BEGIN: Cython Metadata { @@ -20,8 +20,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_15" -#define CYTHON_HEX_VERSION 0x001D0FF0 +#define CYTHON_ABI "0_29_16" +#define CYTHON_HEX_VERSION 0x001D10F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -497,8 +497,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -921,7 +923,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFram }; -/* "_pydevd_bundle/pydevd_cython.pyx":1407 +/* "_pydevd_bundle/pydevd_cython.pyx":1405 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class ThreadTracer: # <<<<<<<<<<<<<< @@ -25256,7 +25258,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace * # match the raised exception. * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) # <<<<<<<<<<<<<< * break - * else: + * finally: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_7); @@ -25317,8 +25319,8 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace * # match the raised exception. * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) * break # <<<<<<<<<<<<<< - * else: - * break # exited during the except block (no exception raised) + * finally: + * # Remove reference to exception after handling it. */ goto __pyx_L19_break; @@ -25331,17 +25333,6 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1387 - * break - * else: - * break # exited during the except block (no exception raised) # <<<<<<<<<<<<<< - * finally: - * # Remove reference to exception after handling it. - */ - /*else*/ { - goto __pyx_L19_break; - } - /* "_pydevd_bundle/pydevd_cython.pyx":1377 * # and it's gotten in the except line. * for try_except_info in self._try_except_info: @@ -25378,7 +25369,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace } } - /* "_pydevd_bundle/pydevd_cython.pyx":1390 + /* "_pydevd_bundle/pydevd_cython.pyx":1388 * finally: * # Remove reference to exception after handling it. * self._last_exc_arg = None # <<<<<<<<<<<<<< @@ -25447,31 +25438,31 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace } __pyx_L4:; - /* "_pydevd_bundle/pydevd_cython.pyx":1392 + /* "_pydevd_bundle/pydevd_cython.pyx":1390 * 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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __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, 1390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1396 + /* "_pydevd_bundle/pydevd_cython.pyx":1394 * # 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_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_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, 1394, __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, 1396, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_1) < 0) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1400 + /* "_pydevd_bundle/pydevd_cython.pyx":1398 * # frame.f_trace = ret * # ENDIF * return ret # <<<<<<<<<<<<<< @@ -25513,7 +25504,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1402 +/* "_pydevd_bundle/pydevd_cython.pyx":1400 * return ret * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< @@ -25540,7 +25531,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_trace_dispatch_func", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":1403 + /* "_pydevd_bundle/pydevd_cython.pyx":1401 * * def get_trace_dispatch_func(self): * return self.trace_dispatch_and_unhandled_exceptions # <<<<<<<<<<<<<< @@ -25548,13 +25539,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, 1403, __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, 1401, __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":1402 + /* "_pydevd_bundle/pydevd_cython.pyx":1400 * return ret * * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< @@ -26480,7 +26471,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTrace return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1409 +/* "_pydevd_bundle/pydevd_cython.pyx":1407 * cdef class ThreadTracer: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -26514,7 +26505,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1409, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1407, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -26525,13 +26516,13 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1409, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1407, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __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, 1409, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1407, __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 */ @@ -26548,7 +26539,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":1410 + /* "_pydevd_bundle/pydevd_cython.pyx":1408 * cdef public tuple _args; * def __init__(self, tuple args): * self._args = args # <<<<<<<<<<<<<< @@ -26561,7 +26552,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":1409 + /* "_pydevd_bundle/pydevd_cython.pyx":1407 * cdef class ThreadTracer: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -26575,7 +26566,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1418 +/* "_pydevd_bundle/pydevd_cython.pyx":1416 * # ENDIF * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -26621,17 +26612,17 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1418, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1416, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1418, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1416, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1418, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1416, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -26646,7 +26637,7 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1418, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1416, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -26696,7 +26687,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal char const *__pyx_t_18; __Pyx_RefNannySetupContext("__call__", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":1444 + /* "_pydevd_bundle/pydevd_cython.pyx":1442 * # 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 # <<<<<<<<<<<<<< @@ -26711,7 +26702,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, 1444, __pyx_L1_error) + __PYX_ERR(0, 1442, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -26729,7 +26720,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, 1444, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -26737,10 +26728,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, 1444, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1442, __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, 1444, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1444, __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, 1442, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1442, __pyx_L1_error) __pyx_v_py_db = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_t = __pyx_t_3; @@ -26752,7 +26743,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":1445 + /* "_pydevd_bundle/pydevd_cython.pyx":1443 * # 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: # <<<<<<<<<<<<<< @@ -26762,7 +26753,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":1446 + /* "_pydevd_bundle/pydevd_cython.pyx":1444 * 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 # <<<<<<<<<<<<<< @@ -26770,12 +26761,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, 1446, __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, 1444, __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, 1446, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -26784,7 +26775,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":1445 + /* "_pydevd_bundle/pydevd_cython.pyx":1443 * # 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: # <<<<<<<<<<<<<< @@ -26793,7 +26784,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1448 + /* "_pydevd_bundle/pydevd_cython.pyx":1446 * 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 # <<<<<<<<<<<<<< @@ -26802,7 +26793,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":1449 + /* "_pydevd_bundle/pydevd_cython.pyx":1447 * * additional_info.is_tracing += 1 * try: # <<<<<<<<<<<<<< @@ -26819,7 +26810,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1450 + /* "_pydevd_bundle/pydevd_cython.pyx":1448 * additional_info.is_tracing += 1 * try: * pydev_step_cmd = additional_info.pydev_step_cmd # <<<<<<<<<<<<<< @@ -26829,7 +26820,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":1451 + /* "_pydevd_bundle/pydevd_cython.pyx":1449 * try: * pydev_step_cmd = additional_info.pydev_step_cmd * is_stepping = pydev_step_cmd != -1 # <<<<<<<<<<<<<< @@ -26838,20 +26829,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":1452 + /* "_pydevd_bundle/pydevd_cython.pyx":1450 * 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, 1452, __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, 1450, __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, 1452, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1450, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1453 + /* "_pydevd_bundle/pydevd_cython.pyx":1451 * is_stepping = pydev_step_cmd != -1 * if py_db.pydb_disposed: * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -26859,12 +26850,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, 1453, __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, 1451, __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, 1453, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1451, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -26873,7 +26864,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":1452 + /* "_pydevd_bundle/pydevd_cython.pyx":1450 * pydev_step_cmd = additional_info.pydev_step_cmd * is_stepping = pydev_step_cmd != -1 * if py_db.pydb_disposed: # <<<<<<<<<<<<<< @@ -26882,14 +26873,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1456 + /* "_pydevd_bundle/pydevd_cython.pyx":1454 * * # 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, 1456, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1454, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -26903,24 +26894,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_t) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_t); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __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, 1456, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1454, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = ((!__pyx_t_7) != 0); if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1457 + /* "_pydevd_bundle/pydevd_cython.pyx":1455 * # 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, 1457, __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, 1455, __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, 1457, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1455, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -26934,7 +26925,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_t) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_t); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1457, __pyx_L7_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1455, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -26950,12 +26941,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); __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, 1457, __pyx_L7_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __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":1458 + /* "_pydevd_bundle/pydevd_cython.pyx":1456 * 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 # <<<<<<<<<<<<<< @@ -26963,12 +26954,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, 1458, __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, 1456, __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, 1458, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1456, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; @@ -26977,7 +26968,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":1456 + /* "_pydevd_bundle/pydevd_cython.pyx":1454 * * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): # <<<<<<<<<<<<<< @@ -26986,29 +26977,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1462 + /* "_pydevd_bundle/pydevd_cython.pyx":1460 * # 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.co_firstlineno, frame.f_code.co_name, frame.f_code.co_filename) # <<<<<<<<<<<<<< * 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, 1462, __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, 1460, __pyx_L7_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, 1462, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1460, __pyx_L7_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, 1462, __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, 1460, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1462, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __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, 1462, __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, 1460, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1462, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L7_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); @@ -27022,7 +27013,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_v_frame_cache_key = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1463 + /* "_pydevd_bundle/pydevd_cython.pyx":1461 * # in the global context and another in the local context. * frame_cache_key = (frame.f_code.co_firstlineno, frame.f_code.co_name, frame.f_code.co_filename) * if frame_cache_key in cache_skips: # <<<<<<<<<<<<<< @@ -27031,13 +27022,13 @@ 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, 1463, __pyx_L7_error) + __PYX_ERR(0, 1461, __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, 1463, __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, 1461, __pyx_L7_error) __pyx_t_7 = (__pyx_t_12 != 0); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1464 + /* "_pydevd_bundle/pydevd_cython.pyx":1462 * frame_cache_key = (frame.f_code.co_firstlineno, frame.f_code.co_name, frame.f_code.co_filename) * if frame_cache_key in cache_skips: * if not is_stepping: # <<<<<<<<<<<<<< @@ -27047,7 +27038,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_7 = ((!(__pyx_v_is_stepping != 0)) != 0); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1466 + /* "_pydevd_bundle/pydevd_cython.pyx":1464 * 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 # <<<<<<<<<<<<<< @@ -27055,12 +27046,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_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1466, __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, 1464, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1466, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1464, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; @@ -27069,7 +27060,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":1464 + /* "_pydevd_bundle/pydevd_cython.pyx":1462 * frame_cache_key = (frame.f_code.co_firstlineno, frame.f_code.co_name, frame.f_code.co_filename) * if frame_cache_key in cache_skips: * if not is_stepping: # <<<<<<<<<<<<<< @@ -27078,7 +27069,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1469 + /* "_pydevd_bundle/pydevd_cython.pyx":1467 * 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: # <<<<<<<<<<<<<< @@ -27088,18 +27079,18 @@ 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, 1469, __pyx_L7_error) + __PYX_ERR(0, 1467, __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, 1469, __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, 1467, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1467, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1469, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1467, __pyx_L7_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1471 + /* "_pydevd_bundle/pydevd_cython.pyx":1469 * 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: # <<<<<<<<<<<<<< @@ -27121,20 +27112,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_7 = __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, 1471, __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, 1469, __pyx_L7_error) __pyx_t_12 = ((!__pyx_t_13) != 0); __pyx_t_7 = __pyx_t_12; __pyx_L19_bool_binop_done:; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1472 + /* "_pydevd_bundle/pydevd_cython.pyx":1470 * * 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_1, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -27151,7 +27142,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_py_db, __pyx_v_frame}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1470, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -27159,13 +27150,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_py_db, __pyx_v_frame}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1470, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1472, __pyx_L7_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1470, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -27176,14 +27167,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_11, __pyx_v_frame); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1470, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1471 + /* "_pydevd_bundle/pydevd_cython.pyx":1469 * 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: # <<<<<<<<<<<<<< @@ -27192,19 +27183,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1474 + /* "_pydevd_bundle/pydevd_cython.pyx":1472 * 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.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_back_frame = __pyx_t_4; __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1475 + /* "_pydevd_bundle/pydevd_cython.pyx":1473 * * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): # <<<<<<<<<<<<<< @@ -27234,29 +27225,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L22_bool_binop_done:; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1476 + /* "_pydevd_bundle/pydevd_cython.pyx":1474 * 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.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) # <<<<<<<<<<<<<< * 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L7_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -27270,7 +27261,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_v_back_frame_cache_key = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1477 + /* "_pydevd_bundle/pydevd_cython.pyx":1475 * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * back_frame_cache_key = (back_frame.f_code.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) * if cache_skips.get(back_frame_cache_key) == 1: # <<<<<<<<<<<<<< @@ -27279,18 +27270,18 @@ 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, 1477, __pyx_L7_error) + __PYX_ERR(0, 1475, __pyx_L7_error) } - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1477, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1477, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1475, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __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, 1477, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1475, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1479 + /* "_pydevd_bundle/pydevd_cython.pyx":1477 * 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 # <<<<<<<<<<<<<< @@ -27298,12 +27289,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_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1479, __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, 1477, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1479, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1477, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; @@ -27312,7 +27303,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_5 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1477 + /* "_pydevd_bundle/pydevd_cython.pyx":1475 * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): * back_frame_cache_key = (back_frame.f_code.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) * if cache_skips.get(back_frame_cache_key) == 1: # <<<<<<<<<<<<<< @@ -27321,7 +27312,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1475 + /* "_pydevd_bundle/pydevd_cython.pyx":1473 * * back_frame = frame.f_back * if back_frame is not None and pydev_step_cmd in (107, 144, 109, 160): # <<<<<<<<<<<<<< @@ -27331,7 +27322,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L21; } - /* "_pydevd_bundle/pydevd_cython.pyx":1482 + /* "_pydevd_bundle/pydevd_cython.pyx":1480 * 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 # <<<<<<<<<<<<<< @@ -27340,12 +27331,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*else*/ { __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, 1482, __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, 1480, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1480, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; @@ -27356,7 +27347,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L21:; - /* "_pydevd_bundle/pydevd_cython.pyx":1469 + /* "_pydevd_bundle/pydevd_cython.pyx":1467 * 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: # <<<<<<<<<<<<<< @@ -27366,7 +27357,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } - /* "_pydevd_bundle/pydevd_cython.pyx":1463 + /* "_pydevd_bundle/pydevd_cython.pyx":1461 * # in the global context and another in the local context. * frame_cache_key = (frame.f_code.co_firstlineno, frame.f_code.co_name, frame.f_code.co_filename) * if frame_cache_key in cache_skips: # <<<<<<<<<<<<<< @@ -27375,7 +27366,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1484 + /* "_pydevd_bundle/pydevd_cython.pyx":1482 * return None if event == 'call' else NO_FTRACE * * try: # <<<<<<<<<<<<<< @@ -27391,29 +27382,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1486 + /* "_pydevd_bundle/pydevd_cython.pyx":1484 * try: * # Make fast path faster! * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] # <<<<<<<<<<<<<< * except: * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1486, __pyx_L25_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1484, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1484, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1486, __pyx_L25_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1484, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1484, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1486, __pyx_L25_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1484, __pyx_L25_error) __pyx_v_abs_path_real_path_and_base = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1484 + /* "_pydevd_bundle/pydevd_cython.pyx":1482 * return None if event == 'call' else NO_FTRACE * * try: # <<<<<<<<<<<<<< @@ -27433,7 +27424,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":1487 + /* "_pydevd_bundle/pydevd_cython.pyx":1485 * # Make fast path faster! * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] * except: # <<<<<<<<<<<<<< @@ -27442,19 +27433,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_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1487, __pyx_L27_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1485, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - /* "_pydevd_bundle/pydevd_cython.pyx":1488 + /* "_pydevd_bundle/pydevd_cython.pyx":1486 * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] * except: * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) # <<<<<<<<<<<<<< * * filename = abs_path_real_path_and_base[1] */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __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, 1486, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -27468,10 +27459,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_frame) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_frame); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L27_except_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1488, __pyx_L27_except_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1486, __pyx_L27_except_error) __Pyx_XDECREF_SET(__pyx_v_abs_path_real_path_and_base, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -27481,7 +27472,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L27_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":1484 + /* "_pydevd_bundle/pydevd_cython.pyx":1482 * return None if event == 'call' else NO_FTRACE * * try: # <<<<<<<<<<<<<< @@ -27501,7 +27492,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L30_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1490 + /* "_pydevd_bundle/pydevd_cython.pyx":1488 * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) * * filename = abs_path_real_path_and_base[1] # <<<<<<<<<<<<<< @@ -27510,22 +27501,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1490, __pyx_L7_error) + __PYX_ERR(0, 1488, __pyx_L7_error) } - __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L7_error) + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1490, __pyx_L7_error) + if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1488, __pyx_L7_error) __pyx_v_filename = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1491 + /* "_pydevd_bundle/pydevd_cython.pyx":1489 * * filename = abs_path_real_path_and_base[1] * file_type = py_db.get_file_type(frame, abs_path_real_path_and_base) # we don't want to debug threading or anything related to pydevd # <<<<<<<<<<<<<< * * if file_type is not None: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1491, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1489, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -27542,7 +27533,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_frame, __pyx_v_abs_path_real_path_and_base}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1491, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -27550,13 +27541,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_frame, __pyx_v_abs_path_real_path_and_base}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1491, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L7_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -27567,7 +27558,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_INCREF(__pyx_v_abs_path_real_path_and_base); __Pyx_GIVEREF(__pyx_v_abs_path_real_path_and_base); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_abs_path_real_path_and_base); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1491, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -27575,7 +27566,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_v_file_type = __pyx_t_5; __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1493 + /* "_pydevd_bundle/pydevd_cython.pyx":1491 * file_type = py_db.get_file_type(frame, abs_path_real_path_and_base) # we don't want to debug threading or anything related to pydevd * * if file_type is not None: # <<<<<<<<<<<<<< @@ -27586,33 +27577,33 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_12 = (__pyx_t_7 != 0); if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1494 + /* "_pydevd_bundle/pydevd_cython.pyx":1492 * * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< * if not py_db.in_project_scope(frame, abs_path_real_path_and_base[0]): * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_real_path_and_base[-1], frame.f_lineno, event, frame.f_code.co_name, file_type) */ - __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1494, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1492, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1494, __pyx_L7_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1492, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1495 + /* "_pydevd_bundle/pydevd_cython.pyx":1493 * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 * if not py_db.in_project_scope(frame, abs_path_real_path_and_base[0]): # <<<<<<<<<<<<<< * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_real_path_and_base[-1], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_in_project_scope); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_in_project_scope); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1495, __pyx_L7_error) + __PYX_ERR(0, 1493, __pyx_L7_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -27629,7 +27620,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_frame, __pyx_t_1}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -27638,14 +27629,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_frame, __pyx_t_1}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -27656,17 +27647,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_11, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1495, __pyx_L7_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1493, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = ((!__pyx_t_12) != 0); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1497 + /* "_pydevd_bundle/pydevd_cython.pyx":1495 * if not py_db.in_project_scope(frame, abs_path_real_path_and_base[0]): * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_real_path_and_base[-1], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -27675,11 +27666,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, 1497, __pyx_L7_error) + __PYX_ERR(0, 1495, __pyx_L7_error) } - if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1497, __pyx_L7_error) + if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1495, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1498 + /* "_pydevd_bundle/pydevd_cython.pyx":1496 * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_real_path_and_base[-1], 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 # <<<<<<<<<<<<<< @@ -27687,12 +27678,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # if DEBUG: print('skipped: trace_dispatch', abs_path_real_path_and_base[-1], frame.f_lineno, event, frame.f_code.co_name, file_type) */ __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, 1498, __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, 1496, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1498, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1496, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; @@ -27701,7 +27692,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_5 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1495 + /* "_pydevd_bundle/pydevd_cython.pyx":1493 * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 * if not py_db.in_project_scope(frame, abs_path_real_path_and_base[0]): # <<<<<<<<<<<<<< @@ -27710,7 +27701,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1494 + /* "_pydevd_bundle/pydevd_cython.pyx":1492 * * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< @@ -27720,7 +27711,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L34; } - /* "_pydevd_bundle/pydevd_cython.pyx":1501 + /* "_pydevd_bundle/pydevd_cython.pyx":1499 * else: * # if DEBUG: print('skipped: trace_dispatch', abs_path_real_path_and_base[-1], frame.f_lineno, event, frame.f_code.co_name, file_type) * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -27730,11 +27721,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, 1501, __pyx_L7_error) + __PYX_ERR(0, 1499, __pyx_L7_error) } - if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1501, __pyx_L7_error) + if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1499, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1502 + /* "_pydevd_bundle/pydevd_cython.pyx":1500 * # if DEBUG: print('skipped: trace_dispatch', abs_path_real_path_and_base[-1], 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 # <<<<<<<<<<<<<< @@ -27742,12 +27733,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_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1502, __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, 1500, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1502, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1500, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; @@ -27758,7 +27749,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L34:; - /* "_pydevd_bundle/pydevd_cython.pyx":1493 + /* "_pydevd_bundle/pydevd_cython.pyx":1491 * file_type = py_db.get_file_type(frame, abs_path_real_path_and_base) # we don't want to debug threading or anything related to pydevd * * if file_type is not None: # <<<<<<<<<<<<<< @@ -27767,27 +27758,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1504 + /* "_pydevd_bundle/pydevd_cython.pyx":1502 * return None if event == 'call' else NO_FTRACE * * if py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< * if py_db.apply_files_filter(frame, filename, False): * cache_skips[frame_cache_key] = 1 */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1504, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1504, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1502, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1505 + /* "_pydevd_bundle/pydevd_cython.pyx":1503 * * if py_db.is_files_filter_enabled: * if py_db.apply_files_filter(frame, filename, False): # <<<<<<<<<<<<<< * cache_skips[frame_cache_key] = 1 * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1505, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -27804,7 +27795,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_frame, __pyx_v_filename, Py_False}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1505, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -27812,13 +27803,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_frame, __pyx_v_filename, Py_False}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1505, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_1 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L7_error) + __pyx_t_1 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -27832,16 +27823,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_11, Py_False); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1505, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1505, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1503, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1506 + /* "_pydevd_bundle/pydevd_cython.pyx":1504 * if py_db.is_files_filter_enabled: * if py_db.apply_files_filter(frame, filename, False): * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -27850,11 +27841,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, 1506, __pyx_L7_error) + __PYX_ERR(0, 1504, __pyx_L7_error) } - if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1506, __pyx_L7_error) + if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1504, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1508 + /* "_pydevd_bundle/pydevd_cython.pyx":1506 * 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: # <<<<<<<<<<<<<< @@ -27882,20 +27873,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_7 = __pyx_t_13; goto __pyx_L39_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, 1508, __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, 1506, __pyx_L7_error) __pyx_t_12 = ((!__pyx_t_13) != 0); __pyx_t_7 = __pyx_t_12; __pyx_L39_bool_binop_done:; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1509 + /* "_pydevd_bundle/pydevd_cython.pyx":1507 * * 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_6, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __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, 1507, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_11 = 0; @@ -27912,7 +27903,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_py_db, __pyx_v_frame}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1509, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1507, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -27920,13 +27911,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_py_db, __pyx_v_frame}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1509, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1507, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L7_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -27937,14 +27928,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_11, __pyx_v_frame); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1509, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1507, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1508 + /* "_pydevd_bundle/pydevd_cython.pyx":1506 * 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: # <<<<<<<<<<<<<< @@ -27953,19 +27944,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1514 + /* "_pydevd_bundle/pydevd_cython.pyx":1512 * # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_back_frame, __pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1515 + /* "_pydevd_bundle/pydevd_cython.pyx":1513 * # 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): # <<<<<<<<<<<<<< @@ -27995,18 +27986,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L43_bool_binop_done:; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1516 + /* "_pydevd_bundle/pydevd_cython.pyx":1514 * 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.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) * cache_skips[back_frame_cache_key] = 1 */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -28024,7 +28015,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_back_frame, __pyx_t_1, Py_False}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28033,14 +28024,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_back_frame, __pyx_t_1, Py_False}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_4 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -28054,38 +28045,38 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_11, Py_False); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1516, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1514, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1517 + /* "_pydevd_bundle/pydevd_cython.pyx":1515 * 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.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) # <<<<<<<<<<<<<< * 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L7_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); @@ -28099,7 +28090,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF_SET(__pyx_v_back_frame_cache_key, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1518 + /* "_pydevd_bundle/pydevd_cython.pyx":1516 * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): * back_frame_cache_key = (back_frame.f_code.co_firstlineno, back_frame.f_code.co_name, back_frame.f_code.co_filename) * cache_skips[back_frame_cache_key] = 1 # <<<<<<<<<<<<<< @@ -28108,11 +28099,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, 1518, __pyx_L7_error) + __PYX_ERR(0, 1516, __pyx_L7_error) } - if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1518, __pyx_L7_error) + if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, __pyx_int_1) < 0)) __PYX_ERR(0, 1516, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1520 + /* "_pydevd_bundle/pydevd_cython.pyx":1518 * 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 # <<<<<<<<<<<<<< @@ -28120,12 +28111,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_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1520, __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, 1518, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_1 = 0; @@ -28134,7 +28125,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_5 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1516 + /* "_pydevd_bundle/pydevd_cython.pyx":1514 * 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): # <<<<<<<<<<<<<< @@ -28143,7 +28134,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1515 + /* "_pydevd_bundle/pydevd_cython.pyx":1513 * # 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): # <<<<<<<<<<<<<< @@ -28153,7 +28144,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L42; } - /* "_pydevd_bundle/pydevd_cython.pyx":1523 + /* "_pydevd_bundle/pydevd_cython.pyx":1521 * 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 # <<<<<<<<<<<<<< @@ -28162,12 +28153,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*else*/ { __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, 1523, __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, 1521, __pyx_L7_error) if (__pyx_t_7) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_1 = 0; @@ -28178,7 +28169,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L42:; - /* "_pydevd_bundle/pydevd_cython.pyx":1505 + /* "_pydevd_bundle/pydevd_cython.pyx":1503 * * if py_db.is_files_filter_enabled: * if py_db.apply_files_filter(frame, filename, False): # <<<<<<<<<<<<<< @@ -28187,7 +28178,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1504 + /* "_pydevd_bundle/pydevd_cython.pyx":1502 * return None if event == 'call' else NO_FTRACE * * if py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< @@ -28196,14 +28187,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1531 + /* "_pydevd_bundle/pydevd_cython.pyx":1529 * ret = PyDBFrame( * ( * py_db, filename, additional_info, t, frame_skips_cache, frame_cache_key, # <<<<<<<<<<<<<< * ) * ).trace_dispatch(frame, event, arg) */ - __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L7_error) + __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1529, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_py_db); __Pyx_GIVEREF(__pyx_v_py_db); @@ -28224,32 +28215,32 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_GIVEREF(__pyx_v_frame_cache_key); PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_v_frame_cache_key); - /* "_pydevd_bundle/pydevd_cython.pyx":1529 + /* "_pydevd_bundle/pydevd_cython.pyx":1527 * # Just create PyDBFrame directly (removed support for Python versions < 2.5, which required keeping a weak * # reference to the frame). * ret = PyDBFrame( # <<<<<<<<<<<<<< * ( * py_db, filename, additional_info, t, frame_skips_cache, frame_cache_key, */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame), __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame), __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1533 + /* "_pydevd_bundle/pydevd_cython.pyx":1531 * py_db, filename, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_event)->tp_name), 0))) __PYX_ERR(0, 1533, __pyx_L7_error) - __pyx_t_5 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_1)->__pyx_vtab)->trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_1), __pyx_v_frame, ((PyObject*)__pyx_v_event), __pyx_v_arg, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1533, __pyx_L7_error) + if (!(likely(PyString_CheckExact(__pyx_v_event))||((__pyx_v_event) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_event)->tp_name), 0))) __PYX_ERR(0, 1531, __pyx_L7_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_1)->__pyx_vtab)->trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_1), __pyx_v_frame, ((PyObject*)__pyx_v_event), __pyx_v_arg, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ret = __pyx_t_5; __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1534 + /* "_pydevd_bundle/pydevd_cython.pyx":1532 * ) * ).trace_dispatch(frame, event, arg) * if ret is None: # <<<<<<<<<<<<<< @@ -28260,7 +28251,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_12 = (__pyx_t_7 != 0); if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1537 + /* "_pydevd_bundle/pydevd_cython.pyx":1535 * # 1 means skipped because of filters. * # 2 means skipped because no breakpoints were hit. * cache_skips[frame_cache_key] = 2 # <<<<<<<<<<<<<< @@ -28269,11 +28260,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, 1537, __pyx_L7_error) + __PYX_ERR(0, 1535, __pyx_L7_error) } - if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_2) < 0)) __PYX_ERR(0, 1537, __pyx_L7_error) + if (unlikely(PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_2) < 0)) __PYX_ERR(0, 1535, __pyx_L7_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1538 + /* "_pydevd_bundle/pydevd_cython.pyx":1536 * # 2 means skipped because no breakpoints were hit. * cache_skips[frame_cache_key] = 2 * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -28281,12 +28272,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_12 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1538, __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, 1536, __pyx_L7_error) if (__pyx_t_12) { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } else { - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_1 = 0; @@ -28295,7 +28286,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_5 = 0; goto __pyx_L11_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1534 + /* "_pydevd_bundle/pydevd_cython.pyx":1532 * ) * ).trace_dispatch(frame, event, arg) * if ret is None: # <<<<<<<<<<<<<< @@ -28304,19 +28295,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1541 + /* "_pydevd_bundle/pydevd_cython.pyx":1539 * * # 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_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1541, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1539, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_5) < 0) __PYX_ERR(0, 1541, __pyx_L7_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_5) < 0) __PYX_ERR(0, 1539, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1545 + /* "_pydevd_bundle/pydevd_cython.pyx":1543 * # frame.f_trace = ret # Make sure we keep the returned tracer. * # ENDIF * return ret # <<<<<<<<<<<<<< @@ -28328,7 +28319,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":1449 + /* "_pydevd_bundle/pydevd_cython.pyx":1447 * * additional_info.is_tracing += 1 * try: # <<<<<<<<<<<<<< @@ -28344,7 +28335,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":1547 + /* "_pydevd_bundle/pydevd_cython.pyx":1545 * return ret * * except SystemExit: # <<<<<<<<<<<<<< @@ -28354,12 +28345,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_5, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1547, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1545, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); - /* "_pydevd_bundle/pydevd_cython.pyx":1548 + /* "_pydevd_bundle/pydevd_cython.pyx":1546 * * except SystemExit: * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -28367,12 +28358,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * except Exception: */ __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, 1548, __pyx_L9_except_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, 1546, __pyx_L9_except_error) if (__pyx_t_12) { __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, 1548, __pyx_L9_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; @@ -28385,7 +28376,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L10_except_return; } - /* "_pydevd_bundle/pydevd_cython.pyx":1550 + /* "_pydevd_bundle/pydevd_cython.pyx":1548 * return None if event == 'call' else NO_FTRACE * * except Exception: # <<<<<<<<<<<<<< @@ -28395,25 +28386,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_1, &__pyx_t_5) < 0) __PYX_ERR(0, 1550, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 1548, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); - /* "_pydevd_bundle/pydevd_cython.pyx":1551 + /* "_pydevd_bundle/pydevd_cython.pyx":1549 * * 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, 1551, __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, 1549, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1551, __pyx_L9_except_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1549, __pyx_L9_except_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { - /* "_pydevd_bundle/pydevd_cython.pyx":1552 + /* "_pydevd_bundle/pydevd_cython.pyx":1550 * except Exception: * if py_db.pydb_disposed: * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. # <<<<<<<<<<<<<< @@ -28421,12 +28412,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * try: */ __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, 1552, __pyx_L9_except_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, 1550, __pyx_L9_except_error) if (__pyx_t_12) { __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, 1552, __pyx_L9_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; @@ -28438,7 +28429,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":1551 + /* "_pydevd_bundle/pydevd_cython.pyx":1549 * * except Exception: * if py_db.pydb_disposed: # <<<<<<<<<<<<<< @@ -28447,7 +28438,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1554 + /* "_pydevd_bundle/pydevd_cython.pyx":1552 * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. * # Log it * try: # <<<<<<<<<<<<<< @@ -28463,28 +28454,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1555 + /* "_pydevd_bundle/pydevd_cython.pyx":1553 * # 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, 1555, __pyx_L52_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1553, __pyx_L52_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = (__pyx_t_6 != Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (__pyx_t_12 != 0); if (__pyx_t_7) { - /* "_pydevd_bundle/pydevd_cython.pyx":1557 + /* "_pydevd_bundle/pydevd_cython.pyx":1555 * 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, 1557, __pyx_L52_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1555, __pyx_L52_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -28498,12 +28489,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1557, __pyx_L52_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1555, __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":1555 + /* "_pydevd_bundle/pydevd_cython.pyx":1553 * # Log it * try: * if pydev_log_exception is not None: # <<<<<<<<<<<<<< @@ -28512,7 +28503,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1554 + /* "_pydevd_bundle/pydevd_cython.pyx":1552 * return None if event == 'call' else NO_FTRACE # Don't log errors when we're shutting down. * # Log it * try: # <<<<<<<<<<<<<< @@ -28529,7 +28520,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":1558 + /* "_pydevd_bundle/pydevd_cython.pyx":1556 * # This can actually happen during the interpreter shutdown in Python 2.7 * pydev_log_exception() * except: # <<<<<<<<<<<<<< @@ -28548,7 +28539,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L59_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1562 + /* "_pydevd_bundle/pydevd_cython.pyx":1560 * # (https://github.com/fabioz/PyDev.Debugger/issues/8) * pass * return None if event == 'call' else NO_FTRACE # <<<<<<<<<<<<<< @@ -28556,12 +28547,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, 1562, __pyx_L9_except_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, 1560, __pyx_L9_except_error) if (__pyx_t_7) { __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, 1562, __pyx_L9_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; @@ -28576,7 +28567,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":1449 + /* "_pydevd_bundle/pydevd_cython.pyx":1447 * * additional_info.is_tracing += 1 * try: # <<<<<<<<<<<<<< @@ -28603,7 +28594,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } - /* "_pydevd_bundle/pydevd_cython.pyx":1564 + /* "_pydevd_bundle/pydevd_cython.pyx":1562 * return None if event == 'call' else NO_FTRACE * finally: * additional_info.is_tracing -= 1 # <<<<<<<<<<<<<< @@ -28658,7 +28649,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } - /* "_pydevd_bundle/pydevd_cython.pyx":1418 + /* "_pydevd_bundle/pydevd_cython.pyx":1416 * # ENDIF * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -28694,7 +28685,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1408 +/* "_pydevd_bundle/pydevd_cython.pyx":1406 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class ThreadTracer: * cdef public tuple _args; # <<<<<<<<<<<<<< @@ -28749,7 +28740,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__se __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1408, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1406, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -29086,7 +29077,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_6__set return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":1579 +/* "_pydevd_bundle/pydevd_cython.pyx":1577 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -29132,23 +29123,23 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15__call__(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 1); __PYX_ERR(0, 1579, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 1); __PYX_ERR(0, 1577, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 2); __PYX_ERR(0, 1579, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 2); __PYX_ERR(0, 1577, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 3); __PYX_ERR(0, 1579, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 3); __PYX_ERR(0, 1577, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1577, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -29165,7 +29156,7 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15__call__(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1577, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -29188,28 +29179,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__call__(CYTHON_UNU PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":1580 + /* "_pydevd_bundle/pydevd_cython.pyx":1578 * * def __call__(self, frame, event, arg): * _tid_to_last_frame[self._args[1].ident] = frame # <<<<<<<<<<<<<< * return _original_call(self, frame, event, arg) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __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, 1580, __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, 1578, __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, 1580, __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, 1578, __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, 1580, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ident); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __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, 1580, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_frame) < 0)) __PYX_ERR(0, 1578, __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":1581 + /* "_pydevd_bundle/pydevd_cython.pyx":1579 * def __call__(self, frame, event, arg): * _tid_to_last_frame[self._args[1].ident] = frame * return _original_call(self, frame, event, arg) # <<<<<<<<<<<<<< @@ -29217,7 +29208,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__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, 1581, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_original_call); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -29234,7 +29225,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__call__(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -29242,13 +29233,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__call__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1581, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -29265,7 +29256,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__call__(CYTHON_UNU __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_arg); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -29274,7 +29265,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14__call__(CYTHON_UNU __pyx_t_2 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":1579 + /* "_pydevd_bundle/pydevd_cython.pyx":1577 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -33914,17 +33905,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__26); __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 1258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 1258, __pyx_L1_error) - /* "_pydevd_bundle/pydevd_cython.pyx":1579 + /* "_pydevd_bundle/pydevd_cython.pyx":1577 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< * _tid_to_last_frame[self._args[1].ident] = frame * return _original_call(self, frame, event, arg) */ - __pyx_tuple__28 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_tuple__28 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); - __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __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_call_2, 1579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __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_call_2, 1577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 1577, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -34074,7 +34065,7 @@ static int __Pyx_modinit_type_init_code(void) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerNoBackFrame, (PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1298, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1298, __pyx_L1_error) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame; - if (PyType_Ready(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1405, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer.tp_print = 0; #endif @@ -34083,7 +34074,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1407, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1405, __pyx_L1_error) if (Py_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__; @@ -34091,8 +34082,8 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadTracer, (PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadTracer, (PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1405, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1405, __pyx_L1_error) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer; if (PyType_Ready(&__pyx_type_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct___get_func_lines) < 0) __PYX_ERR(0, 215, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -35400,75 +35391,75 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace_dispatch, __pyx_t_1) < 0) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1567 + /* "_pydevd_bundle/pydevd_cython.pyx":1565 * * * 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_1, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "_pydevd_bundle/pydevd_cython.pyx":1575 + /* "_pydevd_bundle/pydevd_cython.pyx":1573 * # * # See: https://github.com/IronLanguages/main/issues/1630 * from _pydevd_bundle.pydevd_additional_thread_info_regular import _tid_to_last_frame # <<<<<<<<<<<<<< * * _original_call = ThreadTracer.__call__ */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_tid_to_last_frame); __Pyx_GIVEREF(__pyx_n_s_tid_to_last_frame); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tid_to_last_frame); - __pyx_t_7 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_additional, __pyx_t_1, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_7 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_additional, __pyx_t_1, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_tid_to_last_frame, __pyx_t_1) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tid_to_last_frame, __pyx_t_1) < 0) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1577 + /* "_pydevd_bundle/pydevd_cython.pyx":1575 * from _pydevd_bundle.pydevd_additional_thread_info_regular import _tid_to_last_frame * * _original_call = ThreadTracer.__call__ # <<<<<<<<<<<<<< * * def __call__(self, frame, event, arg): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_original_call, __pyx_t_7) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_original_call, __pyx_t_7) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1579 + /* "_pydevd_bundle/pydevd_cython.pyx":1577 * _original_call = ThreadTracer.__call__ * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< * _tid_to_last_frame[self._args[1].ident] = frame * return _original_call(self, frame, event, arg) */ - __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15__call__, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15__call__, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_call_2, __pyx_t_7) < 0) __PYX_ERR(0, 1579, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_call_2, __pyx_t_7) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1583 + /* "_pydevd_bundle/pydevd_cython.pyx":1581 * return _original_call(self, frame, event, arg) * * ThreadTracer.__call__ = __call__ # <<<<<<<<<<<<<< */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_call_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1583, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_call_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2, __pyx_t_7) < 0) __PYX_ERR(0, 1583, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2, __pyx_t_7) < 0) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1567 + /* "_pydevd_bundle/pydevd_cython.pyx":1565 * * * if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: # <<<<<<<<<<<<<< @@ -38252,7 +38243,7 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -38356,7 +38347,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx index e02cdd5c0..91228e2c5 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx @@ -1383,8 +1383,6 @@ cdef class TopLevelThreadTracerNoBackFrame: # match the raised exception. py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) break - else: - break # exited during the except block (no exception raised) finally: # Remove reference to exception after handling it. self._last_exc_arg = None diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py index c2f8cdc83..8ca2bb5e4 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py @@ -87,6 +87,7 @@ 'pydevd_api.py': PYDEV_FILE, 'pydevd_base_schema.py': PYDEV_FILE, 'pydevd_breakpoints.py': PYDEV_FILE, + 'pydevd_code_to_source.py': PYDEV_FILE, 'pydevd_collect_bytecode_info.py': PYDEV_FILE, 'pydevd_comm.py': PYDEV_FILE, 'pydevd_comm_constants.py': PYDEV_FILE, diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py index 6b87aeba9..76fa581ac 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py @@ -24,6 +24,7 @@ from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info from _pydevd_bundle import pydevd_frame_utils from _pydev_bundle import pydev_log +import linecache class ModulesManager(object): @@ -229,10 +230,24 @@ def make_get_thread_stack_message(self, py_db, seq, thread_id, topmost_frame, fm presentation_hint = 'subtle' formatted_name = self._format_frame_name(fmt, method_name, module_name, lineno, filename_in_utf8) + source_reference = pydevd_file_utils.get_client_filename_source_reference(filename_in_utf8) + + if not source_reference: + # Check if someone added a source reference to the linecache (Python attrs does this). + if linecache.getline(original_filename, 0): + source_reference = pydevd_file_utils.create_source_reference_for_linecache( + original_filename, filename_in_utf8) + + if not source_reference: + if getattr(frame.f_code, 'co_lnotab', None): + if not os.path.exists(original_filename): + # Create a source-reference to be used where we provide the source by decompiling the code. + source_reference = pydevd_file_utils.create_source_reference_for_frame_id(frame_id) + frames.append(pydevd_schema.StackFrame( frame_id, formatted_name, lineno, column=1, source={ 'path': filename_in_utf8, - 'sourceReference': pydevd_file_utils.get_client_filename_source_reference(filename_in_utf8), + 'sourceReference': source_reference, }, presentationHint=presentation_hint).to_dict()) finally: diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py index 75f521989..d655328ea 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py @@ -17,7 +17,7 @@ CMD_THREAD_RESUME_SINGLE_NOTIFICATION, CMD_GET_NEXT_STATEMENT_TARGETS, CMD_VERSION, CMD_RETURN, CMD_SET_PROTOCOL, CMD_ERROR, MAX_IO_MSG_SIZE, VERSION_STRING, - CMD_RELOAD_CODE) + CMD_RELOAD_CODE, CMD_LOAD_SOURCE_FROM_FRAME_ID) from _pydevd_bundle.pydevd_constants import (DebugInfoHolder, get_thread_id, IS_IRONPYTHON, get_global_debugger, GetGlobalDebugger, set_global_debugger) # Keep for backward compatibility @UnusedImport from _pydevd_bundle.pydevd_net_command import NetCommand, NULL_NET_COMMAND, NULL_EXIT_COMMAND @@ -407,7 +407,10 @@ def make_custom_operation_message(self, seq, payload): return self.make_error_message(seq, get_exception_traceback_str()) def make_load_source_message(self, seq, source): - return NetCommand(CMD_LOAD_SOURCE, seq, '%s' % source) + return NetCommand(CMD_LOAD_SOURCE, seq, source) + + def make_load_source_from_frame_id_message(self, seq, source): + return NetCommand(CMD_LOAD_SOURCE_FROM_FRAME_ID, seq, source) def make_show_console_message(self, py_db, thread_id, frame): try: diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py index fc5c1f2be..5db4a4bc7 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py @@ -399,6 +399,10 @@ def _load_source(self, py_db, cmd_id, seq, text): cmd_load_source = _load_source cmd_get_file_contents = _load_source + def cmd_load_source_from_frame_id(self, py_db, cmd_id, seq, text): + frame_id = text + self.api.request_load_source_from_frame_id(py_db, seq, frame_id) + def cmd_set_property_trace(self, py_db, cmd_id, seq, text): # Command which receives whether to trace property getter/setter/deleter # text is feature_state(true/false);disable_getter/disable_setter/disable_deleter diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py index 86348c33a..a5714e736 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py @@ -877,6 +877,9 @@ def on_source_request(self, py_db, request): if source_reference != 0: server_filename = pydevd_file_utils.get_server_filename_from_source_reference(source_reference) + if not server_filename: + server_filename = pydevd_file_utils.get_source_reference_filename_from_linecache(source_reference) + if server_filename: # Try direct file access first - it's much faster when available. try: @@ -896,6 +899,16 @@ def on_source_request(self, py_db, request): # reported as error below, and not as an empty file. content = ''.join(lines) or None + if content is None: + frame_id = pydevd_file_utils.get_frame_id_from_source_reference(source_reference) + pydev_log.debug('Found frame id: %s for source reference: %s', frame_id, source_reference) + if frame_id is not None: + try: + content = self.api.get_decompiled_source_from_frame_id(py_db, frame_id) + except Exception: + pydev_log.exception('Error getting source for frame id: %s', frame_id) + content = None + body = SourceResponseBody(content or '') response_args = {'body': body} diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py index f61fcab12..a1734f227 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py @@ -1,7 +1,6 @@ from contextlib import contextmanager import sys -from _pydev_imps._pydev_saved_modules import threading from _pydevd_bundle.pydevd_constants import get_frame, dict_items, RETURN_VALUES_DICT, \ dict_iter_items, ForkSafeLock from _pydevd_bundle.pydevd_xml import get_variable_details, get_type diff --git a/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c b/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c index c32ec125d..ad9bcedb0 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c +++ b/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.15 */ +/* Generated by Cython 0.29.16 */ /* BEGIN: Cython Metadata { @@ -25,8 +25,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_15" -#define CYTHON_HEX_VERSION 0x001D0FF0 +#define CYTHON_ABI "0_29_16" +#define CYTHON_HEX_VERSION 0x001D10F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -502,8 +502,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -11577,7 +11579,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -11681,7 +11683,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } diff --git a/src/debugpy/_vendored/pydevd/pydevd_file_utils.py b/src/debugpy/_vendored/pydevd/pydevd_file_utils.py index c28e3990c..4afeb7e3c 100644 --- a/src/debugpy/_vendored/pydevd/pydevd_file_utils.py +++ b/src/debugpy/_vendored/pydevd/pydevd_file_utils.py @@ -550,7 +550,9 @@ def _fix_path(path, sep): _last_client_server_paths_set = [] +_source_reference_to_frame_id = {} _source_reference_to_server_filename = {} +_line_cache_source_reference_to_server_filename = {} _client_filename_in_utf8_to_source_reference = {} _next_source_reference = partial(next, itertools.count(1)) @@ -563,6 +565,26 @@ def get_server_filename_from_source_reference(source_reference): return _source_reference_to_server_filename.get(source_reference, '') +def create_source_reference_for_linecache(server_filename): + source_reference = _next_source_reference() + _line_cache_source_reference_to_server_filename[source_reference] = server_filename + return source_reference + + +def get_source_reference_filename_from_linecache(source_reference): + return _line_cache_source_reference_to_server_filename.get(source_reference) + + +def create_source_reference_for_frame_id(frame_id): + source_reference = _next_source_reference() + _source_reference_to_frame_id[source_reference] = frame_id + return source_reference + + +def get_frame_id_from_source_reference(source_reference): + return _source_reference_to_frame_id.get(source_reference) + + def setup_client_server_paths(paths): '''paths is the same format as PATHS_FROM_ECLIPSE_TO_PYTHON''' diff --git a/src/debugpy/_vendored/pydevd/tests_python/debugger_unittest.py b/src/debugpy/_vendored/pydevd/tests_python/debugger_unittest.py index cdd6a6f2a..b562de9cb 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/debugger_unittest.py +++ b/src/debugpy/_vendored/pydevd/tests_python/debugger_unittest.py @@ -1259,6 +1259,11 @@ def write_load_source(self, filename): self.log.append('write_load_source') self.write("%s\t%s\t%s" % (CMD_LOAD_SOURCE, self.next_seq(), filename,)) + def write_load_source_from_frame_id(self, frame_id): + from _pydevd_bundle.pydevd_comm_constants import CMD_LOAD_SOURCE_FROM_FRAME_ID + self.log.append('write_load_source_from_frame_id') + self.write("%s\t%s\t%s" % (CMD_LOAD_SOURCE_FROM_FRAME_ID, self.next_seq(), frame_id,)) + def write_kill_thread(self, thread_id): self.write("%s\t%s\t%s" % (CMD_THREAD_KILL, self.next_seq(), thread_id,)) diff --git a/src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_linecache.py b/src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_linecache.py new file mode 100644 index 000000000..e02d01ab6 --- /dev/null +++ b/src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_linecache.py @@ -0,0 +1,26 @@ +import linecache + +unique_filename = "" + + +def foo(): + print("on foo") # breakpoint + + +script = """ +def somemethod(): + foo() +somemethod() +[x for x in range(10)] +""" + +linecache.cache[unique_filename] = ( + len(script), + None, + script.splitlines(True), + unique_filename, +) + +obj = compile(script, unique_filename, "exec") +exec(obj) +print('TEST SUCEEDED') diff --git a/src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_show_bytecode.py b/src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_show_bytecode.py new file mode 100644 index 000000000..137382274 --- /dev/null +++ b/src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_show_bytecode.py @@ -0,0 +1,25 @@ +def foo(): + return 1 # breakpoint + + +def main(): + + code = ''' + +class MyClass(object): + def method(self): + if True: + foo() + +MyClass().method() +''' + + co = compile(code, '', 'exec') + + # Intermediate stack frame will have source. + eval(co) + + +if __name__ == '__main__': + main() + print('TEST SUCEEDED!') diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_code_obj_to_source_code.py b/src/debugpy/_vendored/pydevd/tests_python/test_code_obj_to_source_code.py new file mode 100644 index 000000000..8e8665728 --- /dev/null +++ b/src/debugpy/_vendored/pydevd/tests_python/test_code_obj_to_source_code.py @@ -0,0 +1,99 @@ +from _pydevd_bundle.pydevd_code_to_source import code_obj_to_source +import pytest +from tests_python.debug_constants import IS_PY26 + +# i.e.: Skip these tests (this is a work in progress / proof of concept / not ready to be used). +pytestmark = pytest.mark.skip + +if IS_PY26: # pytestmark not available in older versions of pytest. + pytest.skip('Work in progress') + + +def check(obtained, expected, strip_return_none=True): + keepends = False + obtained_lines = list(obtained.rstrip().splitlines(keepends)) + if strip_return_none: + obtained_lines = [x.replace('return None', '') for x in obtained_lines] + + expected_lines = list(expected.rstrip().splitlines(keepends)) + + assert obtained_lines == expected_lines + + +def test_code_obj_to_source_make_class_and_func(): + code = ''' +class MyClass(object, other_class): + def my_func(self): + print(self) +''' + expected = ''' +__module__=__name____qualname__=MyClassMyClass=(def MyClass():MyClass,object,other_class,) + def MyClass.my_func(self): + print(self) +''' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, expected) + + +def test_code_obj_to_source_lambda(): + code = 'my_func = lambda arg: (2,)' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, 'my_func=(arg):return return (2,)None') + + +def test_code_obj_to_source_make_func(): + code = ''' + +def my_func(arg1, arg2=2, arg3=3): + some_call(arg1) +''' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, code) + + +def test_code_obj_to_source_call_func(): + code = 'a=call1(call2(arg1))' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, code) + + +def test_for_list_comp(): + code = '[x for x in range(10)]' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, code) + + +def test_code_obj_to_source_for(): + code = 'for i in range(10):\n print(i)' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, code) + + +def test_code_obj_to_source_call_func2(): + code = '''a=call1( +call2( +arg1)) +''' + + co = compile(code, '', 'exec') + + contents = code_obj_to_source(co) + check(contents, code) diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_collect_bytecode_info.py b/src/debugpy/_vendored/pydevd/tests_python/test_collect_bytecode_info.py index 10d363653..0c379a6f6 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/test_collect_bytecode_info.py +++ b/src/debugpy/_vendored/pydevd/tests_python/test_collect_bytecode_info.py @@ -1,10 +1,11 @@ +# coding: utf-8 from io import StringIO import os.path import sys import traceback from _pydevd_bundle.pydevd_collect_bytecode_info import collect_try_except_info, \ - collect_return_info, uncompyle + collect_return_info, code_to_bytecode_representation from tests_python.debugger_unittest import IS_CPYTHON, IS_PYPY from tests_python.debug_constants import IS_PY2 from _pydevd_bundle.pydevd_constants import IS_PY38_OR_GREATER, IS_JYTHON @@ -368,7 +369,7 @@ def method(): @pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') -def test_uncompyle(): +def test_simple_code_to_bytecode_repr(): def method4(): return (1, @@ -376,11 +377,33 @@ def method4(): 3, call('tnh %s' % 1)) - assert uncompyle(method4.__code__, use_func_first_line=True).count('\n') == 4 + assert code_to_bytecode_representation(method4.__code__, use_func_first_line=True).count('\n') == 4 @pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') -def test_uncompyle2(): +def test_simple_code_to_bytecode_repr_many(): + + def method4(): + a = call() + if a == 20: + [x for x in call()] + + def method2(): + for x in y: + yield x + raise AssertionError + + return (1, + 2, + 3, + call('tnh 1' % 1)) + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + # print(new_repr) + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr2(): def method(): print(10) @@ -393,11 +416,110 @@ def method4(a, b): print(20) - s = uncompyle(method.__code__, use_func_first_line=True) - assert s.count('\n') == 9 + s = code_to_bytecode_representation(method.__code__, use_func_first_line=True) + assert s.count('\n') == 9, 'Expected 9 lines. Found: %s in:>>\n%s\n<<' % (s.count('\n'), s) assert 'somestr' in s # i.e.: the contents of the inner code have been added too +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_simple_method_calls(): + + def method4(): + call() + a = 10 + call(1, 2, 3, a, b, "x") + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'call()' in new_repr + assert 'call(1, 2, 3, a, b, \'x\')' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_assign(): + + def method4(): + a = call() + return call() + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'a = call()' in new_repr + assert 'return call()' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_tuple(): + + def method4(): + return (1, 2, call(3, 4)) + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'return (1, 2, call(3, 4))' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_build_tuple(): + + def method4(): + return call(1, (call2(), 2)) + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'return call(1, (call2(), 2))' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_return_tuple(): + + def method4(): + return (1, 2, 3, a) + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'return (1, 2, 3, a)' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_return_tuple_with_call(): + + def method4(): + return (1, 2, 3, a()) + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'return (1, 2, 3, a())' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_attr(): + + def method4(): + call(a.b.c) + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'call(a.b.c)' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_cls_method(): + + def method4(): + + class B: + + def method(self): + self.a.b.c + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert 'self.a.b.c' in new_repr + + +@pytest.mark.skipif(IS_JYTHON, reason='Jython does not have bytecode support.') +def test_simple_code_to_bytecode_repr_unicode(): + + def method4(): + return 'αινσϊ' + + new_repr = code_to_bytecode_representation(method4.__code__, use_func_first_line=True) + assert repr('αινσϊ') in new_repr + + def _create_entry(instruction): argval = instruction.argval return dict( diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py b/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py index e94ddd8f4..d178c234e 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py +++ b/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py @@ -2065,6 +2065,74 @@ def get_environ(writer): writer.finished_ok = True +@pytest.mark.skipif(not IS_CPYTHON, reason='CPython only test.') +def test_linecache_xml(case_setup, tmpdir): + from _pydevd_bundle.pydevd_comm_constants import CMD_LOAD_SOURCE_FROM_FRAME_ID + + with case_setup.test_file('_debugger_case_linecache.py') as writer: + writer.write_add_breakpoint(writer.get_line_index_with_content('breakpoint')) + writer.write_make_initial_run() + + # First hit is for breakpoint reached via a stack frame that doesn't have source. + hit = writer.wait_for_breakpoint_hit() + + writer.write_get_thread_stack(hit.thread_id) + msg = writer.wait_for_get_thread_stack_message() + frame_ids = set() + for frame in msg.thread.frame: + if frame['file'] == '': + frame_ids.add(frame['id']) + + assert len(frame_ids) == 2 + + for frame_id in frame_ids: + writer.write_load_source_from_frame_id(frame_id) + writer.wait_for_message( + lambda msg: + '%s\t' % CMD_LOAD_SOURCE_FROM_FRAME_ID in msg and ( + "[x for x in range(10)]" in msg and "def somemethod():" in msg + ) + , expect_xml=False) + + writer.write_run_thread(hit.thread_id) + + writer.finished_ok = True + + +@pytest.mark.skipif(not IS_CPYTHON, reason='CPython only test.') +def test_show_bytecode_xml(case_setup, tmpdir): + from _pydevd_bundle.pydevd_comm_constants import CMD_LOAD_SOURCE_FROM_FRAME_ID + + with case_setup.test_file('_debugger_case_show_bytecode.py') as writer: + writer.write_add_breakpoint(writer.get_line_index_with_content('breakpoint')) + writer.write_make_initial_run() + + # First hit is for breakpoint reached via a stack frame that doesn't have source. + hit = writer.wait_for_breakpoint_hit() + + writer.write_get_thread_stack(hit.thread_id) + msg = writer.wait_for_get_thread_stack_message() + frame_ids = set() + for frame in msg.thread.frame: + if frame['file'] == '': + frame_ids.add(frame['id']) + + assert len(frame_ids) == 2 + + for frame_id in frame_ids: + writer.write_load_source_from_frame_id(frame_id) + writer.wait_for_message( + lambda msg: + '%s\t' % CMD_LOAD_SOURCE_FROM_FRAME_ID in msg and ( + "MyClass" in msg or "foo()" in msg + ) + , expect_xml=False) + + writer.write_run_thread(hit.thread_id) + + writer.finished_ok = True + + def test_evaluate_errors(case_setup): with case_setup.test_file('_debugger_case_local_variables.py') as writer: writer.write_add_breakpoint(writer.get_line_index_with_content('Break here'), 'Call') diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py b/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py index 38a921610..533a192fd 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py +++ b/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py @@ -444,6 +444,12 @@ def write_terminate(self): # Note: this currently terminates promptly, so, no answer is given. self.write_request(TerminateRequest(arguments=TerminateArguments())) + def write_get_source(self, source_reference, success=True): + response = self.wait_for_response(self.write_request( + pydevd_schema.SourceRequest(pydevd_schema.SourceArguments(source_reference)))) + assert response.success == success + return response + def test_case_json_logpoints(case_setup): with case_setup.test_file('_debugger_case_change_breaks.py') as writer: @@ -3016,8 +3022,7 @@ def get_environ(writer): source_reference = stack_frame_not_path_translated['source']['sourceReference'] assert source_reference != 0 # Not translated - response = json_facade.wait_for_response(json_facade.write_request( - pydevd_schema.SourceRequest(pydevd_schema.SourceArguments(source_reference)))) + response = json_facade.write_get_source(source_reference) assert "def call_me_back1(callback):" in response.body.content json_facade.write_continue() @@ -3056,9 +3061,7 @@ def test_source_reference_no_file(case_setup, tmpdir): source_reference = stack_frame['source']['sourceReference'] assert source_reference != 0 - response = json_facade.wait_for_response(json_facade.write_request( - pydevd_schema.SourceRequest(pydevd_schema.SourceArguments(source_reference)))) - assert not response.success + json_facade.write_get_source(source_reference, success=False) json_facade.write_continue() @@ -3079,15 +3082,81 @@ def test_source_reference_no_file(case_setup, tmpdir): source_reference = stack_frame['source']['sourceReference'] assert source_reference != 0 - response = json_facade.wait_for_response(json_facade.write_request( - pydevd_schema.SourceRequest(pydevd_schema.SourceArguments(source_reference)))) - assert response.success + response = json_facade.write_get_source(source_reference) assert response.body.content == 'foo()\n' json_facade.write_continue() writer.finished_ok = True +@pytest.mark.skipif(not IS_CPYTHON, reason='CPython only test.') +def test_linecache_json(case_setup, tmpdir): + + with case_setup.test_file('_debugger_case_linecache.py') as writer: + json_facade = JsonFacade(writer) + + json_facade.write_launch(justMyCode=False) + + writer.write_add_breakpoint(writer.get_line_index_with_content('breakpoint')) + json_facade.write_make_initial_run() + + # First hit is for breakpoint reached via a stack frame that doesn't have source. + + json_hit = json_facade.wait_for_thread_stopped() + stack_trace_response_body = json_hit.stack_trace_response.body + source_references = [] + for stack_frame in stack_trace_response_body.stackFrames: + if stack_frame['source']['path'] == '': + source_reference = stack_frame['source']['sourceReference'] + assert source_reference != 0 + source_references.append(source_reference) + + # Each frame gets its own source reference. + assert len(set(source_references)) == 2 + + for source_reference in source_references: + response = json_facade.write_get_source(source_reference) + assert 'def somemethod():' in response.body.content + assert ' foo()' in response.body.content + assert '[x for x in range(10)]' in response.body.content + + json_facade.write_continue() + writer.finished_ok = True + + +@pytest.mark.skipif(not IS_CPYTHON, reason='CPython only test.') +def test_show_bytecode_json(case_setup, tmpdir): + + with case_setup.test_file('_debugger_case_show_bytecode.py') as writer: + json_facade = JsonFacade(writer) + + json_facade.write_launch(justMyCode=False) + + writer.write_add_breakpoint(writer.get_line_index_with_content('breakpoint')) + json_facade.write_make_initial_run() + + # First hit is for breakpoint reached via a stack frame that doesn't have source. + + json_hit = json_facade.wait_for_thread_stopped() + stack_trace_response_body = json_hit.stack_trace_response.body + source_references = [] + for stack_frame in stack_trace_response_body.stackFrames: + if stack_frame['source']['path'] == '': + source_reference = stack_frame['source']['sourceReference'] + assert source_reference != 0 + source_references.append(source_reference) + + # Each frame gets its own source reference. + assert len(set(source_references)) == 2 + + for source_reference in source_references: + response = json_facade.write_get_source(source_reference) + assert 'MyClass' in response.body.content or 'foo()' in response.body.content + + json_facade.write_continue() + writer.finished_ok = True + + @pytest.mark.skipif(not TEST_DJANGO, reason='No django available') @pytest.mark.parametrize("jmc", [False, True]) def test_case_django_no_attribute_exception_breakpoint(case_setup_django, jmc):