| 77 | _bdb.Breakpoint.clearBreakpoints() |
| 78 | |
| 79 | def info_breakpoints(): |
| 80 | bp_list = [bp for bp in _bdb.Breakpoint.bpbynumber if bp] |
| 81 | if not bp_list: |
| 82 | return '' |
| 83 | |
| 84 | header_added = False |
| 85 | for bp in bp_list: |
| 86 | if not header_added: |
| 87 | info = 'BpNum Temp Enb Hits Ignore Where\n' |
| 88 | header_added = True |
| 89 | |
| 90 | disp = 'yes ' if bp.temporary else 'no ' |
| 91 | enab = 'yes' if bp.enabled else 'no ' |
| 92 | info += ('%-5d %s %s %-4d %-6d at %s:%d' % |
| 93 | (bp.number, disp, enab, bp.hits, bp.ignore, |
| 94 | os.path.basename(bp.file), bp.line)) |
| 95 | if bp.cond: |
| 96 | info += '\n\tstop only if %s' % (bp.cond,) |
| 97 | info += '\n' |
| 98 | return info |
| 99 | |
| 100 | class Bdb(_bdb.Bdb): |
| 101 | """Extend Bdb to enhance test coverage.""" |