This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 5/6] gdb: mark remote_async_get_pending_events_token in non-stop mode
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 24 Sep 2012 09:38:42 +0800
- Subject: [PATCH 5/6] gdb: mark remote_async_get_pending_events_token in non-stop mode
- References: <1348450723-4341-1-git-send-email-yao@codesourcery.com>
Hi,
remote_async_get_pending_events_token is added for supporting non-stop
mode in remote target. As we generalizing notification to support
both non-stop and all-stop, we have to do a check on 'non_stop' and
only call mark_async_event_handler in non-stop mode.
gdb:
2012-09-23 Yao Qi <yao@codesourcery.com>
* remote-notif.c (remote_async_get_pending_events_handler):
Assert tat 'non_stop' is true.
(handle_notification): Call mark_async_event_handler only
if 'non_stop' is true.
---
gdb/remote-notif.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c
index 6bc804d..ff22d1e 100644
--- a/gdb/remote-notif.c
+++ b/gdb/remote-notif.c
@@ -113,6 +113,7 @@ remote_notif_process (struct notif *except)
static void
remote_async_get_pending_events_handler (gdb_client_data data)
{
+ gdb_assert (non_stop);
remote_notif_process (NULL);
}
@@ -182,7 +183,8 @@ handle_notification (char *buf)
/* Notify the event loop there's a stop reply to acknowledge
and that there may be more events to fetch. */
QUEUE_enque (notif_p, notif_queue, np);
- mark_async_event_handler (remote_async_get_pending_events_token);
+ if (non_stop)
+ mark_async_event_handler (remote_async_get_pending_events_token);
DEBUG_NOTIF ("Notification '%s' captured", np->name);
}
--
1.7.7.6