MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / setup

Method setup

tools/python-3.11.9-amd64/Lib/pdb.py:283–304  ·  view source on GitHub ↗
(self, f, tb)

Source from the content-addressed store, hash-verified

281 self.tb_lineno.clear()
282
283 def setup(self, f, tb):
284 self.forget()
285 self.stack, self.curindex = self.get_stack(f, tb)
286 while tb:
287 # when setting up post-mortem debugging with a traceback, save all
288 # the original line numbers to be displayed along the current line
289 # numbers (which can be different, e.g. due to finally clauses)
290 lineno = lasti2lineno(tb.tb_frame.f_code, tb.tb_lasti)
291 self.tb_lineno[tb.tb_frame] = lineno
292 tb = tb.tb_next
293 self.curframe = self.stack[self.curindex][0]
294 # The f_locals dictionary is updated from the actual frame
295 # locals whenever the .f_locals accessor is called, so we
296 # cache it here to ensure that modifications are not overwritten.
297 self.curframe_locals = self.curframe.f_locals
298
299 if self.rcLines:
300 self.cmdqueue = [
301 line for line in self.rcLines
302 if line.strip() and not line.strip().startswith("#")
303 ]
304 self.rcLines = []
305
306 # Override Bdb methods
307

Callers 2

bp_commandsMethod · 0.95
interactionMethod · 0.95

Calls 5

forgetMethod · 0.95
lasti2linenoFunction · 0.85
stripMethod · 0.80
startswithMethod · 0.80
get_stackMethod · 0.45

Tested by

no test coverage detected