From 02aae27f008dec343962f5e97a307abbf625d9d7 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 28 Jun 2021 14:05:54 +0100 Subject: [PATCH] stop_all_threads: (re-)enable async before waiting for stops Running the gdb.threads/interrupt-while-step-over.exp testcase added later in the series against gdbserver, after the TARGET_WAITKIND_NO_RESUMED fix from the following patch would run into an infinite loop in stop_all_threads. I added a hacky gdb_assert to catch the loop, and it looked like this: [infrun] stop_all_threads: Thread 3492141.3492141 not executing [infrun] stop_all_threads: Thread 3492141.3492716 not executing [infrun] stop_all_threads: Thread 3492141.3492717 not executing [infrun] stop_all_threads: Thread 3492141.3492718 not executing [infrun] stop_all_threads: Thread 3492141.3492719 not executing [infrun] stop_all_threads: Thread 3492141.3492720 executing, need stop [remote] stop: enter [remote] remote_stop_ns: Enqueueing phony stop reply for thread pending vCont-resume (3492141, 3492720, 0) [remote] stop: exit [infrun] stop_all_threads: Thread 3492141.3492721 not executing [infrun] stop_all_threads: Thread 3492141.3492722 not executing [infrun] stop_all_threads: Thread 3492141.3492723 not executing [infrun] stop_all_threads: Thread 3492141.3492724 not executing [infrun] stop_all_threads: Thread 3492141.3492725 not executing [infrun] stop_all_threads: Thread 3492141.3492726 not executing [infrun] stop_all_threads: Thread 3492141.3492727 not executing [infrun] stop_all_threads: Thread 3492141.3492728 not executing [infrun] stop_all_threads: Thread 3492141.3492729 not executing [infrun] stop_all_threads: Thread 3492141.3492730 not executing [infrun] stop_all_threads: Thread 3492141.3492731 not executing [infrun] stop_all_threads: Thread 3492141.3492732 not executing [infrun] stop_all_threads: Thread 3492141.3492733 not executing [infrun] stop_all_threads: Thread 3492141.3492734 not executing [infrun] stop_all_threads: Thread 3492141.3492735 not executing [remote] wait: enter [remote] wait: exit [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) = [infrun] print_target_wait_results: -1.0.0 [process -1], [infrun] print_target_wait_results: status->kind = no-resumed [infrun] infrun_async: enable=0 [infrun] handle_one: status->kind = no-resumed process -1 [remote] Sending packet: $qXfer:threads:read::0,1000#92 [remote] Packet received: l\n\n\n\n\n\n