564 frame.f_globals.get('__file__'), |
564 frame.f_globals.get('__file__'), |
565 frame.f_code.co_firstlineno] = False |
565 frame.f_code.co_firstlineno] = False |
566 return False |
566 return False |
567 lineNo = frame.f_code.co_firstlineno |
567 lineNo = frame.f_code.co_firstlineno |
568 lineNumbers = [lineNo] |
568 lineNumbers = [lineNo] |
|
569 |
|
570 if sys.version_info[0] == 2: |
|
571 co_lnotab = map(ord, frame.f_code.co_lnotab[1::2]) |
|
572 else: |
|
573 co_lnotab = frame.f_code.co_lnotab[1::2] |
|
574 |
569 # No need to handle special case if a lot of lines between |
575 # No need to handle special case if a lot of lines between |
570 # (e.g. closure), because the additional lines won't cause a bp |
576 # (e.g. closure), because the additional lines won't cause a bp |
571 for co_lno in frame.f_code.co_lnotab[1::2]: |
577 for co_lno in co_lnotab: |
572 lineNo += co_lno |
578 lineNo += co_lno |
573 lineNumbers.append(lineNo) |
579 lineNumbers.append(lineNo) |
574 |
|
575 if sys.version_info[0] == 2: |
|
576 lineNo = map(ord, lineNo) |
|
577 |
580 |
578 for bp in Breakpoint.breakInFile[filename]: |
581 for bp in Breakpoint.breakInFile[filename]: |
579 if bp in lineNumbers: |
582 if bp in lineNumbers: |
580 Breakpoint.breakInFrameCache[ |
583 Breakpoint.breakInFrameCache[ |
581 frame.f_globals.get('__file__'), |
584 frame.f_globals.get('__file__'), |