gets the valid line numbers for use with set next statement
(dbg, seq, thread_id, frame_id)
| 1127 | |
| 1128 | |
| 1129 | def internal_get_next_statement_targets(dbg, seq, thread_id, frame_id): |
| 1130 | """gets the valid line numbers for use with set next statement""" |
| 1131 | try: |
| 1132 | frame = dbg.find_frame(thread_id, frame_id) |
| 1133 | if frame is not None: |
| 1134 | code = frame.f_code |
| 1135 | xml = "<xml>" |
| 1136 | try: |
| 1137 | linestarts = dis.findlinestarts(code) |
| 1138 | except: |
| 1139 | # i.e.: jython doesn't provide co_lnotab, so, we can only keep at the current line. |
| 1140 | xml += "<line>%d</line>" % (frame.f_lineno,) |
| 1141 | else: |
| 1142 | for _, line in linestarts: |
| 1143 | if line is not None: |
| 1144 | xml += "<line>%d</line>" % (line,) |
| 1145 | del frame |
| 1146 | xml += "</xml>" |
| 1147 | cmd = dbg.cmd_factory.make_get_next_statement_targets_message(seq, xml) |
| 1148 | dbg.writer.add_command(cmd) |
| 1149 | else: |
| 1150 | cmd = dbg.cmd_factory.make_error_message(seq, "Frame not found: %s from thread: %s" % (frame_id, thread_id)) |
| 1151 | dbg.writer.add_command(cmd) |
| 1152 | except: |
| 1153 | cmd = dbg.cmd_factory.make_error_message(seq, "Error resolving frame: %s from thread: %s" % (frame_id, thread_id)) |
| 1154 | dbg.writer.add_command(cmd) |
| 1155 | |
| 1156 | |
| 1157 | def _evaluate_response(py_db, request, result, error_message=""): |
nothing calls this directly
no test coverage detected