()
| 212 | check_error_msg(msg.replace(">", ">")) |
| 213 | |
| 214 | def wait_for_suspend(): |
| 215 | def accept_message(msg): |
| 216 | if msg.startswith("%s\t" % CMD_GET_BREAKPOINT_EXCEPTION) or ('stop_reason="%s"' % REASON_STOP_ON_BREAKPOINT) in msg: |
| 217 | return True |
| 218 | return False |
| 219 | |
| 220 | # Order is not guaranteed. |
| 221 | msg1 = writer.wait_for_message(accept_message) |
| 222 | msg2 = writer.wait_for_message(accept_message) |
| 223 | try: |
| 224 | hitmsg = msg1 |
| 225 | msg1.thread["stop_reason"] |
| 226 | except: |
| 227 | hitmsg = msg2 |
| 228 | hit = writer._get_stack_as_hit(hitmsg) |
| 229 | writer.write_run_thread(hit.thread_id) |
| 230 | |
| 231 | if expect_suspend: |
| 232 | wait_for_suspend() |
no test coverage detected