DebugClients/Python/DebugBase.py

changeset 2620
a3be952f2ae4
parent 2302
f29e9405c851
child 2622
08cc2f31c983
equal deleted inserted replaced
2617:5719edfddb4c 2620:a3be952f2ae4
528 """ 528 """
529 fr = self.cFrame 529 fr = self.cFrame
530 stack = [] 530 stack = []
531 while fr is not None: 531 while fr is not None:
532 fname = self._dbgClient.absPath(self.fix_frame_filename(fr)) 532 fname = self._dbgClient.absPath(self.fix_frame_filename(fr))
533 fline = fr.f_lineno 533 if not fname.startswith("<"):
534 ffunc = fr.f_code.co_name 534 fline = fr.f_lineno
535 535 ffunc = fr.f_code.co_name
536 if ffunc == '?': 536
537 ffunc = '' 537 if ffunc == '?':
538 538 ffunc = ''
539 stack.append([fname, fline, ffunc]) 539
540 if ffunc and not ffunc.startswith("<"):
541 argInfo = inspect.getargvalues(fr)
542 fargs = inspect.formatargvalues(argInfo[0], argInfo[1],
543 argInfo[2], argInfo[3])
544 else:
545 fargs = ""
546
547 stack.append([fname, fline, ffunc, fargs])
540 548
541 if fr == self._dbgClient.mainFrame: 549 if fr == self._dbgClient.mainFrame:
542 fr = None 550 fr = None
543 else: 551 else:
544 fr = fr.f_back 552 fr = fr.f_back
577 # problems where an exception/breakpoint has occurred 585 # problems where an exception/breakpoint has occurred
578 # but we had disabled tracing along the way via a None 586 # but we had disabled tracing along the way via a None
579 # return from dispatch_call 587 # return from dispatch_call
580 fr.f_trace = self.trace_dispatch 588 fr.f_trace = self.trace_dispatch
581 fname = self._dbgClient.absPath(self.fix_frame_filename(fr)) 589 fname = self._dbgClient.absPath(self.fix_frame_filename(fr))
582 fline = fr.f_lineno 590 if not fname.startswith("<"):
583 ffunc = fr.f_code.co_name 591 fline = fr.f_lineno
584 592 ffunc = fr.f_code.co_name
585 if ffunc == '?': 593
586 ffunc = '' 594 if ffunc == '?':
587 595 ffunc = ''
588 stack.append([fname, fline, ffunc]) 596
597 if ffunc and not ffunc.startswith("<"):
598 argInfo = inspect.getargvalues(fr)
599 fargs = inspect.formatargvalues(argInfo[0], argInfo[1],
600 argInfo[2], argInfo[3])
601 else:
602 fargs = ""
603
604 stack.append([fname, fline, ffunc, fargs])
589 605
590 if fr == self._dbgClient.mainFrame: 606 if fr == self._dbgClient.mainFrame:
591 fr = None 607 fr = None
592 else: 608 else:
593 fr = fr.f_back 609 fr = fr.f_back

eric ide

mercurial