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

Method dispatch_call

Lib/bdb.py:315–341  ·  view source on GitHub ↗

Invoke user function and return trace function for call event. If the debugger stops on this function call, invoke self.user_call(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope.

(self, frame, arg)

Source from the content-addressed store, hash-verified

313 return self.trace_dispatch
314
315 def dispatch_call(self, frame, arg):
316 """Invoke user function and return trace function for call event.
317
318 If the debugger stops on this function call, invoke
319 self.user_call(). Raise BdbQuit if self.quitting is set.
320 Return self.trace_dispatch to continue tracing in this scope.
321 """
322 # XXX 'arg' is no longer used
323 if self.botframe is None:
324 # First call of dispatch since reset()
325 self.botframe = frame.f_back # (CT) Note that this may also be None!
326 return self.trace_dispatch
327 if not (self.stop_here(frame) or self.break_anywhere(frame)):
328 # We already know there's no breakpoint in this function
329 # If it's a next/until/return command, we don't need any CALL event
330 # and we don't need to set the f_trace on any new frame.
331 # If it's a step command, it must either hit stop_here, or skip the
332 # whole module. Either way, we don't need the CALL event here.
333 self.disable_current_event()
334 return # None
335 # Ignore call events in generator except when stepping.
336 if self.stopframe and frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS:
337 return self.trace_dispatch
338 self.user_call(frame, arg)
339 self.restart_events()
340 if self.quitting: raise BdbQuit
341 return self.trace_dispatch
342
343 def dispatch_return(self, frame, arg):
344 """Invoke user function and return trace function for return event.

Callers 1

trace_dispatchMethod · 0.95

Calls 5

stop_hereMethod · 0.95
break_anywhereMethod · 0.95
disable_current_eventMethod · 0.95
user_callMethod · 0.95
restart_eventsMethod · 0.95

Tested by

no test coverage detected