From c39ebbf43faa932a6860fd9c3607503641659898 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 22 Apr 2021 17:01:00 +0200 Subject: [gdb] Fix assert in remote_async_get_pending_events_handler Occassionally I run into the following assert: ... (gdb) PASS: gdb.multi/multi-target-continue.exp: inferior 5 Remote debugging from host ::1, port 49990^M Process multi-target-continue created; pid = 31241^M src/gdb/remote-notif.c:113: internal-error: \ void remote_async_get_pending_events_handler(gdb_client_data): \ Assertion `target_is_non_stop_p ()' failed.^M ... The assert checks target_is_non_stop_p, which is related to the current target. Fix this by changing the assert such that it checks non-stopness related to the event it's handling. Tested on x86_64-linux. gdb/ChangeLog: 2021-04-22 Simon Marchi Tom de Vries PR remote/27710 * remote.c (remote_target_is_non_stop_p): New function. * remote.h (remote_target_is_non_stop_p): Declare. * remote-notif.c (remote_async_get_pending_events_handler): Fix assert to check non-stopness using notif_state->remote rather current target. --- gdb/remote.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/remote.h') diff --git a/gdb/remote.h b/gdb/remote.h index 18352dd..46bfa01 100644 --- a/gdb/remote.h +++ b/gdb/remote.h @@ -77,4 +77,5 @@ extern int remote_register_number_and_offset (struct gdbarch *gdbarch, extern void remote_notif_get_pending_events (remote_target *remote, struct notif_client *np); +extern bool remote_target_is_non_stop_p (remote_target *t); #endif -- cgit v1.1